HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim > Class Template Reference

#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 Types

typedef _ChildNodeType ChildNodeType
 
typedef ChildNodeType::LeafNodeType LeafNodeType
 
typedef ChildNodeType::ValueType ValueType
 
typedef ChildNodeType::BuildType BuildType
 
typedef NodeUnion< ValueType,
ChildNodeType
UnionType
 
typedef util::NodeMask< Log2Dim > NodeMaskType
 
typedef ChildIter
< InternalNode, ChildNodeType,
MaskOnIterator, ChildOn
ChildOnIter
 
typedef ChildIter< const
InternalNode, const
ChildNodeType, MaskOnIterator,
ChildOn
ChildOnCIter
 
typedef ValueIter
< InternalNode, const
ValueType, MaskOffIterator,
ChildOff
ChildOffIter
 
typedef ValueIter< const
InternalNode, const ValueType,
MaskOffIterator, ChildOff
ChildOffCIter
 
typedef DenseIter
< InternalNode, ChildNodeType,
ValueType, ChildAll
ChildAllIter
 
typedef DenseIter< const
InternalNode, const
ChildNodeType, ValueType,
ChildAll
ChildAllCIter
 
typedef ValueIter
< InternalNode, const
ValueType, MaskOnIterator,
ValueOn
ValueOnIter
 
typedef ValueIter< const
InternalNode, const ValueType,
MaskOnIterator, ValueOn
ValueOnCIter
 
typedef ValueIter
< InternalNode, const
ValueType, MaskOffIterator,
ValueOff
ValueOffIter
 
typedef ValueIter< const
InternalNode, const ValueType,
MaskOffIterator, ValueOff
ValueOffCIter
 
typedef ValueIter
< InternalNode, const
ValueType, MaskOffIterator,
ValueAll
ValueAllIter
 
typedef ValueIter< const
InternalNode, const ValueType,
MaskOffIterator, ValueAll
ValueAllCIter
 

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...
 
virtual ~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 leafCount () const
 
Index32 nonLeafCount () 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 ValueTypegetValue (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 ValueTypegetFirstValue () 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 ValueTypegetLastValue () 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 ValueTypegetValueAndCache (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 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 negate ()
 
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)
 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 &)
 
template<typename BBoxOp >
void visitActiveBBox (BBoxOp &) const
 Calls the templated functor BBoxOp with bounding box information for all active tiles and leaf nodes in this node. 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 OtherNodeType , typename VisitorOp >
void visit2Node (OtherNodeType &other, VisitorOp &)
 
template<typename OtherNodeType , typename VisitorOp >
void visit2Node (OtherNodeType &other, VisitorOp &) const
 
template<typename IterT , typename VisitorOp >
void visit2 (IterT &otherIter, VisitorOp &, bool otherIsLHS=false)
 
template<typename IterT , typename VisitorOp >
void visit2 (IterT &otherIter, VisitorOp &, bool otherIsLHS=false) const
 
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 NULL. 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...
 
