Template specialization of the ValueAccessor with no mutex and 2 cache levels.
More...
#include <ValueAccessor.h>
Inherits ValueAccessor2< TreeType >.
template<typename TreeType>
struct openvdb::v1_1_0::tree::ValueAccessor< TreeType, 2, tbb::null_mutex >
Template specialization of the ValueAccessor with no mutex and 2 cache levels.
typedef boost::mpl::at<InvTreeT, boost::mpl::int_<0 > >::type NodeT0 |
|
inherited |
BOOST_STATIC_ASSERT |
( |
_TreeType::DEPTH >= |
3 | ) |
|
|
inherited |
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]
Return the cached node of type NodeType. [Mainly for internal use].
_TreeType * getTree |
( |
| ) |
const |
|
inlineinherited |
- Returns
- a pointer to the tree associated by this ValueAccessor
Return the value of the voxel at the given coordinates.
int getValueDepth |
( |
const Coord & |
xyz | ) |
const |
|
inlineinherited |
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).
void insertNode |
( |
const Coord & |
xyz, |
|
|
NodeT & |
node |
|
) |
| |
|
inlineinherited |
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]
bool isCached |
( |
const Coord & |
xyz | ) |
const |
|
inlineinherited |
Return true
if any of the nodes along the path to the given voxel have been cached.
bool isValueOn |
( |
const Coord & |
xyz | ) |
const |
|
inlineinherited |
Return the active state of the voxel at the given coordinates.
bool isVoxel |
( |
const Coord & |
xyz | ) |
const |
|
inlineinherited |
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.
static Index numCacheLevels |
( |
| ) |
|
|
inlinestaticinherited |
Return the number of cache levels employed by this ValueAccessor.
- Returns
- a const pointer to the leaf node that contains voxel (x, y, z) and if it doesn't exist, return NULL.
- Returns
- a pointer to the leaf node that contains voxel (x, y, z) and if it doesn't exist, return NULL.
Return the active state of the voxel as well as its value.
void setActiveState |
( |
const Coord & |
xyz, |
|
|
bool |
on = true |
|
) |
| |
|
inlineinherited |
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.
void setValueOff |
( |
const Coord & |
xyz | ) |
|
|
inlineinherited |
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.
void setValueOn |
( |
const Coord & |
xyz | ) |
|
|
inlineinherited |
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.
- Returns
- the leaf node that contains voxel (x, y, z) and if it doesn't exist, create it, 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.
The documentation for this struct was generated from the following file: