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

Templated block class to hold specific data types and a fixed number of values determined by Log2Dim. The actual coordinate dimension of the block is 2^Log2Dim, i.e. Log2Dim=3 corresponds to a LeafNode that spans a 8^3 block. More...

#include <LeafNode.h>

+ Inheritance diagram for openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >:

Classes

struct  ChildAll
 
struct  ChildIter
 Leaf nodes have no children, so their child iterators have no get/set accessors. More...
 
struct  ChildOff
 
struct  ChildOn
 
struct  DenseIter
 
struct  SameConfiguration
 SameConfiguration<OtherNodeType>::value is true if and only if OtherNodeType is the type of a LeafNode with the same dimensions as this node. More...
 
struct  ValueAll
 
struct  ValueConverter
 ValueConverter<T>::Type is the type of a LeafNode having the same dimensions as this node but a different value type, T. More...
 
struct  ValueIter
 
struct  ValueOff
 
struct  ValueOn
 

Public Types

using BuildType = T
 
using ValueType = T
 
using Buffer = LeafBuffer< ValueType, Log2Dim >
 
using LeafNodeType = LeafNode< ValueType, Log2Dim >
 
using NodeMaskType = util::NodeMask< Log2Dim >
 
using Ptr = SharedPtr< LeafNode >
 
using ValueOnIter = ValueIter< MaskOnIterator, LeafNode, const ValueType, ValueOn >
 
using ValueOnCIter = ValueIter< MaskOnIterator, const LeafNode, const ValueType, ValueOn >
 
using ValueOffIter = ValueIter< MaskOffIterator, LeafNode, const ValueType, ValueOff >
 
using ValueOffCIter = ValueIter< MaskOffIterator, const LeafNode, const ValueType, ValueOff >
 
using ValueAllIter = ValueIter< MaskDenseIterator, LeafNode, const ValueType, ValueAll >
 
using ValueAllCIter = ValueIter< MaskDenseIterator, const LeafNode, const ValueType, ValueAll >
 
using ChildOnIter = ChildIter< MaskOnIterator, LeafNode, ChildOn >
 
using ChildOnCIter = ChildIter< MaskOnIterator, const LeafNode, ChildOn >
 
using ChildOffIter = ChildIter< MaskOffIterator, LeafNode, ChildOff >
 
using ChildOffCIter = ChildIter< MaskOffIterator, const LeafNode, ChildOff >
 
using ChildAllIter = DenseIter< LeafNode, ValueType, ChildAll >
 
using ChildAllCIter = DenseIter< const LeafNode, const ValueType, ChildAll >
 

Public Member Functions

 LeafNode ()
 Default constructor. More...
 
 LeafNode (const Coord &coords, const ValueType &value=zeroVal< ValueType >(), bool active=false)
 Constructor. More...
 
 LeafNode (const LeafNode &)
 Deep copy constructor. More...
 
LeafNodeoperator= (const LeafNode &)=default
 Deep assignment operator. More...
 
template<typename OtherValueType >
 LeafNode (const LeafNode< OtherValueType, Log2Dim > &other)
 Value conversion copy constructor. More...
 
template<typename OtherValueType >
 LeafNode (const LeafNode< OtherValueType, Log2Dim > &other, const ValueType &offValue, const ValueType &onValue, TopologyCopy)
 Topology copy constructor. More...
 
template<typename OtherValueType >
 LeafNode (const LeafNode< OtherValueType, Log2Dim > &other, const ValueType &background, TopologyCopy)
 Topology copy constructor. More...
 
 ~LeafNode ()
 Destructor. More...
 
Index64 onVoxelCount () const
 Return the number of voxels marked On. More...
 
Index64 offVoxelCount () const
 Return the number of voxels marked Off. More...
 
Index64 onLeafVoxelCount () const
 
Index64 offLeafVoxelCount () const
 
bool isEmpty () const
 Return true if this node has no active voxels. More...
 
bool isDense () const
 Return true if this node contains only active voxels. More...
 
Index64 memUsage () const
 Return the memory in bytes occupied by this node. More...
 
void evalActiveBoundingBox (CoordBBox &bbox, bool visitVoxels=true) const
 
CoordBBox getNodeBoundingBox () const
 Return the bounding box of this node, i.e., the full index space spanned by this leaf node. More...
 
void setOrigin (const Coord &origin)
 Set the grid index coordinates of this node's local origin. More...
 
Coord offsetToGlobalCoord (Index n) const
 Return the global coordinates for a linear table offset. More...
 
std::string str () const
 Return a string representation of this node. More...
 
template<typename OtherType , Index OtherLog2Dim>
bool hasSameTopology (const LeafNode< OtherType, OtherLog2Dim > *other) const
 Return true if the given node (which may have a different ValueType than this node) has the same active value topology as this node. More...
 
bool operator== (const LeafNode &other) const
 Check for buffer, state and origin equivalence. More...
 
bool operator!= (const LeafNode &other) const
 
ValueOnCIter cbeginValueOn () const
 
ValueOnCIter beginValueOn () const
 
ValueOnIter beginValueOn ()
 
ValueOffCIter cbeginValueOff () const
 
ValueOffCIter beginValueOff () const
 
ValueOffIter beginValueOff ()
 
ValueAllCIter cbeginValueAll () const
 
ValueAllCIter beginValueAll () const
 
ValueAllIter beginValueAll ()
 
ValueOnCIter cendValueOn () const
 
ValueOnCIter endValueOn () const
 
ValueOnIter endValueOn ()
 
ValueOffCIter cendValueOff () const
 
ValueOffCIter endValueOff () const
 
ValueOffIter endValueOff ()
 
ValueAllCIter cendValueAll () const
 
ValueAllCIter endValueAll () const
 
ValueAllIter endValueAll ()
 
ChildOnCIter cbeginChildOn () const
 
ChildOnCIter beginChildOn () const
 
ChildOnIter beginChildOn ()
 
ChildOffCIter cbeginChildOff () const
 
ChildOffCIter beginChildOff () const
 
ChildOffIter beginChildOff ()
 
ChildAllCIter cbeginChildAll () const
 
ChildAllCIter beginChildAll () const
 
ChildAllIter beginChildAll ()
 
ChildOnCIter cendChildOn () const
 
ChildOnCIter endChildOn () const
 
ChildOnIter endChildOn ()
 
ChildOffCIter cendChildOff () const
 
ChildOffCIter endChildOff () const
 
ChildOffIter endChildOff ()
 
ChildAllCIter cendChildAll () const
 
ChildAllCIter endChildAll () const
 
ChildAllIter endChildAll ()
 
void swap (Buffer &other)
 Exchange this node's data buffer with the given data buffer without changing the active states of the values. More...
 
const Bufferbuffer () const
 
Bufferbuffer ()
 
void readTopology (std::istream &is, bool fromHalf=false)
 Read in just the topology. More...
 
void writeTopology (std::ostream &os, bool toHalf=false) const
 Write out just the topology. More...
 
void readBuffers (std::istream &is, bool fromHalf=false)
 Read buffers from a stream. More...
 
void readBuffers (std::istream &is, const CoordBBox &bbox, bool fromHalf=false)
 Read buffers that intersect the given bounding box. More...
 
void writeBuffers (std::ostream &os, bool toHalf=false) const
 Write buffers to a stream. More...
 
size_t streamingSize (bool toHalf=false) const
 
const ValueTypegetValue (const Coord &xyz) const
 Return the value of the voxel at the given coordinates. More...
 
const ValueTypegetValue (Index offset) const
 Return the value of the voxel at the given linear offset. More...
 
bool probeValue (const Coord &xyz, ValueType &val) const
 Return true if the voxel at the given coordinates is active. More...
 
bool probeValue (Index offset, ValueType &val) const
 Return true if the voxel at the given offset is active. 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 setActiveState (Index offset, bool on)
 Set the active state of the voxel at the given offset but don't change its value. More...
 
void setValueOnly (const Coord &xyz, const ValueType &val)
 Set the value of the voxel at the given coordinates but don't change its active state. More...
 
void setValueOnly (Index offset, const ValueType &val)
 Set the value of the voxel at the given offset but don't change its active state. More...
 
void setValueOff (const Coord &xyz)
 Mark the voxel at the given coordinates as inactive but don't change its value. More...
 
void setValueOff (Index offset)
 Mark the voxel at the given offset as inactive but don't change its value. More...
 
void setValueOff (const Coord &xyz, const ValueType &val)
 Set the value of the voxel at the given coordinates and mark the voxel as inactive. More...
 
void setValueOff (Index offset, const ValueType &val)
 Set the value of the voxel at the given offset and mark the voxel as inactive. More...
 
void setValueOn (const Coord &xyz)
 Mark the voxel at the given coordinates as active but don't change its value. More...
 
void setValueOn (Index offset)
 Mark the voxel at the given offset as active but don't change its value. More...
 
void setValueOn (const Coord &xyz, const ValueType &val)
 Set the value of the voxel at the given coordinates and mark the voxel as active. More...
 
void setValue (const Coord &xyz, const ValueType &val)
 Set the value of the voxel at the given coordinates and mark the voxel as active. More...
 
void setValueOn (Index offset, const ValueType &val)
 Set the value of the voxel at the given offset and mark the voxel as active. More...
 
template<typename ModifyOp >
void modifyValue (Index offset, const ModifyOp &op)
 Apply a functor to the value of the voxel at the given offset and mark the voxel as active. 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 setValuesOn ()
 Mark all voxels as active but don't change their values. More...
 
void setValuesOff ()
 Mark all voxels as inactive but don't change their 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...
 
void clip (const CoordBBox &, const ValueType &background)
 Set all voxels that lie outside the given axis-aligned box to the background. More...
 
void fill (const CoordBBox &bbox, const ValueType &, bool active=true)
 Set all voxels within an axis-aligned box to the specified value and active state. More...
 
void denseFill (const CoordBBox &bbox, const ValueType &value, bool active=true)
 Set all voxels within an axis-aligned box to the specified value and active state. More...
 
void fill (const ValueType &value)
 Set all voxels to the specified value but don't change their active states. More...
 
void fill (const ValueType &value, bool active)
 Set all voxels to the specified value and active state. 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<typename DenseT >
void copyFromDense (const CoordBBox &bbox, const DenseT &dense, const ValueType &background, const ValueType &tolerance)
 Copy from a dense grid into this node the values of the voxels that lie within a given bounding box. More...
 
template<typename AccessorT >
const ValueTypegetValueAndCache (const Coord &xyz, AccessorT &) const
 Return the value of the voxel at the given coordinates. More...
 
template<typename AccessorT >
bool isValueOnAndCache (const Coord &xyz, AccessorT &) const
 Return true if the voxel at the given coordinates is active. More...
 
template<typename AccessorT >
void setValueAndCache (const Coord &xyz, const ValueType &val, AccessorT &)
 Change the value of the voxel at the given coordinates and mark it as active. More...
 
template<typename AccessorT >
void setValueOnlyAndCache (const Coord &xyz, const ValueType &val, AccessorT &)
 Change the value of the voxel at the given coordinates but preserve its state. More...
 
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. 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 &)
 Change the value of the voxel at the given coordinates and mark it as inactive. More...
 
template<typename AccessorT >
void setActiveStateAndCache (const Coord &xyz, bool on, AccessorT &)
 Set the active state of the voxel at the given coordinates without changing its value. More...
 
template<typename AccessorT >
bool probeValueAndCache (const Coord &xyz, ValueType &val, AccessorT &) const
 Return true if the voxel at the given coordinates is active and return the voxel value in val. More...
 
template<typename AccessorT >
const ValueTypegetValue (const Coord &xyz, bool &state, int &level, AccessorT &) const
 Return the value of the voxel at the given coordinates and return its active state and level (i.e., 0) in state and level. More...
 
const ValueTypegetFirstValue () const
 Return a const reference to the first value in the buffer. More...
 
const ValueTypegetLastValue () const
 Return a const reference to the last value in the buffer. More...
 
void resetBackground (const ValueType &oldBackground, const ValueType &newBackground)
 Replace inactive occurrences of oldBackground with newBackground, and inactive occurrences of -oldBackground with -newBackground. More...
 
void negate ()
 
void voxelizeActiveTiles (bool=true)
 No-op. More...
 
template<MergePolicy Policy>
void merge (const LeafNode &)
 
template<MergePolicy Policy>
void merge (const ValueType &tileValue, bool tileActive)
 
template<MergePolicy Policy>
void merge (const LeafNode &other, const ValueType &, const ValueType &)
 
template<typename OtherType >
void topologyUnion (const LeafNode< OtherType, Log2Dim > &other)
 Union 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 if either of the original voxels were active. More...
 
template<typename OtherType >
void topologyIntersection (const LeafNode< OtherType, Log2Dim > &other, const ValueType &)
 Intersect 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 both of the original voxels were active. More...
 
template<typename OtherType >
void topologyDifference (const LeafNode< OtherType, Log2Dim > &other, const ValueType &)
 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 LeafNode and inactive in the other LeafNode. More...
 
template<typename CombineOp >
void combine (const LeafNode &other, CombineOp &op)
 
template<typename CombineOp >
void combine (const ValueType &value, bool valueIsActive, CombineOp &op)
 
template<typename CombineOp , typename OtherType >
void combine2 (const LeafNode &other, const OtherType &, bool valueIsActive, CombineOp &)
 
template<typename CombineOp , typename OtherNodeT >
void combine2 (const ValueType &, const OtherNodeT &other, bool valueIsActive, CombineOp &)
 
template<typename CombineOp , typename OtherNodeT >
void combine2 (const LeafNode &b0, const OtherNodeT &b1, CombineOp &)
 
template<typename BBoxOp >
void visitActiveBBox (BBoxOp &) const
 Calls the templated functor BBoxOp with bounding box information. An additional level argument is provided to the callback. More...
 
template<typename VisitorOp >
void visit (VisitorOp &)
 
template<typename VisitorOp >
void visit (VisitorOp &) const
 
template<typename OtherLeafNodeType , typename VisitorOp >
void visit2Node (OtherLeafNodeType &other, VisitorOp &)
 
template<typename OtherLeafNodeType , typename VisitorOp >
void visit2Node (OtherLeafNodeType &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 addTile (Index level, const Coord &, const ValueType &, bool)
 
void addTile (Index offset, const ValueType &, bool)
 
template<typename AccessorT >
void addTileAndCache (Index, const Coord &, const ValueType &, bool, AccessorT &)
 
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
 
ValueType medianAll (ValueType *tmp=nullptr) const
 Computes the median value of all the active AND inactive voxels in this node. More...
 
Index medianOn (ValueType &value, ValueType *tmp=nullptr) const
 Computes the median value of all the active voxels in this node. More...
 
Index medianOff (ValueType &value, ValueType *tmp=nullptr) const
 Computes the median value of all the inactive voxels in this node. More...
 
bool isInactive () const
 Return true if all of this node's values are inactive. More...
 
bool isValueMaskOn (Index n) const
 
bool isValueMaskOn () const
 
bool isValueMaskOff (Index n) const
 
bool isValueMaskOff () const
 
const NodeMaskTypegetValueMask () const
 
NodeMaskTypegetValueMask ()
 
const NodeMaskTypevalueMask () const
 
void setValueMask (const NodeMaskType &mask)
 
bool isChildMaskOn (Index) const
 
bool isChildMaskOff (Index) const
 
bool isChildMaskOff () const
 
const Coord & origin () const
 Return the grid index coordinates of this node's local origin. More...
 
void getOrigin (Coord &origin) const
 Return the grid index coordinates of this node's local origin. More...
 
void getOrigin (Int32 &x, Int32 &y, Int32 &z) const
 Return the grid index coordinates of this node's local origin. More...
 
void prune (const ValueType &=zeroVal< ValueType >())
 This function exists only to enable template instantiation. More...
 
void addLeaf (LeafNode *)
 This function exists only to enable template instantiation. More...
 
template<typename AccessorT >
void addLeafAndCache (LeafNode *, AccessorT &)
 This function exists only to enable template instantiation. More...
 
template<typename NodeT >
NodeT * stealNode (const Coord &, const ValueType &, bool)
 This function exists only to enable template instantiation. More...
 
template<typename NodeT >
NodeT * probeNode (const Coord &)
 This function exists only to enable template instantiation. More...
 
template<typename NodeT >
const NodeT * probeConstNode (const Coord &) const
 This function exists only to enable template instantiation. More...
 
template<typename ArrayT >
void getNodes (ArrayT &) const
 This function exists only to enable template instantiation. More...
 
template<typename ArrayT >
void stealNodes (ArrayT &, const ValueType &, bool)
 This function exists only to enable template instantiation. More...
 
LeafNodetouchLeaf (const Coord &)
 Return a pointer to this node. More...
 
template<typename AccessorT >
LeafNodetouchLeafAndCache (const Coord &, AccessorT &)
 Return a pointer to this node. More...
 
template<typename NodeT , typename AccessorT >
NodeT * probeNodeAndCache (const Coord &, AccessorT &)
 Return a pointer to this node. More...
 
LeafNodeprobeLeaf (const Coord &)
 Return a pointer to this node. More...
 
template<typename AccessorT >
LeafNodeprobeLeafAndCache (const Coord &, AccessorT &)
 Return a pointer to this node. More...
 
const LeafNodeprobeConstLeaf (const Coord &) const
 Return a pointer to this node. More...
 
template<typename AccessorT >
const LeafNodeprobeConstLeafAndCache (const Coord &, AccessorT &) const
 Return a pointer to this node. More...
 
template<typename AccessorT >
const LeafNodeprobeLeafAndCache (const Coord &, AccessorT &) const
 Return a pointer to this node. More...
 
const LeafNodeprobeLeaf (const Coord &) const
 Return a pointer to this node. More...
 
template<typename NodeT , typename AccessorT >
const NodeT * probeConstNodeAndCache (const Coord &, AccessorT &) const
 Return a pointer to this node. More...
 

Static Public Member Functions

static Index log2dim ()
 Return log2 of the dimension of this LeafNode, e.g. 3 if dimensions are 8^3. More...
 
static Index dim ()
 Return the number of voxels in each coordinate dimension. More...
 
static Index size ()
 Return the total number of voxels represented by this LeafNode. More...
 
static Index numValues ()
 Return the total number of voxels represented by this LeafNode. More...
 
static Index getLevel ()
 Return the level of this node, which by definition is zero for LeafNodes. More...
 
static void getNodeLog2Dims (std::vector< Index > &dims)
 Append the Log2Dim of this LeafNode to the specified vector. More...
 
static Index getChildDim ()
 Return the dimension of child nodes of this LeafNode, which is one for voxels. More...
 
static Index32 leafCount ()
 Return the leaf count for this node, which is one. More...
 
static Index32 nonLeafCount ()
 Return the non-leaf count for this node, which is zero. More...
 
static Index64 onTileCount ()
 
static Index64 offTileCount ()
 
static Index coordToOffset (const Coord &xyz)
 Return the linear table offset of the given global or local coordinates. More...
 
static Coord offsetToLocalCoord (Index n)
 Return the local coordinates for a linear table offset, where offset 0 has coordinates (0, 0, 0). More...
 
static Index getValueLevel (const Coord &)
 Return the level (i.e., 0) at which leaf node values reside. More...
 
static bool hasActiveTiles ()
 Return false since leaf nodes never contain tiles. More...
 
template<typename AccessorT >
static Index getValueLevelAndCache (const Coord &, AccessorT &)
 Return the LEVEL (=0) at which leaf node values reside. More...
 

Static Public Attributes

static const Index LOG2DIM = Log2Dim
 
static const Index TOTAL = Log2Dim
 
static const Index DIM = 1 << TOTAL
 
static const Index NUM_VALUES = 1 << 3 * Log2Dim
 
static const Index NUM_VOXELS = NUM_VALUES
 
static const Index SIZE = NUM_VALUES
 
static const Index LEVEL = 0
 

Protected Types

using MaskOnIterator = typename NodeMaskType::OnIterator
 
using MaskOffIterator = typename NodeMaskType::OffIterator
 
using MaskDenseIterator = typename NodeMaskType::DenseIterator
 

Protected Member Functions

void setValueMask (Index n, bool on)
 
void setValueMaskOn (Index n)
 
void setValueMaskOff (Index n)
 
void skipCompressedValues (bool seekable, std::istream &, bool fromHalf)
 

Static Protected Member Functions

static void evalNodeOrigin (Coord &xyz)
 Compute the origin of the leaf node that contains the voxel with the given coordinates. More...
 
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 &self, OtherNodeT &other, VisitorOp &)
 
template<typename NodeT , typename VisitorOp , typename ChildAllIterT , typename OtherChildAllIterT >
static void doVisit2 (NodeT &self, OtherChildAllIterT &, VisitorOp &, bool otherIsLHS)
 

Friends

class ::TestLeaf
 
template<typename >
class ::TestLeafIO
 
template<typename , Index >
class LeafNode
 
struct ValueIter< MaskOnIterator, LeafNode, ValueType, ValueOn >
 
struct ValueIter< MaskOffIterator, LeafNode, ValueType, ValueOff >
 
struct ValueIter< MaskDenseIterator, LeafNode, ValueType, ValueAll >
 
struct ValueIter< MaskOnIterator, const LeafNode, ValueType, ValueOn >
 
struct ValueIter< MaskOffIterator, const LeafNode, ValueType, ValueOff >
 
struct ValueIter< MaskDenseIterator, const LeafNode, ValueType, ValueAll >
 
class IteratorBase< MaskOnIterator, LeafNode >
 
class IteratorBase< MaskOffIterator, LeafNode >
 
class IteratorBase< MaskDenseIterator, LeafNode >
 

Detailed Description

template<typename T, Index Log2Dim>
class openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >

Templated block class to hold specific data types and a fixed number of values determined by Log2Dim. The actual coordinate dimension of the block is 2^Log2Dim, i.e. Log2Dim=3 corresponds to a LeafNode that spans a 8^3 block.

Definition at line 64 of file LeafNode.h.

Member Typedef Documentation

template<typename T, Index Log2Dim>
using openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::Buffer = LeafBuffer<ValueType, Log2Dim>

Definition at line 69 of file LeafNode.h.

template<typename T, Index Log2Dim>
using openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::BuildType = T

Definition at line 67 of file LeafNode.h.

template<typename T, Index Log2Dim>
using openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::ChildAllCIter = DenseIter<const LeafNode, const ValueType, ChildAll>

Definition at line 318 of file LeafNode.h.

template<typename T, Index Log2Dim>
using openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::ChildAllIter = DenseIter<LeafNode, ValueType, ChildAll>

Definition at line 317 of file LeafNode.h.

template<typename T, Index Log2Dim>
using openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::ChildOffCIter = ChildIter<MaskOffIterator, const LeafNode, ChildOff>

Definition at line 316 of file LeafNode.h.

template<typename T, Index Log2Dim>
using openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::ChildOffIter = ChildIter<MaskOffIterator, LeafNode, ChildOff>

Definition at line 315 of file LeafNode.h.

template<typename T, Index Log2Dim>
using openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::ChildOnCIter = ChildIter<MaskOnIterator, const LeafNode, ChildOn>

Definition at line 314 of file LeafNode.h.

template<typename T, Index Log2Dim>
using openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::ChildOnIter = ChildIter<MaskOnIterator, LeafNode, ChildOn>

Definition at line 313 of file LeafNode.h.

template<typename T, Index Log2Dim>
using openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::LeafNodeType = LeafNode<ValueType, Log2Dim>

Definition at line 70 of file LeafNode.h.

template<typename T, Index Log2Dim>
using openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::MaskDenseIterator = typename NodeMaskType::DenseIterator
protected