LeafNodeTypetouchLeaf (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 >
LeafNodeTypetouchLeafAndCache (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 NodeMaskTypegetValueMask () const
 
const NodeMaskTypegetChildMask () const
 
NodeMaskType getValueOffMask () const
 
const UnionTypegetTable () 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 AccessorT >
ChildT::LeafNodeType * touchLeafAndCache (const Coord &xyz, AccessorT &acc)
 
template<typename AccessorT >
const ChildT::ValueType & getValueAndCache (const Coord &xyz, AccessorT &acc) const
 
template<typename OtherChildT >
void topologyUnion (const InternalNode< OtherChildT, Log2Dim > &other)
 
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 OtherChildAllIterType , typename VisitorOp >
void visit2 (OtherChildAllIterType &otherIter, VisitorOp &op, bool otherIsLHS)
 
template<typename OtherChildAllIterType , typename VisitorOp >
void visit2 (OtherChildAllIterType &otherIter, VisitorOp &op, bool otherIsLHS) const
 
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 NULL. 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 NULL. 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...
 
LeafNodeTypeprobeLeaf (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 LeafNodeTypeprobeConstLeaf (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 LeafNodeTypeprobeLeaf (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 >
LeafNodeTypeprobeLeafAndCache (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 LeafNodeTypeprobeConstLeafAndCache (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 LeafNodeTypeprobeLeafAndCache (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 stil::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

typedef NodeMaskType::OnIterator MaskOnIterator
 
typedef NodeMaskType::OffIterator MaskOffIterator
 
typedef NodeMaskType::DenseIterator MaskDenseIterator
 

Protected Member Functions

void makeChildNodeEmpty (Index n, const ValueType &value)
 
void setChildNode (Index i, ChildNodeType *child)
 
void resetChildNode (Index i, ChildNodeType *child)
 
ChildNodeTypeunsetChildNode (Index i, const ValueType &value)
 
void setValueMask (Index n, bool on)
 
ChildNodeTypegetChildNode (Index n)
 Returns a pointer to the child node at the linear offset n. More...
 
const ChildNodeTypegetChildNode (Index n) const
 Returns a pointer to the child node at the linear offset n. More...
 

Static Protected Member Functions

template<typename NodeT , typename VisitorOp , typename ChildAllIterT >
static void doVisit (NodeT &, VisitorOp &)
 
template<typename NodeT , typename OtherNodeT , typename VisitorOp , typename ChildAllIterT , typename OtherChildAllIterT >
static void doVisit2Node (NodeT &, OtherNodeT &, VisitorOp &)
 
template<typename NodeT , typename VisitorOp , typename ChildAllIterT , typename OtherChildAllIterT >
static void doVisit2 (NodeT &, OtherChildAllIterT &, VisitorOp &, bool otherIsLHS)
 

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

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 >
 

Detailed Description

template<typename _ChildNodeType, Index Log2Dim>
class openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >

Definition at line 64 of file InternalNode.h.

Member Typedef Documentation

template<typename _ChildNodeType, Index Log2Dim>
typedef ChildNodeType::BuildType openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::BuildType

Definition at line 70 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
typedef DenseIter<const InternalNode,const ChildNodeType, ValueType, ChildAll> openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::ChildAllCIter

Definition at line 244 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
typedef DenseIter<InternalNode, ChildNodeType, ValueType, ChildAll> openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::ChildAllIter

Definition at line 243 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
typedef _ChildNodeType openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::ChildNodeType

Definition at line 67 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
typedef ValueIter<const InternalNode,const ValueType,MaskOffIterator,ChildOff> openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::ChildOffCIter

Definition at line 242 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
typedef ValueIter<InternalNode, const ValueType, MaskOffIterator, ChildOff> openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::ChildOffIter

Definition at line 241 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
typedef ChildIter<const InternalNode,const ChildNodeType,MaskOnIterator,ChildOn> openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::ChildOnCIter

Definition at line 240 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
typedef ChildIter<InternalNode, ChildNodeType, MaskOnIterator, ChildOn> openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::ChildOnIter

Definition at line 239 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
typedef ChildNodeType::LeafNodeType openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::LeafNodeType

Definition at line 68 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
typedef NodeMaskType::DenseIterator openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::MaskDenseIterator
protected

Definition at line 149 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
typedef NodeMaskType::OffIterator openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::MaskOffIterator
protected

Definition at line 148 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
typedef NodeMaskType::OnIterator openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::MaskOnIterator
protected

Definition at line 147 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
typedef util::NodeMask<Log2Dim> openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::NodeMaskType

Definition at line 72 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
typedef NodeUnion<ValueType, ChildNodeType> openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::UnionType

Definition at line 71 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
typedef ValueIter<const InternalNode,const ValueType,MaskOffIterator,ValueAll> openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::ValueAllCIter

Definition at line 251 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
typedef ValueIter<InternalNode, const ValueType, MaskOffIterator, ValueAll> openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::ValueAllIter

Definition at line 250 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
typedef ValueIter<const InternalNode,const ValueType,MaskOffIterator,ValueOff> openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::ValueOffCIter

Definition at line 249 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
typedef ValueIter<InternalNode, const ValueType, MaskOffIterator, ValueOff> openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::ValueOffIter

Definition at line 248 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
typedef ValueIter<const InternalNode,const ValueType,MaskOnIterator,ValueOn> openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::ValueOnCIter

Definition at line 247 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
typedef ValueIter<InternalNode, const ValueType, MaskOnIterator, ValueOn> openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::ValueOnIter

Definition at line 246 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
typedef ChildNodeType::ValueType openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::ValueType

Definition at line 69 of file InternalNode.h.

Constructor & Destructor Documentation

template<typename _ChildNodeType, Index Log2Dim>
openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::InternalNode ( )
inline

Default constructor.

Warning
The resulting InternNode is un-initialized

Definition at line 103 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::InternalNode ( const ValueType offValue)
inlineexplicit

Constructor of an InternalNode with dense inactive tiles of the specified value.

Parameters
offValueBackground value used for inactive values

Definition at line 861 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::InternalNode ( const Coord &  origin,
const ValueType fillValue,
bool  active = false 
)
inline

Constructs an InternalNode with dense tiles.

Parameters
originThe location in index space of the fist tile value
fillValueValue assigned to all the tiles
activeState assigned to all the tiles

Definition at line 869 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::InternalNode ( PartialCreate  ,
const Coord &  origin,
const ValueType fillValue,
bool  active = false 
)
inline

Definition at line 884 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::InternalNode ( const InternalNode< _ChildNodeType, Log2Dim > &  other)
inline

Deep copy constructor.

Note
This method is multi-threaded!

Definition at line 916 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
template<typename OtherChildNodeType >
openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::InternalNode ( const InternalNode< OtherChildNodeType, Log2Dim > &  other)
inlineexplicit

Value conversion copy constructor.

Note
This method is multi-threaded!

Definition at line 929 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
template<typename OtherChildNodeType >
openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::InternalNode ( const InternalNode< OtherChildNodeType, Log2Dim > &  other,
const ValueType background,
TopologyCopy   
)
inline

Topology copy constructor.

Note
This method is multi-threaded!

Definition at line 964 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
template<typename OtherChildNodeType >
openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::InternalNode ( const InternalNode< OtherChildNodeType, Log2Dim > &  other,
const ValueType offValue,
const ValueType onValue,
TopologyCopy   
)
inline

Topology copy constructor.

Note
This method is multi-threaded!

Definition at line 1000 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::~InternalNode ( )
inlinevirtual

Definition at line 1013 of file InternalNode.h.

Member Function Documentation

template<typename ChildT , Index Log2Dim>
void openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::addLeaf ( LeafNodeType leaf)
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 1313 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
template<typename AccessorT >
void openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::addLeafAndCache ( LeafNodeType leaf,
AccessorT &  acc 
)
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 1342 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
void openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::addTile ( Index  level,
const Coord &  xyz,
const ValueType value,
bool  state 
)
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 1385 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
void openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::addTile ( Index  offset,
const ValueType value,
bool  state 
)
inline

Delete any existing child branch at the specified offset and add a tile.

Definition at line 1375 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
template<typename AccessorT >
void openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::addTileAndCache ( Index  level,
const Coord &  xyz,
const ValueType value,
bool  state,
AccessorT &  acc 
)
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 1417 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
ChildAllCIter openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::beginChildAll ( ) const
inline

Definition at line 258 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
ChildAllIter openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::beginChildAll ( )
inline

Definition at line 261 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
ChildOffCIter openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::beginChildOff ( ) const
inline

Definition at line 257 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
ChildOffIter openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::beginChildOff ( )
inline

Definition at line 260 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
ChildOnCIter openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::beginChildOn ( ) const
inline

Definition at line 256 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
ChildOnIter openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::beginChildOn ( )
inline

Definition at line 259 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
ValueAllCIter openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::beginValueAll ( ) const
inline

Definition at line 270 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
ValueAllIter openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::beginValueAll ( )
inline

Definition at line 274 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
ValueOffCIter openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::beginValueOff ( ) const
inline
Warning
This iterator will also visit child nodes so use isChildMaskOn to skip them!

Definition at line 269 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
ValueOffIter openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::beginValueOff ( )
inline
Warning
This iterator will also visit child nodes so use isChildMaskOn to skip them!

Definition at line 273 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
ValueOnCIter openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::beginValueOn ( ) const
inline

Definition at line 267 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
ValueOnIter openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::beginValueOn ( )
inline

Definition at line 271 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
ChildAllCIter openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::cbeginChildAll ( ) const
inline

Definition at line 255 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
ChildOffCIter openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::cbeginChildOff ( ) const
inline

Definition at line 254 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
ChildOnCIter openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::cbeginChildOn ( ) const
inline

Definition at line 253 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
ValueAllCIter openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::cbeginValueAll ( ) const
inline

Definition at line 266 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
ValueOffCIter openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::cbeginValueOff ( ) const
inline
Warning
This iterator will also visit child nodes so use isChildMaskOn to skip them!

Definition at line 265 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
ValueOnCIter openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::cbeginValueOn ( ) const
inline

Definition at line 263 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
void openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::clip ( const CoordBBox &  clipBBox,
const ValueType background 
)
inline

Set all voxels that lie outside the given axis-aligned box to the background.

Definition at line 1968 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
template<typename CombineOp >
void openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::combine ( InternalNode< _ChildNodeType, Log2Dim > &  other,
CombineOp &  op 
)
inline

Definition at line 2586 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
template<typename CombineOp >
void openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::combine ( const ValueType value,
bool  valueIsActive,
CombineOp &  op 
)
inline

Definition at line 2644 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
template<typename CombineOp , typename OtherNodeType >
void openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::combine2 ( const InternalNode< _ChildNodeType, Log2Dim > &  other0,
const OtherNodeType &  other1,
CombineOp &  op 
)
inline

Definition at line 2673 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
template<typename CombineOp , typename OtherNodeType >
void openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::combine2 ( const ValueType value,
const OtherNodeType &  other,
bool  valIsActive,
CombineOp &  op 
)
inline

Definition at line 2720 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
template<typename CombineOp , typename OtherValueType >
void openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::combine2 ( const InternalNode< _ChildNodeType, Log2Dim > &  other,
const OtherValueType &  value,
bool  valIsActive,
CombineOp &  op 
)
inline

Definition at line 2753 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
Index openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::coordToOffset ( const Coord &  xyz)
inlinestatic

Return the linear table offset of the given global or local coordinates.

Definition at line 3027 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
template<typename DenseT >
void openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::copyToDense ( const CoordBBox &  bbox,
DenseT &  dense 
) const
inline

Copy into a dense grid the values of the voxels that lie within a given bounding box.

Parameters
bboxinclusive bounding box of the voxels to be copied into the dense grid
densedense grid with a stride in z of one (see tools::Dense in tools/Dense.h for the required API)
Note
bbox is assumed to be identical to or contained in the coordinate domains of both the dense grid and this node, i.e., no bounds checking is performed.

Definition at line 2072 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
static Index openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::dim ( )
inlinestatic
Returns
The dimension of this InternNode

The number of voxels in one coordinate direction covered by this node

Definition at line 279 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
template<typename NodeT , typename VisitorOp , typename ChildAllIterT >
void openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::doVisit ( NodeT &  self,
VisitorOp &  op 
)
inlinestaticprotected

Definition at line 2833 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
template<typename NodeT , typename VisitorOp , typename ChildAllIterT , typename OtherChildAllIterT >
void openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::doVisit2 ( NodeT &  self,
OtherChildAllIterT &  otherIter,
VisitorOp &  op,
bool  otherIsLHS 
)
inlinestaticprotected

Definition at line 2936 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
template<typename NodeT , typename OtherNodeT , typename VisitorOp , typename ChildAllIterT , typename OtherChildAllIterT >
void openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::doVisit2Node ( NodeT &  self,
OtherNodeT &  other,
VisitorOp &  op 
)
inlinestaticprotected

Definition at line 2876 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
void openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::evalActiveBoundingBox ( CoordBBox &  bbox,
bool  visitVoxels = true 
) const
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 1123 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
void openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::fill ( const CoordBBox &  bbox,
const ValueType value,
bool  active = true 
)
inline

Set all voxels within a given axis-aligned box to a constant value.

Parameters
bboxinclusive coordinates of opposite corners of an axis-aligned box
valuethe value to which to set voxels within the box
activeif true, mark voxels within the box as active, otherwise mark them as inactive
Note
This operation generates a sparse, but not always optimally sparse, representation of the filled box. Follow fill operations with a prune() operation for optimal sparseness.

Definition at line 2018 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
static Index openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::getChildDim ( )
inlinestatic
Returns
The dimension of the child nodes of this node.

The number of voxels in one coordinate direction covered by a child node of this node.

Definition at line 289 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
const NodeMaskType& openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::getChildMask ( ) const
inline

Definition at line 780 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
ChildT * openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::getChildNode ( Index  n)
inlineprotected

Returns a pointer to the child node at the linear offset n.

Warning
This protected method assumes that a child node exists at the specified linear offset!

Definition at line 3199 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
const ChildT * openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::getChildNode ( Index  n) const
inlineprotected

Returns a pointer to the child node at the linear offset n.

Warning
This protected method assumes that a child node exists at the specified linear offset!

Definition at line 3208 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
const ChildT::ValueType & openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::getFirstValue ( ) const
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 2208 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
const ChildT::ValueType & openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::getLastValue ( ) const
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 2216 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
static Index openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::getLevel ( )
inlinestatic
Returns
The level of this node

Level 0 is by definition the level of the leaf nodes

Definition at line 282 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
CoordBBox openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::getNodeBoundingBox ( ) const
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 323 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
void openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::getNodeLog2Dims ( std::vector< Index > &  dims)
static

Populated an stil::vector with the dimension of all the nodes in the branch starting with this node.

Definition at line 3006 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
template<typename ArrayT >
void openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::getNodes ( ArrayT &  array)
inline

Adds all nodes of a certain type to a container with the following API:

struct ArrayT {
typedef value_type;// defines the type of nodes to be added to the array
void push_back(value_type nodePtr);// method that add nodes to the array
};

An example of a wrapper around a c-style array is:

struct MyArray {
typedef LeafType* value_type;
MyArray(value_type* array) : ptr(array) {}
void push_back(value_type leaf) { *ptr++ = leaf; }
};

An example that constructs a list of pointer to all leaf nodes is:

std::vector<const LeafNodeType*> array;//most std contains have the required API
array.reserve(tree.leafCount());//this is a fast preallocation.
tree.getNodes(array);

Definition at line 3050 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
template<typename ArrayT >
void openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::getNodes ( ArrayT &  array) const
inline

Adds all nodes of a certain type to a container with the following API:

struct ArrayT {
typedef value_type;// defines the type of nodes to be added to the array
void push_back(value_type nodePtr);// method that add nodes to the array
};

An example of a wrapper around a c-style array is:

struct MyArray {
typedef LeafType* value_type;
MyArray(value_type* array) : ptr(array) {}
void push_back(value_type leaf) { *ptr++ = leaf; }
};

An example that constructs a list of pointer to all leaf nodes is:

std::vector<const LeafNodeType*> array;//most std contains have the required API
array.reserve(tree.leafCount());//this is a fast preallocation.
tree.getNodes(array);

Definition at line 3070 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
const UnionType* openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::getTable ( ) const
inline

Definition at line 788 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
const ChildT::ValueType & openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::getValue ( const Coord &  xyz) const
inline

Definition at line 1566 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
template<typename AccessorT >
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.

Note
Used internally by ValueAccessor.
template<typename _ChildNodeType, Index Log2Dim>
template<typename AccessorT >
const ChildT::ValueType& openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::getValueAndCache ( const Coord &  xyz,
AccessorT &  acc 
) const
inline

Definition at line 1576 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
Index openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::getValueLevel ( const Coord &  xyz) const
inline

Return the level of the tree (0 = leaf) at which the value at the given coordinates resides.

Definition at line 1589 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
template<typename AccessorT >
Index openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::getValueLevelAndCache ( const Coord &  xyz,
AccessorT &  acc 
) const
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.

Note
Used internally by ValueAccessor.

Definition at line 1598 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
const NodeMaskType& openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::getValueMask ( ) const
inline

Definition at line 779 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
NodeMaskType openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::getValueOffMask ( ) const
inline

Definition at line 781 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
bool openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::hasActiveTiles ( ) const
inline

Return true if this node or any of its child nodes have any active tiles.

Definition at line 1530 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
template<typename OtherChildNodeType , Index OtherLog2Dim>
bool openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::hasSameTopology ( const InternalNode< OtherChildNodeType, OtherLog2Dim > *  other) const
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 3137 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
bool openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::isChildMaskOff ( Index  n) const
inline

Definition at line 777 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
bool openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::isChildMaskOff ( ) const
inline

Definition at line 778 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
bool openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::isChildMaskOn ( Index  n) const
inline

Definition at line 776 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
bool openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::isConstant ( ValueType firstValue,
bool &  state,
const ValueType tolerance = zeroVal<ValueType>() 
) const
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.

Note
This method also returns false if this node contains any child nodes.

Definition at line 1486 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
bool openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::isConstant ( ValueType minValue,
ValueType maxValue,
bool &  state,
const ValueType tolerance = zeroVal<ValueType>() 
) const
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.

Parameters
minValueIs updated with the minimum of all values IF method returns true. Else the value is undefined!
maxValueIs updated with the maximum of all values IF method returns true. Else the value is undefined!
stateIs updated with the state of all values IF method returns true. Else the value is undefined!
toleranceThe tolerance used to determine if values are approximatly constant.
Note
This method also returns false if this node contains any child nodes.

Definition at line 1503 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
bool openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::isEmpty ( ) const
inline
Returns
True if this node contains no child nodes.

Definition at line 326 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
bool openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::isInactive ( ) const
inline

Return true if this node has no children and only contains inactive values.

Definition at line 354 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
bool openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::isValueMaskOff ( Index  n) const
inline

Definition at line 774 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
bool openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::isValueMaskOff ( ) const
inline

Definition at line 775 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
bool openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::isValueMaskOn ( Index  n) const
inline

Definition at line 772 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
bool openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::isValueMaskOn ( ) const
inline

Definition at line 773 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
bool openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::isValueOn ( const Coord &  xyz) const
inline

Return true if the voxel at the given coordinates is active.

Definition at line 1545 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
bool openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::isValueOn ( Index  offset) const
inline

Return true if the voxel at the given offset is active.

Definition at line 359 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
template<typename AccessorT >
bool openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::isValueOnAndCache ( const Coord &  xyz,
AccessorT &  acc 
) const
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.

Note
Used internally by ValueAccessor.

Definition at line 1555 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
Index32 openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::leafCount ( ) const
inline

Definition at line 1026 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
void openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::makeChildNodeEmpty ( Index  n,
const ValueType value 
)
inlineprotected

Definition at line 3192 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
Index64 openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::memUsage ( ) const
inline

Return the total amount of memory in bytes occupied by this node and its children.

Definition at line 1110 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
template<MergePolicy Policy>
void openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::merge ( InternalNode< _ChildNodeType, Log2Dim > &  other,
const ValueType background,
const ValueType otherBackground 
)
inline

Efficiently merge another tree into this tree using one of several schemes.

Warning
This operation cannibalizes the other tree.

Definition at line 2290 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
template<MergePolicy Policy>
void openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::merge ( const ValueType tileValue,
bool  tileActive 
)
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 2399 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
template<typename ModifyOp >
void openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::modifyValue ( const Coord &  xyz,
const ModifyOp &  op 
)
inline

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

Definition at line 1852 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
template<typename ModifyOp >
void openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::modifyValueAndActiveState ( const Coord &  xyz,
const ModifyOp &  op 
)
inline

Apply a functor to the voxel at the given coordinates.

Definition at line 1914 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
template<typename ModifyOp , typename AccessorT >
void openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::modifyValueAndActiveStateAndCache ( const Coord &  xyz,
const ModifyOp &  op,
AccessorT &  acc 
)
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.

Note
Used internally by ValueAccessor.

Definition at line 1937 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
template<typename ModifyOp , typename AccessorT >
void openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::modifyValueAndCache ( const Coord &  xyz,
const ModifyOp &  op,
AccessorT &  acc 
)
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.

Note
Used internally by ValueAccessor.

Definition at line 1880 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
void openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::negate ( )
inline

Change the sign of all the values represented in this node and its child nodes.

Definition at line 2228 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
Index32 openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::nonLeafCount ( ) const
inline

Definition at line 1039 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
Index64 openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::offLeafVoxelCount ( ) const
inline

Definition at line 1088 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
Coord openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::offsetToGlobalCoord ( Index  n) const
inline

Return the global coordinates for a linear table offset.

Definition at line 3037 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
void openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::offsetToLocalCoord ( Index  n,
Coord &  xyz 
)
inlinestatic

Return the local coordinates for a linear table offset, where offset 0 has coordinates (0, 0, 0).

Definition at line 3015 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
Index64 openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::offVoxelCount ( ) const
inline

Definition at line 1064 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
Index64 openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::onLeafVoxelCount ( ) const
inline

Definition at line 1076 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
Index64 openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::onTileCount ( ) const
inline

Definition at line 1099 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
Index64 openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::onVoxelCount ( ) const
inline

Definition at line 1052 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
const Coord& openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::origin ( ) const
inline

Return the grid index coordinates of this node's local origin.

Definition at line 300 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
const ChildT::LeafNodeType * openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::probeConstLeaf ( const Coord &  xyz) const
inline

Return a pointer to the leaf node that contains voxel (x, y, z). If no such node exists, return NULL.

Definition at line 1293 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
template<typename AccessorT >
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).

template<typename _ChildNodeType, Index Log2Dim>
template<typename AccessorT >
const ChildT::LeafNodeType* openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::probeConstLeafAndCache ( const Coord &  xyz,
AccessorT &  acc 
) const
inline

Definition at line 1302 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
template<typename NodeType >
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 NULL.

template<typename _ChildNodeType, Index Log2Dim>
template<typename NodeT >
const NodeT* openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::probeConstNode ( const Coord &  xyz) const
inline

Definition at line 1228 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
template<typename NodeType , typename AccessorT >
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).

template<typename _ChildNodeType, Index Log2Dim>
template<typename NodeT , typename AccessorT >
const NodeT* openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::probeConstNodeAndCache ( const Coord &  xyz,
AccessorT &  acc 
) const
inline

Definition at line 1246 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
ChildT::LeafNodeType * openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::probeLeaf ( const Coord &  xyz)
inline

Return a pointer to the leaf node that contains voxel (x, y, z). If no such node exists, return NULL.

Definition at line 1267 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
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 NULL.

template<typename _ChildNodeType, Index Log2Dim>
template<typename AccessorT >
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).

template<typename _ChildNodeType, Index Log2Dim>
template<typename AccessorT >
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).

template<typename _ChildNodeType, Index Log2Dim>
template<typename AccessorT >
ChildT::LeafNodeType* openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::probeLeafAndCache ( const Coord &  xyz,
AccessorT &  acc 
)
inline

Definition at line 1276 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
template<typename AccessorT >
const ChildT::LeafNodeType* openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::probeLeafAndCache ( const Coord &  xyz,
AccessorT &  acc 
) const
inline

Definition at line 1285 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
template<typename NodeType >
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 NULL.

template<typename _ChildNodeType, Index Log2Dim>
template<typename NodeT >
NodeT* openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::probeNode ( const Coord &  xyz)
inline

Definition at line 1191 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
template<typename NodeType , typename AccessorT >
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).

template<typename _ChildNodeType, Index Log2Dim>
template<typename NodeT , typename AccessorT >
NodeT* openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::probeNodeAndCache ( const Coord &  xyz,
AccessorT &  acc 
)
inline

Definition at line 1209 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
bool openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::probeValue ( const Coord &  xyz,
ValueType value 
) const
inline

Definition at line 1611 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
template<typename AccessorT >
bool openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::probeValueAndCache ( const Coord &  xyz,
ValueType value,
AccessorT &  acc 
) const
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.

Returns
true if the voxel at the given coordinates is active
Note
Used internally by ValueAccessor.

Definition at line 1624 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
void openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::prune ( const ValueType tolerance = zeroVal<ValueType>())
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 1141 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
void openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::readBuffers ( std::istream &  is,
bool  fromHalf = false 
)
inline

Definition at line 2971 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
void openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::readBuffers ( std::istream &  is,
const CoordBBox &  clipBBox,
bool  fromHalf = false 
)
inline

Definition at line 2981 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
void openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::readTopology ( std::istream &  is,
bool  fromHalf = false 
)
inline

Definition at line 2139 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
void openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::resetBackground ( const ValueType oldBackground,
const ValueType newBackground 
)
inline

Change inactive tiles or voxels with value oldBackground to newBackground or -oldBackground to -newBackground. Active values are unchanged.

Definition at line 3117 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
void openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::resetChildNode ( Index  i,
ChildNodeType child 
)
inlineprotected

Definition at line 3151 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
void openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::setActiveState ( const Coord &  xyz,
bool  on 
)
inline

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

Definition at line 1798 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
template<typename AccessorT >
void openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::setActiveStateAndCache ( const Coord &  xyz,
bool  on,
AccessorT &  acc 
)
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.

Note
Used internally by ValueAccessor.

Definition at line 1817 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
void openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::setChildNode ( Index  i,
ChildNodeType child 
)
inlineprotected

Definition at line 3165 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
void openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::setOrigin ( const Coord &  origin)
inline

Set the grid index coordinates of this node's local origin.

Definition at line 302 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
template<typename AccessorT >
void openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::setValueAndCache ( const Coord &  xyz,
const ValueType value,
AccessorT &  acc 
)
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.

Note
Used internally by ValueAccessor.

Definition at line 1736 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
void openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::setValueMask ( Index  n,
bool  on 
)
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 793 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
void openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::setValueOff ( const Coord &  xyz)
inline

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

Definition at line 1639 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
void openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::setValueOff ( const Coord &  xyz,
const ValueType value 
)
inline

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

Definition at line 1671 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
template<typename AccessorT >
void openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::setValueOffAndCache ( const Coord &  xyz,
const ValueType value,
AccessorT &  acc 
)
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.

Note
Used internally by ValueAccessor.

Definition at line 1691 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
void openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::setValueOn ( const Coord &  xyz)
inline

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

Definition at line 1655 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
void openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::setValueOn ( const Coord &  xyz,
const ValueType value 
)
inline

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

Definition at line 1716 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
void openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::setValueOnly ( const Coord &  xyz,
const ValueType value 
)
inline

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

Definition at line 1760 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
template<typename AccessorT >
void openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::setValueOnlyAndCache ( const Coord &  xyz,
const ValueType value,
AccessorT &  acc 
)
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.

Note
Used internally by ValueAccessor.

Definition at line 1777 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
void openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::setValuesOn ( )
inline

Mark all values (both tiles and voxels) as active.

Definition at line 1840 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
template<typename NodeT >
NodeT * openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::stealNode ( const Coord &  xyz,
const ValueType value,
bool  state 
)
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.

Note
The caller takes ownership of the node and is responsible for deleting it.
Warning
Since this method potentially removes nodes and branches of the tree, it is important to clear the caches of all ValueAccessors associated with this tree.

Definition at line 1165 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
template<typename ArrayT >
void openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::stealNodes ( ArrayT &  array,
const ValueType value,
bool  state 
)
inline

Steals all nodes of a certain type from the tree and adds them to a container with the following API:

struct ArrayT {
typedef value_type;// defines the type of nodes to be added to the array
void push_back(value_type nodePtr);// method that add nodes to the array
};

An example of a wrapper around a c-style array is:

struct MyArray {
typedef LeafType* value_type;
MyArray(value_type* array) : ptr(array) {}
void push_back(value_type leaf) { *ptr++ = leaf; }
};

An example that constructs a list of pointer to all leaf nodes is:

std::vector<const LeafNodeType*> array;//most std contains have the required API
array.reserve(tree.leafCount());//this is a fast preallocation.
tree.stealNodes(array);

Definition at line 3091 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
template<typename OtherChildNodeType >
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.

Note
This operation modifies only active states, not values. Also note that this operation can result in all voxels being inactive so consider subsequnetly calling prune.
template<typename _ChildNodeType, Index Log2Dim>
template<typename OtherChildT >
void openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::topologyDifference ( const InternalNode< OtherChildT, Log2Dim > &  other,
const ValueType background 
)
inline

Definition at line 2574 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
template<typename OtherChildNodeType >
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.

Note
This operation can delete branches in this grid if they overlap with inactive tiles in the other grid. Likewise active voxels can be turned into unactive voxels resulting in leaf nodes with no active values. Thus, it is recommended to subsequently call prune.
template<typename _ChildNodeType, Index Log2Dim>
template<typename OtherChildT >
void openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::topologyIntersection ( const InternalNode< OtherChildT, Log2Dim > &  other,
const ValueType background 
)
inline

Definition at line 2515 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
template<typename OtherChildNodeType >
void openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::topologyUnion ( const InternalNode< OtherChildNodeType, Log2Dim > &  other)

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.

template<typename _ChildNodeType, Index Log2Dim>
template<typename OtherChildT >
void openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::topologyUnion ( const InternalNode< OtherChildT, Log2Dim > &  other)
inline

Definition at line 2466 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
ChildT::LeafNodeType * openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::touchLeaf ( const Coord &  xyz)
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 1453 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
template<typename AccessorT >
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.

template<typename _ChildNodeType, Index Log2Dim>
template<typename AccessorT >
ChildT::LeafNodeType* openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::touchLeafAndCache ( const Coord &  xyz,
AccessorT &  acc 
)
inline

Definition at line 1470 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
ChildT * openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::unsetChildNode ( Index  i,
const ValueType value 
)
inlineprotected

Definition at line 3177 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
template<typename VisitorOp >
void openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::visit ( VisitorOp &  op)
inline

Definition at line 2815 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
template<typename VisitorOp >
void openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::visit ( VisitorOp &  op) const
inline

Definition at line 2824 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
template<typename IterT , typename VisitorOp >
void openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::visit2 ( IterT &  otherIter,
VisitorOp &  ,
bool  otherIsLHS = false 
)
template<typename _ChildNodeType, Index Log2Dim>
template<typename IterT , typename VisitorOp >
void openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::visit2 ( IterT &  otherIter,
VisitorOp &  ,
bool  otherIsLHS = false 
) const
template<typename _ChildNodeType, Index Log2Dim>
template<typename OtherChildAllIterType , typename VisitorOp >
void openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::visit2 ( OtherChildAllIterType &  otherIter,
VisitorOp &  op,
bool  otherIsLHS 
)
inline

Definition at line 2914 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
template<typename OtherChildAllIterType , typename VisitorOp >
void openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::visit2 ( OtherChildAllIterType &  otherIter,
VisitorOp &  op,
bool  otherIsLHS 
) const
inline

Definition at line 2925 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
template<typename OtherNodeType , typename VisitorOp >
void openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::visit2Node ( OtherNodeType &  other,
VisitorOp &  op 
)
inline

Definition at line 2851 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
template<typename OtherNodeType , typename VisitorOp >
void openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::visit2Node ( OtherNodeType &  other,
VisitorOp &  op 
) const
inline

Definition at line 2861 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
template<typename BBoxOp >
void openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::visitActiveBBox ( BBoxOp &  op) const
inline

Calls the templated functor BBoxOp with bounding box information for all active tiles and leaf nodes in this node. An additional level argument is provided for each callback.

Note
The bounding boxes are guarenteed to be non-overlapping.

Definition at line 2789 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
void openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::voxelizeActiveTiles ( bool  threaded = true)
inline

Densify active tiles, i.e., replace them with leaf-level active voxels.

Parameters
threadedif true, this operation is multi-threaded (over the internal nodes).

Definition at line 2270 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
void openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::writeBuffers ( std::ostream &  os,
bool  toHalf = false 
) const
inline

Definition at line 2961 of file InternalNode.h.

template<typename ChildT , Index Log2Dim>
void openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< ChildT, Log2Dim >::writeTopology ( std::ostream &  os,
bool  toHalf = false 
) const
inline

Definition at line 2115 of file InternalNode.h.

Friends And Related Function Documentation

template<typename _ChildNodeType, Index Log2Dim>
template<typename , Index >
friend class InternalNode
friend

During topology-only construction, access is needed to protected/private members of other template instances.

Definition at line 768 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
friend class IteratorBase< MaskDenseIterator, InternalNode >
friend

Allow iterators to call mask accessor methods (setValueMask(), setChildMask(), etc.).

Todo:
Make mask accessors public?

Definition at line 763 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
friend class IteratorBase< MaskOffIterator, InternalNode >
friend

Allow iterators to call mask accessor methods (setValueMask(), setChildMask(), etc.).

Todo:
Make mask accessors public?

Definition at line 762 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
friend class IteratorBase< MaskOnIterator, InternalNode >
friend

Allow iterators to call mask accessor methods (setValueMask(), setChildMask(), etc.).

Todo:
Make mask accessors public?

Definition at line 761 of file InternalNode.h.

Member Data Documentation

template<typename _ChildNodeType, Index Log2Dim>
const Index openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::DIM = 1 << TOTAL
static

Definition at line 77 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
const Index openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::LEVEL = 1 + ChildNodeType::LEVEL
static

Definition at line 79 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
const Index openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::LOG2DIM = Log2Dim
static

Definition at line 75 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
NodeMaskType openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::mChildMask
protected

Definition at line 832 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
UnionType openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::mNodes[NUM_VALUES]
protected

Definition at line 828 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
Coord openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::mOrigin
protected

Global grid index coordinates (x,y,z) of the local origin of this node.

Definition at line 834 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
NodeMaskType openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::mValueMask
protected

Definition at line 832 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
const Index openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::NUM_VALUES = 1 << (3 * Log2Dim)
static

Definition at line 78 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
const Index64 openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::NUM_VOXELS = uint64_t(1) << (3 * TOTAL)
static

Definition at line 81 of file InternalNode.h.

template<typename _ChildNodeType, Index Log2Dim>
const Index openvdb::OPENVDB_VERSION_NAME::tree::InternalNode< _ChildNodeType, Log2Dim >::TOTAL = Log2Dim + ChildNodeType::TOTAL
static

Definition at line 76 of file InternalNode.h.


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