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

 GridAccessor ()
 
void clear ()
 
openvdb::GridBase & getGrid (const GEO_PrimVDB &prim)
 
const openvdb::GridBase & getConstGrid (const GEO_PrimVDB &prim) const
 
openvdb::GridBase::Ptr getGridPtr (const GEO_PrimVDB &prim)
 
openvdb::GridBase::ConstPtr getConstGridPtr (const GEO_PrimVDB &prim) const
 
void setGrid (const openvdb::GridBase &grid, GEO_PrimVDB &prim)
 
void setTransform (const openvdb::math::Transform &xform, GEO_PrimVDB &prim)
 
void makeGridUnique ()
 
UT_VDBType getStorageType () const
 
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 636 of file GEO_PrimVDB.h.

Constructor & Destructor Documentation

GEO_PrimVDB::GridAccessor::GridAccessor ( )
inline

Definition at line 639 of file GEO_PrimVDB.h.

Member Function Documentation

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

Definition at line 642 of file GEO_PrimVDB.h.

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

Definition at line 653 of file GEO_PrimVDB.h.

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

Definition at line 661 of file GEO_PrimVDB.h.

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

Definition at line 649 of file GEO_PrimVDB.h.

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

Definition at line 657 of file GEO_PrimVDB.h.

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

Definition at line 675 of file GEO_PrimVDB.h.

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

Definition at line 676 of file GEO_PrimVDB.h.

void GEO_PrimVDB::GridAccessor::makeGridUnique ( )
void GEO_PrimVDB::GridAccessor::setGrid ( const openvdb::GridBase &  grid,
GEO_PrimVDB prim 
)
inline

Definition at line 666 of file GEO_PrimVDB.h.

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

Definition at line 668 of file GEO_PrimVDB.h.


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