OpenVDB  5.2.0
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Types | Protected Member Functions | Static Protected Member Functions | Friends | List of all members
PointIndexLeafNode< T, Log2Dim > Struct Template Reference

#include <PointIndexGrid.h>

Inherits LeafNode< T, Log2Dim >.

Public Types

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

Public Member Functions

IndexArrayindices ()
 
const IndexArrayindices () const
 
bool getIndices (const Coord &ijk, const ValueType *&begin, const ValueType *&end) const
 
bool getIndices (Index offset, const ValueType *&begin, const ValueType *&end) const
 
void setOffsetOn (Index offset, const ValueType &val)
 
void setOffsetOnly (Index offset, const ValueType &val)
 
bool isEmpty (const CoordBBox &bbox) const
 
 PointIndexLeafNode ()
 Default constructor. More...
 
 PointIndexLeafNode (const Coord &coords, const T &value=zeroVal< T >(), bool active=false)
 
 PointIndexLeafNode (PartialCreate, const Coord &coords, const T &value=zeroVal< T >(), bool active=false)
 
 PointIndexLeafNode (const PointIndexLeafNode &rhs)
 Deep copy constructor. More...
 
template<typename OtherType , Index OtherLog2Dim>
bool hasSameTopology (const PointIndexLeafNode< 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 PointIndexLeafNode &other) const
 Check for buffer, state and origin equivalence. More...
 
bool operator!= (const PointIndexLeafNode &other) const
 
template<MergePolicy Policy>
void merge (const PointIndexLeafNode &rhs)
 
template<MergePolicy Policy>
void merge (const ValueType &tileValue, bool tileActive)
 
template<MergePolicy Policy>
void merge (const PointIndexLeafNode &other, const ValueType &, const ValueType &)
 
void addLeaf (PointIndexLeafNode *)
 
template<typename AccessorT >
void addLeafAndCache (PointIndexLeafNode *, AccessorT &)
 
void readBuffers (std::istream &is, bool fromHalf=false)
 
void readBuffers (std::istream &is, const CoordBBox &, bool fromHalf=false)
 
void writeBuffers (std::ostream &os, bool toHalf=false) const
 
Index64 memUsage () const
 
void assertNonmodifiable ()
 
void setActiveState (const Coord &, bool)
 
void setActiveState (Index, bool)
 
void setValueOnly (const Coord &, const ValueType &)
 
void setValueOnly (Index, const ValueType &)
 
void setValueOff (const Coord &)
 
void setValueOff (Index)
 
void setValueOff (const Coord &, const ValueType &)
 
void setValueOff (Index, const ValueType &)
 
void setValueOn (const Coord &)
 
void setValueOn (Index)
 
void setValueOn (const Coord &, const ValueType &)
 
void setValueOn (Index, const ValueType &)
 
void setValue (const Coord &, const ValueType &)
 
void setValuesOn ()
 
void setValuesOff ()
 
template<typename ModifyOp >
void modifyValue (Index, const ModifyOp &)
 
template<typename ModifyOp >
void modifyValue (const Coord &, const ModifyOp &)
 
template<typename ModifyOp >
void modifyValueAndActiveState (const Coord &, const ModifyOp &)
 
void clip (const CoordBBox &, const ValueType &)
 
void fill (const CoordBBox &, const ValueType &, bool)
 
void fill (const ValueType &)
 
void fill (const ValueType &, bool)
 
template<typename AccessorT >
void setValueOnlyAndCache (const Coord &, const ValueType &, AccessorT &)
 
template<typename ModifyOp , typename AccessorT >
void modifyValueAndActiveStateAndCache (const Coord &, const ModifyOp &, AccessorT &)
 
template<typename AccessorT >
void setValueOffAndCache (const Coord &, const ValueType &, AccessorT &)
 
template<typename AccessorT >
void setActiveStateAndCache (const Coord &, bool, AccessorT &)
 
void resetBackground (const ValueType &, const ValueType &)
 
void signedFloodFill (const ValueType &)
 
void signedFloodFill (const ValueType &, const ValueType &)
 
void negate ()
 
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 ()
 
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...
 
bool isAllocated () const
 Return true if memory for this node's buffer has been allocated. More...
 
bool allocate ()
 Allocate memory for this node's buffer if it has not already been allocated. 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
 
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...
 
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...
 
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...
 
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...
 
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 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...
 
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 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 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...
 
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 voxelizeActiveTiles (bool=true)
 No-op. More...
 
template<MergePolicy Policy>
void merge (const LeafNode &)
 
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
 
