OpenVDB
3.1.0
|
Container class that associates a tree with a transform and metadata. More...
#include <Grid.h>
Inherits GridBase.
Classes | |
struct | ValueConverter |
ValueConverter<T>::Type is the type of a grid having the same hierarchy as this grid but a different value type, T. More... | |
Public Types | |
typedef boost::shared_ptr< Grid > | Ptr |
typedef boost::shared_ptr< const Grid > | ConstPtr |
typedef _TreeType | TreeType |
typedef _TreeType::Ptr | TreePtrType |
typedef _TreeType::ConstPtr | ConstTreePtrType |
typedef _TreeType::ValueType | ValueType |
typedef _TreeType::ValueOnIter | ValueOnIter |
typedef _TreeType::ValueOnCIter | ValueOnCIter |
typedef _TreeType::ValueOffIter | ValueOffIter |
typedef _TreeType::ValueOffCIter | ValueOffCIter |
typedef _TreeType::ValueAllIter | ValueAllIter |
typedef _TreeType::ValueAllCIter | ValueAllCIter |
typedef tree::ValueAccessor< _TreeType, true > | Accessor |
typedef tree::ValueAccessor< const _TreeType, true > | ConstAccessor |
typedef tree::ValueAccessor< _TreeType, false > | UnsafeAccessor |
typedef tree::ValueAccessor< const _TreeType, false > | ConstUnsafeAccessor |
typedef Ptr(* | GridFactory) () |
typedef std::map< Name, Metadata::Ptr > | MetadataMap |
typedef MetadataMap::iterator | MetaIterator |
typedef MetadataMap::const_iterator | ConstMetaIterator |
Public Member Functions | |
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 (const Grid &, ShallowCopy) | |
Deep copy another grid's metadata, but share its tree and transform. More... | |
Grid (const GridBase &) | |
Deep copy another grid's metadata and transform, but construct a new tree with background value zero. More... | |
virtual | ~Grid () |
virtual Name | type () const |
Return the name of this grid's type. More... | |
virtual Name | valueType () const |
Return the name of the type of a voxel's value (e.g., "float" or "vec3d"). More... | |
const ValueType & | background () const |
Return this grid's background value. More... | |
virtual bool | empty () const |
Return true if this grid contains only inactive background voxels. More... | |
virtual void | clear () |
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. The accessor is safe in the sense that it is registered by the tree of this grid. More... | |
Accessor | getUnsafeAccessor () |
Return an accessor that provides random read and write access to this grid's voxels. The accessor is unsafe in the sense that it is not registered by the tree of this grid. In some rare cases this can give a performance advantage over a registered accessor but it is unsafe if the tree topology is modified. More... | |
ConstAccessor | getConstUnsafeAccessor () const |
Return an accessor that provides random read-only access to this grid's voxels. The accessor is unsafe in the sense that it is not registered by the tree of this grid. In some rare cases this can give a performance advantage over a registered accessor but it is unsafe if the tree topology is modified. More... | |
void | evalMinMax (ValueType &minVal, ValueType &maxVal) const |
Return the minimum and maximum active values in this grid. 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... | |
virtual void | pruneGrid (float tolerance=0.0) |
Reduce the memory footprint of this grid by increasing its sparseness. More... | |
virtual void | clip (const CoordBBox &) |
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... | |
virtual Index64 | activeVoxelCount () const |
Return the number of active voxels. More... | |
virtual CoordBBox | evalActiveVoxelBoundingBox () const |
Return the axis-aligned bounding box of all active voxels. More... | |
virtual Coord | evalActiveVoxelDim () const |
Return the dimensions of the axis-aligned bounding box of all active voxels. More... | |
virtual Index64 | memUsage () const |
virtual void | setTree (TreeBase::Ptr) |
Associate the given tree with this grid, in place of its existing tree. More... | |
virtual void | newTree () |
Associate a new, empty tree with this grid, in place of its existing tree. More... | |
virtual void | readTopology (std::istream &) |
Read the grid topology from a stream. This will read only the grid structure, not the actual data buffers. More... | |
virtual void | writeTopology (std::ostream &) const |
Write the grid topology to a stream. This will write only the grid structure, not the actual data buffers. More... | |
virtual void | readBuffers (std::istream &) |
Read all data buffers for this grid. More... | |
virtual void | readBuffers (std::istream &, const CoordBBox &) |
Read all of this grid's data buffers that intersect the given index-space bounding box. More... | |
virtual void | readNonresidentBuffers () const |
Read all of this grid's data buffers that are not yet resident in memory (because delayed loading is in effect). More... | |
virtual void | writeBuffers (std::ostream &) const |
Write out all data buffers for this grid. More... | |
virtual void | print (std::ostream &=std::cout, int verboseLevel=1) const |
Output a human-readable description of this grid. More... | |
template<typename GridType > | |
bool | isType () const |
Return true if this grid is of the same type as the template parameter. More... | |
void | clipGrid (const BBoxd &) |
Clip this grid to the given world-space bounding box. 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) |
GridClass | getGridClass () const |
Return the class of volumetric data (level set, fog volume, etc.) stored in this grid. More... | |
void | setGridClass (GridClass) |
Specify the class of volumetric data (level set, fog volume, etc.) 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 addStatsMetadata(). 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 | worldToIndex (const Vec3d &xyz) const |
Apply the inverse of this grid's transform to the given coordinates. 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::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... | |
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 () |
ConstMetaIterator | beginMeta () const |
MetaIterator | endMeta () |
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... | |
template<typename T > | |
TypedMetadata< T >::Ptr | getValidTypedMetadata (const Name &name) const |
Ptr | copy (CopyPolicy treePolicy=CP_SHARE) const |
Return a new grid of the same type as this grid and whose metadata and transform are deep copies of this grid's. More... | |
virtual GridBase::Ptr | copyGrid (CopyPolicy treePolicy=CP_SHARE) const |
Return a new grid of the same type as this grid and whose metadata and transform are deep copies of this grid's. More... | |
Ptr | deepCopy () const |
Return a new grid whose metadata, transform and tree are deep copies of this grid's. More... | |
virtual GridBase::Ptr | deepCopyGrid () const |
Return a new grid whose metadata, transform and tree are deep copies of this grid's. 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... | |
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... | |
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... | |
virtual TreeBase::ConstPtr | constBaseTreePtr () 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... | |
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... | |
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... | |
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... | |
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... | |
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... | |
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... | |
Static Public Member Functions | |
static Ptr | create (const ValueType &background) |
Return a new grid with the given background value. More... | |
static Ptr | create () |
Return a new grid with background value zero. More... | |
static Ptr | create (TreePtrType) |
Return a new grid that contains the given tree. More... | |
static Ptr | create (const GridBase &other) |
Return a new, empty grid with the same transform and metadata as the given grid and with background value zero. More... | |
static Name | gridType () |
Return the name of this type of grid. More... | |
static bool | isRegistered () |
Return true if this grid type is registered. More... | |
static void | registerGrid () |
Register this grid type along with a factory function. More... | |
static void | unregisterGrid () |
Remove this grid type from the registry. More... | |
static Ptr | createGrid (const Name &type) |
Create a new grid of the given (registered) type. More... | |
static bool | isRegistered (const Name &type) |
Return true if the given grid type name is registered. More... | |
static void | clearRegistry () |
Clear the grid type registry. More... | |
static std::string | gridClassToString (GridClass) |
Return the metadata string value for the given class of volumetric data. More... | |
static std::string | gridClassToMenuName (GridClass) |
Return a formatted string version of the grid class. More... | |
static GridClass | stringToGridClass (const std::string &) |
Return the class of volumetric data specified by the given string. More... | |
static std::string | vecTypeToString (VecType) |
Return the metadata string value for the given type of vector data. More... | |
static std::string | vecTypeExamples (VecType) |
static std::string | vecTypeDescription (VecType) |
Return a string describing how the given type of vector data is affected by transformations (e.g., "Does not transform", given VEC_INVARIANT). More... | |
static VecType | stringToVecType (const std::string &) |
template<typename GridType > | |
static GridType::Ptr | grid (const GridBase::Ptr &) |
Return the result of downcasting a GridBase pointer to a Grid pointer of the specified type, or return a null pointer if the types are incompatible. More... | |
template<typename GridType > | |
static GridType::ConstPtr | grid (const GridBase::ConstPtr &) |
Return the result of downcasting a GridBase pointer to a Grid pointer of the specified type, or return a null pointer if the types are incompatible. More... | |
template<typename GridType > | |
static GridType::ConstPtr | constGrid (const GridBase::Ptr &) |
Return the result of downcasting a GridBase pointer to a Grid pointer of the specified type, or return a null pointer if the types are incompatible. More... | |
template<typename GridType > | |
static GridType::ConstPtr | constGrid (const GridBase::ConstPtr &) |
Return the result of downcasting a GridBase pointer to a Grid pointer of the specified type, or return a null pointer if the types are incompatible. More... | |
Static Public Attributes | |
static const char *const | META_GRID_CLASS |
static const char *const | META_GRID_CREATOR |
static const char *const | META_GRID_NAME |
static const char *const | META_SAVE_HALF_FLOAT |
static const char *const | META_IS_LOCAL_SPACE |
static const char *const | META_VECTOR_TYPE |
static const char *const | META_FILE_BBOX_MIN |
static const char *const | META_FILE_BBOX_MAX |
static const char *const | META_FILE_COMPRESSION |
static const char *const | META_FILE_MEM_BYTES |
static const char *const | META_FILE_VOXEL_COUNT |
Static Protected Member Functions | |
static void | registerGrid (const Name &type, GridFactory) |
Register a grid type along with a factory function. More... | |
static void | unregisterGrid (const Name &type) |
Remove a grid type from the registry. More... | |
Container class that associates a tree with a transform and metadata.
typedef tree::ValueAccessor<_TreeType, true> Accessor |
typedef tree::ValueAccessor<const _TreeType, true> ConstAccessor |
|
inherited |
typedef _TreeType::ConstPtr ConstTreePtrType |
typedef tree::ValueAccessor<const _TreeType, false> ConstUnsafeAccessor |
|
inherited |
|
inherited |
|
inherited |
typedef _TreeType::Ptr TreePtrType |
typedef _TreeType TreeType |
typedef tree::ValueAccessor<_TreeType, false> UnsafeAccessor |
typedef _TreeType::ValueAllCIter ValueAllCIter |
typedef _TreeType::ValueAllIter ValueAllIter |
typedef _TreeType::ValueOffCIter ValueOffCIter |
typedef _TreeType::ValueOffIter ValueOffIter |
typedef _TreeType::ValueOnCIter ValueOnCIter |
typedef _TreeType::ValueOnIter ValueOnIter |
typedef _TreeType::ValueType ValueType |
|
inline |
Construct a new grid with background value zero.
Construct a new grid with the given background value.
|
inlineexplicit |
Construct a new grid that shares the given tree and associates with it an identity linear transform.
ValueError | if the tree pointer is null |
Deep copy another grid's metadata, transform and tree.
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.
TypeError | if the other grid's tree configuration doesn't match this grid's or if this grid's ValueType is not constructible from the other grid's ValueType. |
|
inline |
Deep copy another grid's metadata, but share its tree and transform.
Deep copy another grid's metadata and transform, but construct a new tree with background value zero.
|
inlinevirtual |
|
inlinevirtual |
Return the number of active voxels.
Implements GridBase.
|
inherited |
Add metadata to this grid comprising the current values of statistics like the active voxel count and bounding box.
|
inline |
Return this grid's background value.
|
inlineinherited |
Return a reference to this grid's tree, which might be shared with other grids.
|
inlineinherited |
Return a reference to this grid's tree, which might be shared with other grids.
|
inlineinherited |
Return a pointer to this grid's tree, which might be shared with other grids. The pointer is guaranteed to be non-null.
|
inlineinherited |
Return a pointer to this grid's tree, which might be shared with other grids. The pointer is guaranteed to be non-null.
|
inlineinherited |
|
inlineinherited |
|
inline |
Return an iterator over all of this grid's values (tile and voxel).
|
inline |
Return an iterator over all of this grid's values (tile and voxel).
|
inline |
Return an iterator over all of this grid's inactive values (tile and voxel).
|
inline |
Return an iterator over all of this grid's inactive values (tile and voxel).
|
inline |
Return an iterator over all of this grid's active values (tile and voxel).
|
inline |
Return an iterator over all of this grid's active values (tile and voxel).
|
inline |
Return an iterator over all of this grid's values (tile and voxel).
|
inline |
Return an iterator over all of this grid's inactive values (tile and voxel).
|
inline |
Return an iterator over all of this grid's active values (tile and voxel).
|
inlinevirtual |
Empty this grid, so that all voxels become inactive background voxels.
Implements GridBase.
|
inherited |
Remove the setting specifying the class of this grid's volumetric data.
|
inlineinherited |
|
staticinherited |
Clear the grid type registry.
|
inherited |
Remove the setting specifying the type of vector data stored in this grid.
|
inlinevirtual |
Clip this grid to the given index-space bounding box.
Voxels that lie outside the bounding box are set to the background.
Implements GridBase.
|
inherited |
Clip this grid to the given world-space bounding box.
Voxels that lie outside the bounding box are set to the background.
|
inlineinherited |
Return a reference to this grid's tree, which might be shared with other grids.
|
inlinevirtual |
Return a pointer to this grid's tree, which might be shared with other grids. The pointer is guaranteed to be non-null.
Implements GridBase.
|
inlinestaticinherited |
|
inlinestaticinherited |
|
inlineinherited |
Return a reference to this grid's transform, which might be shared with other grids.
|
inlineinherited |
Return a pointer to this grid's transform, which might be shared with other grids.
|
inline |
Return a reference to this grid's tree, which might be shared with other grids.
|
inline |
Return a pointer to this grid's tree, which might be shared with other grids. The pointer is guaranteed to be non-null.
|
inline |
Return a new grid of the same type as this grid and whose metadata and transform are deep copies of this grid's.
If treePolicy is CP_NEW
, give the new grid a new, empty tree; if CP_SHARE
, the new grid shares this grid's tree and transform; if CP_COPY
, the new grid's tree is a deep copy of this grid's tree and transform
|
inlinevirtual |
Return a new grid of the same type as this grid and whose metadata and transform are deep copies of this grid's.
If treePolicy is CP_NEW
, give the new grid a new, empty tree; if CP_SHARE
, the new grid shares this grid's tree and transform; if CP_COPY
, the new grid's tree is a deep copy of this grid's tree and transform
Implements GridBase.
|
inherited |
Return a copy of this map whose fields are shared with this map.
Return a new grid with the given background value.
|
inlinestatic |
Return a new grid that contains the given tree.
ValueError | if the tree pointer is null |
Return a new, empty grid with the same transform and metadata as the given grid and with background value zero.
Create a new grid of the given (registered) type.
|
inline |
Return a new grid whose metadata, transform and tree are deep copies of this grid's.
|
inlinevirtual |
Return a new grid whose metadata, transform and tree are deep copies of this grid's.
Implements GridBase.
|
inherited |
Return a deep copy of this map that shares no data with this map.
|
inlinevirtual |
Return true
if this grid contains only inactive background voxels.
Implements GridBase.
|
inlineinherited |
|
inlineinherited |
|
inlinevirtual |
Return the axis-aligned bounding box of all active voxels.
Implements GridBase.
|
inlinevirtual |
Return the dimensions of the axis-aligned bounding box of all active voxels.
Implements GridBase.
Return the minimum and maximum active values in this grid.
|
inline |
Set all voxels within a given axis-aligned box to a constant value.
bbox | inclusive coordinates of opposite corners of an axis-aligned box |
value | the value to which to set voxels within the box |
active | if true, mark voxels within the box as active, otherwise mark them as inactive |
|
inline |
Return an accessor that provides random read and write access to this grid's voxels. The accessor is safe in the sense that it is registered by the tree of this grid.
|
inline |
Return an accessor that provides random read-only access to this grid's voxels.
|
inline |
Return an accessor that provides random read-only access to this grid's voxels.
|
inline |
Return an accessor that provides random read-only access to this grid's voxels. The accessor is unsafe in the sense that it is not registered by the tree of this grid. In some rare cases this can give a performance advantage over a registered accessor but it is unsafe if the tree topology is modified.
|
inherited |
Return the user-specified description of this grid's creator.
|
inherited |
Return the class of volumetric data (level set, fog volume, etc.) stored in this grid.
|
inlineinherited |
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.
|
inlineinherited |
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.
|
inherited |
Return this grid's user-specified name.
|
inherited |
Return a new MetaMap containing just the metadata that was added to this grid with addStatsMetadata().
If addStatsMetadata() was never called on this grid, return an empty MetaMap.
|
inline |
Return an accessor that provides random read and write access to this grid's voxels. The accessor is unsafe in the sense that it is not registered by the tree of this grid. In some rare cases this can give a performance advantage over a registered accessor but it is unsafe if the tree topology is modified.
|
inlineinherited |
|
inherited |
Return the type of vector data (invariant, covariant, etc.) stored in this grid, assuming that this grid contains a vector-valued tree.
|
inlinestaticinherited |
|
inlinestaticinherited |
|
staticinherited |
Return a formatted string version of the grid class.
|
staticinherited |
Return the metadata string value for the given class of volumetric data.
|
inlinestatic |
Return the name of this type of grid.
|
inlineinherited |
Return true if the voxels in world space are uniformly sized cubes.
|
inlineinherited |
Apply this grid's transform to the given coordinates.
|
inlineinherited |
Apply this grid's transform to the given coordinates.
Insert a new metadata field or overwrite the value of an existing field.
If a field with the given name doesn't already exist, add a new field. Otherwise, if the new value's type is the same as the existing field's value type, overwrite the existing value with new value.
TypeError | if a field with the given name already exists, but its value type is not the same as the new value's |
ValueError | if the given field name is empty. |
|
inherited |
Deep copy all of the metadata fields from the given map into this map.
TypeError | if any field in the given map has the same name as but a different value type than one of this map's fields. |
|
inherited |
Return true
if this grid's voxel values are in world space and should be affected by transformations, false
if they are in local space and should not be affected by transformations.
|
staticinherited |
Return true
if the given grid type name is registered.
|
inlinestatic |
Return true
if this grid type is registered.
|
inlineinherited |
Return true
if this grid is of the same type as the template parameter.
|
inlinevirtual |
Return the number of bytes of memory used by this grid.
Implements GridBase.
|
inline |
Efficiently merge another grid into this grid using one of several schemes.
This operation is primarily intended to combine grids that are mostly non-overlapping (for example, intermediate grids from computations that are parallelized across disjoint regions of space).
|
inlineinherited |
|
inlineinherited |
Return a reference to the value of type T
stored in the given metadata field.
LookupError | if no field with the given name exists. |
TypeError | if the given field is not of type T . |
|
inlineinherited |
|
inlinevirtual |
Associate a new, empty tree with this grid, in place of its existing tree.
Implements GridBase.
|
inlineinherited |
Return true
if the given map is different from this map.
|
inherited |
Return true
if the given map is equivalent to this map.
|
inlineinherited |
Return a pointer to the metadata with the given name. If no such field exists, return a null pointer.
|
inlineinherited |
Return a pointer to the metadata with the given name. If no such field exists, return a null pointer.
|
inlinevirtual |
Output a human-readable description of this grid.
Implements GridBase.
|
inlinevirtual |
Reduce the memory footprint of this grid by increasing its sparseness.
Implements GridBase.
|
inlinevirtual |
Read all data buffers for this grid.
Implements GridBase.
|
inlinevirtual |
Read all of this grid's data buffers that intersect the given index-space bounding box.
Implements GridBase.
|
inherited |
Unserialize metadata from the given stream.
|
inlinevirtual |
Read all of this grid's data buffers that are not yet resident in memory (because delayed loading is in effect).
If this grid was read from a memory-mapped file, this operation disconnects the grid from the file.
Implements GridBase.
|
inlinevirtual |
Read the grid topology from a stream. This will read only the grid structure, not the actual data buffers.
Implements GridBase.
|
inlineinherited |
Read in the transform for this grid.
|
staticprotectedinherited |
Register a grid type along with a factory function.
|
inlinestatic |
Register this grid type along with a factory function.
|
inherited |
Remove the given metadata field if it exists.
|
inherited |
Return true
if this grid should be written out with floating-point voxel values (including components of vectors) quantized to 16 bits.
|
inherited |
Provide a description of this grid's creator.
|
inherited |
Specify the class of volumetric data (level set, fog volume, etc.) stored in this grid.
|
inherited |
Specify whether this grid's voxel values are in world space or in local space.
|
inherited |
Specify a name for this grid.
|
inherited |
|
inlineinherited |
Associate the given transform with this grid, in place of its existing transform.
ValueError | if the transform pointer is null |
|
inlinevirtual |
Associate the given tree with this grid, in place of its existing tree.
ValueError | if the tree pointer is null |
TypeError | if the tree is not of type TreeType |
Implements GridBase.
|
inherited |
Specify the type of vector data (invariant, covariant, etc.) stored in this grid, assuming that this grid contains a vector-valued tree.
|
inherited |
Return a string describing this metadata map. Prefix each line with indent.
|
staticinherited |
Return the class of volumetric data specified by the given string.
If the string is not one of the ones returned by gridClassToString(), return GRID_UNKNOWN
.
|
staticinherited |
|
inline |
Difference this grid's set of active values with the active values of the other grid, whose value type may be different.
After this method is called, voxels in this grid will be active only if they were active to begin with and if the corresponding voxels in the other grid were inactive.
|
inline |
Intersect this grid's set of active values with the active values of the other grid, whose value type may be different.
The resulting state of a value is active only if the corresponding value was already active AND if it is active in the other tree. Also, a resulting value maps to a voxel if the corresponding value already mapped to an active voxel in either of the two grids and it maps to an active tile or voxel in the other grid.
|
inline |
Union this grid's set of active values with the active values of the other grid, whose value type may be different.
The resulting state of a value is active if the corresponding value was already active OR if it is active in the other grid. Also, a resulting value maps to a voxel if the corresponding value already mapped to a voxel OR if it is a voxel in the other grid. Thus, a resulting value can only map to a tile if the corresponding value already mapped to a tile AND if it is a tile value in the other grid.
|
inlineinherited |
Return a reference to this grid's transform, which might be shared with other grids.
|
inlineinherited |
Return a reference to this grid's transform, which might be shared with other grids.
|
inlineinherited |
Return a pointer to this grid's transform, which might be shared with other grids.
|
inlineinherited |
Return a pointer to this grid's transform, which might be shared with other grids.
|
inline |
Return a reference to this grid's tree, which might be shared with other grids.
|
inline |
Return a reference to this grid's tree, which might be shared with other grids.
|
inline |
Return a pointer to this grid's tree, which might be shared with other grids. The pointer is guaranteed to be non-null.
|
inline |
Return a pointer to this grid's tree, which might be shared with other grids. The pointer is guaranteed to be non-null.
|
staticprotectedinherited |
Remove a grid type from the registry.
|
inlinestatic |
Remove this grid type from the registry.
|
inlinevirtual |
Return the name of the type of a voxel's value (e.g., "float" or "vec3d").
Implements GridBase.
|
staticinherited |
Return a string describing how the given type of vector data is affected by transformations (e.g., "Does not transform", given VEC_INVARIANT).
|
staticinherited |
Return a string listing examples of the given type of vector data (e.g., "Gradient/Normal", given VEC_COVARIANT).
|
staticinherited |
Return the metadata string value for the given type of vector data.
|
inlineinherited |
Return the size of this grid's voxels.
|
inlineinherited |
Return the size of this grid's voxel at position (x, y, z).
|
inlineinherited |
Apply the inverse of this grid's transform to the given coordinates.
|
inlinevirtual |
Write out all data buffers for this grid.
Implements GridBase.
|
inherited |
Serialize metadata to the given stream.
|
inlinevirtual |
Write the grid topology to a stream. This will write only the grid structure, not the actual data buffers.
Implements GridBase.
|
inlineinherited |
Write out the transform for this grid.
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |