HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessor< _TreeType, IsSafe, CacheLevels, MutexType > Class Template Reference

#include <ValueAccessor.h>

+ Inheritance diagram for openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessor< _TreeType, IsSafe, CacheLevels, MutexType >:

Public Types

typedef _TreeType TreeType
 
typedef TreeType::RootNodeType RootNodeT
 
typedef TreeType::LeafNodeType LeafNodeT
 
typedef RootNodeT::ValueType ValueType
 
typedef ValueAccessorBase
< TreeType, IsSafe > 
BaseT
 
typedef MutexType::scoped_lock LockT
 

Public Member Functions

 HBOOST_STATIC_ASSERT (CacheLevels< _TreeType::DEPTH)
 
 ValueAccessor (TreeType &tree)
 
 ValueAccessor (const ValueAccessor &other)
 
ValueAccessoroperator= (const ValueAccessor &other)
 
virtual ~ValueAccessor ()
 
bool isCached (const Coord &xyz) const
 Return true if nodes along the path to the given voxel have been cached. More...
 
const ValueTypegetValue (const Coord &xyz) const
 Return the value of the voxel at the given coordinates. More...
 
bool isValueOn (const Coord &xyz) const
 Return the active state of the voxel at the given coordinates. More...
 
bool probeValue (const Coord &xyz, ValueType &value) const
 Return the active state of the voxel as well as its value. More...
 
int getValueDepth (const Coord &xyz) const
 
bool isVoxel (const Coord &xyz) const
 
void setValueOnly (const Coord &xyz, const ValueType &value)
 Set the value of the voxel at the given coordinate but don't change its active state. More...
 
void newSetValue (const Coord &xyz, const ValueType &value)
 
void setValueOff (const Coord &xyz, const ValueType &value)
 Set the value of the voxel at the given coordinates and mark the voxel as inactive. More...
 
template<typename ModifyOp >
void modifyValue (const Coord &xyz, const ModifyOp &op)
 Apply a functor to the value of the voxel at the given coordinates and mark the voxel as active. More...
 
template<typename ModifyOp >
void modifyValueAndActiveState (const Coord &xyz, const ModifyOp &op)
 Apply a functor to the voxel at the given coordinates. More...
 
void setActiveState (const Coord &xyz, bool on=true)
 Set the active state of the voxel at the given coordinates but don't change its value. More...
 
void setValueOn (const Coord &xyz)
 Mark the voxel at the given coordinates as active but don't change its value. More...
 
void setValueOff (const Coord &xyz)
 Mark the voxel at the given coordinates as inactive but don't change its value. More...
 
template<typename NodeType >
NodeType * getNode ()
 Return the cached node of type NodeType. [Mainly for internal use]. More...
 
template<typename NodeType >
void insertNode (const Coord &xyz, NodeType &node)
 
template<typename NodeType >
void eraseNode ()
 
void addLeaf (LeafNodeT *leaf)
 Add the specified leaf to this tree, possibly creating a child branch in the process. If the leaf node already exists, replace it. More...
 
void addTile (Index level, const Coord &xyz, const ValueType &value, bool state)
 Add a tile at the specified tree level that contains voxel (x, y, z), possibly deleting existing nodes or creating new nodes in the process. More...
 
LeafNodeTtouchLeaf (const Coord &xyz)
 Return a pointer to the leaf node that contains voxel (x, y, z). If no such node exists, create one, but preserve the values and active states of all voxels. More...
 
virtual void clear ()
 Remove all nodes from this cache, then reinsert the root node. More...
 
void setValue (const Coord &xyz, const ValueType &value)
 Set the value of the voxel at the given coordinates and mark the voxel as active. More...
 
void setValueOn (const Coord &xyz, const ValueType &value)
 Set the value of the voxel at the given coordinates and mark the voxel as active. More...
 
template<typename NodeT >
NodeT * probeNode (const Coord &xyz)
 Return a pointer to the node of the specified type that contains voxel (x, y, z), or nullptr if no such node exists. More...
 
template<typename NodeT >
const NodeT * probeConstNode (const Coord &xyz) const
 Return a pointer to the node of the specified type that contains voxel (x, y, z), or nullptr if no such node exists. More...
 
template<typename NodeT >
const NodeT * probeNode (const Coord &xyz) const
 Return a pointer to the node of the specified type that contains voxel (x, y, z), or nullptr if no such node exists. More...
 
LeafNodeTprobeLeaf (const Coord &xyz)
 Return a pointer to the leaf node that contains voxel (x, y, z), or nullptr if no such node exists. More...
 
const LeafNodeTprobeConstLeaf (const Coord &xyz) const
 Return a pointer to the leaf node that contains voxel (x, y, z), or nullptr if no such node exists. More...
 
const LeafNodeTprobeLeaf (const Coord &xyz) const
 Return a pointer to the leaf node that contains voxel (x, y, z), or nullptr if no such node exists. More...
 
- Public Member Functions inherited from openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessorBase< _TreeType, IsSafe >
 ValueAccessorBase (_TreeType &tree)
 
 ValueAccessorBase (const ValueAccessorBase &other)
 
virtual ~ValueAccessorBase ()
 
_TreeType * getTree () const
 Return a pointer to the tree associated with this accessor. More...
 
_TreeType & tree () const
 Return a reference to the tree associated with this accessor. More...
 
ValueAccessorBaseoperator= (const ValueAccessorBase &other)
 

Static Public Member Functions

static Index numCacheLevels ()
 Return the number of cache levels employed by this accessor. More...
 
- Static Public Member Functions inherited from openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessorBase< _TreeType, IsSafe >
static bool isSafe ()
 Return true if this accessor is safe, i.e. registered by the tree from which it is constructed. Un-registered accessors can in rare cases be faster because it avoids the (small) overhead of registration, but they are unsafe if the tree is modified. So unless you're an expert it is highly recommended to set IsSafe = true (which is the default). More...
 

Friends

template<typename >
class RootNode
 
template<typename , Index >
class InternalNode
 
template<typename , Index >
class LeafNode
 
template<typename >
class Tree
 

Additional Inherited Members

- Static Public Attributes inherited from openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessorBase< _TreeType, IsSafe >
static const bool IsConstTree
 
- Protected Attributes inherited from openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessorBase< _TreeType, IsSafe >
_TreeType * mTree
 

Detailed Description

template<typename _TreeType, bool IsSafe = true, Index CacheLevels = _TreeType::DEPTH-1, typename MutexType = tbb::null_mutex>
class openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessor< _TreeType, IsSafe, CacheLevels, MutexType >

When traversing a grid in a spatially coherent pattern (e.g., iterating over neighboring voxels), request a ValueAccessor from the grid (with Grid::getAccessor()) and use the accessor's getValue() and setValue() methods. These will typically be significantly faster than accessing voxels directly in the grid's tree.

A ValueAccessor caches pointers to tree nodes along the path to a voxel (x, y, z). A subsequent access to voxel (x', y', z') starts from the cached leaf node and moves up until a cached node that encloses (x', y', z') is found, then traverses down the tree from that node to a leaf, updating the cache with the new path. This leads to significant acceleration of spatially-coherent accesses.

Parameters
_TreeTypethe type of the tree to be accessed [required]
IsSafeif IsSafe = false then the ValueAccessor will not register itself with the tree from which it is consturcted (see warning).
CacheLevelsthe number of nodes to be cached, starting from the leaf level and not including the root (i.e., CacheLevels < DEPTH), and defaulting to all non-root nodes
MutexTypethe type of mutex to use (see note)
Warning
If IsSafe = false then the ValueAccessor will not register itself with the tree from which it is constructed. While in some rare cases this can lead to better performance (since it avoids the small overhead of insertion on creation and deletion on destruction) it is also unsafe if the tree is modified. So unless you're an expert it is highly recommended to set IsSafe = true, which is the default. However if you know that the tree is no being modifed for the lifespan of the ValueAccessor AND the work performed per ValueAccessor is small relative to overhead of registering it you should consider setting IsSafe = false. If this improves performance you should really rewrite your code so as to better amortize the construction of the ValueAccessor, i.e. reuse it as much as possible!
Note
If MutexType is a TBB-compatible mutex, then multiple threads may safely access a single, shared accessor. However, it is highly recommended that, instead, each thread be assigned its own, non-mutex-protected accessor.

Definition at line 219 of file ValueAccessor.h.

Member Typedef Documentation

template<typename _TreeType, bool IsSafe = true, Index CacheLevels = _TreeType::DEPTH-1, typename MutexType = tbb::null_mutex>
typedef ValueAccessorBase<TreeType, IsSafe> openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessor< _TreeType, IsSafe, CacheLevels, MutexType >::BaseT

Definition at line 228 of file ValueAccessor.h.

template<typename _TreeType, bool IsSafe = true, Index CacheLevels = _TreeType::DEPTH-1, typename MutexType = tbb::null_mutex>
typedef TreeType::LeafNodeType openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessor< _TreeType, IsSafe, CacheLevels, MutexType >::LeafNodeT