PointIndexLeafNodetouchLeaf (const Coord &)
 Return a pointer to this node. More...
 
template<typename AccessorT >
PointIndexLeafNodetouchLeafAndCache (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...
 
PointIndexLeafNodeprobeLeaf (const Coord &)
 Return a pointer to this node. More...
 
template<typename AccessorT >
PointIndexLeafNodeprobeLeafAndCache (const Coord &, AccessorT &)
 Return a pointer to this node. More...
 
const PointIndexLeafNodeprobeConstLeaf (const Coord &) const
 Return a const pointer to this node. More...
 
template<typename AccessorT >
const PointIndexLeafNodeprobeConstLeafAndCache (const Coord &, AccessorT &) const
 Return a const pointer to this node. More...
 
template<typename AccessorT >
const PointIndexLeafNodeprobeLeafAndCache (const Coord &, AccessorT &) const
 Return a const pointer to this node. More...
 
const PointIndexLeafNodeprobeLeaf (const Coord &) const
 Return a const pointer to this node. More...
 
template<typename NodeT , typename AccessorT >
const NodeT * probeConstNodeAndCache (const Coord &, AccessorT &) const
 Return a const pointer to this node. More...
 
const Coordorigin () 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...
 

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 ValueOn = typename BaseLeaf::ValueOn
 
using ValueOff = typename BaseLeaf::ValueOff
 
using ValueAll = typename BaseLeaf::ValueAll
 
using ChildOn = typename BaseLeaf::ChildOn
 
using ChildOff = typename BaseLeaf::ChildOff
 
using ChildAll = typename BaseLeaf::ChildAll
 
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

template<typename , Index >
struct PointIndexLeafNode
 
class tree::IteratorBase< MaskOnIterator, PointIndexLeafNode >
 
class tree::IteratorBase< MaskOffIterator, PointIndexLeafNode >
 
class tree::IteratorBase< MaskDenseIterator, PointIndexLeafNode >
 

Member Typedef Documentation

◆ BaseLeaf

using BaseLeaf = tree::LeafNode<T, Log2Dim>

◆ Buffer

using Buffer = LeafBuffer<ValueType, Log2Dim>
inherited

◆ BuildType

using BuildType = T
inherited

◆ ChildAll

using ChildAll = typename BaseLeaf::ChildAll
protected

◆ ChildAllCIter

using ChildAllCIter = typename BaseLeaf::template DenseIter< const PointIndexLeafNode, const ValueType, ChildAll>

◆ ChildAllIter

using ChildAllIter = typename BaseLeaf::template DenseIter< PointIndexLeafNode, ValueType, ChildAll>

◆ ChildOff

using ChildOff = typename BaseLeaf::ChildOff
protected

◆ ChildOffCIter

using ChildOffCIter = typename BaseLeaf::template ChildIter< MaskOffIterator, const PointIndexLeafNode, ChildOff>

◆ ChildOffIter

using ChildOffIter = typename BaseLeaf::template ChildIter< MaskOffIterator, PointIndexLeafNode, ChildOff>

◆ ChildOn

using ChildOn = typename BaseLeaf::ChildOn
protected

◆ ChildOnCIter

using ChildOnCIter = typename BaseLeaf::template ChildIter< MaskOnIterator, const PointIndexLeafNode, ChildOn>

◆ ChildOnIter

using ChildOnIter = typename BaseLeaf::template ChildIter< MaskOnIterator, PointIndexLeafNode, ChildOn>

◆ IndexArray

using IndexArray = std::vector<ValueType>

◆ LeafNodeType

using LeafNodeType = PointIndexLeafNode<T, Log2Dim>

◆ MaskDenseIterator

using MaskDenseIterator = typename NodeMaskType::DenseIterator
protected

◆ MaskOffIterator

using MaskOffIterator = typename NodeMaskType::OffIterator
protected

◆ MaskOnIterator

using MaskOnIterator = typename NodeMaskType::OnIterator
protected

◆ NodeMaskType

using NodeMaskType = util::NodeMask<Log2Dim>

◆ Ptr

◆ ValueAll

using ValueAll = typename BaseLeaf::ValueAll
protected

◆ ValueAllCIter

using ValueAllCIter = typename BaseLeaf::template ValueIter< MaskDenseIterator,const PointIndexLeafNode,const ValueType, ValueAll>

◆ ValueAllIter

using ValueAllIter = typename BaseLeaf::template ValueIter< MaskDenseIterator, PointIndexLeafNode, const ValueType, ValueAll>

◆ ValueOff

using ValueOff = typename BaseLeaf::ValueOff
protected

◆ ValueOffCIter

using ValueOffCIter = typename BaseLeaf::template ValueIter< MaskOffIterator,const PointIndexLeafNode,const ValueType, ValueOff>

◆ ValueOffIter

using ValueOffIter = typename BaseLeaf::template ValueIter< MaskOffIterator, PointIndexLeafNode, const ValueType, ValueOff>

◆ ValueOn

using ValueOn = typename BaseLeaf::ValueOn
protected

◆ ValueOnCIter

using ValueOnCIter = typename BaseLeaf::template ValueIter< MaskOnIterator, const PointIndexLeafNode, const ValueType, ValueOn>

◆ ValueOnIter

using ValueOnIter = typename BaseLeaf::template ValueIter< MaskOnIterator, PointIndexLeafNode, const ValueType, ValueOn>

◆ ValueType

using ValueType = T

Constructor & Destructor Documentation

◆ PointIndexLeafNode() [1/4]

PointIndexLeafNode ( )
inline

Default constructor.

◆ PointIndexLeafNode() [2/4]

PointIndexLeafNode ( const Coord coords,
const T &  value = zeroVal<T>(),
bool  active = false 
)
inlineexplicit

◆ PointIndexLeafNode() [3/4]

PointIndexLeafNode ( PartialCreate  ,
const Coord coords,
const T &  value = zeroVal<T>(),
bool  active = false 
)
inline

◆ PointIndexLeafNode() [4/4]

PointIndexLeafNode ( const PointIndexLeafNode< T, Log2Dim > &  rhs)
inline

Deep copy constructor.

Member Function Documentation

◆ addLeaf() [1/2]

void addLeaf ( LeafNode< T, Log2Dim > *  )
inlineinherited

This function exists only to enable template instantiation.

◆ addLeaf() [2/2]

void addLeaf ( PointIndexLeafNode< T, Log2Dim > *  )
inline

◆ addLeafAndCache() [1/2]

void addLeafAndCache ( LeafNode< T, Log2Dim > *  ,
AccessorT &   
)
inlineinherited

This function exists only to enable template instantiation.

◆ addLeafAndCache() [2/2]

void addLeafAndCache ( PointIndexLeafNode< T, Log2Dim > *  ,
AccessorT &   
)
inline

◆ addTile() [1/2]

void addTile ( Index  level,
const Coord xyz,
const ValueType val,
bool  active 
)
inlineinherited

◆ addTile() [2/2]

void addTile ( Index  offset,
const ValueType val,
bool  active 
)
inlineinherited

◆ addTileAndCache()

void addTileAndCache ( Index  level,
const Coord xyz,
const ValueType val,
bool  active,
AccessorT &   
)
inlineinherited

◆ allocate()

bool allocate ( )
inlineinherited

Allocate memory for this node's buffer if it has not already been allocated.

◆ assertNonmodifiable()

void assertNonmodifiable ( )
inline

◆ beginChildAll() [1/2]

ChildAllCIter beginChildAll ( ) const
inline

◆ beginChildAll() [2/2]

ChildAllIter beginChildAll ( )
inline

◆ beginChildOff() [1/2]

ChildOffCIter beginChildOff ( ) const
inline

◆ beginChildOff() [2/2]

ChildOffIter beginChildOff ( )
inline

◆ beginChildOn() [1/2]

ChildOnCIter beginChildOn ( ) const
inline

◆ beginChildOn() [2/2]

ChildOnIter beginChildOn ( )
inline

◆ beginValueAll() [1/2]

ValueAllCIter beginValueAll ( ) const
inline

◆ beginValueAll() [2/2]

ValueAllIter beginValueAll ( )
inline

◆ beginValueOff() [1/2]

ValueOffCIter beginValueOff ( ) const
inline

◆ beginValueOff() [2/2]

ValueOffIter beginValueOff ( )
inline

◆ beginValueOn() [1/2]

ValueOnCIter beginValueOn ( ) const
inline

◆ beginValueOn() [2/2]

ValueOnIter beginValueOn ( )
inline

◆ buffer() [1/2]

const Buffer& buffer ( ) const
inlineinherited

◆ buffer() [2/2]

Buffer& buffer ( )
inlineinherited

◆ cbeginChildAll()

ChildAllCIter cbeginChildAll ( ) const
inline

◆ cbeginChildOff()

ChildOffCIter cbeginChildOff ( ) const
inline

◆ cbeginChildOn()

ChildOnCIter cbeginChildOn ( ) const
inline

◆ cbeginValueAll()

ValueAllCIter cbeginValueAll ( ) const
inline

◆ cbeginValueOff()

ValueOffCIter cbeginValueOff ( ) const
inline

◆ cbeginValueOn()

ValueOnCIter cbeginValueOn ( ) const
inline

◆ cendChildAll()

ChildAllCIter cendChildAll ( ) const
inline

◆ cendChildOff()

ChildOffCIter cendChildOff ( ) const
inline

◆ cendChildOn()

ChildOnCIter cendChildOn ( ) const
inline

◆ cendValueAll()

ValueAllCIter cendValueAll ( ) const
inline

◆ cendValueOff()

ValueOffCIter cendValueOff ( ) const
inline

◆ cendValueOn()

ValueOnCIter cendValueOn ( ) const
inline

◆ clip()

void clip ( const CoordBBox ,
const ValueType  
)
inline

◆ combine() [1/2]

void combine ( const LeafNode< T, Log2Dim > &  other,
CombineOp &  op 
)
inlineinherited

◆ combine() [2/2]

void combine ( const ValueType value,
bool  valueIsActive,
CombineOp &  op 
)
inlineinherited

◆ combine2() [1/3]

void combine2 ( const LeafNode< T, Log2Dim > &  other,
const OtherType &  value,
bool  valueIsActive,
CombineOp &  op 
)
inlineinherited

◆ combine2() [2/3]

void combine2 ( const ValueType value,
const OtherNodeT &  other,
bool  valueIsActive,
CombineOp &  op 
)
inlineinherited

◆ combine2() [3/3]

void combine2 ( const LeafNode< T, Log2Dim > &  b0,
const OtherNodeT &  b1,
CombineOp &  op 
)
inlineinherited

◆ coordToOffset()

Index coordToOffset ( const Coord xyz)
inlinestaticinherited

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

◆ copyFromDense()

void copyFromDense ( const CoordBBox bbox,
const DenseT &  dense,
const ValueType background,
const ValueType tolerance 
)
inlineinherited

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.

◆ copyToDense()

void copyToDense ( const CoordBBox bbox,
DenseT &  dense 
) const
inlineinherited

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.

◆ denseFill()

void denseFill ( const CoordBBox bbox,
const ValueType value,
bool  active = true 
)
inlineinherited

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

◆ dim()

static Index dim ( )
inlinestaticinherited

Return the number of voxels in each coordinate dimension.

◆ doVisit()

void doVisit ( NodeT &  self,
VisitorOp &  op 
)
inlinestaticprotectedinherited

◆ doVisit2()

void doVisit2 ( NodeT &  self,
OtherChildAllIterT &  otherIter,
VisitorOp &  op,
bool  otherIsLHS 
)
inlinestaticprotectedinherited

◆ doVisit2Node()

void doVisit2Node ( NodeT &  self,
OtherNodeT &  other,
VisitorOp &  op 
)
inlinestaticprotectedinherited

◆ endChildAll() [1/2]

ChildAllCIter endChildAll ( ) const
inline

◆ endChildAll() [2/2]

ChildAllIter endChildAll ( )
inline

◆ endChildOff() [1/2]

ChildOffCIter endChildOff ( ) const
inline

◆ endChildOff() [2/2]

ChildOffIter endChildOff ( )
inline

◆ endChildOn() [1/2]

ChildOnCIter endChildOn ( ) const
inline

◆ endChildOn() [2/2]

ChildOnIter endChildOn ( )
inline

◆ endValueAll() [1/2]

ValueAllCIter endValueAll ( ) const
inline

◆ endValueAll() [2/2]

ValueAllIter endValueAll ( )
inline

◆ endValueOff() [1/2]

ValueOffCIter endValueOff ( ) const
inline

◆ endValueOff() [2/2]

ValueOffIter endValueOff ( )
inline

◆ endValueOn() [1/2]

ValueOnCIter endValueOn ( ) const
inline

◆ endValueOn() [2/2]

ValueOnIter endValueOn ( )
inline

◆ evalActiveBoundingBox()

void evalActiveBoundingBox ( CoordBBox bbox,
bool  visitVoxels = true 
) const
inlineinherited

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.

◆ evalNodeOrigin()

static void evalNodeOrigin ( Coord xyz)
inlinestaticprotectedinherited

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

◆ fill() [1/3]

void fill ( const CoordBBox ,
const ValueType ,
bool   
)
inline

◆ fill() [2/3]

void fill ( const ValueType )
inline

◆ fill() [3/3]

void fill ( const ValueType ,
bool   
)
inline

◆ getChildDim()

static Index getChildDim ( )
inlinestaticinherited

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

◆ getFirstValue()

const ValueType& getFirstValue ( ) const
inlineinherited

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

◆ getIndices() [1/2]

bool getIndices ( const Coord ijk,
const ValueType *&  begin,
const ValueType *&  end 
) const
inline

◆ getIndices() [2/2]

bool getIndices ( Index  offset,
const ValueType *&  begin,
const ValueType *&  end 
) const
inline

◆ getLastValue()

const ValueType& getLastValue ( ) const
inlineinherited

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

◆ getLevel()

static Index getLevel ( )
inlinestaticinherited

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

◆ getNodeBoundingBox()

CoordBBox getNodeBoundingBox ( ) const
inlineinherited

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

◆ getNodeLog2Dims()

static void getNodeLog2Dims ( std::vector< Index > &  dims)
inlinestaticinherited

Append the Log2Dim of this LeafNode to the specified vector.

◆ getNodes()

void getNodes ( ArrayT &  ) const
inlineinherited

This function exists only to enable template instantiation.

◆ getOrigin() [1/2]

void getOrigin ( Coord origin) const
inlineinherited

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

◆ getOrigin() [2/2]

void getOrigin ( Int32 x,
Int32 y,
Int32 z 
) const
inlineinherited

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

◆ getValue() [1/3]

const ValueT & getValue ( const Coord xyz) const
inlineinherited

Return the value of the voxel at the given coordinates.

◆ getValue() [2/3]

const ValueT & getValue ( Index  offset) const
inlineinherited

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

◆ getValue() [3/3]

const ValueType& getValue ( const Coord xyz,
bool &  state,
int &  level,
AccessorT &   
) const
inlineinherited

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.

◆ getValueAndCache()

const ValueType& getValueAndCache ( const Coord xyz,
AccessorT &   
) const
inlineinherited

Return the value of the voxel at the given coordinates.

Note
Used internally by ValueAccessor.

◆ getValueLevel()

static Index getValueLevel ( const Coord )
inlinestaticinherited

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

◆ getValueLevelAndCache()

static Index getValueLevelAndCache ( const Coord ,
AccessorT &   
)
inlinestaticinherited

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

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

◆ getValueMask() [1/2]

const NodeMaskType& getValueMask ( ) const
inlineinherited

◆ getValueMask() [2/2]

NodeMaskType& getValueMask ( )
inlineinherited

◆ hasActiveTiles()

static bool hasActiveTiles ( )
inlinestaticinherited

Return false since leaf nodes never contain tiles.

◆ hasSameTopology() [1/2]

bool hasSameTopology ( const LeafNode< OtherType, OtherLog2Dim > *  other) const
inlineinherited

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

◆ hasSameTopology() [2/2]

bool hasSameTopology ( const PointIndexLeafNode< 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.

◆ indices() [1/2]

IndexArray& indices ( )
inline

◆ indices() [2/2]

const IndexArray& indices ( ) const
inline

◆ isAllocated()

bool isAllocated ( ) const
inlineinherited

Return true if memory for this node's buffer has been allocated.

◆ isChildMaskOff() [1/2]

bool isChildMaskOff ( Index  ) const
inlineinherited

◆ isChildMaskOff() [2/2]

bool isChildMaskOff ( ) const
inlineinherited

◆ isChildMaskOn()

bool isChildMaskOn ( Index  ) const
inlineinherited

◆ isConstant() [1/2]

bool isConstant ( ValueType firstValue,
bool &  state,
const ValueType tolerance = zeroVal<ValueType>() 
) const
inlineinherited

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.

◆ isConstant() [2/2]

bool isConstant ( ValueType minValue,
ValueType maxValue,
bool &  state,
const ValueType tolerance = zeroVal<ValueType>() 
) const
inlineinherited

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.

◆ isDense()

bool isDense ( ) const
inlineinherited

Return true if this node contains only active voxels.

◆ isEmpty() [1/2]

bool isEmpty ( ) const
inlineinherited

Return true if this node has no active voxels.

◆ isEmpty() [2/2]

bool isEmpty ( const CoordBBox bbox) const
inline

◆ isInactive()

bool isInactive ( ) const
inlineinherited

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

◆ isValueMaskOff() [1/2]

bool isValueMaskOff ( Index  n) const
inlineinherited

◆ isValueMaskOff() [2/2]

bool isValueMaskOff ( ) const
inlineinherited

◆ isValueMaskOn() [1/2]

bool isValueMaskOn ( Index  n) const
inlineinherited

◆ isValueMaskOn() [2/2]

bool isValueMaskOn ( ) const
inlineinherited

◆ isValueOn() [1/2]

bool isValueOn ( const Coord xyz) const
inlineinherited

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

◆ isValueOn() [2/2]

bool isValueOn ( Index  offset) const
inlineinherited

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

◆ isValueOnAndCache()

bool isValueOnAndCache ( const Coord xyz,
AccessorT &   
) const
inlineinherited

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

Note
Used internally by ValueAccessor.

◆ leafCount()

static Index32 leafCount ( )
inlinestaticinherited

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

◆ log2dim()

static Index log2dim ( )
inlinestaticinherited

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

◆ medianAll()

T medianAll ( ValueType tmp = nullptr) const
inlineinherited

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.

◆ medianOff()

Index medianOff ( ValueType value,
ValueType tmp = nullptr 
) const
inlineinherited

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.

◆ medianOn()

Index medianOn ( ValueType value,
ValueType tmp = nullptr 
) const
inlineinherited

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.

◆ memUsage()

Index64 memUsage ( ) const
inline

◆ merge() [1/5]

void merge ( const LeafNode< T, Log2Dim > &  other)
inlineinherited

◆ merge() [2/5]

void merge ( const LeafNode< T, Log2Dim > &  other,
const ValueType ,
const ValueType  
)
inlineinherited

◆ merge() [3/5]

void merge ( const PointIndexLeafNode< T, Log2Dim > &  rhs)
inline

◆ merge() [4/5]

void merge ( const ValueType tileValue,
bool  tileActive 
)
inline

◆ merge() [5/5]

void merge ( const PointIndexLeafNode< T, Log2Dim > &  other,
const ValueType ,
const ValueType  
)
inline

◆ modifyValue() [1/2]

void modifyValue ( Index  ,
const ModifyOp &   
)
inline

◆ modifyValue() [2/2]

void modifyValue ( const Coord ,
const ModifyOp &   
)
inline

◆ modifyValueAndActiveState()

void modifyValueAndActiveState ( const Coord ,
const ModifyOp &   
)
inline

◆ modifyValueAndActiveStateAndCache()

void modifyValueAndActiveStateAndCache ( const Coord ,
const ModifyOp &  ,
AccessorT &   
)
inline

◆ modifyValueAndCache()

void modifyValueAndCache ( const Coord xyz,
const ModifyOp &  op,
AccessorT &   
)
inlineinherited

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

Note
Used internally by ValueAccessor.

◆ negate()

void negate ( )
inline

◆ nonLeafCount()

static Index32 nonLeafCount ( )
inlinestaticinherited

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

◆ numValues()

static Index numValues ( )
inlinestaticinherited

Return the total number of voxels represented by this LeafNode.

◆ offLeafVoxelCount()

Index64 offLeafVoxelCount ( ) const
inlineinherited

◆ offsetToGlobalCoord()

Coord offsetToGlobalCoord ( Index  n) const
inlineinherited

Return the global coordinates for a linear table offset.

◆ offsetToLocalCoord()

Coord offsetToLocalCoord ( Index  n)
inlinestaticinherited

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

◆ offTileCount()

static Index64 offTileCount ( )
inlinestaticinherited

◆ offVoxelCount()

Index64 offVoxelCount ( ) const
inlineinherited

Return the number of voxels marked Off.

◆ onLeafVoxelCount()

Index64 onLeafVoxelCount ( ) const
inlineinherited

◆ onTileCount()

static Index64 onTileCount ( )
inlinestaticinherited

◆ onVoxelCount()

Index64 onVoxelCount ( ) const
inlineinherited

Return the number of voxels marked On.

◆ operator!=() [1/2]

bool operator!= ( const LeafNode< T, Log2Dim > &  other) const
inlineinherited

◆ operator!=() [2/2]

bool operator!= ( const PointIndexLeafNode< T, Log2Dim > &  other) const
inline

◆ operator==() [1/2]

bool operator== ( const LeafNode< T, Log2Dim > &  other) const
inlineinherited

Check for buffer, state and origin equivalence.

◆ operator==() [2/2]

bool operator== ( const PointIndexLeafNode< T, Log2Dim > &  other) const
inline

Check for buffer, state and origin equivalence.

◆ origin()

const Coord& origin ( ) const
inlineinherited

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

◆ probeConstLeaf()

const PointIndexLeafNode* probeConstLeaf ( const Coord ) const
inline

Return a const pointer to this node.

◆ probeConstLeafAndCache()

const PointIndexLeafNode* probeConstLeafAndCache ( const Coord ,
AccessorT &   
) const
inline

Return a const pointer to this node.

◆ probeConstNode()

const NodeT* probeConstNode ( const Coord ) const
inlineinherited

This function exists only to enable template instantiation.

◆ probeConstNodeAndCache()

const NodeT* probeConstNodeAndCache ( const Coord ,
AccessorT &   
) const
inline

Return a const pointer to this node.

◆ probeLeaf() [1/2]

PointIndexLeafNode* probeLeaf ( const Coord )
inline

Return a pointer to this node.

◆ probeLeaf() [2/2]

const PointIndexLeafNode* probeLeaf ( const Coord ) const
inline

Return a const pointer to this node.

◆ probeLeafAndCache() [1/2]

PointIndexLeafNode* probeLeafAndCache ( const Coord ,
AccessorT &   
)
inline

Return a pointer to this node.

◆ probeLeafAndCache() [2/2]

const PointIndexLeafNode* probeLeafAndCache ( const Coord ,
AccessorT &   
) const
inline

Return a const pointer to this node.

◆ probeNode()

NodeT* probeNode ( const Coord )
inlineinherited

This function exists only to enable template instantiation.

◆ probeNodeAndCache()

NodeT* probeNodeAndCache ( const Coord ,
AccessorT &   
)
inline

Return a pointer to this node.

◆ probeValue() [1/2]

bool probeValue ( const Coord xyz,
ValueType val 
) const
inlineinherited

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

◆ probeValue() [2/2]

bool probeValue ( Index  offset,
ValueType val 
) const
inlineinherited

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

◆ probeValueAndCache()

bool probeValueAndCache ( const Coord xyz,
ValueType val,
AccessorT &   
) const
inlineinherited

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

Note
Used internally by ValueAccessor.

◆ prune()

void prune ( const ValueType = zeroVal<ValueType>())
inlineinherited

This function exists only to enable template instantiation.

◆ readBuffers() [1/2]

void readBuffers ( std::istream &  is,
bool  fromHalf = false 
)
inline

◆ readBuffers() [2/2]

void readBuffers ( std::istream &  is,
const CoordBBox bbox,
bool  fromHalf = false 
)
inline

◆ readTopology()

void readTopology ( std::istream &  is,
bool  fromHalf = false 
)
inlineinherited

Read in just the topology.

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

◆ resetBackground()

void resetBackground ( const ValueType ,
const ValueType  
)
inline

◆ setActiveState() [1/2]

void setActiveState ( const Coord ,
bool   
)
inline

◆ setActiveState() [2/2]

void setActiveState ( Index  ,
bool   
)
inline

◆ setActiveStateAndCache()

void setActiveStateAndCache ( const Coord ,
bool  ,
AccessorT &   
)
inline

◆ setOffsetOn()

void setOffsetOn ( Index  offset,
const ValueType val 
)
inline

◆ setOffsetOnly()

void setOffsetOnly ( Index  offset,
const ValueType val 
)
inline

◆ setOrigin()

void setOrigin ( const Coord origin)
inlineinherited

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

◆ setValue()

void setValue ( const Coord ,
const ValueType  
)
inline

◆ setValueAndCache()

void setValueAndCache ( const Coord xyz,
const ValueType val,
AccessorT &   
)
inlineinherited

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

Note
Used internally by ValueAccessor.

◆ setValueMask() [1/2]

void setValueMask ( const NodeMaskType mask)
inlineinherited

◆ setValueMask() [2/2]

void setValueMask ( Index  n,
bool  on 
)
inlineprotectedinherited

◆ setValueMaskOff()

void setValueMaskOff ( Index  n)
inlineprotectedinherited

◆ setValueMaskOn()

void setValueMaskOn ( Index  n)
inlineprotectedinherited

◆ setValueOff() [1/4]

void setValueOff ( const Coord )
inline

◆ setValueOff() [2/4]

void setValueOff ( Index  )
inline

◆ setValueOff() [3/4]

void setValueOff ( const Coord ,
const ValueType  
)
inline

◆ setValueOff() [4/4]

void setValueOff ( Index  ,
const ValueType  
)
inline

◆ setValueOffAndCache()

void setValueOffAndCache ( const Coord ,
const ValueType ,
AccessorT &   
)
inline

◆ setValueOn() [1/4]

void setValueOn ( const Coord )
inline

◆ setValueOn() [2/4]

void setValueOn ( Index  )
inline

◆ setValueOn() [3/4]

void setValueOn ( const Coord ,
const ValueType  
)
inline

◆ setValueOn() [4/4]

void setValueOn ( Index  ,
const ValueType  
)
inline

◆ setValueOnly() [1/2]

void setValueOnly ( const Coord ,
const ValueType  
)
inline

◆ setValueOnly() [2/2]

void setValueOnly ( Index  ,
const ValueType  
)
inline

◆ setValueOnlyAndCache()

void setValueOnlyAndCache ( const Coord ,
const ValueType ,
AccessorT &   
)
inline

◆ setValuesOff()

void setValuesOff ( )
inline

◆ setValuesOn()

void setValuesOn ( )
inline

◆ signedFloodFill() [1/2]

void signedFloodFill ( const ValueType )
inline

◆ signedFloodFill() [2/2]

void signedFloodFill ( const ValueType ,
const ValueType  
)
inline

◆ size()

static Index size ( )
inlinestaticinherited

Return the total number of voxels represented by this LeafNode.

◆ skipCompressedValues()

void skipCompressedValues ( bool  seekable,
std::istream &  is,
bool  fromHalf 
)
inlineprotectedinherited

◆ stealNode()

NodeT* stealNode ( const Coord ,
const ValueType ,
bool   
)
inlineinherited

This function exists only to enable template instantiation.

◆ stealNodes()

void stealNodes ( ArrayT &  ,
const ValueType ,
bool   
)
inlineinherited

This function exists only to enable template instantiation.

◆ str()

std::string str ( ) const
inlineinherited

Return a string representation of this node.

◆ streamingSize()

size_t streamingSize ( bool  toHalf = false) const
inherited

◆ swap()

void swap ( Buffer other)
inlineinherited

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

◆ topologyDifference()

void topologyDifference ( const LeafNode< OtherType, Log2Dim > &  other,
const ValueType  
)
inlineinherited

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.

◆ topologyIntersection()

void topologyIntersection ( const LeafNode< OtherType, Log2Dim > &  other,
const ValueType  
)
inlineinherited

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.

◆ topologyUnion()

void topologyUnion ( const LeafNode< OtherType, Log2Dim > &  other)
inlineinherited

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.

◆ touchLeaf()

PointIndexLeafNode* touchLeaf ( const Coord )
inline

Return a pointer to this node.

◆ touchLeafAndCache()

PointIndexLeafNode* touchLeafAndCache ( const Coord ,
AccessorT &   
)
inline

Return a pointer to this node.

◆ valueMask()

const NodeMaskType& valueMask ( ) const
inlineinherited

◆ visit() [1/2]

void visit ( VisitorOp &  op)
inlineinherited

◆ visit() [2/2]

void visit ( VisitorOp &  op) const
inlineinherited

◆ visit2() [1/2]

void visit2 ( IterT &  otherIter,
VisitorOp &  op,
bool  otherIsLHS = false 
)
inlineinherited

◆ visit2() [2/2]

void visit2 ( IterT &  otherIter,
VisitorOp &  op,
bool  otherIsLHS = false 
) const
inlineinherited

◆ visit2Node() [1/2]

void visit2Node ( OtherLeafNodeType &  other,
VisitorOp &  op 
)
inlineinherited

◆ visit2Node() [2/2]

void visit2Node ( OtherLeafNodeType &  other,
VisitorOp &  op 
) const
inlineinherited

◆ visitActiveBBox()

void visitActiveBBox ( BBoxOp &  op) const
inlineinherited

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.

◆ voxelizeActiveTiles()

void voxelizeActiveTiles ( bool  = true)
inlineinherited

No-op.

This function exists only to enable template instantiation.

◆ writeBuffers()

void writeBuffers ( std::ostream &  os,
bool  toHalf = false 
) const
inline

◆ writeTopology()

void writeTopology ( std::ostream &  os,
bool  toHalf = false 
) const
inlineinherited

Write out just the topology.

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

Friends And Related Function Documentation

◆ PointIndexLeafNode

friend struct PointIndexLeafNode
friend

◆ tree::IteratorBase< MaskDenseIterator, PointIndexLeafNode >

◆ tree::IteratorBase< MaskOffIterator, PointIndexLeafNode >

◆ tree::IteratorBase< MaskOnIterator, PointIndexLeafNode >

Member Data Documentation

◆ DIM

const Index DIM = 1 << TOTAL
staticinherited

◆ LEVEL

const Index LEVEL = 0
staticinherited

◆ LOG2DIM

const Index LOG2DIM = Log2Dim
staticinherited

◆ NUM_VALUES

const Index NUM_VALUES = 1 << 3 * Log2Dim
staticinherited

◆ NUM_VOXELS

const Index NUM_VOXELS = NUM_VALUES
staticinherited

◆ SIZE

const Index SIZE = NUM_VALUES
staticinherited

◆ TOTAL

const Index TOTAL = Log2Dim
staticinherited

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