HDK
|
#include <InternalNode.h>
Classes | |
struct | ChildAll |
struct | ChildIter |
struct | ChildOff |
struct | ChildOn |
struct | DeepCopy |
struct | DenseIter |
struct | SameConfiguration |
SameConfiguration<OtherNodeType>::value is true if and only if OtherNodeType is the type of an InternalNode with the same dimensions as this node and whose ChildNodeType has the same configuration as this node's ChildNodeType. More... | |
struct | TopologyCopy1 |
struct | TopologyCopy2 |
struct | TopologyDifference |
struct | TopologyIntersection |
struct | TopologyUnion |
struct | ValueAll |
struct | ValueConverter |
ValueConverter<T>::Type is the type of an InternalNode having the same child hierarchy and dimensions as this node but a different value type, T. More... | |
struct | ValueIter |
struct | ValueOff |
struct | ValueOn |
struct | VoxelizeActiveTiles |
Public Member Functions | |
InternalNode () | |
Default constructor. More... | |
InternalNode (const ValueType &offValue) | |
Constructor of an InternalNode with dense inactive tiles of the specified value. More... | |
InternalNode (const Coord &origin, const ValueType &fillValue, bool active=false) | |
Constructs an InternalNode with dense tiles. More... | |
InternalNode (PartialCreate, const Coord &, const ValueType &fillValue, bool active=false) | |
InternalNode (const InternalNode &) | |
Deep copy constructor. More... | |
template<typename OtherChildNodeType > | |
InternalNode (const InternalNode< OtherChildNodeType, Log2Dim > &other) | |
Value conversion copy constructor. More... | |
template<typename OtherChildNodeType > | |
InternalNode (const InternalNode< OtherChildNodeType, Log2Dim > &other, const ValueType &background, TopologyCopy) | |
Topology copy constructor. More... | |
template<typename OtherChildNodeType > | |
InternalNode (const InternalNode< OtherChildNodeType, Log2Dim > &other, const ValueType &offValue, const ValueType &onValue, TopologyCopy) | |
Topology copy constructor. More... | |
~InternalNode () | |
ChildOnCIter | cbeginChildOn () const |
ChildOffCIter | cbeginChildOff () const |
ChildAllCIter | cbeginChildAll () const |
ChildOnCIter | beginChildOn () const |
ChildOffCIter | beginChildOff () const |
ChildAllCIter | beginChildAll () const |
ChildOnIter | beginChildOn () |
ChildOffIter | beginChildOff () |
ChildAllIter | beginChildAll () |
ValueOnCIter | cbeginValueOn () const |
ValueOffCIter | cbeginValueOff () const |
ValueAllCIter | cbeginValueAll () const |
ValueOnCIter | beginValueOn () const |
ValueOffCIter | beginValueOff () const |
ValueAllCIter | beginValueAll () const |
ValueOnIter | beginValueOn () |
ValueOffIter | beginValueOff () |
ValueAllIter | beginValueAll () |
Coord | offsetToGlobalCoord (Index n) const |
Return the global coordinates for a linear table offset. More... | |
const Coord & | origin () const |
Return the grid index coordinates of this node's local origin. More... | |
void | setOrigin (const Coord &origin) |
Set the grid index coordinates of this node's local origin. More... | |
Index32 | transientData () const |
Return the transient data value. More... | |
void | setTransientData (Index32 transientData) |
Set the transient data value. More... | |
Index32 | leafCount () const |
void | nodeCount (std::vector< Index32 > &vec) const |
Index32 | nonLeafCount () const |
Index32 | childCount () const |
Index64 | onVoxelCount () const |
Index64 | offVoxelCount () const |
Index64 | onLeafVoxelCount () const |
Index64 | offLeafVoxelCount () const |
Index64 | onTileCount () const |
Index64 | memUsage () const |
Return the total amount of memory in bytes occupied by this node and its children. More... | |
void | evalActiveBoundingBox (CoordBBox &bbox, bool visitVoxels=true) const |
Expand the specified bounding box so that it includes the active tiles of this internal node as well as all the active values in its child nodes. If visitVoxels is false LeafNodes will be approximated as dense, i.e. with all voxels active. Else the individual active voxels are visited to produce a tight bbox. More... | |
CoordBBox | getNodeBoundingBox () const |
Return the bounding box of this node, i.e., the full index space spanned by the node regardless of its content. More... | |
bool | isEmpty () const |
bool | isConstant (ValueType &firstValue, bool &state, const ValueType &tolerance=zeroVal< ValueType >()) const |
bool | isConstant (ValueType &minValue, ValueType &maxValue, bool &state, const ValueType &tolerance=zeroVal< ValueType >()) const |
bool | isInactive () const |
Return true if this node has no children and only contains inactive values. More... | |
bool | isValueOn (const Coord &xyz) const |
Return true if the voxel at the given coordinates is active. More... | |
bool | isValueOn (Index offset) const |
Return true if the voxel at the given offset is active. More... | |
bool | hasActiveTiles () const |
Return true if this node or any of its child nodes have any active tiles. More... | |
const ValueType & | getValue (const Coord &xyz) const |
bool | probeValue (const Coord &xyz, ValueType &value) const |
Index | getValueLevel (const Coord &xyz) const |
Return the level of the tree (0 = leaf) at which the value at the given coordinates resides. More... | |
const ValueType & | getFirstValue () const |
If the first entry in this node's table is a tile, return the tile's value. Otherwise, return the result of calling getFirstValue() on the child. More... | |
const ValueType & | getLastValue () const |
If the last entry in this node's table is a tile, return the tile's value. Otherwise, return the result of calling getLastValue() on the child. More... | |
void | setActiveState (const Coord &xyz, bool on) |
Set the active state of the voxel at the given coordinates but don't change its value. More... | |
void | setValueOnly (const Coord &xyz, const ValueType &value) |
Set the value of the voxel at the given coordinates but don't change its active state. More... | |
void | setValueOn (const Coord &xyz) |
Mark the voxel at the given coordinates as active but don't change its value. 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... | |
void | setValueOff (const Coord &xyz) |
Mark the voxel at the given coordinates as inactive but don't change its value. 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... | |
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... | |
template<typename AccessorT > | |
const ValueType & | getValueAndCache (const Coord &xyz, AccessorT &) const |
template<typename AccessorT > | |
bool | isValueOnAndCache (const Coord &xyz, AccessorT &) const |
template<typename AccessorT > | |
void | setValueAndCache (const Coord &xyz, const ValueType &value, AccessorT &) |
template<typename AccessorT > | |
void | setValueOnlyAndCache (const Coord &xyz, const ValueType &value, AccessorT &) |
template<typename ModifyOp , typename AccessorT > | |
void | modifyValueAndCache (const Coord &xyz, const ModifyOp &op, AccessorT &) |
Apply a functor to the value of the voxel at the given coordinates and mark the voxel as active. If necessary, update the accessor with pointers to the nodes along the path from the root node to the node containing the voxel. More... | |
template<typename ModifyOp , typename AccessorT > | |
void | modifyValueAndActiveStateAndCache (const Coord &xyz, const ModifyOp &op, AccessorT &) |
template<typename AccessorT > | |
void | setValueOffAndCache (const Coord &xyz, const ValueType &value, AccessorT &) |
template<typename AccessorT > | |
void | setActiveStateAndCache (const Coord &xyz, bool on, AccessorT &) |
template<typename AccessorT > | |
bool | probeValueAndCache (const Coord &xyz, ValueType &value, AccessorT &) const |
template<typename AccessorT > | |
Index | getValueLevelAndCache (const Coord &xyz, AccessorT &) const |
Return the level of the tree (0 = leaf) at which the value at the given coordinates resides. More... | |
void | setValuesOn () |
Mark all values (both tiles and voxels) as active. More... | |
void | writeTopology (std::ostream &, bool toHalf=false) const |
void | readTopology (std::istream &, bool fromHalf=false) |
void | writeBuffers (std::ostream &, bool toHalf=false) const |
void | readBuffers (std::istream &, bool fromHalf=false) |
void | readBuffers (std::istream &, const CoordBBox &, bool fromHalf=false) |
void | negate () |
Change the sign of all the values represented in this node and its child nodes. More... | |
void | fill (const CoordBBox &bbox, const ValueType &value, bool active=true) |
Set all voxels within a given axis-aligned box to a constant value. More... | |
void | denseFill (const CoordBBox &bbox, const ValueType &value, bool active=true) |
Set all voxels within a given axis-aligned box to a constant value and ensure that those voxels are all represented at the leaf level. More... | |
void | voxelizeActiveTiles (bool threaded=true) |
Densify active tiles, i.e., replace them with leaf-level active voxels. More... | |
template<typename DenseT > | |
void | copyToDense (const CoordBBox &bbox, DenseT &dense) const |
Copy into a dense grid the values of the voxels that lie within a given bounding box. More... | |
template<MergePolicy Policy> | |
void | merge (InternalNode &other, const ValueType &background, const ValueType &otherBackground) |
Efficiently merge another tree into this tree using one of several schemes. More... | |
template<MergePolicy Policy> | |
void | merge (const ValueType &tileValue, bool tileActive) |
Merge, using one of several schemes, this node (and its descendants) with a tile of the same dimensions and the given value and active state. More... | |
template<typename OtherChildNodeType > | |
void | topologyUnion (const InternalNode< OtherChildNodeType, Log2Dim > &other, const bool preserveTiles=false) |
Union this branch's set of active values with the other branch's active values. The value type of the other branch can be different. More... | |
template<typename OtherChildNodeType > | |
void | topologyIntersection (const InternalNode< OtherChildNodeType, Log2Dim > &other, const ValueType &background) |
Intersects this tree's set of active values with the active values of the other tree, whose ValueType may be different. More... | |
template<typename OtherChildNodeType > | |
void | topologyDifference (const InternalNode< OtherChildNodeType, Log2Dim > &other, const ValueType &background) |
Difference this node's set of active values with the active values of the other node, whose ValueType may be different. So a resulting voxel will be active only if the original voxel is active in this node and inactive in the other node. More... | |
template<typename CombineOp > | |
void | combine (InternalNode &other, CombineOp &) |
template<typename CombineOp > | |
void | combine (const ValueType &value, bool valueIsActive, CombineOp &) |
template<typename CombineOp , typename OtherNodeType > | |
void | combine2 (const InternalNode &other0, const OtherNodeType &other1, CombineOp &) |
template<typename CombineOp , typename OtherNodeType > | |
void | combine2 (const ValueType &value, const OtherNodeType &other, bool valIsActive, CombineOp &) |
template<typename CombineOp , typename OtherValueType > | |
void | combine2 (const InternalNode &other, const OtherValueType &, bool valIsActive, CombineOp &) |
void | clip (const CoordBBox &, const ValueType &background) |
Set all voxels that lie outside the given axis-aligned box to the background. More... | |
void | prune (const ValueType &tolerance=zeroVal< ValueType >()) |
Reduce the memory footprint of this tree by replacing with tiles any nodes whose values are all the same (optionally to within a tolerance) and have the same active state. More... | |
void | addLeaf (LeafNodeType *leaf) |
Add the specified leaf to this node, possibly creating a child branch in the process. If the leaf node already exists, replace it. More... | |
template<typename AccessorT > | |
void | addLeafAndCache (LeafNodeType *leaf, AccessorT &) |
Same as addLeaf() except, if necessary, update the accessor with pointers to the nodes along the path from the root node to the node containing the coordinate. More... | |
template<typename NodeT > | |
NodeT * | stealNode (const Coord &xyz, const ValueType &value, bool state) |
Return a pointer to the node of type NodeT that contains voxel (x, y, z) and replace it with a tile of the specified value and state. If no such node exists, leave the tree unchanged and return nullptr . More... | |
bool | addChild (ChildNodeType *child) |
Add the given child node at this level deducing the offset from it's origin. If a child node with this offset already exists, delete the old node and add the new node in its place (i.e. ownership of the new child node is transferred to this InternalNode) 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 creating a parent branch or deleting a child branch in the process. More... | |
void | addTile (Index offset, const ValueType &value, bool state) |
Delete any existing child branch at the specified offset and add a tile. More... | |
template<typename AccessorT > | |
void | addTileAndCache (Index level, const Coord &xyz, const ValueType &, bool state, AccessorT &) |
Same as addTile() except, if necessary, update the accessor with pointers to the nodes along the path from the root node to the node containing (x, y, z). More... | |
LeafNodeType * | touchLeaf (const Coord &xyz) |
Return 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... | |
template<typename AccessorT > | |
LeafNodeType * | touchLeafAndCache (const Coord &xyz, AccessorT &) |
Same as touchLeaf() except, if necessary, update the accessor with pointers to the nodes along the path from the root node to the node containing the coordinate. More... | |
template<typename ArrayT > | |
void | stealNodes (ArrayT &array, const ValueType &value, bool state) |
Steals all nodes of a certain type from the tree and adds them to a container with the following API: More... | |
void | resetBackground (const ValueType &oldBackground, const ValueType &newBackground) |
Change inactive tiles or voxels with value oldBackground to newBackground or -oldBackground to -newBackground. Active values are unchanged. More... | |
template<typename OtherChildNodeType , Index OtherLog2Dim> | |
bool | hasSameTopology (const InternalNode< OtherChildNodeType, OtherLog2Dim > *other) const |
Return true if the given tree branch has the same node and active value topology as this tree branch (but possibly a different ValueType ). More... | |
bool | isValueMaskOn (Index n) const |
bool | isValueMaskOn () const |
bool | isValueMaskOff (Index n) const |
bool | isValueMaskOff () const |
bool | isChildMaskOn (Index n) const |
bool | isChildMaskOff (Index n) const |
bool | isChildMaskOff () const |
const NodeMaskType & | getValueMask () const |
const NodeMaskType & | getChildMask () const |
NodeMaskType | getValueOffMask () const |
const UnionType * | getTable () const |
template<typename NodeT > | |
NodeT * | probeNode (const Coord &xyz) |
template<typename NodeT , typename AccessorT > | |
NodeT * | probeNodeAndCache (const Coord &xyz, AccessorT &acc) |
template<typename NodeT > | |
const NodeT * | probeConstNode (const Coord &xyz) const |
template<typename NodeT , typename AccessorT > | |
const NodeT * | probeConstNodeAndCache (const Coord &xyz, AccessorT &acc) const |
template<typename AccessorT > | |
ChildT::LeafNodeType * | probeLeafAndCache (const Coord &xyz, AccessorT &acc) |
template<typename AccessorT > | |
const ChildT::LeafNodeType * | probeLeafAndCache (const Coord &xyz, AccessorT &acc) const |
template<typename AccessorT > | |
const ChildT::LeafNodeType * | probeConstLeafAndCache (const Coord &xyz, AccessorT &acc) const |
template<typename OtherChildT > | |
void | topologyUnion (const InternalNode< OtherChildT, Log2Dim > &other, const bool preserveTiles) |
template<typename OtherChildT > | |
void | topologyIntersection (const InternalNode< OtherChildT, Log2Dim > &other, const ValueType &background) |
template<typename OtherChildT > | |
void | topologyDifference (const InternalNode< OtherChildT, Log2Dim > &other, const ValueType &background) |
template<typename NodeType > | |
NodeType * | probeNode (const Coord &xyz) |
Return a pointer to the node that contains voxel (x, y, z). If no such node exists, return nullptr. More... | |
template<typename NodeType > | |
const NodeType * | probeConstNode (const Coord &xyz) const |
Return a pointer to the node that contains voxel (x, y, z). If no such node exists, return nullptr. More... | |
template<typename NodeType , typename AccessorT > | |
NodeType * | probeNodeAndCache (const Coord &xyz, AccessorT &) |
Same as probeNode() except, if necessary, update the accessor with pointers to the nodes along the path from the root node to the node containing (x, y, z). More... | |
template<typename NodeType , typename AccessorT > | |
const NodeType * | probeConstNodeAndCache (const Coord &xyz, AccessorT &) const |
Same as probeNode() except, if necessary, update the accessor with pointers to the nodes along the path from the root node to the node containing (x, y, z). More... | |
LeafNodeType * | probeLeaf (const Coord &xyz) |
Return a pointer to the leaf node that contains voxel (x, y, z). If no such node exists, return nullptr . More... | |
const LeafNodeType * | probeConstLeaf (const Coord &xyz) const |
Return a pointer to the leaf node that contains voxel (x, y, z). If no such node exists, return nullptr . More... | |
const LeafNodeType * | probeLeaf (const Coord &xyz) const |
Return a pointer to the leaf node that contains voxel (x, y, z). If no such node exists, return nullptr . More... | |
template<typename AccessorT > | |
LeafNodeType * | probeLeafAndCache (const Coord &xyz, AccessorT &acc) |
Same as probeLeaf() except, if necessary, update the accessor with pointers to the nodes along the path from the root node to the node containing (x, y, z). More... | |
template<typename AccessorT > | |
const LeafNodeType * | probeConstLeafAndCache (const Coord &xyz, AccessorT &acc) const |
Same as probeLeaf() except, if necessary, update the accessor with pointers to the nodes along the path from the root node to the node containing (x, y, z). More... | |
template<typename AccessorT > | |
const LeafNodeType * | probeLeafAndCache (const Coord &xyz, AccessorT &acc) const |
Same as probeLeaf() except, if necessary, update the accessor with pointers to the nodes along the path from the root node to the node containing (x, y, z). More... | |
template<typename ArrayT > | |
void | getNodes (ArrayT &array) |
Adds all nodes of a certain type to a container with the following API: More... | |
template<typename ArrayT > | |
void | getNodes (ArrayT &array) const |
Adds all nodes of a certain type to a container with the following API: More... | |
Static Public Member Functions | |
static Index | dim () |
static Index | getLevel () |
static void | getNodeLog2Dims (std::vector< Index > &dims) |
Populated an std::vector with the dimension of all the nodes in the branch starting with this node. More... | |
static Index | getChildDim () |
static Index | coordToOffset (const Coord &xyz) |
Return the linear table offset of the given global or local coordinates. More... | |
static void | offsetToLocalCoord (Index n, Coord &xyz) |
Return the local coordinates for a linear table offset, where offset 0 has coordinates (0, 0, 0). More... | |
Static Public Attributes | |
static const Index | LOG2DIM = Log2Dim |
static const Index | TOTAL = Log2Dim + ChildNodeType::TOTAL |
static const Index | DIM = 1 << TOTAL |
static const Index | NUM_VALUES = 1 << (3 * Log2Dim) |
static const Index | LEVEL = 1 + ChildNodeType::LEVEL |
static const Index64 | NUM_VOXELS = uint64_t(1) << (3 * TOTAL) |
Protected Types | |
using | MaskOnIterator = typename NodeMaskType::OnIterator |
using | MaskOffIterator = typename NodeMaskType::OffIterator |
using | MaskDenseIterator = typename NodeMaskType::DenseIterator |
Protected Member Functions | |
void | makeChildNodeEmpty (Index n, const ValueType &value) |
void | setChildNode (Index i, ChildNodeType *child) |
void | resetChildNode (Index i, ChildNodeType *child) |
ChildNodeType * | unsetChildNode (Index i, const ValueType &value) |
void | setValueMask (Index n, bool on) |
ChildNodeType * | getChildNode (Index n) |
Returns a pointer to the child node at the linear offset n. More... | |
const ChildNodeType * | getChildNode (Index n) const |
Returns a pointer to the child node at the linear offset n. More... | |
Protected Attributes | |
UnionType | mNodes [NUM_VALUES] |
NodeMaskType | mChildMask |
NodeMaskType | mValueMask |
Coord | mOrigin |
Global grid index coordinates (x,y,z) of the local origin of this node. More... | |
Index32 | mTransientData = 0 |
Transient data (not serialized) More... | |
Friends | |
template<typename , Index > | |
class | InternalNode |
During topology-only construction, access is needed to protected/private members of other template instances. More... | |
class | IteratorBase< MaskOnIterator, InternalNode > |
class | IteratorBase< MaskOffIterator, InternalNode > |
class | IteratorBase< MaskDenseIterator, InternalNode > |
Definition at line 33 of file InternalNode.h.
using openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::BuildType = typename ChildNodeType::BuildType |
Definition at line 39 of file InternalNode.h.
using openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::ChildAllCIter = DenseIter<const InternalNode,const ChildNodeType, ValueType, ChildAll> |
Definition at line 211 of file InternalNode.h.
using openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::ChildAllIter = DenseIter<InternalNode, ChildNodeType, ValueType, ChildAll> |
Definition at line 210 of file InternalNode.h.
using openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::ChildNodeType = _ChildNodeType |
Definition at line 36 of file InternalNode.h.
using openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::ChildOffCIter = ValueIter<const InternalNode,const ValueType,MaskOffIterator,ChildOff> |
Definition at line 209 of file InternalNode.h.
using openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::ChildOffIter = ValueIter<InternalNode, const ValueType, MaskOffIterator, ChildOff> |
Definition at line 208 of file InternalNode.h.
using openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::ChildOnCIter = ChildIter<const InternalNode,const ChildNodeType,MaskOnIterator,ChildOn> |
Definition at line 207 of file InternalNode.h.
using openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::ChildOnIter = ChildIter<InternalNode, ChildNodeType, MaskOnIterator, ChildOn> |
Definition at line 206 of file InternalNode.h.
using openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::LeafNodeType = typename ChildNodeType::LeafNodeType |
Definition at line 37 of file InternalNode.h.
|
protected |
Definition at line 116 of file InternalNode.h.
|
protected |
Definition at line 115 of file InternalNode.h.
|
protected |
Definition at line 114 of file InternalNode.h.
using openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::NodeMaskType = util::NodeMask<Log2Dim> |
Definition at line 41 of file InternalNode.h.
using openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::UnionType = NodeUnion<ValueType, ChildNodeType> |
Definition at line 40 of file InternalNode.h.
using openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::ValueAllCIter = ValueIter<const InternalNode,const ValueType,MaskOffIterator,ValueAll> |
Definition at line 218 of file InternalNode.h.
using openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::ValueAllIter = ValueIter<InternalNode, const ValueType, MaskOffIterator, ValueAll> |
Definition at line 217 of file InternalNode.h.
using openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::ValueOffCIter = ValueIter<const InternalNode,const ValueType,MaskOffIterator,ValueOff> |
Definition at line 216 of file InternalNode.h.
using openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::ValueOffIter = ValueIter<InternalNode, const ValueType, MaskOffIterator, ValueOff> |
Definition at line 215 of file InternalNode.h.
using openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::ValueOnCIter = ValueIter<const InternalNode, const ValueType, MaskOnIterator, ValueOn> |
Definition at line 214 of file InternalNode.h.
using openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::ValueOnIter = ValueIter<InternalNode, const ValueType, MaskOnIterator, ValueOn> |
Definition at line 213 of file InternalNode.h.
using openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::ValueType = typename ChildNodeType::ValueType |
Definition at line 38 of file InternalNode.h.
|
inline |
Default constructor.
Definition at line 72 of file InternalNode.h.
|
inlineexplicit |
Constructor of an InternalNode with dense inactive tiles of the specified value.
offValue | Background value used for inactive values |
Definition at line 824 of file InternalNode.h.
|
inline |
Constructs an InternalNode with dense tiles.
origin | The location in index space of the fist tile value |
fillValue | Value assigned to all the tiles |
active | State assigned to all the tiles |
Definition at line 832 of file InternalNode.h.
|
inline |
Definition at line 846 of file InternalNode.h.
|
inline |
Deep copy constructor.
Definition at line 877 of file InternalNode.h.
|
inlineexplicit |
Value conversion copy constructor.
Definition at line 891 of file InternalNode.h.
|
inline |
Topology copy constructor.
Definition at line 927 of file InternalNode.h.
|
inline |
Topology copy constructor.
Definition at line 964 of file InternalNode.h.
|
inline |
Definition at line 978 of file InternalNode.h.
bool openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::addChild | ( | ChildNodeType * | child | ) |
Add the given child node at this level deducing the offset from it's origin. If a child node with this offset already exists, delete the old node and add the new node in its place (i.e. ownership of the new child node is transferred to this InternalNode)
true
if inserting the child has been successful, otherwise the caller retains ownership of the node and is responsible for deleting it.
|
inline |
Add the specified leaf to this node, possibly creating a child branch in the process. If the leaf node already exists, replace it.
Definition at line 1298 of file InternalNode.h.
|
inline |
Same as addLeaf() except, if necessary, update the accessor with pointers to the nodes along the path from the root node to the node containing the coordinate.
Definition at line 1327 of file InternalNode.h.
|
inline |
Add a tile at the specified tree level that contains voxel (x, y, z), possibly creating a parent branch or deleting a child branch in the process.
Definition at line 1386 of file InternalNode.h.
|
inline |
Delete any existing child branch at the specified offset and add a tile.
Definition at line 1376 of file InternalNode.h.
|
inline |
Same as addTile() except, if necessary, update the accessor with pointers to the nodes along the path from the root node to the node containing (x, y, z).
Definition at line 1418 of file InternalNode.h.
|
inline |
Definition at line 225 of file InternalNode.h.
|
inline |
Definition at line 228 of file InternalNode.h.
|
inline |
Definition at line 224 of file InternalNode.h.
|
inline |
Definition at line 227 of file InternalNode.h.
|
inline |
Definition at line 223 of file InternalNode.h.
|
inline |
Definition at line 226 of file InternalNode.h.
|
inline |
Definition at line 237 of file InternalNode.h.
|
inline |
Definition at line 241 of file InternalNode.h.
|
inline |
Definition at line 236 of file InternalNode.h.
|
inline |
Definition at line 240 of file InternalNode.h.
|
inline |
Definition at line 234 of file InternalNode.h.
|
inline |
Definition at line 238 of file InternalNode.h.
|
inline |
Definition at line 222 of file InternalNode.h.
|
inline |
Definition at line 221 of file InternalNode.h.
|
inline |
Definition at line 220 of file InternalNode.h.
|
inline |
Definition at line 233 of file InternalNode.h.
|
inline |
Definition at line 232 of file InternalNode.h.
|
inline |
Definition at line 230 of file InternalNode.h.
|
inline |
Definition at line 1029 of file InternalNode.h.
|
inline |
Set all voxels that lie outside the given axis-aligned box to the background.
Definition at line 1972 of file InternalNode.h.
|
inline |
Definition at line 2647 of file InternalNode.h.
|
inline |
Definition at line 2705 of file InternalNode.h.
|
inline |
Definition at line 2734 of file InternalNode.h.
|
inline |
Definition at line 2781 of file InternalNode.h.
|
inline |
Definition at line 2814 of file InternalNode.h.
|
inlinestatic |
Return the linear table offset of the given global or local coordinates.
Definition at line 2915 of file InternalNode.h.
|
inline |
Copy into a dense grid the values of the voxels that lie within a given bounding box.
bbox | inclusive bounding box of the voxels to be copied into the dense grid |
dense | dense grid with a stride in z of one (see tools::Dense in tools/Dense.h for the required API) |
Definition at line 2126 of file InternalNode.h.
|
inline |
Set all voxels within a given axis-aligned box to a constant value and ensure that those voxels are all represented at the leaf level.
bbox | inclusive coordinates of opposite corners of an axis-aligned box. |
value | the value to which to set voxels within the box. |
active | if true, mark voxels within the box as active, otherwise mark them as inactive. |
Definition at line 2078 of file InternalNode.h.
|
inlinestatic |
The number of voxels in one coordinate direction covered by this node
Definition at line 246 of file InternalNode.h.
|
inline |
Expand the specified bounding box so that it includes the active tiles of this internal node as well as all the active values in its child nodes. If visitVoxels is false LeafNodes will be approximated as dense, i.e. with all voxels active. Else the individual active voxels are visited to produce a tight bbox.
Definition at line 1108 of file InternalNode.h.
|
inline |
Set all voxels within a given axis-aligned box to a constant value.
bbox | inclusive coordinates of opposite corners of an axis-aligned box |
value | the value to which to set voxels within the box |
active | if true, mark voxels within the box as active, otherwise mark them as inactive |
Definition at line 2022 of file InternalNode.h.
|
inlinestatic |
The number of voxels in one coordinate direction covered by a child node of this node.
Definition at line 256 of file InternalNode.h.
|
inline |
Definition at line 752 of file InternalNode.h.
|
inlineprotected |
Returns a pointer to the child node at the linear offset n.
Definition at line 3093 of file InternalNode.h.
|
inlineprotected |
Returns a pointer to the child node at the linear offset n.
Definition at line 3102 of file InternalNode.h.
|
inline |
If the first entry in this node's table is a tile, return the tile's value. Otherwise, return the result of calling getFirstValue() on the child.
Definition at line 2256 of file InternalNode.h.
|
inline |
If the last entry in this node's table is a tile, return the tile's value. Otherwise, return the result of calling getLastValue() on the child.
Definition at line 2264 of file InternalNode.h.
|
inlinestatic |
Level 0 is by definition the level of the leaf nodes
Definition at line 249 of file InternalNode.h.
|
inline |
Return the bounding box of this node, i.e., the full index space spanned by the node regardless of its content.
Definition at line 297 of file InternalNode.h.
|
static |
Populated an std::vector with the dimension of all the nodes in the branch starting with this node.
Definition at line 2894 of file InternalNode.h.
|
inline |
Adds all nodes of a certain type to a container with the following API:
An example of a wrapper around a c-style array is:
An example that constructs a list of pointer to all leaf nodes is:
Definition at line 2940 of file InternalNode.h.
|
inline |
Adds all nodes of a certain type to a container with the following API:
An example of a wrapper around a c-style array is:
An example that constructs a list of pointer to all leaf nodes is:
Definition at line 2960 of file InternalNode.h.
|
inline |
Definition at line 760 of file InternalNode.h.
|
inline |
Definition at line 1570 of file InternalNode.h.
const ValueType& openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::getValueAndCache | ( | const Coord & | xyz, |
AccessorT & | |||
) | const |
Return the value of the voxel at the given coordinates and, if necessary, update the accessor with pointers to the nodes along the path from the root node to the node containing the voxel.
|
inline |
Return the level of the tree (0 = leaf) at which the value at the given coordinates resides.
Definition at line 1593 of file InternalNode.h.
|
inline |
Return the level of the tree (0 = leaf) at which the value at the given coordinates resides.
If necessary, update the accessor with pointers to the nodes along the path from the root node to the node containing the voxel.
Definition at line 1602 of file InternalNode.h.
|
inline |
Definition at line 751 of file InternalNode.h.
|
inline |
Definition at line 753 of file InternalNode.h.
|
inline |
Return true
if this node or any of its child nodes have any active tiles.
Definition at line 1534 of file InternalNode.h.
|
inline |
Return true
if the given tree branch has the same node and active value topology as this tree branch (but possibly a different ValueType
).
Definition at line 3031 of file InternalNode.h.
|
inline |
Definition at line 749 of file InternalNode.h.
|
inline |
Definition at line 750 of file InternalNode.h.
|
inline |
Definition at line 748 of file InternalNode.h.
|
inline |
Return true
if all of this node's table entries have the same active state and the same constant value to within the given tolerance, and return that value in firstValue and the active state in state.
false
if this node contains any child nodes. Definition at line 1487 of file InternalNode.h.
|
inline |
Return true
if all of this node's tables entries have the same active state and the range of its values satisfy (maxValue - minValue) <= tolerance.
minValue | Is updated with the minimum of all values IF method returns true . Else the value is undefined! |
maxValue | Is updated with the maximum of all values IF method returns true . Else the value is undefined! |
state | Is updated with the state of all values IF method returns true . Else the value is undefined! |
tolerance | The tolerance used to determine if values are approximately constant. |
false
if this node contains any child nodes. Definition at line 1507 of file InternalNode.h.
|
inline |
Definition at line 300 of file InternalNode.h.
|
inline |
Return true
if this node has no children and only contains inactive values.
Definition at line 328 of file InternalNode.h.
|
inline |
Definition at line 746 of file InternalNode.h.
|
inline |
Definition at line 747 of file InternalNode.h.
|
inline |
Definition at line 744 of file InternalNode.h.
|
inline |
Definition at line 745 of file InternalNode.h.
|
inline |
Return true
if the voxel at the given coordinates is active.
Definition at line 1549 of file InternalNode.h.
|
inline |
Return true
if the voxel at the given offset is active.
Definition at line 333 of file InternalNode.h.
|
inline |
Return true
if the voxel at the given coordinates is active and, if necessary, update the accessor with pointers to the nodes along the path from the root node to the node containing the voxel.
Definition at line 1559 of file InternalNode.h.
|
inline |
Definition at line 991 of file InternalNode.h.
|
inlineprotected |
Definition at line 3086 of file InternalNode.h.
|
inline |
Return the total amount of memory in bytes occupied by this node and its children.
Definition at line 1095 of file InternalNode.h.
|
inline |
Efficiently merge another tree into this tree using one of several schemes.
Definition at line 2341 of file InternalNode.h.
|
inline |
Merge, using one of several schemes, this node (and its descendants) with a tile of the same dimensions and the given value and active state.
Definition at line 2450 of file InternalNode.h.
|
inline |
Apply a functor to the value of the voxel at the given coordinates and mark the voxel as active.
Definition at line 1856 of file InternalNode.h.
|
inline |
Apply a functor to the voxel at the given coordinates.
Definition at line 1918 of file InternalNode.h.
|
inline |
Apply a functor to the voxel at the given coordinates. If necessary, update the accessor with pointers to the nodes along the path from the root node to the node containing the voxel.
Definition at line 1941 of file InternalNode.h.
|
inline |
Apply a functor to the value of the voxel at the given coordinates and mark the voxel as active. If necessary, update the accessor with pointers to the nodes along the path from the root node to the node containing the voxel.
Definition at line 1884 of file InternalNode.h.
|
inline |
Change the sign of all the values represented in this node and its child nodes.
Definition at line 2276 of file InternalNode.h.
|
inline |
Definition at line 1003 of file InternalNode.h.
|
inline |
Definition at line 1016 of file InternalNode.h.
|
inline |
Definition at line 1073 of file InternalNode.h.
|
inline |
Return the global coordinates for a linear table offset.
Definition at line 2925 of file InternalNode.h.
|
inlinestatic |
Return the local coordinates for a linear table offset, where offset 0 has coordinates (0, 0, 0).
Definition at line 2903 of file InternalNode.h.
|
inline |
Definition at line 1049 of file InternalNode.h.
|
inline |
Definition at line 1061 of file InternalNode.h.
|
inline |
Definition at line 1084 of file InternalNode.h.
|
inline |
Definition at line 1037 of file InternalNode.h.
|
inline |
Return the grid index coordinates of this node's local origin.
Definition at line 267 of file InternalNode.h.
|
inline |
Return a pointer to the leaf node that contains voxel (x, y, z). If no such node exists, return nullptr
.
Definition at line 1278 of file InternalNode.h.
const LeafNodeType* openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::probeConstLeafAndCache | ( | const Coord & | xyz, |
AccessorT & | acc | ||
) | const |
Same as probeLeaf() except, if necessary, update the accessor with pointers to the nodes along the path from the root node to the node containing (x, y, z).
|
inline |
Definition at line 1287 of file InternalNode.h.
const NodeType* openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::probeConstNode | ( | const Coord & | xyz | ) | const |
Return a pointer to the node that contains voxel (x, y, z). If no such node exists, return nullptr.
|
inline |
Definition at line 1213 of file InternalNode.h.
const NodeType* openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::probeConstNodeAndCache | ( | const Coord & | xyz, |
AccessorT & | |||
) | const |
Same as probeNode() except, if necessary, update the accessor with pointers to the nodes along the path from the root node to the node containing (x, y, z).
|
inline |
Definition at line 1231 of file InternalNode.h.
|
inline |
Return a pointer to the leaf node that contains voxel (x, y, z). If no such node exists, return nullptr
.
Definition at line 1252 of file InternalNode.h.
const LeafNodeType* openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::probeLeaf | ( | const Coord & | xyz | ) | const |
Return a pointer to the leaf node that contains voxel (x, y, z). If no such node exists, return nullptr
.
LeafNodeType* openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::probeLeafAndCache | ( | const Coord & | xyz, |
AccessorT & | acc | ||
) |
Same as probeLeaf() except, if necessary, update the accessor with pointers to the nodes along the path from the root node to the node containing (x, y, z).
const LeafNodeType* openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::probeLeafAndCache | ( | const Coord & | xyz, |
AccessorT & | acc | ||
) | const |
Same as probeLeaf() except, if necessary, update the accessor with pointers to the nodes along the path from the root node to the node containing (x, y, z).
|
inline |
Definition at line 1261 of file InternalNode.h.
|
inline |
Definition at line 1270 of file InternalNode.h.
NodeType* openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::probeNode | ( | const Coord & | xyz | ) |
Return a pointer to the node that contains voxel (x, y, z). If no such node exists, return nullptr.
|
inline |
Definition at line 1176 of file InternalNode.h.
NodeType* openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::probeNodeAndCache | ( | const Coord & | xyz, |
AccessorT & | |||
) |
Same as probeNode() except, if necessary, update the accessor with pointers to the nodes along the path from the root node to the node containing (x, y, z).
|
inline |
Definition at line 1194 of file InternalNode.h.
|
inline |
Definition at line 1615 of file InternalNode.h.
|
inline |
Return, in value, the value of the voxel at the given coordinates and, if necessary, update the accessor with pointers to the nodes along the path from the root node to the node containing the voxel.
true
if the voxel at the given coordinates is active Definition at line 1628 of file InternalNode.h.
|
inline |
Reduce the memory footprint of this tree by replacing with tiles any nodes whose values are all the same (optionally to within a tolerance) and have the same active state.
Definition at line 1126 of file InternalNode.h.
|
inline |
Definition at line 2859 of file InternalNode.h.
|
inline |
Definition at line 2869 of file InternalNode.h.
|
inline |
Definition at line 2196 of file InternalNode.h.
|
inline |
Change inactive tiles or voxels with value oldBackground to newBackground or -oldBackground to -newBackground. Active values are unchanged.
Definition at line 3011 of file InternalNode.h.
|
inlineprotected |
Definition at line 3045 of file InternalNode.h.
|
inline |
Set the active state of the voxel at the given coordinates but don't change its value.
Definition at line 1802 of file InternalNode.h.
|
inline |
Set the active state of the voxel at the given coordinates without changing its value. If necessary, update the accessor with pointers to the nodes along the path from the root node to the node containing the voxel.
Definition at line 1821 of file InternalNode.h.
|
inlineprotected |
Definition at line 3059 of file InternalNode.h.
|
inline |
Set the grid index coordinates of this node's local origin.
Definition at line 269 of file InternalNode.h.
|
inline |
Set the transient data value.
Definition at line 274 of file InternalNode.h.
|
inline |
Change the value of the voxel at the given coordinates and mark it as active. If necessary, update the accessor with pointers to the nodes along the path from the root node to the node containing the voxel.
Definition at line 1740 of file InternalNode.h.
|
inlineprotected |
Use a mask accessor to ensure consistency between the child and value masks; i.e., the value mask should always be off wherever the child mask is on.
Definition at line 765 of file InternalNode.h.
|
inline |
Mark the voxel at the given coordinates as inactive but don't change its value.
Definition at line 1643 of file InternalNode.h.
|
inline |
Set the value of the voxel at the given coordinates and mark the voxel as inactive.
Definition at line 1675 of file InternalNode.h.
|
inline |
Change the value of the voxel at the given coordinates and mark it as inactive. If necessary, update the accessor with pointers to the nodes along the path from the root node to the node containing the voxel.
Definition at line 1695 of file InternalNode.h.
|
inline |
Mark the voxel at the given coordinates as active but don't change its value.
Definition at line 1659 of file InternalNode.h.
|
inline |
Set the value of the voxel at the given coordinates and mark the voxel as active.
Definition at line 1720 of file InternalNode.h.
|
inline |
Set the value of the voxel at the given coordinates but don't change its active state.
Definition at line 1764 of file InternalNode.h.
|
inline |
Set the value of the voxel at the given coordinate but preserves its active state. If necessary, update the accessor with pointers to the nodes along the path from the root node to the node containing the voxel.
Definition at line 1781 of file InternalNode.h.
|
inline |
Mark all values (both tiles and voxels) as active.
Definition at line 1844 of file InternalNode.h.
|
inline |
Return a pointer to the node of type NodeT
that contains voxel (x, y, z) and replace it with a tile of the specified value and state. If no such node exists, leave the tree unchanged and return nullptr
.
Definition at line 1150 of file InternalNode.h.
|
inline |
Steals all nodes of a certain type from the tree and adds them to a container with the following API:
An example of a wrapper around a c-style array is:
An example that constructs a list of pointer to all leaf nodes is:
Definition at line 2984 of file InternalNode.h.
void openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::topologyDifference | ( | const InternalNode< OtherChildNodeType, Log2Dim > & | other, |
const ValueType & | background | ||
) |
Difference this node's set of active values with the active values of the other node, whose ValueType
may be different. So a resulting voxel will be active only if the original voxel is active in this node and inactive in the other node.
The last dummy argument is required to match the signature for InternalNode::topologyDifference.
|
inline |
Definition at line 2634 of file InternalNode.h.
void openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::topologyIntersection | ( | const InternalNode< OtherChildNodeType, Log2Dim > & | other, |
const ValueType & | background | ||
) |
Intersects this tree's set of active values with the active values of the other tree, whose ValueType
may be different.
The resulting state of a value is active only if the corresponding value was already active AND if it is active in the other tree. Also, a resulting value maps to a voxel if the corresponding value already mapped to an active voxel in either of the two grids and it maps to an active tile or voxel in the other grid.
|
inline |
Definition at line 2574 of file InternalNode.h.
void openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::topologyUnion | ( | const InternalNode< OtherChildNodeType, Log2Dim > & | other, |
const bool | preserveTiles = false |
||
) |
Union this branch's set of active values with the other branch's active values. The value type of the other branch can be different.
The resulting state of a value is active if the corresponding value was already active OR if it is active in the other tree. Also, a resulting value maps to a voxel if the corresponding value already mapped to a voxel OR if it is a voxel in the other tree. Thus, a resulting value can only map to a tile if the corresponding value already mapped to a tile AND if it is a tile value in other tree.
Specifically, active tiles and voxels in this branch are not changed, and tiles or voxels that were inactive in this branch but active in the other branch are marked as active in this branch but left with their original values.
|
inline |
Definition at line 2525 of file InternalNode.h.
|
inline |
Return 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 1454 of file InternalNode.h.
LeafNodeType* openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::touchLeafAndCache | ( | const Coord & | xyz, |
AccessorT & | |||
) |
Same as touchLeaf() except, if necessary, update the accessor with pointers to the nodes along the path from the root node to the node containing the coordinate.
|
inline |
Return the transient data value.
Definition at line 272 of file InternalNode.h.
|
inlineprotected |
Definition at line 3071 of file InternalNode.h.
|
inline |
Densify active tiles, i.e., replace them with leaf-level active voxels.
threaded | if true, this operation is multi-threaded (over the internal nodes). |
Definition at line 2320 of file InternalNode.h.
|
inline |
Definition at line 2849 of file InternalNode.h.
|
inline |
Definition at line 2171 of file InternalNode.h.
|
friend |
During topology-only construction, access is needed to protected/private members of other template instances.
Definition at line 740 of file InternalNode.h.
|
friend |
Allow iterators to call mask accessor methods (setValueMask(), setChildMask(), etc.).
Definition at line 735 of file InternalNode.h.
|
friend |
Allow iterators to call mask accessor methods (setValueMask(), setChildMask(), etc.).
Definition at line 734 of file InternalNode.h.
|
friend |
Allow iterators to call mask accessor methods (setValueMask(), setChildMask(), etc.).
Definition at line 733 of file InternalNode.h.
|
static |
Definition at line 46 of file InternalNode.h.
|
static |
Definition at line 48 of file InternalNode.h.
|
static |
Definition at line 44 of file InternalNode.h.
|
protected |
Definition at line 793 of file InternalNode.h.
|
protected |
Definition at line 789 of file InternalNode.h.
|
protected |
Global grid index coordinates (x,y,z) of the local origin of this node.
Definition at line 795 of file InternalNode.h.
|
protected |
Transient data (not serialized)
Definition at line 797 of file InternalNode.h.
|
protected |
Definition at line 793 of file InternalNode.h.
|
static |
Definition at line 47 of file InternalNode.h.
|
static |
Definition at line 50 of file InternalNode.h.
|
static |
Definition at line 45 of file InternalNode.h.