Definition at line 226 of file ValueAccessor.h.

template<typename _TreeType, bool IsSafe = true, Index CacheLevels = _TreeType::DEPTH-1, typename MutexType = tbb::null_mutex>
typedef MutexType::scoped_lock openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessor< _TreeType, IsSafe, CacheLevels, MutexType >::LockT

Definition at line 229 of file ValueAccessor.h.

template<typename _TreeType, bool IsSafe = true, Index CacheLevels = _TreeType::DEPTH-1, typename MutexType = tbb::null_mutex>
typedef TreeType::RootNodeType openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessor< _TreeType, IsSafe, CacheLevels, MutexType >::RootNodeT

Definition at line 225 of file ValueAccessor.h.

template<typename _TreeType, bool IsSafe = true, Index CacheLevels = _TreeType::DEPTH-1, typename MutexType = tbb::null_mutex>
typedef _TreeType openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessor< _TreeType, IsSafe, CacheLevels, MutexType >::TreeType

Definition at line 224 of file ValueAccessor.h.

template<typename _TreeType, bool IsSafe = true, Index CacheLevels = _TreeType::DEPTH-1, typename MutexType = tbb::null_mutex>
typedef RootNodeT::ValueType openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessor< _TreeType, IsSafe, CacheLevels, MutexType >::ValueType

Definition at line 227 of file ValueAccessor.h.

Constructor & Destructor Documentation

template<typename _TreeType, bool IsSafe = true, Index CacheLevels = _TreeType::DEPTH-1, typename MutexType = tbb::null_mutex>
openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessor< _TreeType, IsSafe, CacheLevels, MutexType >::ValueAccessor ( TreeType tree)
inline

Definition at line 232 of file ValueAccessor.h.

template<typename _TreeType, bool IsSafe = true, Index CacheLevels = _TreeType::DEPTH-1, typename MutexType = tbb::null_mutex>
openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessor< _TreeType, IsSafe, CacheLevels, MutexType >::ValueAccessor ( const ValueAccessor< _TreeType, IsSafe, CacheLevels, MutexType > &  other)
inline

Definition at line 237 of file ValueAccessor.h.

template<typename _TreeType, bool IsSafe = true, Index CacheLevels = _TreeType::DEPTH-1, typename MutexType = tbb::null_mutex>
virtual openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessor< _TreeType, IsSafe, CacheLevels, MutexType >::~ValueAccessor ( )
inlinevirtual

Definition at line 247 of file ValueAccessor.h.

Member Function Documentation

template<typename _TreeType, bool IsSafe = true, Index CacheLevels = _TreeType::DEPTH-1, typename MutexType = tbb::null_mutex>
void openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessor< _TreeType, IsSafe, CacheLevels, MutexType >::addLeaf ( LeafNodeT leaf)
inline

Add the specified leaf to this tree, possibly creating a child branch in the process. If the leaf node already exists, replace it.

Definition at line 374 of file ValueAccessor.h.

template<typename _TreeType, bool IsSafe = true, Index CacheLevels = _TreeType::DEPTH-1, typename MutexType = tbb::null_mutex>
void openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessor< _TreeType, IsSafe, CacheLevels, MutexType >::addTile ( Index  level,
const Coord &  xyz,
const ValueType value,
bool  state 
)
inline

Add a tile at the specified tree level that contains voxel (x, y, z), possibly deleting existing nodes or creating new nodes in the process.

Definition at line 382 of file ValueAccessor.h.

template<typename _TreeType, bool IsSafe = true, Index CacheLevels = _TreeType::DEPTH-1, typename MutexType = tbb::null_mutex>
virtual void openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessor< _TreeType, IsSafe, CacheLevels, MutexType >::clear ( void  )
inlinevirtual

Remove all nodes from this cache, then reinsert the root node.

Implements openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessorBase< _TreeType, IsSafe >.

Definition at line 438 of file ValueAccessor.h.

template<typename _TreeType, bool IsSafe = true, Index CacheLevels = _TreeType::DEPTH-1, typename MutexType = tbb::null_mutex>
template<typename NodeType >
void openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessor< _TreeType, IsSafe, CacheLevels, MutexType >::eraseNode ( )
inline

If a node of the given type exists in the cache, remove it, so that isCached(xyz) returns false for any voxel (x, y, z) contained in that node. [Mainly for internal use]