Definition at line 229 of file LeafNode.h.

template<typename T, Index Log2Dim>
using openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::MaskOffIterator = typename NodeMaskType::OffIterator
protected

Definition at line 228 of file LeafNode.h.

template<typename T, Index Log2Dim>
using openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::MaskOnIterator = typename NodeMaskType::OnIterator
protected

Definition at line 227 of file LeafNode.h.

template<typename T, Index Log2Dim>
using openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::NodeMaskType = util::NodeMask<Log2Dim>

Definition at line 71 of file LeafNode.h.

template<typename T, Index Log2Dim>
using openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::Ptr = SharedPtr<LeafNode>

Definition at line 72 of file LeafNode.h.

Definition at line 312 of file LeafNode.h.

Definition at line 311 of file LeafNode.h.

Definition at line 310 of file LeafNode.h.

Definition at line 309 of file LeafNode.h.

Definition at line 308 of file LeafNode.h.

template<typename T, Index Log2Dim>
using openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::ValueOnIter = ValueIter<MaskOnIterator, LeafNode, const ValueType, ValueOn>

Definition at line 307 of file LeafNode.h.

template<typename T, Index Log2Dim>
using openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::ValueType = T

Definition at line 68 of file LeafNode.h.

Constructor & Destructor Documentation

template<typename T , Index Log2Dim>
openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::LeafNode ( )
inline

Default constructor.

Definition at line 946 of file LeafNode.h.

template<typename T , Index Log2Dim>
openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::LeafNode ( const Coord &  coords,
const ValueType value = zeroVal<ValueType>(),
bool  active = false 
)
inlineexplicit

Constructor.

Parameters
coordsthe grid index coordinates of a voxel
valuea value with which to fill the buffer
activethe active state to which to initialize all voxels

Definition at line 955 of file LeafNode.h.

template<typename T , Index Log2Dim>
openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::LeafNode ( const LeafNode< T, Log2Dim > &  other)
inline

Deep copy constructor.

Definition at line 977 of file LeafNode.h.

template<typename T , Index Log2Dim>
template<typename OtherValueType >
openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::LeafNode ( const LeafNode< OtherValueType, Log2Dim > &  other)
inlineexplicit

Value conversion copy constructor.

Todo:
Consider using a value conversion functor passed as an argument instead.

Definition at line 989 of file LeafNode.h.

template<typename T , Index Log2Dim>
template<typename OtherValueType >
openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::LeafNode ( const LeafNode< OtherValueType, Log2Dim > &  other,
const ValueType offValue,
const ValueType onValue,
TopologyCopy   
)
inline

Topology copy constructor.

Definition at line 1019 of file LeafNode.h.

template<typename T , Index Log2Dim>
template<typename OtherValueType >
openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::LeafNode ( const LeafNode< OtherValueType, Log2Dim > &  other,
const ValueType background,
TopologyCopy   
)
inline

Topology copy constructor.

Definition at line 1007 of file LeafNode.h.

template<typename T , Index Log2Dim>
openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::~LeafNode ( )
inline

Destructor.

Definition at line 1032 of file LeafNode.h.

Member Function Documentation

template<typename T, Index Log2Dim>
void openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::addLeaf ( LeafNode< T, Log2Dim > *  )
inline

This function exists only to enable template instantiation.

Definition at line 731 of file LeafNode.h.

template<typename T, Index Log2Dim>
template<typename AccessorT >
void openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::addLeafAndCache ( LeafNode< T, Log2Dim > *  ,
AccessorT &   
)
inline

This function exists only to enable template instantiation.

Definition at line 733 of file LeafNode.h.

template<typename T , Index Log2Dim>
void openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::addTile ( Index  level,
const Coord &  xyz,
const ValueType val,
bool  active 
)
inline

Definition at line 1615 of file LeafNode.h.

template<typename T , Index Log2Dim>
void openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::addTile ( Index  offset,
const ValueType val,
bool  active 
)
inline

Definition at line 1622 of file LeafNode.h.

template<typename T , Index Log2Dim>
template<typename AccessorT >
void openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::addTileAndCache ( Index  level,
const Coord &  xyz,
const ValueType val,
bool  active,
AccessorT &   
)
inline

Definition at line 1632 of file LeafNode.h.

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

Definition at line 349 of file LeafNode.h.

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

Definition at line 350 of file LeafNode.h.

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

Definition at line 346 of file LeafNode.h.

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

Definition at line 347 of file LeafNode.h.

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

Definition at line 343 of file LeafNode.h.

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

Definition at line 344 of file LeafNode.h.

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

Definition at line 327 of file LeafNode.h.

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

Definition at line 328 of file LeafNode.h.

template<typename T, Index Log2Dim>
ValueOffCIter openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::beginValueOff ( ) const
inline

Definition at line 324 of file LeafNode.h.

template<typename T, Index Log2Dim>
ValueOffIter openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::beginValueOff ( )
inline

Definition at line 325 of file LeafNode.h.

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

Definition at line 321 of file LeafNode.h.

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

Definition at line 322 of file LeafNode.h.

template<typename T, Index Log2Dim>
const Buffer& openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::buffer ( ) const
inline

Definition at line 368 of file LeafNode.h.

template<typename T, Index Log2Dim>
Buffer& openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::buffer ( )
inline

Definition at line 369 of file LeafNode.h.

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

Definition at line 348 of file LeafNode.h.

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

Definition at line 345 of file LeafNode.h.

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

Definition at line 342 of file LeafNode.h.

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

Definition at line 326 of file LeafNode.h.

template<typename T, Index Log2Dim>
ValueOffCIter openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::cbeginValueOff ( ) const
inline

Definition at line 323 of file LeafNode.h.

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

Definition at line 320 of file LeafNode.h.

template<typename T, Index Log2Dim>
ChildAllCIter openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::cendChildAll ( ) const
inline

Definition at line 358 of file LeafNode.h.

template<typename T, Index Log2Dim>
ChildOffCIter openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::cendChildOff ( ) const
inline

Definition at line 355 of file LeafNode.h.

template<typename T, Index Log2Dim>
ChildOnCIter openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::cendChildOn ( ) const
inline

Definition at line 352 of file LeafNode.h.

template<typename T, Index Log2Dim>
ValueAllCIter openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::cendValueAll ( ) const
inline

Definition at line 336 of file LeafNode.h.

template<typename T, Index Log2Dim>
ValueOffCIter openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::cendValueOff ( ) const
inline

Definition at line 333 of file LeafNode.h.

template<typename T, Index Log2Dim>
ValueOnCIter openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::cendValueOn ( ) const
inline

Definition at line 330 of file LeafNode.h.

template<typename T , Index Log2Dim>
void openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, 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 1163 of file LeafNode.h.

template<typename T , Index Log2Dim>
template<typename CombineOp >
void openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::combine ( const LeafNode< T, Log2Dim > &  other,
CombineOp &  op 
)
inline

Definition at line 1762 of file LeafNode.h.

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

Definition at line 1782 of file LeafNode.h.

template<typename T , Index Log2Dim>
template<typename CombineOp , typename OtherType >
void openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::combine2 ( const LeafNode< T, Log2Dim > &  other,
const OtherType &  value,
bool  valueIsActive,
CombineOp &  op 
)
inline

Definition at line 1804 of file LeafNode.h.

template<typename T , Index Log2Dim>
template<typename CombineOp , typename OtherNodeT >
void openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::combine2 ( const ValueType value,
const OtherNodeT &  other,
bool  valueIsActive,
CombineOp &  op 
)
inline

Definition at line 1824 of file LeafNode.h.

template<typename T , Index Log2Dim>
template<typename CombineOp , typename OtherNodeT >
void openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::combine2 ( const LeafNode< T, Log2Dim > &  b0,
const OtherNodeT &  b1,
CombineOp &  op 
)
inline

Definition at line 1844 of file LeafNode.h.

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

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

Definition at line 1052 of file LeafNode.h.

