OpenVDB
11.0.0
|
#include <openvdb/io/GridDescriptor.h>
Public Member Functions | |
GridDescriptor () | |
GridDescriptor (const Name &name, const Name &gridType, bool saveFloatAsHalf=false) | |
GridDescriptor (const GridDescriptor &)=default | |
GridDescriptor & | operator= (const GridDescriptor &)=default |
~GridDescriptor () | |
const Name & | gridType () const |
const Name & | gridName () const |
const Name & | uniqueName () const |
const Name & | instanceParentName () const |
void | setInstanceParentName (const Name &name) |
bool | isInstance () const |
bool | saveFloatAsHalf () const |
void | setGridPos (int64_t pos) |
int64_t | getGridPos () const |
void | setBlockPos (int64_t pos) |
int64_t | getBlockPos () const |
void | setEndPos (int64_t pos) |
int64_t | getEndPos () const |
void | seekToGrid (std::istream &) const |
void | seekToBlocks (std::istream &) const |
void | seekToEnd (std::istream &) const |
void | seekToGrid (std::ostream &) const |
void | seekToBlocks (std::ostream &) const |
void | seekToEnd (std::ostream &) const |
void | writeHeader (std::ostream &) const |
Write out this descriptor's header information (all data except for stream offsets). More... | |
void | writeStreamPos (std::ostream &) const |
Since positions into the stream are known at a later time, they are written out separately. More... | |
GridBase::Ptr | read (std::istream &) |
Read a grid descriptor from the given stream. More... | |
Static Public Member Functions | |
static Name | addSuffix (const Name &, int n) |
Append the number n to the given name (separated by an ASCII "record separator" character) and return the resulting name. More... | |
static Name | stripSuffix (const Name &) |
Strip from the given name any suffix that is separated by an ASCII "record separator" character and return the resulting name. More... | |
static std::string | nameAsString (const Name &) |
Given a name with suffix N, return "name[N]", otherwise just return "name". Use this to produce a human-readable string from a descriptor's unique name. More... | |
static Name | stringAsUniqueName (const std::string &) |
Given a string of the form "name[N]", return "name" with the suffix N separated by an ASCII "record separator" character). Otherwise just return the string as is. More... | |
This structure stores useful information that describes a grid on disk. It can be used to retrieve I/O information about the grid such as offsets into the file where the grid is located, its type, etc.
GridDescriptor | ( | ) |
GridDescriptor | ( | const Name & | name, |
const Name & | gridType, | ||
bool | saveFloatAsHalf = false |
||
) |
|
default |
~GridDescriptor | ( | ) |
Append the number n to the given name (separated by an ASCII "record separator" character) and return the resulting name.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
static |
Given a name with suffix N, return "name[N]", otherwise just return "name". Use this to produce a human-readable string from a descriptor's unique name.
|
default |
GridBase::Ptr read | ( | std::istream & | ) |
Read a grid descriptor from the given stream.
|
inline |
void seekToBlocks | ( | std::istream & | ) | const |
void seekToBlocks | ( | std::ostream & | ) | const |
void seekToEnd | ( | std::istream & | ) | const |
void seekToEnd | ( | std::ostream & | ) | const |
void seekToGrid | ( | std::istream & | ) | const |
void seekToGrid | ( | std::ostream & | ) | const |
|
inline |
|
inline |
|
inline |
|
inline |
|
static |
Given a string of the form "name[N]", return "name" with the suffix N separated by an ASCII "record separator" character). Otherwise just return the string as is.
Strip from the given name any suffix that is separated by an ASCII "record separator" character and return the resulting name.
|
inline |
void writeHeader | ( | std::ostream & | ) | const |
Write out this descriptor's header information (all data except for stream offsets).
void writeStreamPos | ( | std::ostream & | ) | const |
Since positions into the stream are known at a later time, they are written out separately.