Go to the documentation of this file.
31 #ifndef OPENVDB_IO_GRIDDESCRIPTOR_HAS_BEEN_INCLUDED
32 #define OPENVDB_IO_GRIDDESCRIPTOR_HAS_BEEN_INCLUDED
34 #include <openvdb/Grid.h>
61 bool isInstance()
const {
return !mInstanceParentName.empty(); }
115 Name mInstanceParentName;
119 bool mSaveFloatAsHalf;
132 #endif // OPENVDB_IO_GRIDDESCRIPTOR_HAS_BEEN_INCLUDED
void setEndPos(int64_t pos)
Definition: GridDescriptor.h:71
GridBase::Ptr read(std::istream &)
Read a grid descriptor from the given stream.
bool isInstance() const
Definition: GridDescriptor.h:61
int64_t getGridPos() const
Definition: GridDescriptor.h:66
void writeStreamPos(std::ostream &) const
Since positions into the stream are known at a later time, they are written out separately.
const Name & uniqueName() const
Definition: GridDescriptor.h:57
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 s...
void seekToGrid(std::ostream &) const
static std::string nameAsString(const Name &)
Given a name with suffix N, return "name[N]", otherwise just return "name". Use this to produce a hum...
const Name & instanceParentName() const
Definition: GridDescriptor.h:59
const Name & gridType() const
Definition: GridDescriptor.h:55
int64_t getEndPos() const
Definition: GridDescriptor.h:72
void seekToEnd(std::ostream &) const
int64_t getBlockPos() const
Definition: GridDescriptor.h:69
void writeHeader(std::ostream &) const
Write out this descriptor's header information (all data except for stream offsets).
const Name & gridName() const
Definition: GridDescriptor.h:56
void setGridPos(int64_t pos)
Definition: GridDescriptor.h:65
void setInstanceParentName(const Name &name)
Definition: GridDescriptor.h:60
void seekToBlocks(std::ostream &) const
#define OPENVDB_USE_VERSION_NAMESPACE
Definition: version.h:188
void seekToGrid(std::istream &) const
#define OPENVDB_VERSION_NAME
The version namespace name for this library version.
Definition: version.h:136
std::string Name
Definition: Name.h:44
void seekToBlocks(std::istream &) const
static Name stripSuffix(const Name &)
Strip from the given name any suffix that is separated by an ASCII "record separator" character and r...
Definition: GridDescriptor.h:47
SharedPtr< GridBase > Ptr
Definition: Grid.h:107
bool saveFloatAsHalf() const
Definition: GridDescriptor.h:63
Definition: Exceptions.h:40
GridDescriptor(const GridDescriptor &)=default
void setBlockPos(int64_t pos)
Definition: GridDescriptor.h:68
static Name addSuffix(const Name &, int n)
Append the number n to the given name (separated by an ASCII "record separator" character) and return...
GridDescriptor & operator=(const GridDescriptor &)=default
GridDescriptor(const Name &name, const Name &gridType, bool saveFloatAsHalf=false)
void seekToEnd(std::istream &) const