|
| Grid () |
| Construct a new grid with background value zero. More...
|
|
| Grid (const ValueType &background) |
| Construct a new grid with the given background value. More...
|
|
| Grid (TreePtrType) |
| Construct a new grid that shares the given tree and associates with it an identity linear transform. More...
|
|
| Grid (const Grid &) |
| Deep copy another grid's metadata, transform and tree. More...
|
|
template<typename OtherTreeType > |
| Grid (const Grid< OtherTreeType > &) |
| Deep copy the metadata, transform and tree of another grid whose tree configuration is the same as this grid's but whose value type is different. Cast the other grid's values to this grid's value type. More...
|
|
| Grid (Grid &, ShallowCopy) |
| Deep copy another grid's metadata and transform, but share its tree. More...
|
|
| Grid (const GridBase &) |
| Deep copy another grid's metadata and transform, but construct a new tree with background value zero. More...
|
|
| ~Grid () override |
|
Grid & | operator= (const Grid &)=delete |
| Disallow assignment, since it wouldn't be obvious whether the copy is deep or shallow. More...
|
|
Name | type () const override |
| Return the name of this grid's type. More...
|
|
Name | valueType () const override |
| Return the name of the type of a voxel's value (e.g., "float" or "vec3d"). More...
|
|
bool | isTreeUnique () const final |
| Return true if tree is not shared with another grid. More...
|
|
|
Ptr | copy () |
| Return a new grid of the same type as this grid whose metadata and transform are deep copies of this grid's and whose tree is shared with this grid. More...
|
|
ConstPtr | copy () const |
| Return a new grid of the same type as this grid whose metadata and transform are deep copies of this grid's and whose tree is shared with this grid. More...
|
|
Ptr | copyWithNewTree () const |
| Return a new grid of the same type as this grid whose metadata and transform are deep copies of this grid's and whose tree is default-constructed. More...
|
|
GridBase::Ptr | copyGrid () override |
| Return a new grid of the same type as this grid whose metadata is a deep copy of this grid's and whose tree and transform are shared with this grid. More...
|
|
GridBase::ConstPtr | copyGrid () const override |
| Return a new grid of the same type as this grid whose metadata is a deep copy of this grid's and whose tree and transform are shared with this grid. More...
|
|
GridBase::Ptr | copyGridWithNewTree () const override |
| Return a new grid of the same type as this grid whose metadata and transform are deep copies of this grid's and whose tree is default-constructed. More...
|
|
ConstPtr | copyReplacingMetadata (const MetaMap &meta) const |
| Return a new grid of the same type as this grid whose tree and transform is shared with this grid and whose metadata is provided as an argument. More...
|
|
ConstPtr | copyReplacingTransform (math::Transform::Ptr xform) const |
| Return a new grid of the same type as this grid whose tree is shared with this grid, whose metadata is a deep copy of this grid's and whose transform is provided as an argument. More...
|
|
ConstPtr | copyReplacingMetadataAndTransform (const MetaMap &meta, math::Transform::Ptr xform) const |
| Return a new grid of the same type as this grid whose tree is shared with this grid and whose transform and metadata are provided as arguments. More...
|
|
GridBase::ConstPtr | copyGridReplacingMetadata (const MetaMap &meta) const override |
| Return a new grid of the same type as this grid whose tree and transform is shared with this grid and whose metadata is provided as an argument. More...
|
|
GridBase::ConstPtr | copyGridReplacingTransform (math::Transform::Ptr xform) const override |
| Return a new grid of the same type as this grid whose tree is shared with this grid, whose metadata is a deep copy of this grid's and whose transform is provided as an argument. More...
|
|
GridBase::ConstPtr | copyGridReplacingMetadataAndTransform (const MetaMap &meta, math::Transform::Ptr xform) const override |
| Return a new grid of the same type as this grid whose tree is shared with this grid and whose transform and metadata are provided as arguments. More...
|
|
Ptr | deepCopy () const |
| Return a new grid whose metadata, transform and tree are deep copies of this grid's. More...
|
|
GridBase::Ptr | deepCopyGrid () const override |
| Return a new grid whose metadata, transform and tree are deep copies of this grid's. More...
|
|
|
const ValueType & | background () const |
| Return this grid's background value. More...
|
|
bool | empty () const override |
| Return true if this grid contains only inactive background voxels. More...
|
|
void | clear () override |
| Empty this grid, so that all voxels become inactive background voxels. More...
|
|
Accessor | getAccessor () |
| Return an accessor that provides random read and write access to this grid's voxels. More...
|
|
UnsafeAccessor | getUnsafeAccessor () |
| Return an unsafe accessor that provides random read and write access to this grid's voxels. More...
|
|
ConstAccessor | getAccessor () const |
| Return an accessor that provides random read-only access to this grid's voxels. More...
|
|
ConstAccessor | getConstAccessor () const |
| Return an accessor that provides random read-only access to this grid's voxels. More...
|
|
ConstUnsafeAccessor | getConstUnsafeAccessor () const |
| Return an unsafe accessor that provides random read-only access to this grid's voxels. More...
|
|
ValueOnIter | beginValueOn () |
| Return an iterator over all of this grid's active values (tile and voxel). More...
|
|
ValueOnCIter | beginValueOn () const |
| Return an iterator over all of this grid's active values (tile and voxel). More...
|
|
ValueOnCIter | cbeginValueOn () const |
| Return an iterator over all of this grid's active values (tile and voxel). More...
|
|
ValueOffIter | beginValueOff () |
| Return an iterator over all of this grid's inactive values (tile and voxel). More...
|
|
ValueOffCIter | beginValueOff () const |
| Return an iterator over all of this grid's inactive values (tile and voxel). More...
|
|
ValueOffCIter | cbeginValueOff () const |
| Return an iterator over all of this grid's inactive values (tile and voxel). More...
|
|
ValueAllIter | beginValueAll () |
| Return an iterator over all of this grid's values (tile and voxel). More...
|
|
ValueAllCIter | beginValueAll () const |
| Return an iterator over all of this grid's values (tile and voxel). More...
|
|
ValueAllCIter | cbeginValueAll () const |
| Return an iterator over all of this grid's values (tile and voxel). More...
|
|
|
void | sparseFill (const CoordBBox &bbox, const ValueType &value, bool active=true) |
| Set all voxels within a given axis-aligned box to a constant value. More...
|
|
void | fill (const CoordBBox &bbox, const ValueType &value, bool active=true) |
| Set all voxels within a given axis-aligned box to a constant value. More...
|
|
void | denseFill (const CoordBBox &bbox, const ValueType &value, bool active=true) |
| Set all voxels within a given axis-aligned box to a constant value and ensure that those voxels are all represented at the leaf level. More...
|
|
void | pruneGrid (float tolerance=0.0) override |
| Reduce the memory footprint of this grid by increasing its sparseness. More...
|
|
void | clip (const CoordBBox &) override |
| Clip this grid to the given index-space bounding box. More...
|
|
void | merge (Grid &other, MergePolicy policy=MERGE_ACTIVE_STATES) |
| Efficiently merge another grid into this grid using one of several schemes. More...
|
|
template<typename OtherTreeType > |
void | topologyUnion (const Grid< OtherTreeType > &other) |
| Union this grid's set of active values with the active values of the other grid, whose value type may be different. More...
|
|
template<typename OtherTreeType > |
void | topologyIntersection (const Grid< OtherTreeType > &other) |
| Intersect this grid's set of active values with the active values of the other grid, whose value type may be different. More...
|
|
template<typename OtherTreeType > |
void | topologyDifference (const Grid< OtherTreeType > &other) |
| Difference this grid's set of active values with the active values of the other grid, whose value type may be different. More...
|
|
|
Index64 | activeVoxelCount () const override |
| Return the number of active voxels. More...
|
|
CoordBBox | evalActiveVoxelBoundingBox () const override |
| Return the axis-aligned bounding box of all active voxels. More...
|
|
Coord | evalActiveVoxelDim () const override |
| Return the dimensions of the axis-aligned bounding box of all active voxels. More...
|
|
void | evalMinMax (ValueType &minVal, ValueType &maxVal) const |
| Return the minimum and maximum active values in this grid. More...
|
|
Index64 | memUsage () const override |
|
|
TreePtrType | treePtr () |
| Return a pointer to this grid's tree, which might be shared with other grids. The pointer is guaranteed to be non-null. More...
|
|
ConstTreePtrType | treePtr () const |
| Return a pointer to this grid's tree, which might be shared with other grids. The pointer is guaranteed to be non-null. More...
|
|
ConstTreePtrType | constTreePtr () const |
| Return a pointer to this grid's tree, which might be shared with other grids. The pointer is guaranteed to be non-null. More...
|
|
TreeBase::ConstPtr | constBaseTreePtr () const override |
| Return a pointer to this grid's tree, which might be shared with other grids. The pointer is guaranteed to be non-null. More...
|
|
void | setTree (TreeBase::Ptr) override |
| Associate the given tree with this grid, in place of its existing tree. More...
|
|
void | newTree () override |
| Associate a new, empty tree with this grid, in place of its existing tree. More...
|
|
|
TreeType & | tree () |
| Return a reference to this grid's tree, which might be shared with other grids. More...
|
|
const TreeType & | tree () const |
| Return a reference to this grid's tree, which might be shared with other grids. More...
|
|
const TreeType & | constTree () const |
| Return a reference to this grid's tree, which might be shared with other grids. More...
|
|
|
void | readTopology (std::istream &) override |
| Read the grid topology from a stream. This will read only the grid structure, not the actual data buffers. More...
|
|
void | writeTopology (std::ostream &) const override |
| Write the grid topology to a stream. This will write only the grid structure, not the actual data buffers. More...
|
|
void | readBuffers (std::istream &) override |
| Read all data buffers for this grid. More...
|
|
void | readBuffers (std::istream &, const CoordBBox &) override |
| Read all of this grid's data buffers that intersect the given index-space bounding box. More...
|
|
void | readNonresidentBuffers () const override |
| Read all of this grid's data buffers that are not yet resident in memory (because delayed loading is in effect). More...
|
|
void | writeBuffers (std::ostream &) const override |
| Write out all data buffers for this grid. More...
|
|
void | print (std::ostream &=std::cout, int verboseLevel=1) const override |
| Output a human-readable description of this grid. More...
|
|
| ~GridBase () override |
|
template<typename GridType > |
bool | isType () const |
| Return true if this grid is of the same type as the template parameter. More...
|
|
TreeBase::Ptr | baseTreePtr () |
| Return a pointer to this grid's tree, which might be shared with other grids. The pointer is guaranteed to be non-null. More...
|
|
TreeBase::ConstPtr | baseTreePtr () const |
| Return a pointer to this grid's tree, which might be shared with other grids. The pointer is guaranteed to be non-null. More...
|
|
TreeBase & | baseTree () |
| Return a reference to this grid's tree, which might be shared with other grids. More...
|
|
const TreeBase & | baseTree () const |
| Return a reference to this grid's tree, which might be shared with other grids. More...
|
|
const TreeBase & | constBaseTree () const |
| Return a reference to this grid's tree, which might be shared with other grids. More...
|
|
void | clipGrid (const BBoxd &) |
| Clip this grid to the given world-space bounding box. More...
|
|
template<typename GridTypeListT , typename OpT > |
bool | apply (OpT &) const |
| If this grid resolves to one of the listed grid types, invoke the given functor on the resolved grid. More...
|
|
template<typename GridTypeListT , typename OpT > |
bool | apply (OpT &) |
| If this grid resolves to one of the listed grid types, invoke the given functor on the resolved grid. More...
|
|
template<typename GridTypeListT , typename OpT > |
bool | apply (const OpT &) const |
| If this grid resolves to one of the listed grid types, invoke the given functor on the resolved grid. More...
|
|
template<typename GridTypeListT , typename OpT > |
bool | apply (const OpT &) |
| If this grid resolves to one of the listed grid types, invoke the given functor on the resolved grid. More...
|
|
std::string | getName () const |
| Return this grid's user-specified name. More...
|
|
void | setName (const std::string &) |
| Specify a name for this grid. More...
|
|
std::string | getCreator () const |
| Return the user-specified description of this grid's creator. More...
|
|
void | setCreator (const std::string &) |
| Provide a description of this grid's creator. More...
|
|
bool | saveFloatAsHalf () const |
| Return true if this grid should be written out with floating-point voxel values (including components of vectors) quantized to 16 bits. More...
|
|
void | setSaveFloatAsHalf (bool) |
| Return this grid's user-specified name. More...
|
|
GridClass | getGridClass () const |
| Return the class of volumetric data (level set, fog volume, etc.) that is stored in this grid. More...
|
|
void | setGridClass (GridClass) |
| Specify the class of volumetric data (level set, fog volume, etc.) that is stored in this grid. More...
|
|
void | clearGridClass () |
| Remove the setting specifying the class of this grid's volumetric data. More...
|
|
VecType | getVectorType () const |
| Return the type of vector data (invariant, covariant, etc.) stored in this grid, assuming that this grid contains a vector-valued tree. More...
|
|
void | setVectorType (VecType) |
| Specify the type of vector data (invariant, covariant, etc.) stored in this grid, assuming that this grid contains a vector-valued tree. More...
|
|
void | clearVectorType () |
| Remove the setting specifying the type of vector data stored in this grid. More...
|
|
bool | isInWorldSpace () const |
|
void | setIsInWorldSpace (bool) |
| Specify whether this grid's voxel values are in world space or in local space. More...
|
|
void | addStatsMetadata () |
| Add metadata to this grid comprising the current values of statistics like the active voxel count and bounding box. More...
|
|
MetaMap::Ptr | getStatsMetadata () const |
| Return a new MetaMap containing just the metadata that was added to this grid with ::GridBase::addStatsMetadata() addStatsMetadata. More...
|
|
math::Transform::Ptr | transformPtr () |
| Return a pointer to this grid's transform, which might be shared with other grids. More...
|
|
math::Transform::ConstPtr | transformPtr () const |
| Return a pointer to this grid's transform, which might be shared with other grids. More...
|
|
math::Transform::ConstPtr | constTransformPtr () const |
| Return a pointer to this grid's transform, which might be shared with other grids. More...
|
|
void | setTransform (math::Transform::Ptr) |
| Associate the given transform with this grid, in place of its existing transform. More...
|
|
Vec3d | voxelSize () const |
| Return the size of this grid's voxels. More...
|
|
Vec3d | voxelSize (const Vec3d &xyz) const |
| Return the size of this grid's voxel at position (x, y, z). More...
|
|
bool | hasUniformVoxels () const |
| Return true if the voxels in world space are uniformly sized cubes. More...
|
|
Vec3d | indexToWorld (const Vec3d &xyz) const |
| Apply this grid's transform to the given coordinates. More...
|
|
Vec3d | indexToWorld (const Coord &ijk) const |
| Apply this grid's transform to the given coordinates. More...
|
|
Vec3d | worldToIndex (const Vec3d &xyz) const |
| Apply the inverse of this grid's transform to the given coordinates. More...
|
|
math::Transform & | transform () |
| Return a reference to this grid's transform, which might be shared with other grids. More...
|
|
const math::Transform & | transform () const |
| Return a reference to this grid's transform, which might be shared with other grids. More...
|
|
const math::Transform & | constTransform () const |
| Return a reference to this grid's transform, which might be shared with other grids. More...
|
|
void | readTransform (std::istream &is) |
| Read in the transform for this grid. More...
|
|
void | writeTransform (std::ostream &os) const |
| Write out the transform for this grid. More...
|
|
| MetaMap () |
|
| MetaMap (const MetaMap &other) |
|
virtual | ~MetaMap () |
|
MetaMap::Ptr | copyMeta () const |
| Return a copy of this map whose fields are shared with this map. More...
|
|
MetaMap::Ptr | deepCopyMeta () const |
| Return a deep copy of this map that shares no data with this map. More...
|
|
MetaMap & | operator= (const MetaMap &) |
| Assign a deep copy of another map to this map. More...
|
|
void | readMeta (std::istream &) |
| Unserialize metadata from the given stream. More...
|
|
void | writeMeta (std::ostream &) const |
| Serialize metadata to the given stream. More...
|
|
void | insertMeta (const Name &, const Metadata &value) |
| Insert a new metadata field or overwrite the value of an existing field. More...
|
|
void | insertMeta (const MetaMap &) |
| Deep copy all of the metadata fields from the given map into this map. More...
|
|
void | removeMeta (const Name &) |
| Remove the given metadata field if it exists. More...
|
|
template<typename T > |
T & | metaValue (const Name &) |
| Return a reference to the value of type T stored in the given metadata field. More...
|
|
template<typename T > |
const T & | metaValue (const Name &) const |
|
MetaIterator | beginMeta () |
|
MetaIterator | endMeta () |
|
ConstMetaIterator | beginMeta () const |
|
ConstMetaIterator | endMeta () const |
|
void | clearMetadata () |
|
size_t | metaCount () const |
|
std::string | str (const std::string &indent="") const |
| Return a string describing this metadata map. Prefix each line with indent. More...
|
|
bool | operator== (const MetaMap &other) const |
| Return true if the given map is equivalent to this map. More...
|
|
bool | operator!= (const MetaMap &other) const |
| Return true if the given map is different from this map. More...
|
|
Metadata::Ptr | operator[] (const Name &) |
| Return a pointer to the metadata with the given name. If no such field exists, return a null pointer. More...
|
|
Metadata::ConstPtr | operator[] (const Name &) const |
| Return a pointer to the metadata with the given name. If no such field exists, return a null pointer. More...
|
|
template<typename T > |
T::Ptr | getMetadata (const Name &) |
| Return a pointer to a TypedMetadata object of type T and with the given name. If no such field exists or if there is a type mismatch, return a null pointer. More...
|
|
template<typename T > |
T::ConstPtr | getMetadata (const Name &) const |
| Return a pointer to a TypedMetadata object of type T and with the given name. If no such field exists or if there is a type mismatch, return a null pointer. More...
|
|