OpenVDB
2.1.0
|
#include <RootNode.h>
Classes | |
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 | |
typedef ChildType | ChildNodeType |
typedef ChildType::LeafNodeType | LeafNodeType |
typedef ChildType::ValueType | ValueType |
typedef NodeChain< RootNode, LEVEL >::Type | NodeChainType |
NodeChainType is a list of this tree's node types, from LeafNodeType to RootNode. More... | |
typedef ChildIter< RootNode, MapIter, ChildOnPred, ChildType > | ChildOnIter |
typedef ChildIter< const RootNode, MapCIter, ChildOnPred, const ChildType > | ChildOnCIter |
typedef ValueIter< RootNode, MapIter, ChildOffPred, const ValueType > | ChildOffIter |
typedef ValueIter< const RootNode, MapCIter, ChildOffPred, ValueType > | ChildOffCIter |
typedef DenseIter< RootNode, MapIter, ChildType, ValueType > | ChildAllIter |
typedef DenseIter< const RootNode, MapCIter, const ChildType, const ValueType > | ChildAllCIter |
typedef ValueIter< RootNode, MapIter, ValueOnPred, ValueType > | ValueOnIter |
typedef ValueIter< const RootNode, MapCIter, ValueOnPred, const ValueType > | ValueOnCIter |
typedef ValueIter< RootNode, MapIter, ValueOffPred, ValueType > | ValueOffIter |
typedef ValueIter< const RootNode, MapCIter, ValueOffPred, const ValueType > | ValueOffCIter |
typedef ValueIter< RootNode, MapIter, ValueAllPred, ValueType > | ValueAllIter |
typedef ValueIter< const RootNode, MapCIter, ValueAllPred, const ValueType > | ValueAllCIter |
Public Member Functions | |
BOOST_STATIC_ASSERT (boost::mpl::size< NodeChainType >::value==LEVEL+1) | |
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, 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) |
~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... | |
OPENVDB_DEPRECATED void | evalActiveVoxelBoundingBox (CoordBBox &bbox) const |
void | setBackground (const ValueType &value, bool updateChildNodes=true) |
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... | |
Index32 | leafCount () const |
Index32 | nonLeafCount () const |
Index64 | onVoxelCount () const |
Index64 | offVoxelCount () const |
Index64 | onLeafVoxelCount () const |
Index64 | offLeafVoxelCount () const |
Index64 | onTileCount () const |
bool | isValueOn (const Coord &xyz) const |
bool | hasActiveTiles () const |
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 | fill (const CoordBBox &bbox, const ValueType &value, bool active=true) |
Set all voxels within a given box to a constant value, if necessary subdividing tiles that intersect the box. 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) |
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 |
template<typename PruneOp > | |
void | pruneOp (PruneOp &) |
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 | pruneInactive (const ValueType &) |
Reduce the memory footprint of this tree by replacing with tiles of the given value any nodes whose values are all inactive. More... | |
void | pruneInactive () |
Reduce the memory footprint of this tree by replacing with background tiles any nodes whose values are all inactive. More... | |
void | pruneTiles (const ValueType &tolerance) |
Reduce the memory footprint of this tree by replacing with tiles any non-leaf 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 NULL . 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... | |
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... | |
void | signedFloodFill () |
Set the values of all inactive voxels and tiles of a narrow-band level set from the signs of the active voxels, setting outside values to +background and inside values to -background. More... | |
void | signedFloodFill (const ValueType &outside, const ValueType &inside) |
Set the values of all inactive voxels and tiles of a narrow-band level set from the signs of the active voxels, setting exterior values to outside and interior values to inside. Set the background value of this tree to outside. More... | |
void | voxelizeActiveTiles () |
Densify active tiles, i.e., replace them with leaf-level active voxels. 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) |
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 > | |
void | combine2 (const RootNode &other0, const RootNode &other1, CombineOp &op, bool prune=false) |
template<typename BBoxOp > | |
void | visitActiveBBox (BBoxOp &) const |
Call the templated functor BBoxOp with bounding box information for all active tiles and leaf nodes in the tree. An additional level argument is provided for each callback. More... | |
template<typename VisitorOp > | |
void | visit (VisitorOp &) |
template<typename VisitorOp > | |
void | visit (VisitorOp &) const |
template<typename OtherRootNodeType , typename VisitorOp > | |
void | visit2 (OtherRootNodeType &other, VisitorOp &) |
template<typename OtherRootNodeType , typename VisitorOp > | |
void | visit2 (OtherRootNodeType &other, VisitorOp &) const |
template<typename AccessorT > | |
const ChildT::ValueType & | getValueAndCache (const Coord &xyz, AccessorT &acc) const |
template<typename AccessorT > | |
ChildT::LeafNodeType * | touchLeafAndCache (const Coord &xyz, AccessorT &acc) |
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... | |
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 NULL. 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 NULL. 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 |
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... | |
LeafNodeType * | probeLeaf (const Coord &xyz) |
Return a pointer to the leaf node that contains voxel (x, y, z). If no such node exists, return NULL. 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 NULL. 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 NULL. 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... | |
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... | |
Static Public Attributes | |
static const Index | LEVEL = 1 + ChildType::LEVEL |
Friends | |
template<typename > | |
class | RootNode |
typedef DenseIter<const RootNode, MapCIter, const ChildType, const ValueType> ChildAllCIter |
typedef DenseIter<RootNode, MapIter, ChildType, ValueType> ChildAllIter |
typedef ChildType ChildNodeType |
typedef ValueIter<const RootNode, MapCIter, ChildOffPred, ValueType> ChildOffCIter |
typedef ValueIter<RootNode, MapIter, ChildOffPred, const ValueType> ChildOffIter |
typedef ChildIter<const RootNode, MapCIter, ChildOnPred, const ChildType> ChildOnCIter |
typedef ChildIter<RootNode, MapIter, ChildOnPred, ChildType> ChildOnIter |
typedef ChildType::LeafNodeType LeafNodeType |
typedef NodeChain<RootNode, LEVEL>::Type NodeChainType |
NodeChainType is a list of this tree's node types, from LeafNodeType to RootNode.
typedef ValueIter<const RootNode, MapCIter, ValueAllPred, const ValueType> ValueAllCIter |
typedef ValueIter<RootNode, MapIter, ValueAllPred, ValueType> ValueAllIter |
typedef ValueIter<const RootNode, MapCIter, ValueOffPred, const ValueType> ValueOffCIter |
typedef ValueIter<RootNode, MapIter, ValueOffPred, ValueType> ValueOffIter |
typedef ValueIter<const RootNode, MapCIter, ValueOnPred, const ValueType> ValueOnCIter |
typedef ValueIter<RootNode, MapIter, ValueOnPred, ValueType> ValueOnIter |
typedef ChildType::ValueType ValueType |
|
inline |
Construct a new tree with a background value of 0.
Construct a new tree with the given background value.
|
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 |
|
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 |
|
inline |
|
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.
|
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.
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).
|
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.
|
inline |
Return this node's background value.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
BOOST_STATIC_ASSERT | ( | boost::mpl::size< NodeChainType >::value | = =LEVEL+1 | ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
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) |
|
inline |
Return true
if this node's table is either empty or contains only background tiles.
|
inline |
Remove all background tiles.
|
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.
|
inline |
|
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).
|
inline |
Set all voxels within a given box to a constant value, if necessary subdividing tiles that intersect the box.
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 |
|
inlinestatic |
|
inline |
|
inline |
|
inline |
Return the current index range. Both min and max are inclusive.
|
inlinestatic |
|
inline |
Return the largest index of the current tree.
|
inline |
Return the smallest index of the current tree.
|
inlinestatic |
Return the bounding box of this RootNode, i.e., an infinite bounding box.
|
inlinestatic |
|
inline |
Return the number of entries in this node's table.
|
inline |
const ValueType& 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 |
|
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.
|
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.
|
inline |
|
inline |
|
inlinestatic |
Return false
if the other node's dimensions don't match this node's.
|
inline |
Return true
if the given tree has the same node and active value topology as this tree (but possibly a different ValueType
).
|
inline |
Return true
if the given tile is inactive and has the background value.
|
inline |
Return true
if the given iterator points to an inactive tile with the background value.
|
inline |
Return true
if the given iterator points to an inactive tile with the background value.
|
inline |
|
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.
|
inline |
|
inline |
Return the total amount of memory in bytes occupied by this node and its children.
|
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).
|
inline |
Apply a functor to the value of the voxel at the given coordinates and mark the voxel as active.
|
inline |
Apply a functor to the voxel at the given coordinates.
|
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.
|
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.
|
inline |
|
inline |
Return the number of background tiles.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Return a pointer to the leaf node that contains voxel (x, y, z). If no such node exists, return NULL.
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.
|
inline |
|
inline |
Return a pointer to the node that contains voxel (x, y, z). If no such node exists, return NULL.
|
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.
|
inline |
Return a pointer to the leaf node that contains voxel (x, y, z). If no such node exists, return NULL.
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 NULL.
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.
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.
|
inline |
|
inline |
|
inline |
Return a pointer to the node that contains voxel (x, y, z). If no such node exists, return NULL.
|
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.
|
inline |
|
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 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.
|
inline |
Reduce the memory footprint of this tree by replacing with tiles of the given value any nodes whose values are all inactive.
|
inline |
Reduce the memory footprint of this tree by replacing with background tiles any nodes whose values are all inactive.
|
inline |
Call the PruneOp
functor for each child node and, if the functor returns true
, prune the node and replace it with a tile.
This method is used to implement all of the various pruning algorithms (prune(), pruneInactive(), etc.). It should rarely be called directly.
PruneOp
functor
|
inline |
Reduce the memory footprint of this tree by replacing with tiles any non-leaf nodes whose values are all the same (optionally to within a tolerance) and have the same active state.
|
inline |
|
inline |
|
inline |
Set the active state of the voxel at the given coordinates but don't change its value.
|
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.
|
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 (which is the default) the background values of the child nodes is also updated. Else only the background value stored in the RootNode itself is changed. |
|
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.
|
inline |
Mark the voxel at the given coordinates as inactive but don't change its value.
|
inline |
Set the value of the voxel at the given coordinates and mark the voxel as inactive.
|
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.
|
inline |
Set the value of the voxel at the given coordinates and mark the voxel as active.
|
inline |
Set the value of the voxel at the given coordinates but don't change its active state.
|
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.
|
inline |
Set the values of all inactive voxels and tiles of a narrow-band level set from the signs of the active voxels, setting outside values to +background and inside values to -background.
Set the values of all inactive voxels and tiles of a narrow-band level set from the signs of the active voxels, setting exterior values to outside and interior values to inside. Set the background value of this tree to outside.
|
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 NULL
.
|
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.
|
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.
|
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.
|
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.
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.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Call the templated functor BBoxOp with bounding box information for all active tiles and leaf nodes in the tree. An additional level argument is provided for each callback.
|
inline |
Densify active tiles, i.e., replace them with leaf-level active voxels.
|
inline |
|
inline |
|
friend |
During topology-only construction, access is needed to protected/private members of other template instances.
|
static |