OpenVDB
1.1.0
|
ValueAccessor with no mutex and no node caching. More...
#include <ValueAccessor.h>
Inherits ValueAccessorBase< _TreeType >.
Public Types | |
typedef _TreeType | TreeType |
typedef TreeType::ValueType | ValueType |
typedef TreeType::RootNodeType | RootNodeT |
typedef TreeType::LeafNodeType | LeafNodeT |
typedef ValueAccessorBase < TreeType > | BaseT |
Public Member Functions | |
ValueAccessor0 (TreeType &tree) | |
ValueAccessor0 (const ValueAccessor0 &other) | |
ValueAccessor0 & | operator= (const ValueAccessor0 &other) |
virtual | ~ValueAccessor0 () |
bool | isCached (const Coord &) const |
Return true if nodes along the path to the given voxel have been cached. | |
const ValueType & | getValue (const Coord &xyz) const |
Return the value of the voxel at the given coordinates. | |
bool | isValueOn (const Coord &xyz) const |
Return the active state of the voxel at the given coordinates. | |
bool | probeValue (const Coord &xyz, ValueType &value) const |
Return the active state of the voxel as well as its value. | |
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 preserves its active state. | |
void | setValueOff (const Coord &xyz, const ValueType &value) |
Set the value of the voxel at the given coordinates and mark the voxel as inactive. | |
void | setValueOnSum (const Coord &xyz, const ValueType &value) |
void | setActiveState (const Coord &xyz, bool on=true) |
Set the active state of the voxel at the given coordinates without changing its value. | |
void | setValueOn (const Coord &xyz) |
Mark the voxel at the given coordinates as active without changing its value. | |
void | setValueOff (const Coord &xyz) |
Mark the voxel at the given coordinates as inactive without changing its value. | |
template<typename NodeT > | |
NodeT * | getNode () |
Return the cached node of type NodeType. [Mainly for internal use]. | |
template<typename NodeT > | |
void | insertNode (const Coord &, NodeT &) |
template<typename NodeT > | |
void | eraseNode () |
LeafNodeT * | touchLeaf (const Coord &xyz) |
LeafNodeT * | probeLeaf (const Coord &xyz) |
const LeafNodeT * | probeConstLeaf (const Coord &xyz) |
virtual void | clear () |
Remove all nodes from this cache, then reinsert the root node. | |
_TreeType * | getTree () const |
void | setValue (const Coord &xyz, const ValueType &value) |
Set the value of the voxel at the given coordinates and mark the voxel as active. | |
void | setValueOn (const Coord &xyz, const ValueType &value) |
Set the value of the voxel at the given coordinates and mark the voxel as active. |
Static Public Member Functions | |
static Index | numCacheLevels () |
Return the number of cache levels employed by this ValueAccessor. |
Static Public Attributes | |
static const bool | IsConstTree |
Protected Attributes | |
_TreeType * | mTree |
Friends | |
class | Tree |
ValueAccessor with no mutex and no node caching.
typedef ValueAccessorBase<TreeType> BaseT |
typedef TreeType::LeafNodeType LeafNodeT |
typedef TreeType::RootNodeType RootNodeT |
typedef _TreeType TreeType |
typedef TreeType::ValueType ValueType |
|
inline |
|
inline |
|
inlinevirtual |
|
inlinevirtual |
Remove all nodes from this cache, then reinsert the root node.
Implements ValueAccessorBase< _TreeType >.
|
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]
|
inline |
Return the cached node of type NodeType. [Mainly for internal use].
|
inlineinherited |
Return the value of the voxel at the given coordinates.
|
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).
|
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]
|
inline |
Return true
if nodes along the path to the given voxel have been cached.
|
inline |
Return the active state of the voxel at the given coordinates.
|
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.
|
inlinestatic |
Return the number of cache levels employed by this ValueAccessor.
|
inline |
Return the active state of the voxel as well as its value.
|
inline |
Set the active state of the voxel at the given coordinates without changing its value.
Set the value of the voxel at the given coordinates and mark the voxel as active.
Set the value of the voxel at the given coordinates and mark the voxel as inactive.
|
inline |
Mark the voxel at the given coordinates as inactive without changing its value.
Set the value of the voxel at the given coordinates and mark the voxel as active.
|
inline |
Mark the voxel at the given coordinates as active without changing its value.
Set the value of the voxel at the given coordinate but preserves its active state.
Set the value of the voxel at the given coordinates to the sum of its current value and the given value, and mark the voxel as active.
|
friend |
|
staticinherited |
|
protectedinherited |