template<typename T , Index Log2Dim>
template<typename DenseT >
void openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::copyFromDense ( const CoordBBox &  bbox,
const DenseT &  dense,
const ValueType background,
const ValueType tolerance 
)
inline

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

Only values that are different (by more than the given tolerance) from the background value will be active. Other values are inactive and truncated to the background value.

Parameters
bboxinclusive bounding box of the voxels to be copied into this node
densedense grid with a stride in z of one (see tools::Dense in tools/Dense.h for the required API)
backgroundbackground value of the tree that this node belongs to
tolerancetolerance within which a value equals the background value
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.
Consider using tools::CopyFromDense in tools/Dense.h instead of calling this method directly.

Definition at line 1277 of file LeafNode.h.

template<typename T , Index Log2Dim>
template<typename DenseT >
void openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, 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.
Consider using tools::CopyToDense in tools/Dense.h instead of calling this method directly.

Definition at line 1248 of file LeafNode.h.

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

Set all voxels within an axis-aligned box to the specified value and active state.

Definition at line 504 of file LeafNode.h.

template<typename T, Index Log2Dim>
static Index openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::dim ( )
inlinestatic

Return the number of voxels in each coordinate dimension.

Definition at line 149 of file LeafNode.h.

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

Definition at line 1909 of file LeafNode.h.

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

Definition at line 1995 of file LeafNode.h.

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

Definition at line 1948 of file LeafNode.h.

template<typename T, Index Log2Dim>
ChildAllCIter openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::endChildAll ( ) const
inline

Definition at line 359 of file LeafNode.h.

template<typename T, Index Log2Dim>
ChildAllIter openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::endChildAll ( )
inline

Definition at line 360 of file LeafNode.h.

template<typename T, Index Log2Dim>
ChildOffCIter openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::endChildOff ( ) const
inline

Definition at line 356 of file LeafNode.h.

template<typename T, Index Log2Dim>
ChildOffIter openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::endChildOff ( )
inline

Definition at line 357 of file LeafNode.h.

template<typename T, Index Log2Dim>
ChildOnCIter openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::endChildOn ( ) const
inline

Definition at line 353 of file LeafNode.h.

template<typename T, Index Log2Dim>
ChildOnIter openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::endChildOn ( )
inline

Definition at line 354 of file LeafNode.h.

template<typename T, Index Log2Dim>
ValueAllCIter openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::endValueAll ( ) const
inline

Definition at line 337 of file LeafNode.h.

template<typename T, Index Log2Dim>
ValueAllIter openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::endValueAll ( )
inline

Definition at line 338 of file LeafNode.h.

template<typename T, Index Log2Dim>
ValueOffCIter openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::endValueOff ( ) const
inline

Definition at line 334 of file LeafNode.h.

template<typename T, Index Log2Dim>
ValueOffIter openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::endValueOff ( )
inline

Definition at line 335 of file LeafNode.h.

template<typename T, Index Log2Dim>
ValueOnCIter openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::endValueOn ( ) const
inline

Definition at line 331 of file LeafNode.h.

template<typename T, Index Log2Dim>
ValueOnIter openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::endValueOn ( )
inline

Definition at line 332 of file LeafNode.h.

template<typename T , Index Log2Dim>
void openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::evalActiveBoundingBox ( CoordBBox &  bbox,
bool  visitVoxels = true 
) const
inline

Expand the given bounding box so that it includes this leaf node's active voxels. If visitVoxels is false this LeafNode 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 1484 of file LeafNode.h.

template<typename T, Index Log2Dim>
static void openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::evalNodeOrigin ( Coord &  xyz)
inlinestaticprotected

Compute the origin of the leaf node that contains the voxel with the given coordinates.

Definition at line 904 of file LeafNode.h.

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

Set all voxels within an axis-aligned box to the specified value and active state.

Definition at line 1203 of file LeafNode.h.

template<typename T , Index Log2Dim>
void openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::fill ( const ValueType value)
inline

Set all voxels to the specified value but don't change their active states.

Definition at line 1228 of file LeafNode.h.

template<typename T , Index Log2Dim>
void openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::fill ( const ValueType value,
bool  active 
)
inline

Set all voxels to the specified value and active state.

Definition at line 1235 of file LeafNode.h.

template<typename T, Index Log2Dim>
static Index openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::getChildDim ( )
inlinestatic

Return the dimension of child nodes of this LeafNode, which is one for voxels.

Definition at line 159 of file LeafNode.h.

template<typename T, Index Log2Dim>
const ValueType& openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::getFirstValue ( ) const
inline

Return a const reference to the first value in the buffer.

Note
Though it is potentially risky you can convert this to a non-const pointer by means of const_case<ValueType*>&.

Definition at line 641 of file LeafNode.h.

template<typename T, Index Log2Dim>
const ValueType& openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::getLastValue ( ) const
inline

Return a const reference to the last value in the buffer.

Definition at line 643 of file LeafNode.h.

template<typename T, Index Log2Dim>
static Index openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::getLevel ( )
inlinestatic

Return the level of this node, which by definition is zero for LeafNodes.

Definition at line 155 of file LeafNode.h.

template<typename T, Index Log2Dim>
CoordBBox openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::getNodeBoundingBox ( ) const
inline

Return the bounding box of this node, i.e., the full index space spanned by this leaf node.

Definition at line 195 of file LeafNode.h.

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

Append the Log2Dim of this LeafNode to the specified vector.

Definition at line 157 of file LeafNode.h.

template<typename T, Index Log2Dim>
template<typename ArrayT >
void openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::getNodes ( ArrayT &  ) const
inline

This function exists only to enable template instantiation.

Definition at line 740 of file LeafNode.h.

template<typename T, Index Log2Dim>
void openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::getOrigin ( Coord &  origin) const
inline

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

Definition at line 202 of file LeafNode.h.

template<typename T, Index Log2Dim>
void openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::getOrigin ( Int32 x,
Int32 y,
Int32 z 
) const
inline

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

Definition at line 203 of file LeafNode.h.

template<typename ValueT , Index Log2Dim>
const ValueT & openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< ValueT, Log2Dim >::getValue ( const Coord &  xyz) const
inline

Return the value of the voxel at the given coordinates.

Definition at line 1087 of file LeafNode.h.

template<typename ValueT , Index Log2Dim>
const ValueT & openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< ValueT, Log2Dim >::getValue ( Index  offset) const
inline

Return the value of the voxel at the given linear offset.

Definition at line 1094 of file LeafNode.h.

template<typename T, Index Log2Dim>
template<typename AccessorT >
const ValueType& openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::getValue ( const Coord &  xyz,
bool &  state,
int level,
AccessorT &   
) const
inline

Return the value of the voxel at the given coordinates and return its active state and level (i.e., 0) in state and level.

Note
Used internally by ValueAccessor.

Definition at line 625 of file LeafNode.h.

template<typename T, Index Log2Dim>
template<typename AccessorT >
const ValueType& openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::getValueAndCache ( const Coord &  xyz,
AccessorT &   
) const
inline

Return the value of the voxel at the given coordinates.

Note
Used internally by ValueAccessor.

Definition at line 551 of file LeafNode.h.

template<typename T, Index Log2Dim>
static Index openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::getValueLevel ( const Coord &  )
inlinestatic

Return the level (i.e., 0) at which leaf node values reside.

Definition at line 417 of file LeafNode.h.

template<typename T, Index Log2Dim>
template<typename AccessorT >
static Index openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::getValueLevelAndCache ( const Coord &  ,
AccessorT &   
)
inlinestatic

Return the LEVEL (=0) at which leaf node values reside.

Note
Used internally by ValueAccessor (note last argument is a dummy).

Definition at line 636 of file LeafNode.h.

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

Definition at line 889 of file LeafNode.h.

template<typename T, Index Log2Dim>
NodeMaskType& openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::getValueMask ( )
inline

Definition at line 890 of file LeafNode.h.

template<typename T, Index Log2Dim>
static bool openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::hasActiveTiles ( )
inlinestatic

Return false since leaf nodes never contain tiles.

Definition at line 496 of file LeafNode.h.

template<typename T , Index Log2Dim>
template<typename OtherType , Index OtherLog2Dim>
bool openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::hasSameTopology ( const LeafNode< OtherType, OtherLog2Dim > *  other) const
inline

Return true if the given node (which may have a different ValueType than this node) has the same active value topology as this node.

Definition at line 1502 of file LeafNode.h.

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

Definition at line 894 of file LeafNode.h.

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

Definition at line 895 of file LeafNode.h.

template<typename T, Index Log2Dim>
bool openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::isChildMaskOn ( Index  ) const
inline

Definition at line 893 of file LeafNode.h.

template<typename T , Index Log2Dim>
bool openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::isConstant ( ValueType firstValue,
bool &  state,
const ValueType tolerance = zeroVal<ValueType>() 
) const
inline

Return true if all of this node's values have the same active state and are in the range this->getFirstValue() +/- tolerance.

Parameters
firstValueIs updated with the first value of this leaf node.
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 equal to the for value.

Definition at line 1510 of file LeafNode.h.

template<typename T , Index Log2Dim>
bool openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::isConstant ( ValueType minValue,
ValueType maxValue,
bool &  state,
const ValueType tolerance = zeroVal<ValueType>() 
) const
inline

Return true if all of this node's values have the same active state and the range (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.

Definition at line 1524 of file LeafNode.h.

template<typename T, Index Log2Dim>
bool openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::isDense ( ) const
inline

Return true if this node contains only active voxels.

Definition at line 176 of file LeafNode.h.

template<typename T, Index Log2Dim>
bool openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::isEmpty ( ) const
inline

Return true if this node has no active voxels.

Definition at line 174 of file LeafNode.h.

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

Return true if all of this node's values are inactive.

Definition at line 860 of file LeafNode.h.

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

Definition at line 887 of file LeafNode.h.

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

Definition at line 888 of file LeafNode.h.

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

Definition at line 885 of file LeafNode.h.

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

Definition at line 886 of file LeafNode.h.

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

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

Definition at line 491 of file LeafNode.h.

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

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

Definition at line 493 of file LeafNode.h.

template<typename T, Index Log2Dim>
template<typename AccessorT >
bool openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::isValueOnAndCache ( const Coord &  xyz,
AccessorT &   
) const
inline

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

Note
Used internally by ValueAccessor.

Definition at line 559 of file LeafNode.h.

template<typename T, Index Log2Dim>
static Index32 openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::leafCount ( )
inlinestatic

Return the leaf count for this node, which is one.

Definition at line 161 of file LeafNode.h.

template<typename T, Index Log2Dim>
static Index openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::log2dim ( )
inlinestatic

Return log2 of the dimension of this LeafNode, e.g. 3 if dimensions are 8^3.

Definition at line 147 of file LeafNode.h.

template<typename T , Index Log2Dim>
T openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::medianAll ( ValueType tmp = nullptr) const
inline

Computes the median value of all the active AND inactive voxels in this node.

Returns
The median value of all values in this node.
Parameters
tmpOptional temporary storage that can hold at least NUM_VALUES values Use of this temporary storage can improve performance when this method is called multiple times.
Note
If tmp = this->buffer().data() then the median value is computed very efficiently (in place) but the voxel values in this node are re-shuffeled!
Warning
If tmp != nullptr then it is the responsibility of the client code that it points to enough memory to hold NUM_VALUES elements of type ValueType.

Definition at line 1546 of file LeafNode.h.

template<typename T , Index Log2Dim>
Index openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::medianOff ( ValueType value,
ValueType tmp = nullptr 
) const
inline

Computes the median value of all the inactive voxels in this node.

Returns
The number of inactive voxels.
Parameters
valueIf the return value is non zero value is updated with the median value.
tmpOptional temporary storage that can hold at least as many values as there are inactive voxels in this node. Use of this temporary storage can improve performance when this method is called multiple times.
Warning
If tmp != nullptr then it is the responsibility of the client code that it points to enough memory to hold the number of inactive voxels of type ValueType.

Definition at line 1588 of file LeafNode.h.

template<typename T , Index Log2Dim>
Index openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::medianOn ( ValueType value,
ValueType tmp = nullptr 
) const
inline

Computes the median value of all the active voxels in this node.

Returns
The number of active voxels.
Parameters
valueIf the return value is non zero value is updated with the median value.
tmpOptional temporary storage that can hold at least as many values as there are active voxels in this node. Use of this temporary storage can improve performance when this method is called multiple times.
Warning
If tmp != nullptr then it is the responsibility of the client code that it points to enough memory to hold the number of active voxels of type ValueType.

Definition at line 1564 of file LeafNode.h.

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

Return the memory in bytes occupied by this node.

Definition at line 1474 of file LeafNode.h.

template<typename T , Index Log2Dim>
template<MergePolicy Policy>
void openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::merge ( const LeafNode< T, Log2Dim > &  other)
inline

Definition at line 1667 of file LeafNode.h.

template<typename T , Index Log2Dim>
template<MergePolicy Policy>
void openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::merge ( const ValueType tileValue,
bool  tileActive 
)
inline

Definition at line 1698 of file LeafNode.h.

template<typename T , Index Log2Dim>
template<MergePolicy Policy>
void openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::merge ( const LeafNode< T, Log2Dim > &  other,
const ValueType ,
const ValueType  
)
inline

Definition at line 1689 of file LeafNode.h.

template<typename T, Index Log2Dim>
template<typename ModifyOp >
void openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::modifyValue ( Index  offset,
const ModifyOp &  op 
)
inline

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

Definition at line 458 of file LeafNode.h.

template<typename T, Index Log2Dim>
template<typename ModifyOp >
void openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, 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 468 of file LeafNode.h.

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

Apply a functor to the voxel at the given coordinates.

Definition at line 475 of file LeafNode.h.

template<typename T, Index Log2Dim>
template<typename ModifyOp , typename AccessorT >
void openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::modifyValueAndActiveStateAndCache ( const Coord &  xyz,
const ModifyOp &  op,
AccessorT &   
)
inline

Apply a functor to the voxel at the given coordinates.

Note
Used internally by ValueAccessor.

Definition at line 590 of file LeafNode.h.

template<typename T, Index Log2Dim>
template<typename ModifyOp , typename AccessorT >
void openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::modifyValueAndCache ( const Coord &  xyz,
const ModifyOp &  op,
AccessorT &   
)
inline

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

Note
Used internally by ValueAccessor.

Definition at line 582 of file LeafNode.h.

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

Definition at line 1745 of file LeafNode.h.

template<typename T, Index Log2Dim>
static Index32 openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::nonLeafCount ( )
inlinestatic

Return the non-leaf count for this node, which is zero.

Definition at line 163 of file LeafNode.h.

template<typename T, Index Log2Dim>
static Index openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::numValues ( )
inlinestatic

Return the total number of voxels represented by this LeafNode.

Definition at line 153 of file LeafNode.h.

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

Definition at line 170 of file LeafNode.h.

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

Return the global coordinates for a linear table offset.

Definition at line 1076 of file LeafNode.h.

template<typename T , Index Log2Dim>
Coord openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::offsetToLocalCoord ( Index  n)
inlinestatic

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

Definition at line 1062 of file LeafNode.h.

template<typename T, Index Log2Dim>
static Index64 openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::offTileCount ( )
inlinestatic

Definition at line 172 of file LeafNode.h.

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

Return the number of voxels marked Off.

Definition at line 168 of file LeafNode.h.

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

Definition at line 169 of file LeafNode.h.

template<typename T, Index Log2Dim>
static Index64 openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::onTileCount ( )
inlinestatic

Definition at line 171 of file LeafNode.h.

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

Return the number of voxels marked On.

Definition at line 166 of file LeafNode.h.

template<typename T, Index Log2Dim>
bool openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::operator!= ( const LeafNode< T, Log2Dim > &  other) const
inline

Definition at line 224 of file LeafNode.h.

