HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GEO_PrimVDB::GridAccessor Class Reference

GridAccessor manages access to a GEO_PrimVDB's grid. More...

#include <GEO_PrimVDB.h>

Public Member Functions

SYS_FORCE_INLINE GridAccessor ()
 
SYS_FORCE_INLINE void clear ()
 
SYS_FORCE_INLINE
openvdb::GridBase & 
getGrid (const GEO_PrimVDB &prim)
 
SYS_FORCE_INLINE const
openvdb::GridBase & 
getConstGrid (const GEO_PrimVDB &prim) const
 
SYS_FORCE_INLINE
openvdb::GridBase::Ptr 
getGridPtr (const GEO_PrimVDB &prim)
 
SYS_FORCE_INLINE
openvdb::GridBase::ConstPtr 
getConstGridPtr (const GEO_PrimVDB &prim) const
 
SYS_FORCE_INLINE void setGrid (const openvdb::GridBase &grid, GEO_PrimVDB &prim, bool copyPosition=true)
 
SYS_FORCE_INLINE void setTransform (const openvdb::math::Transform &xform, GEO_PrimVDB &prim)
 
void makeGridUnique ()
 
bool isGridUnique () const
 
SYS_FORCE_INLINE UT_VDBType getStorageType () const
 
SYS_FORCE_INLINE bool hasGrid () const
 

Detailed Description

GridAccessor manages access to a GEO_PrimVDB's grid.

In keeping with OpenVDB library conventions, the grid is stored internally by shared pointer. However, grid objects are never shared among primitives, though their voxel data (i.e., their trees) may be shared.

Among other things, GridAccessor

  • ensures that each primitive's transform and metadata are unique (i.e., not shared with anyone else)
  • allows primitives to share voxel data but, via makeGridUnique(), provides a way to break the connection
  • ensures that the primitive's transform and the grid's transform are in sync (specifically, the translation component, which is stored independently as a vertex offset).

Definition at line 666 of file GEO_PrimVDB.h.

Constructor & Destructor Documentation

SYS_FORCE_INLINE GEO_PrimVDB::GridAccessor::GridAccessor ( )
inline

Definition at line 670 of file GEO_PrimVDB.h.

Member Function Documentation

SYS_FORCE_INLINE void GEO_PrimVDB::GridAccessor::clear ( )
inline

Definition at line 674 of file GEO_PrimVDB.h.

SYS_FORCE_INLINE const openvdb::GridBase& GEO_PrimVDB::GridAccessor::getConstGrid ( const GEO_PrimVDB prim) const
inline

Definition at line 687 of file GEO_PrimVDB.h.

SYS_FORCE_INLINE openvdb::GridBase::ConstPtr GEO_PrimVDB::GridAccessor::getConstGridPtr ( const GEO_PrimVDB prim) const
inline

Definition at line 697 of file GEO_PrimVDB.h.

SYS_FORCE_INLINE openvdb::GridBase& GEO_PrimVDB::GridAccessor::getGrid ( const GEO_PrimVDB prim)
inline

Definition at line 682 of file GEO_PrimVDB.h.

SYS_FORCE_INLINE openvdb::GridBase::Ptr GEO_PrimVDB::GridAccessor::getGridPtr ( const GEO_PrimVDB prim)
inline

Definition at line 692 of file GEO_PrimVDB.h.

SYS_FORCE_INLINE UT_VDBType GEO_PrimVDB::GridAccessor::getStorageType ( ) const
inline

Definition at line 715 of file GEO_PrimVDB.h.

SYS_FORCE_INLINE bool GEO_PrimVDB::GridAccessor::hasGrid ( ) const
inline

Definition at line 718 of file GEO_PrimVDB.h.

bool GEO_PrimVDB::GridAccessor::isGridUnique ( ) const
void GEO_PrimVDB::GridAccessor::makeGridUnique ( )
SYS_FORCE_INLINE void GEO_PrimVDB::GridAccessor::setGrid ( const openvdb::GridBase &  grid,
GEO_PrimVDB prim,
bool  copyPosition = true 
)
inline

Definition at line 703 of file GEO_PrimVDB.h.

SYS_FORCE_INLINE void GEO_PrimVDB::GridAccessor::setTransform ( const openvdb::math::Transform &  xform,
GEO_PrimVDB prim 
)
inline

Definition at line 706 of file GEO_PrimVDB.h.


The documentation for this class was generated from the following file: