OpenVDB
1.2.0
|
Base class for typed trees. More...
#include <Tree.h>
Inherited by Tree< _RootNodeType >.
Public Types | |
typedef boost::shared_ptr < TreeBase > | Ptr |
typedef boost::shared_ptr < const TreeBase > | ConstPtr |
Public Member Functions | |
TreeBase () | |
virtual | ~TreeBase () |
virtual const Name & | type () const =0 |
Return the name of this tree's type. More... | |
virtual Name | valueType () const =0 |
Return the name of the type of a voxel's value (e.g., "float" or "vec3d"). More... | |
virtual TreeBase::Ptr | copy () const =0 |
Return a pointer to a deep copy of this tree. More... | |
virtual Metadata::Ptr | getBackgroundValue () const |
Return this tree's background value wrapped as metadata. More... | |
virtual bool | evalLeafBoundingBox (CoordBBox &bbox) const =0 |
Return in bbox the axis-aligned bounding box of all leaf nodes. More... | |
virtual bool | evalLeafDim (Coord &dim) const =0 |
Return in dim the dimensions of the axis-aligned bounding box of all leaf nodes. More... | |
virtual bool | evalActiveVoxelBoundingBox (CoordBBox &bbox) const =0 |
Return in bbox the axis-aligned bounding box of all active voxels and tiles. This is a tighter bounding box than the leaf node bounding box. More... | |
virtual bool | evalActiveVoxelDim (Coord &dim) const =0 |
Return in dim the dimensions of the axis-aligned bounding box of all active voxels. This is a tighter bounding box than the leaf node bounding box. More... | |
virtual void | getIndexRange (CoordBBox &bbox) const =0 |
virtual Index | treeDepth () const =0 |
Return the depth of this tree. More... | |
virtual Index32 | leafCount () const =0 |
Return the number of leaf nodes. More... | |
virtual Index32 | nonLeafCount () const =0 |
Return the number of non-leaf nodes. More... | |
virtual Index64 | activeLeafVoxelCount () const =0 |
Return the number of active voxels stored in leaf nodes. More... | |
virtual Index64 | inactiveLeafVoxelCount () const =0 |
Return the number of inactive voxels stored in leaf nodes. More... | |
virtual Index64 | activeVoxelCount () const =0 |
Return the total number of active voxels. More... | |
virtual Index64 | inactiveVoxelCount () const =0 |
Return the number of inactive voxels within the bounding box of all active voxels. More... | |
virtual Index64 | memUsage () const |
Return the total amount of memory in bytes occupied by this tree. More... | |
virtual void | readTopology (std::istream &, bool saveFloatAsHalf=false) |
Read the tree topology from a stream. More... | |
virtual void | writeTopology (std::ostream &, bool saveFloatAsHalf=false) const |
Write the tree topology to a stream. More... | |
virtual void | readBuffers (std::istream &, bool saveFloatAsHalf=false)=0 |
Read all data buffers for this tree. More... | |
virtual void | writeBuffers (std::ostream &, bool saveFloatAsHalf=false) const =0 |
Write out all the data buffers for this tree. More... | |
virtual void | print (std::ostream &os=std::cout, int verboseLevel=1) const |
Print statistics, memory usage and other information about this tree. More... | |
Base class for typed trees.
|
inline |
|
inlinevirtual |
|
pure virtual |
Return the number of active voxels stored in leaf nodes.
Implemented in Tree< _RootNodeType >.
|
pure virtual |
Return the total number of active voxels.
Implemented in Tree< _RootNodeType >.
|
pure virtual |
Return a pointer to a deep copy of this tree.
Implemented in Tree< _RootNodeType >.
|
pure virtual |
Return in bbox the axis-aligned bounding box of all active voxels and tiles. This is a tighter bounding box than the leaf node bounding box.
false
if the bounding box is empty (in which case the bbox is set to its default value). Implemented in Tree< _RootNodeType >.
|
pure virtual |
Return in dim the dimensions of the axis-aligned bounding box of all active voxels. This is a tighter bounding box than the leaf node bounding box.
false
if the bounding box is empty. Implemented in Tree< _RootNodeType >.
|
pure virtual |
Return in bbox the axis-aligned bounding box of all leaf nodes.
false
if the bounding box is empty (in which case the bbox is set to its default value). Implemented in Tree< _RootNodeType >.
|
pure virtual |
Return in dim the dimensions of the axis-aligned bounding box of all leaf nodes.
false
if the bounding box is empty. Implemented in Tree< _RootNodeType >.
|
inlinevirtual |
Return this tree's background value wrapped as metadata.
Reimplemented in Tree< _RootNodeType >.
|
pure virtual |
Implemented in Tree< _RootNodeType >.
|
pure virtual |
Return the number of inactive voxels stored in leaf nodes.
Implemented in Tree< _RootNodeType >.
|
pure virtual |
Return the number of inactive voxels within the bounding box of all active voxels.
Implemented in Tree< _RootNodeType >.
|
pure virtual |
Return the number of leaf nodes.
Implemented in Tree< _RootNodeType >.
|
inlinevirtual |
Return the total amount of memory in bytes occupied by this tree.
Reimplemented in Tree< _RootNodeType >.
|
pure virtual |
Return the number of non-leaf nodes.
Implemented in Tree< _RootNodeType >.
|
inlinevirtual |
Print statistics, memory usage and other information about this tree.
os | a stream to which to write textual information |
verboseLevel | 1: print tree configuration only; 2: include node and voxel statistics; 3: include memory usage |
Reimplemented in Tree< _RootNodeType >.
|
pure virtual |
Read all data buffers for this tree.
Implemented in Tree< _RootNodeType >.
|
inlinevirtual |
Read the tree topology from a stream.
This will read the tree structure and tile values, but not voxel data.
Reimplemented in Tree< _RootNodeType >.
|
pure virtual |
Return the depth of this tree.
A tree with only a root node and leaf nodes has depth 2, for example.
Implemented in Tree< _RootNodeType >.
|
pure virtual |
Return the name of this tree's type.
Implemented in Tree< _RootNodeType >.
|
pure virtual |
Return the name of the type of a voxel's value (e.g., "float" or "vec3d").
Implemented in Tree< _RootNodeType >.
|
pure virtual |
Write out all the data buffers for this tree.
Implemented in Tree< _RootNodeType >.
|
inlinevirtual |
Write the tree topology to a stream.
This will write the tree structure and tile values, but not voxel data.
Reimplemented in Tree< _RootNodeType >.