|
HDK
|
#include <RootNode.h>
Classes | |
| struct | SameConfiguration |
SameConfiguration<OtherNodeType>::value is true if and only if OtherNodeType is the type of a RootNode whose ChildNodeType has the same configuration as this node's ChildNodeType. More... | |
| struct | ValueConverter |
| ValueConverter<T>::Type is the type of a RootNode having the same child hierarchy as this node but a different value type, T. More... | |
Public Types | |
| using | ChildNodeType = ChildType |
| using | LeafNodeType = typename ChildType::LeafNodeType |
| using | ValueType = typename ChildType::ValueType |
| using | BuildType = typename ChildType::BuildType |
| using | NodeChainType = typename NodeChain< RootNode, LEVEL >::Type |
| NodeChainType is a list of this tree's node types, from LeafNodeType to RootNode. More... | |
| using | ChildOnIter = ChildIter< RootNode, MapIter, ChildOnPred, ChildType > |
| using | ChildOnCIter = ChildIter< const RootNode, MapCIter, ChildOnPred, const ChildType > |
| using | ChildOffIter = ValueIter< RootNode, MapIter, ChildOffPred, const ValueType > |
| using | ChildOffCIter = ValueIter< const RootNode, MapCIter, ChildOffPred, ValueType > |
| using | ChildAllIter = DenseIter< RootNode, MapIter, ChildType, ValueType > |
| using | ChildAllCIter = DenseIter< const RootNode, MapCIter, const ChildType, const ValueType > |
| using | ValueOnIter = ValueIter< RootNode, MapIter, ValueOnPred, ValueType > |
| using | ValueOnCIter = ValueIter< const RootNode, MapCIter, ValueOnPred, const ValueType > |
| using | ValueOffIter = ValueIter< RootNode, MapIter, ValueOffPred, ValueType > |
| using | ValueOffCIter = ValueIter< const RootNode, MapCIter, ValueOffPred, const ValueType > |
| using | ValueAllIter = ValueIter< RootNode, MapIter, ValueAllPred, ValueType > |
| using | ValueAllCIter = ValueIter< const RootNode, MapCIter, ValueAllPred, const ValueType > |
Public Member Functions | |
| RootNode () | |
| Construct a new tree with a background value of 0. More... | |
| RootNode (const ValueType &background) | |
| Construct a new tree with the given background value. More... | |
| RootNode (const RootNode &other) | |
| template<typename OtherChildType > | |
| RootNode (const RootNode< OtherChildType > &other) | |
| Construct a new tree that reproduces the topology and active states of a tree of a different ValueType but the same configuration (levels, node dimensions and branching factors). Cast the other tree's values to this tree's ValueType. More... | |
| template<typename OtherChildType > | |
| RootNode (const RootNode< OtherChildType > &other, const ValueType &background, const ValueType &foreground, TopologyCopy) | |
| Construct a new tree that reproduces the topology and active states of another tree (which may have a different ValueType), but not the other tree's values. More... | |
| template<typename OtherChildType > | |
| RootNode (const RootNode< OtherChildType > &other, const ValueType &background, TopologyCopy) | |
| Construct a new tree that reproduces the topology and active states of another tree (which may have a different ValueType), but not the other tree's values. All tiles and voxels in the new tree are set to background regardless of their active states in the other tree. More... | |
| RootNode & | operator= (const RootNode &other) |
| Copy a root node of the same type as this node. More... | |
| template<typename OtherChildType > | |
| RootNode & | operator= (const RootNode< OtherChildType > &other) |
| Copy a root node of the same tree configuration as this node but a different ValueType. More... | |
| ~RootNode () | |
| 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 () |
| 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 bbox so it includes the active tiles of this root 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... | |
| Index32 | transientData () const |
| Return the transient data value. More... | |
| void | setTransientData (Index32 transientData) |
| Set the transient data value. More... | |
| void | setBackground (const ValueType &value, bool updateChildNodes) |
| Change inactive tiles or voxels with a value equal to +/- the old background to the specified value (with the same sign). Active values are unchanged. More... | |
| const ValueType & | background () const |
| Return this node's background value. More... | |
| bool | isBackgroundTile (const Tile &) const |
Return true if the given tile is inactive and has the background value. More... | |
| size_t | numBackgroundTiles () const |
| Return the number of background tiles. More... | |
| size_t | eraseBackgroundTiles () |
| Remove all background tiles. More... | |
| void | clear () |
| bool | empty () const |
Return true if this node's table is either empty or contains only background tiles. More... | |
| bool | expand (const Coord &xyz) |
| Expand this node's table so that (x, y, z) is included in the index range. More... | |
| Index | getTableSize () const |
| Return the number of entries in this node's table. More... | |
| Index | getWidth () const |
| Index | getHeight () const |
| Index | getDepth () const |
| Coord | getMinIndex () const |
| Return the smallest index of the current tree. More... | |
| Coord | getMaxIndex () const |
| Return the largest index of the current tree. More... | |
| void | getIndexRange (CoordBBox &bbox) const |
| Return the current index range. Both min and max are inclusive. More... | |
| template<typename OtherChildType > | |
| bool | hasSameTopology (const RootNode< OtherChildType > &other) const |
Return true if the given tree has the same node and active value topology as this tree (but possibly a different ValueType). More... | |
| Index64 | leafCount () const |
| Index64 | nonLeafCount () const |
| Index32 | childCount () const |
| Index32 | tileCount () const |
| Index32 | activeTileCount () const |
| Index32 | inactiveTileCount () const |
| Index64 | onVoxelCount () const |
| Index64 | offVoxelCount () const |
| Index64 | onLeafVoxelCount () const |
| Index64 | offLeafVoxelCount () const |
| Index64 | onTileCount () const |
| void | nodeCount (std::vector< Index64 > &vec) const |
| void | nodeCount (std::vector< Index32 > &vec) const |
| bool | isValueOn (const Coord &xyz) const |
| bool | hasActiveTiles () const |
Return true if this root node, or any of its child nodes, have active tiles. More... | |
| const ValueType & | getValue (const Coord &xyz) const |
| bool | probeValue (const Coord &xyz, ValueType &value) const |
| int | getValueDepth (const Coord &xyz) const |
| Return the tree depth (0 = root) at which the value of voxel (x, y, z) resides. 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, 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... | |
| 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 all voxels, both active and inactive, that intersect a given bounding box. More... | |
| bool | writeTopology (std::ostream &, bool toHalf=false) const |
| bool | 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) |
| 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 &) |
| 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 > | |
| int | getValueDepthAndCache (const Coord &xyz, AccessorT &) const |
| void | clip (const CoordBBox &) |
| 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 given leaf node to this tree, creating a new branch if necessary. If a leaf node with the same origin already exists, replace it. More... | |
| template<typename AccessorT > | |
| void | addLeafAndCache (LeafNodeType *leaf, AccessorT &) |
| Same as addLeaf() but, if necessary, update the given 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 (ChildType *child) |
| Add the given child node at the root level. If a child node with the same origin 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 RootNode). More... | |
| void | addTile (const Coord &xyz, const ValueType &value, bool state) |
| Add a tile containing voxel (x, y, z) at the root level, deleting the existing branch if necessary. More... | |
| void | addTile (Index level, const Coord &xyz, const ValueType &value, bool state) |
| Add a tile containing voxel (x, y, z) at the specified tree level, creating a new branch if necessary. Delete any existing lower-level nodes that contain (x, y, z). More... | |
| template<typename AccessorT > | |
| void | addTileAndCache (Index level, const Coord &xyz, const ValueType &, bool state, AccessorT &) |
| Same as addTile() but, if necessary, update the given accessor with pointers to the nodes along the path from the root node to the node containing the coordinate. More... | |
| bool | deleteChildOrTile (const Coord &xyz) |
| Delete any child or tile containing voxel (x, y, z) at the root level. Do nothing if no child or tile was found. More... | |
| LeafNodeType * | touchLeaf (const Coord &xyz) |
| Return a pointer to the leaf node that contains voxel (x, y, z). If no such node exists, create one that preserves the values and active states of all voxels. More... | |
| template<typename AccessorT > | |
| LeafNodeType * | touchLeafAndCache (const Coord &xyz, AccessorT &acc) |
| Same as touchLeaf() but, if necessary, update the given accessor with pointers to the nodes along the path from the root node to the node containing the coordinate. More... | |
| const ValueType & | getTileValueUnsafe (const Coord &xyz) const |
| Return the tile value at the given coordinate. More... | |
| bool | getTileValueUnsafe (const Coord &xyz, ValueType &value) const |
| Return the tile value and active state at the given coordinate. More... | |
| ChildNodeType * | getChildUnsafe (const Coord &xyz) |
| Return the child node at the given coordinate. More... | |
| const ChildNodeType * | getConstChildUnsafe (const Coord &xyz) const |
| Return the child node at the given coordinate. More... | |
| const ChildNodeType * | getChildUnsafe (const Coord &xyz) const |
| Return the child node at the given coordinate. More... | |
| template<MergePolicy Policy> | |
| void | merge (RootNode &other) |
| Efficiently merge another tree into this tree using one of several schemes. More... | |
| template<typename OtherChildType > | |
| void | topologyUnion (const RootNode< OtherChildType > &other, const bool preserveTiles=false) |
Union this tree's set of active values with the active values of the other tree, whose ValueType may be different. More... | |
| template<typename OtherChildType > | |
| void | topologyIntersection (const RootNode< OtherChildType > &other) |
Intersects this tree's set of active values with the active values of the other tree, whose ValueType may be different. More... | |
| template<typename OtherChildType > | |
| void | topologyDifference (const RootNode< OtherChildType > &other) |
Difference this tree's set of active values with the active values of the other tree, whose ValueType may be different. So a resulting voxel will be active only if the original voxel is active in this tree and inactive in the other tree. More... | |
| template<typename CombineOp > | |
| void | combine (RootNode &other, CombineOp &, bool prune=false) |
| template<typename CombineOp , typename OtherRootNode > | |
| void | combine2 (const RootNode &other0, const OtherRootNode &other1, CombineOp &op, bool prune=false) |
| const Coord & | origin () const |
| Return the grid index coordinates of this node's local origin. More... | |
| void | setOrigin (const Coord &origin) |
| change the origin on this root node More... | |
| Coord | coordToKey (const Coord &xyz) const |
| Return a MapType key for the given coordinates, offset by the mOrigin. More... | |
| bool | hasKey (const Coord &key) const |
Return true if this node's mTable contains the given key. More... | |
| template<typename OtherChildType > | |
| RootNode< ChildT > & | operator= (const RootNode< OtherChildType > &other) |
| template<typename AccessorT > | |
| ChildT::LeafNodeType * | probeLeafAndCache (const Coord &xyz, AccessorT &acc) |
| template<typename AccessorT > | |
| const ChildT::LeafNodeType * | probeConstLeafAndCache (const Coord &xyz, AccessorT &acc) const |
| template<typename AccessorT > | |
| const ChildT::LeafNodeType * | probeLeafAndCache (const Coord &xyz, AccessorT &acc) const |
| bool | isBackgroundTile (const MapIter &) const |
Return true if the given iterator points to an inactive tile with the background value. More... | |
| bool | isBackgroundTile (const MapCIter &) const |
Return true if the given iterator points to an inactive tile with the background value. 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 | sparseFill (const CoordBBox &bbox, const ValueType &value, bool active=true) |
| Set all voxels within a given axis-aligned box to a constant value. More... | |
| template<typename NodeT > | |
| NodeT * | 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 NodeT > | |
| const NodeT * | probeNode (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 NodeT > | |
| const NodeT * | 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... | |
| bool | probe (const Coord &xyz, ChildNodeType *&child, ValueType &value, bool &active) |
Return a pointer to the root child node that contains voxel (x, y, z). If no such node exists, query and set the tile value and active status and return nullptr. More... | |
| bool | probeConst (const Coord &xyz, const ChildNodeType *&child, ValueType &value, bool &active) const |
Return a pointer to the root child node that contains voxel (x, y, z). If no such node exists, query and set the tile value and active status and return nullptr. More... | |
| bool | probe (const Coord &xyz, const ChildNodeType *&child, ValueType &value, bool &active) const |
Return a pointer to the root child node that contains voxel (x, y, z). If no such node exists, query and set the tile value and active status and return nullptr. More... | |
| template<typename NodeT , typename AccessorT > | |
| NodeT * | probeNodeAndCache (const Coord &xyz, AccessorT &acc) |
| Same as probeNode() but, if necessary, update the given accessor with pointers to the nodes along the path from the root node to the node containing the coordinate. More... | |
| template<typename NodeT , typename AccessorT > | |
| const NodeT * | probeConstNodeAndCache (const Coord &xyz, AccessorT &acc) const |
Return a pointer to the root child node that contains voxel (x, y, z). If no such node exists, query and set the tile value and active status and return nullptr. More... | |
| ChildNodeType * | probeChild (const Coord &xyz) |
Return a pointer to the root child node that contains voxel (x, y, z). If no such node exists, return nullptr. More... | |
| const ChildNodeType * | probeConstChild (const Coord &xyz) const |
Return a pointer to the root child node that contains voxel (x, y, z). If no such node exists, return nullptr. More... | |
| const ChildNodeType * | probeChild (const Coord &xyz) const |
Return a pointer to the root child node that contains voxel (x, y, z). If no such node exists, return nullptr. 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() but, if necessary, update the given accessor with pointers to the nodes along the path from the root node to the node containing the coordinate. More... | |
| template<typename AccessorT > | |
| const LeafNodeType * | probeConstLeafAndCache (const Coord &xyz, AccessorT &acc) const |
| Same as probeLeaf() but, if necessary, update the given accessor with pointers to the nodes along the path from the root node to the node containing the coordinate. More... | |
| template<typename AccessorT > | |
| const LeafNodeType * | probeLeafAndCache (const Coord &xyz, AccessorT &acc) const |
| Same as probeLeaf() but, if necessary, update the given accessor with pointers to the nodes along the path from the root node to the node containing the coordinate. 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... | |
| 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... | |
| template<typename ArrayT > | |
| void | stealNodes (ArrayT &array) |
| Steals all nodes of a certain type from the tree and adds them to a container with the following API: More... | |
Static Public Member Functions | |
| static CoordBBox | getNodeBoundingBox () |
| Return the bounding box of this RootNode, i.e., an infinite bounding box. More... | |
| static Index | getLevel () |
| static void | getNodeLog2Dims (std::vector< Index > &dims) |
| static Index | getChildDim () |
| template<typename OtherChildType > | |
| static bool | hasSameConfiguration (const RootNode< OtherChildType > &other) |
Return false if the other node's dimensions don't match this node's. More... | |
| template<typename OtherChildType > | |
| static bool | hasCompatibleValueType (const RootNode< OtherChildType > &other) |
Static Public Attributes | |
| static const Index | LEVEL = 1 + ChildType::LEVEL |
Friends | |
| template<typename > | |
| class | RootNode |
| template<typename , typename , bool > | |
| struct | RootNodeCopyHelper |
| template<typename , typename , typename , bool > | |
| struct | RootNodeCombineHelper |
Definition at line 39 of file RootNode.h.
| using openvdb::OPENVDB_VERSION_NAME::tree::RootNode< ChildType >::BuildType = typename ChildType::BuildType |
Definition at line 45 of file RootNode.h.
| using openvdb::OPENVDB_VERSION_NAME::tree::RootNode< ChildType >::ChildAllCIter = DenseIter<const RootNode, MapCIter, const ChildType, const ValueType> |
Definition at line 367 of file RootNode.h.
| using openvdb::OPENVDB_VERSION_NAME::tree::RootNode< ChildType >::ChildAllIter = DenseIter<RootNode, MapIter, ChildType, ValueType> |
Definition at line 366 of file RootNode.h.
| using openvdb::OPENVDB_VERSION_NAME::tree::RootNode< ChildType >::ChildNodeType = ChildType |
Definition at line 42 of file RootNode.h.
| using openvdb::OPENVDB_VERSION_NAME::tree::RootNode< ChildType >::ChildOffCIter = ValueIter<const RootNode, MapCIter, ChildOffPred, ValueType> |
Definition at line 365 of file RootNode.h.
| using openvdb::OPENVDB_VERSION_NAME::tree::RootNode< ChildType >::ChildOffIter = ValueIter<RootNode, MapIter, ChildOffPred, const ValueType> |
Definition at line 364 of file RootNode.h.
| using openvdb::OPENVDB_VERSION_NAME::tree::RootNode< ChildType >::ChildOnCIter = ChildIter<const RootNode, MapCIter, ChildOnPred, const ChildType> |
Definition at line 363 of file RootNode.h.
| using openvdb::OPENVDB_VERSION_NAME::tree::RootNode< ChildType >::ChildOnIter = ChildIter<RootNode, MapIter, ChildOnPred, ChildType> |
Definition at line 362 of file RootNode.h.
| using openvdb::OPENVDB_VERSION_NAME::tree::RootNode< ChildType >::LeafNodeType = typename ChildType::LeafNodeType |
Definition at line 43 of file RootNode.h.
| using openvdb::OPENVDB_VERSION_NAME::tree::RootNode< ChildType >::NodeChainType = typename NodeChain<RootNode, LEVEL>::Type |
NodeChainType is a list of this tree's node types, from LeafNodeType to RootNode.
Definition at line 50 of file RootNode.h.
| using openvdb::OPENVDB_VERSION_NAME::tree::RootNode< ChildType >::ValueAllCIter = ValueIter<const RootNode, MapCIter, ValueAllPred, const ValueType> |
Definition at line 374 of file RootNode.h.
| using openvdb::OPENVDB_VERSION_NAME::tree::RootNode< ChildType >::ValueAllIter = ValueIter<RootNode, MapIter, ValueAllPred, ValueType> |
Definition at line 373 of file RootNode.h.
| using openvdb::OPENVDB_VERSION_NAME::tree::RootNode< ChildType >::ValueOffCIter = ValueIter<const RootNode, MapCIter, ValueOffPred, const ValueType> |
Definition at line 372 of file RootNode.h.
| using openvdb::OPENVDB_VERSION_NAME::tree::RootNode< ChildType >::ValueOffIter = ValueIter<RootNode, MapIter, ValueOffPred, ValueType> |
Definition at line 371 of file RootNode.h.
| using openvdb::OPENVDB_VERSION_NAME::tree::RootNode< ChildType >::ValueOnCIter = ValueIter<const RootNode, MapCIter, ValueOnPred, const ValueType> |
Definition at line 370 of file RootNode.h.
| using openvdb::OPENVDB_VERSION_NAME::tree::RootNode< ChildType >::ValueOnIter = ValueIter<RootNode, MapIter, ValueOnPred, ValueType> |
Definition at line 369 of file RootNode.h.
| using openvdb::OPENVDB_VERSION_NAME::tree::RootNode< ChildType >::ValueType = typename ChildType::ValueType |
Definition at line 44 of file RootNode.h.
|
inline |
Construct a new tree with a background value of 0.
Definition at line 1072 of file RootNode.h.
|
inlineexplicit |
Construct a new tree with the given background value.
Definition at line 1081 of file RootNode.h.
|
inline |
Definition at line 76 of file RootNode.h.
|
inlineexplicit |
Construct a new tree that reproduces the topology and active states of a tree of a different ValueType but the same configuration (levels, node dimensions and branching factors). Cast the other tree's values to this tree's ValueType.
| TypeError | if the other tree's configuration doesn't match this tree's or if this tree's ValueType is not constructible from the other tree's ValueType. |
Definition at line 85 of file RootNode.h.
|
inline |
Construct a new tree that reproduces the topology and active states of another tree (which may have a different ValueType), but not the other tree's values.
All tiles and voxels that are active in the other tree are set to foreground in the new tree, and all inactive tiles and voxels are set to background.
| other | the root node of a tree having (possibly) a different ValueType |
| background | the value to which inactive tiles and voxels are initialized |
| foreground | the value to which active tiles and voxels are initialized |
| TypeError | if the other tree's configuration doesn't match this tree's. |
Definition at line 1091 of file RootNode.h.
|
inline |
Construct a new tree that reproduces the topology and active states of another tree (which may have a different ValueType), but not the other tree's values. All tiles and voxels in the new tree are set to background regardless of their active states in the other tree.
| other | the root node of a tree having (possibly) a different ValueType |
| background | the value to which inactive tiles and voxels are initialized |
| TypeError | if the other tree's configuration doesn't match this tree's. |
Definition at line 1118 of file RootNode.h.
|
inline |
Definition at line 124 of file RootNode.h.
|
inline |
Definition at line 1596 of file RootNode.h.
| bool openvdb::OPENVDB_VERSION_NAME::tree::RootNode< ChildType >::addChild | ( | ChildType * | child | ) |
Add the given child node at the root level. If a child node with the same origin 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 RootNode).
true (for consistency with InternalNode::addChild)
|
inline |
Add the given leaf node to this tree, creating a new branch if necessary. If a leaf node with the same origin already exists, replace it.
Definition at line 2613 of file RootNode.h.
|
inline |
Same as addLeaf() but, if necessary, update the given accessor with pointers to the nodes along the path from the root node to the node containing the coordinate.
Definition at line 2649 of file RootNode.h.
|
inline |
Add a tile containing voxel (x, y, z) at the root level, deleting the existing branch if necessary.
Definition at line 2710 of file RootNode.h.
|
inline |
Add a tile containing voxel (x, y, z) at the specified tree level, creating a new branch if necessary. Delete any existing lower-level nodes that contain (x, y, z).
Definition at line 2723 of file RootNode.h.
|
inline |
Same as addTile() but, if necessary, update the given accessor with pointers to the nodes along the path from the root node to the node containing the coordinate.
Definition at line 2759 of file RootNode.h.
|
inline |
Return this node's background value.
Definition at line 430 of file RootNode.h.
|
inline |
Definition at line 382 of file RootNode.h.
|
inline |
Definition at line 385 of file RootNode.h.
|
inline |
Definition at line 381 of file RootNode.h.
|
inline |
Definition at line 384 of file RootNode.h.
|
inline |
Definition at line 380 of file RootNode.h.
|
inline |
Definition at line 383 of file RootNode.h.
|
inline |
Definition at line 392 of file RootNode.h.
|
inline |
Definition at line 395 of file RootNode.h.
|
inline |
Definition at line 391 of file RootNode.h.
|
inline |
Definition at line 394 of file RootNode.h.
|
inline |
Definition at line 390 of file RootNode.h.
|
inline |
Definition at line 393 of file RootNode.h.
|
inline |
Definition at line 379 of file RootNode.h.
|
inline |
Definition at line 378 of file RootNode.h.
|
inline |
Definition at line 377 of file RootNode.h.
|
inline |
Definition at line 389 of file RootNode.h.
|
inline |
Definition at line 388 of file RootNode.h.
|
inline |
Definition at line 387 of file RootNode.h.
|
inline |
Definition at line 1572 of file RootNode.h.
|
inline |
Definition at line 1521 of file RootNode.h.
|
inline |
Set all voxels that lie outside the given axis-aligned box to the background.
Definition at line 2533 of file RootNode.h.
|
inline |
Definition at line 3420 of file RootNode.h.
|
inline |
Definition at line 3510 of file RootNode.h.
|
inline |
Return a MapType key for the given coordinates, offset by the mOrigin.
Definition at line 954 of file RootNode.h.
|
inline |
Copy into a dense grid the values of all voxels, both active and inactive, that intersect 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 2304 of file RootNode.h.
|
inline |
Delete any child or tile containing voxel (x, y, z) at the root level. Do nothing if no child or tile was found.
true if child or tile was deleted Definition at line 2798 of file RootNode.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 2228 of file RootNode.h.
|
inline |
Return true if this node's table is either empty or contains only background tiles.
Definition at line 448 of file RootNode.h.
|
inline |
Remove all background tiles.
Definition at line 1311 of file RootNode.h.
|
inline |
Expand the specified bbox so it includes the active tiles of this root 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 1532 of file RootNode.h.
|
inline |
Expand this node's table so that (x, y, z) is included in the index range.
true if an expansion was performed (i.e., if (x, y, z) was not already included in the index range). Definition at line 1350 of file RootNode.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 2170 of file RootNode.h.
|
inlinestatic |
Definition at line 457 of file RootNode.h.
|
inline |
Return the child node at the given coordinate.
Definition at line 3071 of file RootNode.h.
|
inline |
Return the child node at the given coordinate.
Definition at line 3093 of file RootNode.h.
|
inline |
Return the child node at the given coordinate.
Definition at line 3082 of file RootNode.h.
|
inline |
Definition at line 464 of file RootNode.h.
|
inline |
Definition at line 463 of file RootNode.h.
|
inline |
Return the current index range. Both min and max are inclusive.
Definition at line 1388 of file RootNode.h.
|
inlinestatic |
Definition at line 455 of file RootNode.h.
|
inline |
Return the largest index of the current tree.
Definition at line 1380 of file RootNode.h.
|
inline |
Return the smallest index of the current tree.
Definition at line 1373 of file RootNode.h.
|
inlinestatic |
Return the bounding box of this RootNode, i.e., an infinite bounding box.
Definition at line 408 of file RootNode.h.
|
inlinestatic |
Definition at line 1364 of file RootNode.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 3105 of file RootNode.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 3133 of file RootNode.h.
|
inline |
Return the number of entries in this node's table.
Definition at line 460 of file RootNode.h.
|
inline |
Return the tile value at the given coordinate.
Definition at line 3047 of file RootNode.h.
|
inline |
Return the tile value and active state at the given coordinate.
Definition at line 3058 of file RootNode.h.
|
inline |
Definition at line 1759 of file RootNode.h.
| const ValueType& openvdb::OPENVDB_VERSION_NAME::tree::RootNode< ChildType >::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 tree depth (0 = root) at which the value of voxel (x, y, z) resides.
If (x, y, z) isn't explicitly represented in the tree (i.e., it is implicitly a background voxel), return -1.
Definition at line 1783 of file RootNode.h.
|
inline |
Return the tree depth (0 = root) at which the value of voxel (x, y, z) resides. If (x, y, z) isn't explicitly represented in the tree (i.e., it is implicitly a background voxel), return -1. 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 1793 of file RootNode.h.
|
inline |
Definition at line 462 of file RootNode.h.
|
inline |
Return true if this root node, or any of its child nodes, have active tiles.
Definition at line 1736 of file RootNode.h.
|
inlinestatic |
Return true if values of the other node's ValueType can be converted to values of this node's ValueType.
Definition at line 1480 of file RootNode.h.
|
inline |
Return true if this node's mTable contains the given key.
Definition at line 957 of file RootNode.h.
|
inlinestatic |
Return false if the other node's dimensions don't match this node's.
Definition at line 1448 of file RootNode.h.
|
inline |
Return true if the given tree has the same node and active value topology as this tree (but possibly a different ValueType).
Definition at line 1401 of file RootNode.h.
|
inline |
Definition at line 1608 of file RootNode.h.
|
inline |
Return true if the given tile is inactive and has the background value.
Definition at line 1277 of file RootNode.h.
|
inline |
Return true if the given iterator points to an inactive tile with the background value.
Definition at line 1284 of file RootNode.h.
|
inline |
Return true if the given iterator points to an inactive tile with the background value.
Definition at line 1291 of file RootNode.h.
|
inline |
Definition at line 1727 of file RootNode.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 1747 of file RootNode.h.
|
inline |
Definition at line 1546 of file RootNode.h.
|
inline |
Return the total amount of memory in bytes occupied by this node and its children.
Definition at line 1507 of file RootNode.h.
|
inline |
Efficiently merge another tree into this tree using one of several schemes.
This operation is primarily intended to combine trees that are mostly non-overlapping (for example, intermediate trees from computations that are parallelized across disjoint regions of space).
Definition at line 3195 of file RootNode.h.
|
inline |
Apply a functor to the value of the voxel at the given coordinates and mark the voxel as active.
Definition at line 2004 of file RootNode.h.
|
inline |
Apply a functor to the voxel at the given coordinates.
Definition at line 2074 of file RootNode.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 2102 of file RootNode.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 2037 of file RootNode.h.
|
inline |
Definition at line 1690 of file RootNode.h.
|
inline |
Definition at line 1706 of file RootNode.h.
|
inline |
Definition at line 1558 of file RootNode.h.
|
inline |
Return the number of background tiles.
Definition at line 1299 of file RootNode.h.
|
inline |
Definition at line 1664 of file RootNode.h.
|
inline |
Definition at line 1636 of file RootNode.h.
|
inline |
Definition at line 1652 of file RootNode.h.
|
inline |
Definition at line 1675 of file RootNode.h.
|
inline |
Definition at line 1620 of file RootNode.h.
|
inline |
Copy a root node of the same type as this node.
Definition at line 1211 of file RootNode.h.
| RootNode& openvdb::OPENVDB_VERSION_NAME::tree::RootNode< ChildType >::operator= | ( | const RootNode< OtherChildType > & | other | ) |
Copy a root node of the same tree configuration as this node but a different ValueType.
| TypeError | if the other tree's configuration doesn't match this tree's. |
|
inline |
Definition at line 1235 of file RootNode.h.
|
inline |
Return the grid index coordinates of this node's local origin.
Definition at line 945 of file RootNode.h.
|
inline |
Return a pointer to the root child node that contains voxel (x, y, z). If no such node exists, query and set the tile value and active status and return nullptr.
Definition at line 2907 of file RootNode.h.
|
inline |
Return a pointer to the root child node that contains voxel (x, y, z). If no such node exists, query and set the tile value and active status and return nullptr.
Definition at line 750 of file RootNode.h.
|
inline |
Return a pointer to the root child node that contains voxel (x, y, z). If no such node exists, return nullptr.
Definition at line 2947 of file RootNode.h.
|
inline |
Return a pointer to the root child node that contains voxel (x, y, z). If no such node exists, return nullptr.
Definition at line 767 of file RootNode.h.
|
inline |
Return a pointer to the root child node that contains voxel (x, y, z). If no such node exists, query and set the tile value and active status and return nullptr.
Definition at line 2927 of file RootNode.h.
|
inline |
Return a pointer to the root child node that contains voxel (x, y, z). If no such node exists, return nullptr.
Definition at line 2955 of file RootNode.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 2971 of file RootNode.h.
| const LeafNodeType* openvdb::OPENVDB_VERSION_NAME::tree::RootNode< ChildType >::probeConstLeafAndCache | ( | const Coord & | xyz, |
| AccessorT & | acc | ||
| ) | const |
Same as probeLeaf() but, if necessary, update the given accessor with pointers to the nodes along the path from the root node to the node containing the coordinate.
|
inline |
Definition at line 2989 of file RootNode.h.
|
inline |
Return a pointer to the node that contains voxel (x, y, z). If no such node exists, return nullptr.
Definition at line 2890 of file RootNode.h.
|
inline |
Return a pointer to the root child node that contains voxel (x, y, z). If no such node exists, query and set the tile value and active status and return nullptr.
Definition at line 3026 of file RootNode.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 2963 of file RootNode.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 775 of file RootNode.h.
| LeafNodeType* openvdb::OPENVDB_VERSION_NAME::tree::RootNode< ChildType >::probeLeafAndCache | ( | const Coord & | xyz, |
| AccessorT & | acc | ||
| ) |
Same as probeLeaf() but, if necessary, update the given accessor with pointers to the nodes along the path from the root node to the node containing the coordinate.
| const LeafNodeType* openvdb::OPENVDB_VERSION_NAME::tree::RootNode< ChildType >::probeLeafAndCache | ( | const Coord & | xyz, |
| AccessorT & | acc | ||
| ) | const |
Same as probeLeaf() but, if necessary, update the given accessor with pointers to the nodes along the path from the root node to the node containing the coordinate.
|
inline |
Definition at line 2980 of file RootNode.h.
|
inline |
Definition at line 2998 of file RootNode.h.
|
inline |
Return a pointer to the node that contains voxel (x, y, z). If no such node exists, return nullptr.
Definition at line 2863 of file RootNode.h.
|
inline |
Return a pointer to the node that contains voxel (x, y, z). If no such node exists, return nullptr.
Definition at line 2881 of file RootNode.h.
|
inline |
Same as probeNode() but, if necessary, update the given accessor with pointers to the nodes along the path from the root node to the node containing the coordinate.
Definition at line 3007 of file RootNode.h.
|
inline |
Definition at line 2134 of file RootNode.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 2150 of file RootNode.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 2573 of file RootNode.h.
|
inline |
Definition at line 2499 of file RootNode.h.
|
inline |
Definition at line 2509 of file RootNode.h.
|
inline |
Definition at line 2384 of file RootNode.h.
|
inline |
Set the active state of the voxel at the given coordinates but don't change its value.
Definition at line 1819 of file RootNode.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 1843 of file RootNode.h.
|
inline |
Change inactive tiles or voxels with a value equal to +/- the old background to the specified value (with the same sign). Active values are unchanged.
| value | The new background value |
| updateChildNodes | If true the background values of the child nodes is also updated. Else only the background value stored in the RootNode itself is changed. |
Definition at line 1250 of file RootNode.h.
|
inline |
change the origin on this root node
| origin | the index coordinates of the new alignment |
Definition at line 2700 of file RootNode.h.
|
inline |
Set the transient data value.
Definition at line 413 of file RootNode.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 1937 of file RootNode.h.
|
inline |
Mark the voxel at the given coordinates as inactive but don't change its value.
Definition at line 1805 of file RootNode.h.
|
inline |
Set the value of the voxel at the given coordinates and mark the voxel as inactive.
Definition at line 1870 of file RootNode.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 1892 of file RootNode.h.
|
inline |
Set the value of the voxel at the given coordinates and mark the voxel as active.
Definition at line 1917 of file RootNode.h.
|
inline |
Set the value of the voxel at the given coordinates but don't change its active state.
Definition at line 1960 of file RootNode.h.
|
inline |
Set the value of the voxel at the given coordinates without changing 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 1980 of file RootNode.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 544 of file RootNode.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 2594 of file RootNode.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 3163 of file RootNode.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 877 of file RootNode.h.
|
inline |
Definition at line 1584 of file RootNode.h.
|
inline |
Difference this tree's set of active values with the active values of the other tree, whose ValueType may be different. So a resulting voxel will be active only if the original voxel is active in this tree and inactive in the other tree.
Definition at line 3381 of file RootNode.h.
|
inline |
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.
Definition at line 3345 of file RootNode.h.
|
inline |
Union 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 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.
Definition at line 3307 of file RootNode.h.
|
inline |
Return a pointer to the leaf node that contains voxel (x, y, z). If no such node exists, create one that preserves 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 2817 of file RootNode.h.
| LeafNodeType* openvdb::OPENVDB_VERSION_NAME::tree::RootNode< ChildType >::touchLeafAndCache | ( | const Coord & | xyz, |
| AccessorT & | acc | ||
| ) |
Same as touchLeaf() but, if necessary, update the given 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 411 of file RootNode.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 2278 of file RootNode.h.
|
inline |
Definition at line 2489 of file RootNode.h.
|
inline |
Definition at line 2348 of file RootNode.h.
During topology-only construction, access is needed to protected/private members of other template instances.
Definition at line 962 of file RootNode.h.
|
friend |
Definition at line 965 of file RootNode.h.
|
friend |
Definition at line 964 of file RootNode.h.
|
static |
Definition at line 47 of file RootNode.h.