Definition at line 370 of file ValueAccessor.h.

template<typename _TreeType, bool IsSafe = true, Index CacheLevels = _TreeType::DEPTH-1, typename MutexType = tbb::null_mutex>
template<typename NodeType >
NodeType* openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessor< _TreeType, IsSafe, CacheLevels, MutexType >::getNode ( void  )
inline

Return the cached node of type NodeType. [Mainly for internal use].

Definition at line 349 of file ValueAccessor.h.

template<typename _TreeType, bool IsSafe = true, Index CacheLevels = _TreeType::DEPTH-1, typename MutexType = tbb::null_mutex>
const ValueType& openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessor< _TreeType, IsSafe, CacheLevels, MutexType >::getValue ( const Coord &  xyz) const
inline

Return the value of the voxel at the given coordinates.

Definition at line 256 of file ValueAccessor.h.

template<typename _TreeType, bool IsSafe = true, Index CacheLevels = _TreeType::DEPTH-1, typename MutexType = tbb::null_mutex>
int openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessor< _TreeType, IsSafe, CacheLevels, MutexType >::getValueDepth ( const Coord &  xyz) const
inline

Return the tree depth (0 = root) at which the value of voxel (x, y, z) resides, or -1 if (x, y, z) isn't explicitly represented in the tree (i.e., if it is implicitly a background voxel).

Definition at line 275 of file ValueAccessor.h.

template<typename _TreeType, bool IsSafe = true, Index CacheLevels = _TreeType::DEPTH-1, typename MutexType = tbb::null_mutex>
openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessor< _TreeType, IsSafe, CacheLevels, MutexType >::HBOOST_STATIC_ASSERT ( )
template<typename _TreeType, bool IsSafe = true, Index CacheLevels = _TreeType::DEPTH-1, typename MutexType = tbb::null_mutex>
template<typename NodeType >
void openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessor< _TreeType, IsSafe, CacheLevels, MutexType >::insertNode ( const Coord &  xyz,
NodeType &  node 
)
inline

Cache the given node, which should lie along the path from the root node to the node containing voxel (x, y, z). [Mainly for internal use]

Definition at line 360 of file ValueAccessor.h.

template<typename _TreeType, bool IsSafe = true, Index CacheLevels = _TreeType::DEPTH-1, typename MutexType = tbb::null_mutex>
bool openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessor< _TreeType, IsSafe, CacheLevels, MutexType >::isCached ( const Coord &  xyz) const
inline

Return true if nodes along the path to the given voxel have been cached.

Definition at line 253 of file ValueAccessor.h.

template<typename _TreeType, bool IsSafe = true, Index CacheLevels = _TreeType::DEPTH-1, typename MutexType = tbb::null_mutex>
bool openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessor< _TreeType, IsSafe, CacheLevels, MutexType >::isValueOn ( const Coord &  xyz) const
inline

Return the active state of the voxel at the given coordinates.

Definition at line 263 of file ValueAccessor.h.

template<typename _TreeType, bool IsSafe = true, Index CacheLevels = _TreeType::DEPTH-1, typename MutexType = tbb::null_mutex>
bool openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessor< _TreeType, IsSafe, CacheLevels, MutexType >::isVoxel ( const Coord &  xyz) const
inline

Return true if the value of voxel (x, y, z) resides at the leaf level of the tree, i.e., if it is not a tile value.

Definition at line 283 of file ValueAccessor.h.

template<typename _TreeType, bool IsSafe = true, Index CacheLevels = _TreeType::DEPTH-1, typename MutexType = tbb::null_mutex>
template<typename ModifyOp >
void openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessor< _TreeType, IsSafe, CacheLevels, MutexType >::modifyValue ( const Coord &  xyz,
const ModifyOp &  op 
)
inline

Apply a functor to the value of the voxel at the given coordinates and mark the voxel as active.

See Tree::modifyValue() for details.

Definition at line 321 of file ValueAccessor.h.

template<typename _TreeType, bool IsSafe = true, Index CacheLevels = _TreeType::DEPTH-1, typename MutexType = tbb::null_mutex>
template<typename ModifyOp >
void openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessor< _TreeType, IsSafe, CacheLevels, MutexType >::modifyValueAndActiveState ( const Coord &  xyz,
const ModifyOp &  op 
)
inline

Apply a functor to the voxel at the given coordinates.

See Tree::modifyValueAndActiveState() for details.

Definition at line 330 of file ValueAccessor.h.

