HDK
|
#include <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.
Definition at line 19 of file GridDescriptor.h.
openvdb::OPENVDB_VERSION_NAME::io::GridDescriptor::GridDescriptor | ( | ) |
openvdb::OPENVDB_VERSION_NAME::io::GridDescriptor::GridDescriptor | ( | const Name & | name, |
const Name & | gridType, | ||
bool | saveFloatAsHalf = false |
||
) |
|
default |
openvdb::OPENVDB_VERSION_NAME::io::GridDescriptor::~GridDescriptor | ( | ) |
|
static |
Append the number n to the given name (separated by an ASCII "record separator" character) and return the resulting name.
|
inline |
Definition at line 42 of file GridDescriptor.h.
|
inline |
Definition at line 45 of file GridDescriptor.h.
|
inline |
Definition at line 39 of file GridDescriptor.h.
|
inline |
Definition at line 29 of file GridDescriptor.h.
|
inline |
Definition at line 28 of file GridDescriptor.h.
|
inline |
Definition at line 32 of file GridDescriptor.h.
|
inline |
Definition at line 34 of file GridDescriptor.h.
|
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 openvdb::OPENVDB_VERSION_NAME::io::GridDescriptor::read | ( | std::istream & | ) |
Read a grid descriptor from the given stream.
|
inline |
Definition at line 36 of file GridDescriptor.h.
void openvdb::OPENVDB_VERSION_NAME::io::GridDescriptor::seekToBlocks | ( | std::istream & | ) | const |
void openvdb::OPENVDB_VERSION_NAME::io::GridDescriptor::seekToBlocks | ( | std::ostream & | ) | const |
void openvdb::OPENVDB_VERSION_NAME::io::GridDescriptor::seekToEnd | ( | std::istream & | ) | const |
void openvdb::OPENVDB_VERSION_NAME::io::GridDescriptor::seekToEnd | ( | std::ostream & | ) | const |
void openvdb::OPENVDB_VERSION_NAME::io::GridDescriptor::seekToGrid | ( | std::istream & | ) | const |
void openvdb::OPENVDB_VERSION_NAME::io::GridDescriptor::seekToGrid | ( | std::ostream & | ) | const |
|
inline |
Definition at line 41 of file GridDescriptor.h.
|
inline |
Definition at line 44 of file GridDescriptor.h.
|
inline |
Definition at line 38 of file GridDescriptor.h.
|
inline |
Definition at line 33 of file GridDescriptor.h.
|
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 |
Definition at line 30 of file GridDescriptor.h.
void openvdb::OPENVDB_VERSION_NAME::io::GridDescriptor::writeHeader | ( | std::ostream & | ) | const |
Write out this descriptor's header information (all data except for stream offsets).
void openvdb::OPENVDB_VERSION_NAME::io::GridDescriptor::writeStreamPos | ( | std::ostream & | ) | const |
Since positions into the stream are known at a later time, they are written out separately.