OpenVDB  1.1.0
Classes | Namespaces | Enumerations | Functions
Compression.h File Reference
#include <openvdb/Types.h>
#include <openvdb/math/Math.h>
#include <boost/scoped_array.hpp>
#include <algorithm>
#include <iostream>
#include <string>
#include <vector>

Go to the source code of this file.

Classes

struct  RealToHalf< T >
 RealToHalf and its specializations define a mapping from floating-point data types to analogous half float types. More...
struct  RealToHalf< float >
struct  RealToHalf< double >
struct  RealToHalf< Vec2s >
struct  RealToHalf< Vec2d >
struct  RealToHalf< Vec3s >
struct  RealToHalf< Vec3d >
struct  HalfReader< false, T >
 Partial specialization for non-floating-point types (no half to float promotion) More...
struct  HalfReader< true, T >
 Partial specialization for floating-point types. More...
struct  HalfWriter< false, T >
 Partial specialization for non-floating-point types (no float to half quantization) More...
struct  HalfWriter< true, T >
 Partial specialization for floating-point types. More...

Namespaces

namespace  openvdb
namespace  openvdb::v1_1_0
namespace  openvdb::v1_1_0::io

Enumerations

enum  { COMPRESS_NONE = 0, COMPRESS_ZIP = 0x1, COMPRESS_ACTIVE_MASK = 0x2 }
 OR-able bit flags for compression options on input and output streams. More...
enum  {
  NO_MASK_OR_INACTIVE_VALS, NO_MASK_AND_MINUS_BG, NO_MASK_AND_ONE_INACTIVE_VAL, MASK_AND_NO_INACTIVE_VALS,
  MASK_AND_ONE_INACTIVE_VAL, MASK_AND_TWO_INACTIVE_VALS
}

Functions

OPENVDB_API std::string compressionToString (uint32_t flags)
 Return a string describing the given compression flags.
template<typename T >
truncateRealToHalf (const T &val)
 Return the given value truncated to 16-bit float precision.
OPENVDB_API void zipToStream (std::ostream &, const char *data, size_t numBytes)
OPENVDB_API void unzipFromStream (std::istream &, char *data, size_t numBytes)
template<typename T >
void readData (std::istream &is, T *data, Index count, bool compressed)
 Read data from a stream.
template<>
void readData< std::string > (std::istream &is, std::string *data, Index count, bool)
 Specialization for std::string input.
template<typename T >
void writeData (std::ostream &os, const T *data, Index count, bool compress)
template<>
void writeData< std::string > (std::ostream &os, const std::string *data, Index count, bool)
template<typename ValueT , typename MaskT >
void readCompressedValues (std::istream &is, ValueT *destBuf, Index destCount, const MaskT &valueMask, bool fromHalf)
template<typename ValueT , typename MaskT >
void writeCompressedValues (std::ostream &os, ValueT *srcBuf, Index srcCount, const MaskT &valueMask, const MaskT &childMask, bool toHalf)