template<typename _TreeType, bool IsSafe = true, Index CacheLevels = _TreeType::DEPTH-1, typename MutexType = tbb::null_mutex>
void openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessor< _TreeType, IsSafe, CacheLevels, MutexType >::newSetValue ( const Coord &  xyz,
const ValueType value 
)
inline

Set the value of the voxel at the given coordinates and mark the voxel as active. [Experimental]

Definition at line 304 of file ValueAccessor.h.

template<typename _TreeType, bool IsSafe = true, Index CacheLevels = _TreeType::DEPTH-1, typename MutexType = tbb::null_mutex>
static Index openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessor< _TreeType, IsSafe, CacheLevels, MutexType >::numCacheLevels ( )
inlinestatic

Return the number of cache levels employed by this accessor.

Definition at line 250 of file ValueAccessor.h.

template<typename _TreeType, bool IsSafe = true, Index CacheLevels = _TreeType::DEPTH-1, typename MutexType = tbb::null_mutex>
ValueAccessor& openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessor< _TreeType, IsSafe, CacheLevels, MutexType >::operator= ( const ValueAccessor< _TreeType, IsSafe, CacheLevels, MutexType > &  other)
inline

Definition at line 239 of file ValueAccessor.h.

template<typename _TreeType, bool IsSafe = true, Index CacheLevels = _TreeType::DEPTH-1, typename MutexType = tbb::null_mutex>
const LeafNodeT* openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessor< _TreeType, IsSafe, CacheLevels, MutexType >::probeConstLeaf ( const Coord &  xyz) const
inline

Return a pointer to the leaf node that contains voxel (x, y, z), or nullptr if no such node exists.

Definition at line 429 of file ValueAccessor.h.

template<typename _TreeType, bool IsSafe = true, Index CacheLevels = _TreeType::DEPTH-1, typename MutexType = tbb::null_mutex>
template<typename NodeT >
const NodeT* openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessor< _TreeType, IsSafe, CacheLevels, MutexType >::probeConstNode ( const Coord &  xyz) const
inline

Return a pointer to the node of the specified type that contains voxel (x, y, z), or nullptr if no such node exists.

Definition at line 409 of file ValueAccessor.h.

template<typename _TreeType, bool IsSafe = true, Index CacheLevels = _TreeType::DEPTH-1, typename MutexType = tbb::null_mutex>
LeafNodeT* openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessor< _TreeType, IsSafe, CacheLevels, MutexType >::probeLeaf ( const Coord &  xyz)
inline

Return a pointer to the leaf node that contains voxel (x, y, z), or nullptr if no such node exists.

Definition at line 424 of file ValueAccessor.h.

template<typename _TreeType, bool IsSafe = true, Index CacheLevels = _TreeType::DEPTH-1, typename MutexType = tbb::null_mutex>
const LeafNodeT* openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessor< _TreeType, IsSafe, CacheLevels, MutexType >::probeLeaf ( const Coord &  xyz) const
inline

Return a pointer to the leaf node that contains voxel (x, y, z), or nullptr if no such node exists.

Definition at line 434 of file ValueAccessor.h.

template<typename _TreeType, bool IsSafe = true, Index CacheLevels = _TreeType::DEPTH-1, typename MutexType = tbb::null_mutex>
template<typename NodeT >
NodeT* openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessor< _TreeType, IsSafe, CacheLevels, MutexType >::probeNode ( const Coord &  xyz)
inline

Return a pointer to the node of the specified type that contains voxel (x, y, z), or nullptr if no such node exists.

Definition at line 403 of file ValueAccessor.h.

template<typename _TreeType, bool IsSafe = true, Index CacheLevels = _TreeType::DEPTH-1, typename MutexType = tbb::null_mutex>
template<typename NodeT >
const NodeT* openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessor< _TreeType, IsSafe, CacheLevels, MutexType >::probeNode ( const Coord &  xyz) const
inline

Return a pointer to the node of the specified type that contains voxel (x, y, z), or nullptr if no such node exists.

Definition at line 415 of file ValueAccessor.h.

template<typename _TreeType, bool IsSafe = true, Index CacheLevels = _TreeType::DEPTH-1, typename MutexType = tbb::null_mutex>
bool openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessor< _TreeType, IsSafe, CacheLevels, MutexType >::probeValue ( const Coord &  xyz,
ValueType value 
) const
inline

Return the active state of the voxel as well as its value.

Definition at line 266 of file ValueAccessor.h.

