OpenVDB
2.0.0
|
Classes | |
class | Archive |
Grid serializer/unserializer. More... | |
struct | RealToHalf |
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 |
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 |
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... | |
class | File |
Grid archive associated with a file on disk. More... | |
class | GridDescriptor |
class | Stream |
Grid archive associated with arbitrary input and output streams (not necessarily files) More... | |
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_IMPORT uint32_t | getFormatVersion (std::istream &) |
Return the file format version number associated with the given input stream. More... | |
OPENVDB_IMPORT VersionId | getLibraryVersion (std::istream &) |
Return the (major, minor) library version number associated with the given input stream. More... | |
OPENVDB_IMPORT std::string | getVersion (std::istream &) |
Return a string of the form "<major>.<minor>/<format>", giving the library and file format version numbers associated with the given input stream. More... | |
OPENVDB_IMPORT void | setCurrentVersion (std::istream &) |
Associate the current file format and library version numbers with the given input stream. More... | |
OPENVDB_IMPORT void | setVersion (std::ios_base &, const VersionId &libraryVersion, uint32_t fileVersion) |
Associate specific file format and library version numbers with the given stream. More... | |
OPENVDB_IMPORT uint32_t | getDataCompression (std::ios_base &) |
Return a bitwise OR of compression option flags (COMPRESS_ZIP, COMPRESS_ACTIVE_MASK, etc.) specifying whether and how input data is compressed or output data should be compressed. More... | |
OPENVDB_IMPORT void | setDataCompression (std::ios_base &, uint32_t compressionFlags) |
Associate with the given stream a bitwise OR of compression option flags (COMPRESS_ZIP, COMPRESS_ACTIVE_MASK, etc.) specifying whether and how input data is compressed or output data should be compressed. More... | |
OPENVDB_IMPORT uint32_t | getGridClass (std::ios_base &) |
Return the class (GRID_LEVEL_SET, GRID_UNKNOWN, etc.) of the grid currently being read from or written to the given stream. More... | |
OPENVDB_IMPORT void | setGridClass (std::ios_base &, uint32_t) |
Associate with the given stream the class (GRID_LEVEL_SET, GRID_UNKNOWN, etc.) of the grid currently being read or written. More... | |
OPENVDB_IMPORT const void * | getGridBackgroundValuePtr (std::ios_base &) |
Return a pointer to the background value of the grid currently being read from or written to the given stream. More... | |
OPENVDB_IMPORT void | setGridBackgroundValuePtr (std::ios_base &, const void *background) |
Specify (a pointer to) the background value of the grid currently being read from or written to the given stream. More... | |
OPENVDB_API bool | getWriteGridStatsMetadata (std::ostream &) |
OPENVDB_API std::string | compressionToString (uint32_t flags) |
Return a string describing the given compression flags. More... | |
template<typename T > | |
T | truncateRealToHalf (const T &val) |
Return the given value truncated to 16-bit float precision. More... | |
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. More... | |
template<> | |
void | readData< std::string > (std::istream &is, std::string *data, Index count, bool) |
Specialization for std::string input. More... | |
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) |
anonymous enum |
OR-able bit flags for compression options on input and output streams.
COMPRESS_NONE
On write, don't compress data.
On read, the input stream contains uncompressed data.
COMPRESS_ZIP
When writing grids other than level sets or fog volumes, apply ZIP compression to internal and leaf node value buffers.
On read of grids other than level sets or fog volumes, the value buffers of internal and leaf nodes are ZIP-compressed.
COMPRESS_ACTIVE_MASK
Enumerator | |
---|---|
COMPRESS_NONE | |
COMPRESS_ZIP | |
COMPRESS_ACTIVE_MASK |
anonymous enum |
OPENVDB_API std::string openvdb::v2_0_0::io::compressionToString | ( | uint32_t | flags | ) |
Return a string describing the given compression flags.
OPENVDB_API uint32_t getDataCompression | ( | std::ios_base & | ) |
Return a bitwise OR of compression option flags (COMPRESS_ZIP, COMPRESS_ACTIVE_MASK, etc.) specifying whether and how input data is compressed or output data should be compressed.
OPENVDB_API uint32_t getFormatVersion | ( | std::istream & | ) |
Return the file format version number associated with the given input stream.
Return the file format version number associated with the given input stream.
OPENVDB_API const void * getGridBackgroundValuePtr | ( | std::ios_base & | ) |
Return a pointer to the background value of the grid currently being read from or written to the given stream.
OPENVDB_API uint32_t getGridClass | ( | std::ios_base & | ) |
Return the class (GRID_LEVEL_SET, GRID_UNKNOWN, etc.) of the grid currently being read from or written to the given stream.
OPENVDB_API VersionId getLibraryVersion | ( | std::istream & | ) |
Return the (major, minor) library version number associated with the given input stream.
Return the library version number associated with the given input stream.
OPENVDB_API std::string getVersion | ( | std::istream & | ) |
Return a string of the form "<major>.<minor>/<format>", giving the library and file format version numbers associated with the given input stream.
Return a string of the form "<major>.<minor>/<format>", giving the library and file format version numbers associated with the given input stream.
OPENVDB_API bool openvdb::v2_0_0::io::getWriteGridStatsMetadata | ( | std::ostream & | ) |
Return true
if grid statistics (active voxel count and bounding box, etc.) should be computed and stored as grid metadata on output to the given stream.
|
inline |
Populate the given buffer with destCount values of type ValueT
read from the given stream, taking into account that the stream might have been compressed via one of several supported schemes. [Mainly for internal use]
is | a stream from which to read data (possibly compressed, depending on the stream's compression settings) |
destBuf | a buffer into which to read values of type ValueT |
destCount | the number of values to be stored in the buffer |
valueMask | a bitmask (typically, a node's value mask) indicating which positions in the buffer correspond to active values |
fromHalf | if true, read 16-bit half floats from the input stream and convert them to full floats |
|
inline |
Read data from a stream.
is | the input stream |
data | the contiguous array of data to read in |
count | the number of elements to read in |
compressed | if true , assume the data is ZIP compressed and uncompress it This default implementation is instantiated only for types whose size can be determined by the sizeof() operator. |
|
inline |
Specialization for std::string input.
OPENVDB_API void setCurrentVersion | ( | std::istream & | ) |
Associate the current file format and library version numbers with the given input stream.
OPENVDB_API void setDataCompression | ( | std::ios_base & | , |
uint32_t | compressionFlags | ||
) |
Associate with the given stream a bitwise OR of compression option flags (COMPRESS_ZIP, COMPRESS_ACTIVE_MASK, etc.) specifying whether and how input data is compressed or output data should be compressed.
OPENVDB_API void setGridBackgroundValuePtr | ( | std::ios_base & | , |
const void * | background | ||
) |
Specify (a pointer to) the background value of the grid currently being read from or written to the given stream.
OPENVDB_API void setGridClass | ( | std::ios_base & | , |
uint32_t | |||
) |
Associate with the given stream the class (GRID_LEVEL_SET, GRID_UNKNOWN, etc.) of the grid currently being read or written.
OPENVDB_API void setVersion | ( | std::ios_base & | , |
const VersionId & | libraryVersion, | ||
uint32_t | fileVersion | ||
) |
Associate specific file format and library version numbers with the given stream.
This is typically called immediately after reading a header that contains the version numbers. Data read subsequently can then be interpreted appropriately.
|
inline |
Return the given value truncated to 16-bit float precision.
OPENVDB_API void openvdb::v2_0_0::io::unzipFromStream | ( | std::istream & | , |
char * | data, | ||
size_t | numBytes | ||
) |
|
inline |
Write srcCount values of type ValueT
to the given stream, optionally after compressing the values via one of several supported schemes. [Mainly for internal use]
os | a stream to which to write data (possibly compressed, depending on the stream's compression settings) |
srcBuf | a buffer containing values of type ValueT to be written |
srcCount | the number of values stored in the buffer |
valueMask | a bitmask (typically, a node's value mask) indicating which positions in the buffer correspond to active values |
childMask | a bitmask (typically, a node's child mask) indicating which positions in the buffer correspond to child node pointers |
toHalf | if true, convert floating-point values to 16-bit half floats |
|
inline |
Write data to a stream.
os | the output stream |
data | the contiguous array of data to write |
count | the number of elements to write out |
compress | if true , apply ZIP compression to the data This default implementation is instantiated only for types whose size can be determined by the sizeof() operator. |
|
inline |
Specialization for std::string output
OPENVDB_API void openvdb::v2_0_0::io::zipToStream | ( | std::ostream & | , |
const char * | data, | ||
size_t | numBytes | ||
) |