template<typename T, Index Log2Dim>
LeafNode& openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::operator= ( const LeafNode< T, Log2Dim > &  )
default

Deep assignment operator.

template<typename T , Index Log2Dim>
bool openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::operator== ( const LeafNode< T, Log2Dim > &  other) const
inline

Check for buffer, state and origin equivalence.

Definition at line 1464 of file LeafNode.h.

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

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

Definition at line 201 of file LeafNode.h.

template<typename T, Index Log2Dim>
const LeafNode* openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::probeConstLeaf ( const Coord &  ) const
inline

Return a pointer to this node.

Definition at line 768 of file LeafNode.h.

template<typename T, Index Log2Dim>
template<typename AccessorT >
const LeafNode* openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::probeConstLeafAndCache ( const Coord &  ,
AccessorT &   
) const
inline

Return a pointer to this node.

Definition at line 770 of file LeafNode.h.

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

This function exists only to enable template instantiation.

Definition at line 739 of file LeafNode.h.

template<typename T, Index Log2Dim>
template<typename NodeT , typename AccessorT >
const NodeT* openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::probeConstNodeAndCache ( const Coord &  ,
AccessorT &   
) const
inline

Return a pointer to this node.

Definition at line 775 of file LeafNode.h.

template<typename T, Index Log2Dim>
LeafNode* openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::probeLeaf ( const Coord &  )
inline

Return a pointer to this node.

Definition at line 762 of file LeafNode.h.

template<typename T, Index Log2Dim>
const LeafNode* openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::probeLeaf ( const Coord &  ) const
inline

Return a pointer to this node.

Definition at line 773 of file LeafNode.h.

template<typename T, Index Log2Dim>
template<typename AccessorT >
LeafNode* openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::probeLeafAndCache ( const Coord &  ,
AccessorT &   
)
inline

Return a pointer to this node.

Definition at line 764 of file LeafNode.h.

template<typename T, Index Log2Dim>
template<typename AccessorT >
const LeafNode* openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::probeLeafAndCache ( const Coord &  ,
AccessorT &   
) const
inline

Return a pointer to this node.

Definition at line 772 of file LeafNode.h.

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

This function exists only to enable template instantiation.

Definition at line 737 of file LeafNode.h.

template<typename T, Index Log2Dim>
template<typename NodeT , typename AccessorT >
NodeT* openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::probeNodeAndCache ( const Coord &  ,
AccessorT &   
)
inline

Return a pointer to this node.

Definition at line 755 of file LeafNode.h.

template<typename T , Index Log2Dim>
bool openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::probeValue ( const Coord &  xyz,
ValueType val 
) const
inline

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

Parameters
xyzthe coordinates of the voxel to be probed
[out]valthe value of the voxel at the given coordinates

Definition at line 1103 of file LeafNode.h.

template<typename T , Index Log2Dim>
bool openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::probeValue ( Index  offset,
ValueType val 
) const
inline

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

Parameters
offsetthe linear offset of the voxel to be probed
[out]valthe value of the voxel at the given coordinates

Definition at line 1110 of file LeafNode.h.

template<typename T, Index Log2Dim>
template<typename AccessorT >
bool openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::probeValueAndCache ( const Coord &  xyz,
ValueType val,
AccessorT &   
) const
inline

Return true if the voxel at the given coordinates is active and return the voxel value in val.

Note
Used internally by ValueAccessor.

Definition at line 616 of file LeafNode.h.

template<typename T, Index Log2Dim>
void openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::prune ( const ValueType = zeroVal<ValueType>())
inline

This function exists only to enable template instantiation.

Definition at line 730 of file LeafNode.h.

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

Read buffers from a stream.

Parameters
isthe stream from which to read
fromHalfif true, floating-point input values are assumed to be 16-bit

Definition at line 1352 of file LeafNode.h.

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

Read buffers that intersect the given bounding box.

Parameters
isthe stream from which to read
bboxan index-space bounding box
fromHalfif true, floating-point input values are assumed to be 16-bit

Definition at line 1360 of file LeafNode.h.

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

Read in just the topology.

Parameters
isthe stream from which to read
fromHalfif true, floating-point input values are assumed to be 16-bit

Definition at line 1316 of file LeafNode.h.

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

Replace inactive occurrences of oldBackground with newBackground, and inactive occurrences of -oldBackground with -newBackground.

Definition at line 1644 of file LeafNode.h.

template<typename T , Index Log2Dim>
void openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, 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 1137 of file LeafNode.h.

template<typename T, Index Log2Dim>
void openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::setActiveState ( Index  offset,
bool  on 
)
inline

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

Definition at line 422 of file LeafNode.h.

template<typename T, Index Log2Dim>
template<typename AccessorT >
void openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::setActiveStateAndCache ( const Coord &  xyz,
bool  on,
AccessorT &   
)
inline

Set the active state of the voxel at the given coordinates without changing its value.

Note
Used internally by ValueAccessor.

Definition at line 607 of file LeafNode.h.

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

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

Definition at line 198 of file LeafNode.h.

template<typename T, Index Log2Dim>
void openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::setValue ( const Coord &  xyz,
const ValueType val 
)
inline

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

Definition at line 448 of file LeafNode.h.

template<typename T, Index Log2Dim>
template<typename AccessorT >
void openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::setValueAndCache ( const Coord &  xyz,
const ValueType val,
AccessorT &   
)
inline

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

Note
Used internally by ValueAccessor.

Definition at line 564 of file LeafNode.h.

template<typename T, Index Log2Dim>
void openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::setValueMask ( const NodeMaskType mask)
inline

Definition at line 892 of file LeafNode.h.

template<typename T, Index Log2Dim>
void openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::setValueMask ( Index  n,
bool  on 
)
inlineprotected

Definition at line 897 of file LeafNode.h.

template<typename T, Index Log2Dim>
void openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::setValueMaskOff ( Index  n)
inlineprotected

Definition at line 899 of file LeafNode.h.

template<typename T, Index Log2Dim>
void openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::setValueMaskOn ( Index  n)
inlineprotected

Definition at line 898 of file LeafNode.h.

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

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

Definition at line 430 of file LeafNode.h.

template<typename T, Index Log2Dim>
void openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::setValueOff ( Index  offset)
inline

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

Definition at line 432 of file LeafNode.h.

template<typename T , Index Log2Dim>
void openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::setValueOff ( const Coord &  xyz,
const ValueType val 
)
inline

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

Definition at line 1120 of file LeafNode.h.

template<typename T , Index Log2Dim>
void openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::setValueOff ( Index  offset,
const ValueType val 
)
inline

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

Definition at line 1127 of file LeafNode.h.

template<typename T, Index Log2Dim>
template<typename AccessorT >
void openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::setValueOffAndCache ( const Coord &  xyz,
const ValueType value,
AccessorT &   
)
inline

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

Note
Used internally by ValueAccessor.

Definition at line 598 of file LeafNode.h.

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

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

Definition at line 440 of file LeafNode.h.

template<typename T, Index Log2Dim>
void openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::setValueOn ( Index  offset)
inline

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

Definition at line 442 of file LeafNode.h.

template<typename T, Index Log2Dim>
void openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::setValueOn ( const Coord &  xyz,
const ValueType val 
)
inline

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

Definition at line 444 of file LeafNode.h.

template<typename T, Index Log2Dim>
void openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::setValueOn ( Index  offset,
const ValueType val 
)
inline

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

Definition at line 450 of file LeafNode.h.

template<typename T , Index Log2Dim>
void openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::setValueOnly ( const Coord &  xyz,
const ValueType val 
)
inline

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

Definition at line 1145 of file LeafNode.h.

template<typename T , Index Log2Dim>
void openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::setValueOnly ( Index  offset,
const ValueType val 
)
inline

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

Definition at line 1152 of file LeafNode.h.

template<typename T, Index Log2Dim>
template<typename AccessorT >
void openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::setValueOnlyAndCache ( const Coord &  xyz,
const ValueType val,
AccessorT &   
)
inline

Change the value of the voxel at the given coordinates but preserve its state.