template<typename _TreeType, bool IsSafe = true, Index CacheLevels = _TreeType::DEPTH-1, typename MutexType = tbb::null_mutex>
void openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessor< _TreeType, IsSafe, CacheLevels, MutexType >::setActiveState ( const Coord &  xyz,
bool  on = true 
)
inline

Set the active state of the voxel at the given coordinates but don't change its value.

Definition at line 337 of file ValueAccessor.h.

template<typename _TreeType, bool IsSafe = true, Index CacheLevels = _TreeType::DEPTH-1, typename MutexType = tbb::null_mutex>
void openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessor< _TreeType, IsSafe, CacheLevels, MutexType >::setValue ( const Coord &  xyz,
const ValueType value 
)
inline

Set the value of the voxel at the given coordinates and mark the voxel as active.

Definition at line 287 of file ValueAccessor.h.

template<typename _TreeType, bool IsSafe = true, Index CacheLevels = _TreeType::DEPTH-1, typename MutexType = tbb::null_mutex>
void openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessor< _TreeType, IsSafe, CacheLevels, MutexType >::setValueOff ( const Coord &  xyz,
const ValueType value 
)
inline

Set the value of the voxel at the given coordinates and mark the voxel as inactive.

Definition at line 311 of file ValueAccessor.h.

template<typename _TreeType, bool IsSafe = true, Index CacheLevels = _TreeType::DEPTH-1, typename MutexType = tbb::null_mutex>
void openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessor< _TreeType, IsSafe, CacheLevels, MutexType >::setValueOff ( const Coord &  xyz)
inline

Mark the voxel at the given coordinates as inactive but don't change its value.

Definition at line 345 of file ValueAccessor.h.

template<typename _TreeType, bool IsSafe = true, Index CacheLevels = _TreeType::DEPTH-1, typename MutexType = tbb::null_mutex>
void openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessor< _TreeType, IsSafe, CacheLevels, MutexType >::setValueOn ( const Coord &  xyz,
const ValueType value 
)
inline

Set the value of the voxel at the given coordinates and mark the voxel as active.

Definition at line 292 of file ValueAccessor.h.

template<typename _TreeType, bool IsSafe = true, Index CacheLevels = _TreeType::DEPTH-1, typename MutexType = tbb::null_mutex>
void openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessor< _TreeType, IsSafe, CacheLevels, MutexType >::setValueOn ( const Coord &  xyz)
inline

Mark the voxel at the given coordinates as active but don't change its value.

Definition at line 343 of file ValueAccessor.h.

template<typename _TreeType, bool IsSafe = true, Index CacheLevels = _TreeType::DEPTH-1, typename MutexType = tbb::null_mutex>
void openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessor< _TreeType, IsSafe, CacheLevels, MutexType >::setValueOnly ( const Coord &  xyz,
const ValueType value 
)
inline

Set the value of the voxel at the given coordinate but don't change its active state.

Definition at line 296 of file ValueAccessor.h.

template<typename _TreeType, bool IsSafe = true, Index CacheLevels = _TreeType::DEPTH-1, typename MutexType = tbb::null_mutex>
LeafNodeT* openvdb::OPENVDB_VERSION_NAME::tree::ValueAccessor< _TreeType, IsSafe, CacheLevels, MutexType >::touchLeaf ( const Coord &  xyz)
inline

Return a pointer to the leaf node that contains voxel (x, y, z). If no such node exists, create one, but preserve the values and active states of all voxels.

Use this method to preallocate a static tree topology over which to safely perform multithreaded processing.

Definition at line 393 of file ValueAccessor.h.

Friends And Related Function Documentation

template<typename _TreeType, bool IsSafe = true, Index CacheLevels = _TreeType::DEPTH-1, typename MutexType = tbb::null_mutex>
template<typename , Index >
friend class InternalNode
friend

Definition at line 448 of file ValueAccessor.h.

template<typename _TreeType, bool IsSafe = true, Index CacheLevels = _TreeType::DEPTH-1, typename MutexType = tbb::null_mutex>
template<typename , Index >
friend class LeafNode
friend

Definition at line 449 of file ValueAccessor.h.

template<typename _TreeType, bool IsSafe = true, Index CacheLevels = _TreeType::DEPTH-1, typename MutexType = tbb::null_mutex>
template<typename >
friend class RootNode
friend

Definition at line 447 of file ValueAccessor.h.

template<typename _TreeType, bool IsSafe = true, Index CacheLevels = _TreeType::DEPTH-1, typename MutexType = tbb::null_mutex>
template<typename >
friend class Tree
friend

Definition at line 451 of file ValueAccessor.h.


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