OpenVDB: ValueAccessor< TreeType, IsSafe, 0, tbb::null_mutex > Class Template Reference

OpenVDB 7.0.0

Public Types | Public Member Functions | Static Public Member Functions | List of all members
ValueAccessor< TreeType, IsSafe, 0, tbb::null_mutex > Class Template Reference

Template specialization of the ValueAccessor with no mutex and no cache levels. More...

`#include <ValueAccessor.h>`

Inherits ValueAccessor0< TreeType, IsSafe >.

## Public Types
using | TreeType = TreeType
using | ValueType = typename TreeType::ValueType
using | RootNodeT = typename TreeType::RootNodeType
using | LeafNodeT = typename TreeType::LeafNodeType
using | BaseT = ValueAccessorBase< TreeType, IsSafe >

## Public Member Functions
| ValueAccessor (TreeType &tree)
| ValueAccessor (const ValueAccessor &other)
| ~ValueAccessor () override=default
bool | isCached (const Coord &) const
| Return `true` if nodes along the path to the given voxel have been cached. More...
const ValueType & | getValue (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 and, in value, the value of the voxel at the given coordinates. More...
int | getValueDepth (const Coord &xyz) const
bool | isVoxel (const Coord &xyz) 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. More...
void | setValueOn (const Coord &xyz, const ValueType &value)
void | setValueOn (const Coord &xyz)
| Mark the voxel at the given coordinates as active but don't change its value. More...
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 | setValueOff (const Coord &xyz, const ValueType &value)
| Set the value of the voxel at the given coordinates and mark the voxel as inactive. More...
void | setValueOff (const Coord &xyz)
| Mark the voxel at the given coordinates as inactive but don't change its value. More...
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...
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...
NodeT * | getNode ()
| Return the cached node of type NodeType. [Mainly for internal use]. More...
void | insertNode (const Coord &, NodeT &)
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...
void | eraseNode ()
LeafNodeT * | touchLeaf (const Coord &xyz)
NodeT * | probeNode (const Coord &xyz)
const NodeT * | probeConstNode (const Coord &xyz) const
LeafNodeT * | probeLeaf (const Coord &xyz)
const LeafNodeT * | probeLeaf (const Coord &xyz) const
const LeafNodeT * | probeConstLeaf (const Coord &xyz) const
void | clear () override
| Remove all nodes from this cache, then reinsert the root node. More...

## Static Public Member Functions
static Index | numCacheLevels ()
| Return the number of cache levels employed by this accessor. More...

## Detailed Description

### template<typename TreeType, bool IsSafe>
class openvdb::v7_0::tree::ValueAccessor< TreeType, IsSafe, 0, tbb::null_mutex >

Template specialization of the ValueAccessor with no mutex and no cache levels.

This specialization is provided mainly for benchmarking. Accessors with caching will almost always be faster.

## Member Typedef Documentation

## ◆ BaseT

using BaseT = ValueAccessorBase<TreeType, IsSafe>
| inherited

## ◆ LeafNodeT

using LeafNodeT = typename TreeType::LeafNodeType
| inherited

## ◆ RootNodeT

using RootNodeT = typename TreeType::RootNodeType
| inherited

## ◆ TreeType

using TreeType = TreeType
| inherited

## ◆ ValueType

using ValueType = typename TreeType::ValueType
| inherited

## Constructor & Destructor Documentation

## ◆ ValueAccessor() [1/2]

ValueAccessor | ( | TreeType & | tree | ) |
| inline

## ◆ ValueAccessor() [2/2]

ValueAccessor | ( | const ValueAccessor< TreeType, IsSafe, 0, tbb::null_mutex > & | other | ) |
| inline

## ◆ ~ValueAccessor()

~ValueAccessor | ( |  | ) |
| overridedefault

## Member Function Documentation

## ◆ addLeaf()

void addLeaf | ( | LeafNodeT * | leaf | ) |
| inlineinherited

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

## ◆ addTile()

void addTile | ( | Index | level,
|  | const Coord & | xyz,
|  | const ValueType & | value,
|  | bool | state
| ) |  |
| inlineinherited

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.

## ◆ clear()

void clear
| inlineoverrideinherited

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

## ◆ eraseNode()

void eraseNode
| inlineinherited

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]

## ◆ getNode()

NodeT* getNode
| inlineinherited

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

## ◆ getValue()

const ValueType& getValue | ( | const Coord & | xyz | ) | const
| inlineinherited

Return the value of the voxel at the given coordinates.

## ◆ getValueDepth()

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).

## ◆ insertNode()

void insertNode | ( | const Coord & | ,
|  | NodeT & |
| ) |  |
| 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]

## ◆ isCached()

bool isCached | ( | const Coord & |  | ) | const
| inlineinherited

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

## ◆ isValueOn()

bool isValueOn | ( | const Coord & | xyz | ) | const
| inlineinherited

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

## ◆ isVoxel()

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.

## ◆ modifyValue()

void modifyValue | ( | const Coord & | xyz,
|  | const ModifyOp & | op
| ) |  |
| inlineinherited

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

See Tree::modifyValue() for details.

## ◆ modifyValueAndActiveState()

void modifyValueAndActiveState | ( | const Coord & | xyz,
|  | const ModifyOp & | op
| ) |  |
| inlineinherited

Apply a functor to the voxel at the given coordinates.

See Tree::modifyValueAndActiveState() for details.

## ◆ numCacheLevels()

static Index numCacheLevels
| inlinestaticinherited

Return the number of cache levels employed by this accessor.

## ◆ probeConstLeaf()

const LeafNodeT* probeConstLeaf | ( | const Coord & | xyz | ) | const
| inlineinherited

## ◆ probeConstNode()

const NodeT* probeConstNode | ( | const Coord & | xyz | ) | const
| inlineinherited

## ◆ probeLeaf() [1/2]

LeafNodeT* probeLeaf | ( | const Coord & | xyz | ) |
| inlineinherited

## ◆ probeLeaf() [2/2]

const LeafNodeT* probeLeaf | ( | const Coord & | xyz | ) | const
| inlineinherited

## ◆ probeNode()

NodeT* probeNode | ( | const Coord & | xyz | ) |
| inlineinherited

## ◆ probeValue()

bool probeValue | ( | const Coord & | xyz,
|  | ValueType & | value
| ) |  | const
| inlineinherited

Return the active state and, in value, the value of the voxel at the given coordinates.

## ◆ setActiveState()

void setActiveState | ( | const Coord & | xyz,
|  | bool | on = `true`
| ) |  |
| inlineinherited

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

## ◆ setValue()

void setValue | ( | const Coord & | xyz,
|  | const ValueType & | value
| ) |  |
| inlineinherited

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

## ◆ setValueOff() [1/2]

void setValueOff | ( | const Coord & | xyz | ) |
| inlineinherited

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

## ◆ setValueOff() [2/2]

void setValueOff | ( | const Coord & | xyz,
|  | const ValueType & | value
| ) |  |
| inlineinherited

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

## ◆ setValueOn() [1/2]

void setValueOn | ( | const Coord & | xyz | ) |
| inlineinherited

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

## ◆ setValueOn() [2/2]

void setValueOn | ( | const Coord & | xyz,
|  | const ValueType & | value
| ) |  |
| inlineinherited

## ◆ setValueOnly()

void setValueOnly | ( | const Coord & | xyz,
|  | const ValueType & | value
| ) |  |
| inlineinherited

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

## ◆ touchLeaf()

LeafNodeT* touchLeaf | ( | const Coord & | xyz | ) |
| inlineinherited

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

- ValueAccessor.h