Note
Used internally by ValueAccessor.

Definition at line 573 of file LeafNode.h.

template<typename T, Index Log2Dim>
void openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::setValuesOff ( )
inline

Mark all voxels as inactive but don't change their values.

Definition at line 488 of file LeafNode.h.

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

Mark all voxels as active but don't change their values.

Definition at line 486 of file LeafNode.h.

template<typename T, Index Log2Dim>
static Index openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::size ( void  )
inlinestatic

Return the total number of voxels represented by this LeafNode.

Definition at line 151 of file LeafNode.h.

template<typename T , Index Log2Dim>
void openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::skipCompressedValues ( bool  seekable,
std::istream &  is,
bool  fromHalf 
)
inlineprotected

Definition at line 1336 of file LeafNode.h.

template<typename T, Index Log2Dim>
template<typename NodeT >
NodeT* openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::stealNode ( const Coord &  ,
const ValueType ,
bool   
)
inline

This function exists only to enable template instantiation.

Definition at line 735 of file LeafNode.h.

template<typename T, Index Log2Dim>
template<typename ArrayT >
void openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::stealNodes ( ArrayT &  ,
const ValueType ,
bool   
)
inline

This function exists only to enable template instantiation.

Definition at line 741 of file LeafNode.h.

template<typename T , Index Log2Dim>
std::string openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::str ( ) const
inline

Return a string representation of this node.

Definition at line 1039 of file LeafNode.h.

template<typename T, Index Log2Dim>
size_t openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::streamingSize ( bool  toHalf = false) const
template<typename T, Index Log2Dim>
void openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::swap ( Buffer other)
inline

Exchange this node's data buffer with the given data buffer without changing the active states of the values.

Definition at line 367 of file LeafNode.h.

template<typename T , Index Log2Dim>
template<typename OtherType >
void openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::topologyDifference ( const LeafNode< OtherType, Log2Dim > &  other,
const ValueType  
)
inline

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 LeafNode and inactive in the other LeafNode.

The last dummy argument is required to match the signature for InternalNode::topologyDifference.

Note
This operation modifies only active states, not values. Also, because it can deactivate all of this node's voxels, consider subsequently calling prune.

Definition at line 1737 of file LeafNode.h.

template<typename T , Index Log2Dim>
template<typename OtherType >
void openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::topologyIntersection ( const LeafNode< OtherType, Log2Dim > &  other,
const ValueType  
)
inline

Intersect 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 both of the original voxels were active.

The last dummy argument is required to match the signature for InternalNode::topologyIntersection.

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.

Definition at line 1728 of file LeafNode.h.

template<typename T , Index Log2Dim>
template<typename OtherType >
void openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::topologyUnion ( const LeafNode< OtherType, Log2Dim > &  other)
inline

Union 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 if either of the original voxels were active.

Note
This operation modifies only active states, not values.

Definition at line 1720 of file LeafNode.h.

template<typename T, Index Log2Dim>
LeafNode* openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::touchLeaf ( const Coord &  )
inline

Return a pointer to this node.

Definition at line 751 of file LeafNode.h.

template<typename T, Index Log2Dim>
template<typename AccessorT >
LeafNode* openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::touchLeafAndCache ( const Coord &  ,
AccessorT &   
)
inline

Return a pointer to this node.

Definition at line 753 of file LeafNode.h.

template<typename T, Index Log2Dim>
const NodeMaskType& openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::valueMask ( ) const
inline

Definition at line 891 of file LeafNode.h.

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

Definition at line 1891 of file LeafNode.h.

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

Definition at line 1900 of file LeafNode.h.

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

Definition at line 1971 of file LeafNode.h.

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

Definition at line 1981 of file LeafNode.h.

template<typename T , Index Log2Dim>
template<typename OtherLeafNodeType , typename VisitorOp >
void openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::visit2Node ( OtherLeafNodeType &  other,
VisitorOp &  op 
)
inline

Definition at line 1923 of file LeafNode.h.

template<typename T , Index Log2Dim>
template<typename OtherLeafNodeType , typename VisitorOp >
void openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::visit2Node ( OtherLeafNodeType &  other,
VisitorOp &  op 
) const
inline

Definition at line 1933 of file LeafNode.h.

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

Calls the templated functor BBoxOp with bounding box information. An additional level argument is provided to the callback.

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

Definition at line 1868 of file LeafNode.h.

template<typename T, Index Log2Dim>
void openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::voxelizeActiveTiles ( bool  = true)
inline

No-op.

This function exists only to enable template instantiation.

Definition at line 653 of file LeafNode.h.

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

Write buffers to a stream.

Parameters
osthe stream to which to write
toHalfif true, output floating-point values as 16-bit half floats

Definition at line 1447 of file LeafNode.h.

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

Write out just the topology.

Parameters
osthe stream to which to write
toHalfif true, output floating-point values as 16-bit half floats

Definition at line 1324 of file LeafNode.h.

Friends And Related Function Documentation

template<typename T, Index Log2Dim>
friend class ::TestLeaf
friend

Definition at line 863 of file LeafNode.h.

template<typename T, Index Log2Dim>
template<typename >
friend class ::TestLeafIO
friend

Definition at line 864 of file LeafNode.h.

template<typename T, Index Log2Dim>
friend class IteratorBase< MaskDenseIterator, LeafNode >
friend

Definition at line 881 of file LeafNode.h.

template<typename T, Index Log2Dim>
friend class IteratorBase< MaskOffIterator, LeafNode >
friend

Definition at line 880 of file LeafNode.h.

template<typename T, Index Log2Dim>
friend class IteratorBase< MaskOnIterator, LeafNode >
friend
Todo:
Make mask accessors public?

Definition at line 879 of file LeafNode.h.

template<typename T, Index Log2Dim>
template<typename , Index >
friend class LeafNode
friend

Definition at line 868 of file LeafNode.h.

template<typename T, Index Log2Dim>
friend struct ValueIter< MaskDenseIterator, const LeafNode, ValueType, ValueAll >
friend

Definition at line 875 of file LeafNode.h.

template<typename T, Index Log2Dim>
friend struct ValueIter< MaskDenseIterator, LeafNode, ValueType, ValueAll >
friend

Definition at line 872 of file LeafNode.h.

template<typename T, Index Log2Dim>
friend struct ValueIter< MaskOffIterator, const LeafNode, ValueType, ValueOff >
friend

Definition at line 874 of file LeafNode.h.

template<typename T, Index Log2Dim>
friend struct ValueIter< MaskOffIterator, LeafNode, ValueType, ValueOff >
friend

Definition at line 871 of file LeafNode.h.

template<typename T, Index Log2Dim>
friend struct ValueIter< MaskOnIterator, const LeafNode, ValueType, ValueOn >
friend

Definition at line 873 of file LeafNode.h.

template<typename T, Index Log2Dim>
friend struct ValueIter< MaskOnIterator, LeafNode, ValueType, ValueOn >
friend

Definition at line 870 of file LeafNode.h.

Member Data Documentation

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

Definition at line 77 of file LeafNode.h.

template<typename T, Index Log2Dim>
const Index openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::LEVEL = 0
static

Definition at line 81 of file LeafNode.h.

template<typename T, Index Log2Dim>
const Index openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::LOG2DIM = Log2Dim
static

Definition at line 75 of file LeafNode.h.

template<typename T, Index Log2Dim>
const Index openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::NUM_VALUES = 1 << 3 * Log2Dim
static

Definition at line 78 of file LeafNode.h.

template<typename T, Index Log2Dim>
const Index openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::NUM_VOXELS = NUM_VALUES
static

Definition at line 79 of file LeafNode.h.

template<typename T, Index Log2Dim>
const Index openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::SIZE = NUM_VALUES
static

Definition at line 80 of file LeafNode.h.

template<typename T, Index Log2Dim>
const Index openvdb::OPENVDB_VERSION_NAME::tree::LeafNode< T, Log2Dim >::TOTAL = Log2Dim
static

Definition at line 76 of file LeafNode.h.


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