#include <openvdb/tree/LeafNodeMask.h>
Public Types | |
using | BaseT = SparseIteratorBase<MaskIterT, ValueIter, NodeT, ValueT> |
using | BaseT |
using | BuildType |
using | ValueType |
using | Buffer |
using | LeafNodeType |
using | NodeMaskType |
using | Ptr |
using | ValueOnIter |
using | ValueOnCIter |
using | ValueOffIter |
using | ValueOffCIter |
using | ValueAllIter |
using | ValueAllCIter |
using | ChildOnIter |
using | ChildOnCIter |
using | ChildOffIter |
using | ChildOffCIter |
using | ChildAllIter |
using | ChildAllCIter |
using | NodeType |
using | NonConstNodeType |
using | NonConstValueType |
Public Member Functions | |
ValueIter () | |
ValueIter (const MaskIterT &iter, NodeT *parent) | |
const bool & | getItem (Index pos) const |
const bool & | getValue () const |
void | setItem (Index pos, bool value) const |
void | setValue (bool value) const |
template<typename ModifyOp> | |
void | modifyItem (Index n, const ModifyOp &op) const |
template<typename ModifyOp> | |
void | modifyValue (const ModifyOp &op) const |
LeafNode (const Coord &xyz, bool value, bool active) | |
LeafNode (PartialCreate, const Coord &xyz, bool value, bool active) | |
LeafNode (const LeafNode< ValueT, Log2Dim > &other) | |
LeafNode (const LeafNode< ValueT, Log2Dim > &other, bool background, TopologyCopy) | |
LeafNode (const LeafNode< ValueT, Log2Dim > &other, TopologyCopy) | |
LeafNode (const Coord &xyz, const NodeMaskType &mask, const Buffer &buff, const Index32 trans) | |
LeafNode (const LeafNode< ValueT, Log2Dim > &other, bool offValue, bool onValue, TopologyCopy) | |
void | addTileAndCache (Index level, const Coord &xyz, bool val, bool active, AccessorT &) |
void | merge (const LeafNode &other, bool, bool) |
void | merge (bool tileValue, bool tileActive) |
void | topologyIntersection (const LeafNode< OtherType, Log2Dim > &other, const bool &) |
void | topologyDifference (const LeafNode< OtherType, Log2Dim > &other, const bool &) |
void | copyFromDense (const CoordBBox &bbox, const DenseT &dense, bool background, bool tolerance) |
void | combine (bool value, bool valueIsActive, CombineOp &op) |
void | combine2 (bool value, const OtherNodeT &other, bool valueIsActive, CombineOp &op) |
ValueIter () | |
ValueIter (const MaskIterT &iter, NodeT *parent) | |
ValueT & | getItem (Index pos) const |
ValueT & | getValue () const |
void | setItem (Index pos, const ValueT &value) const |
void | setValue (const ValueT &value) const |
void | modifyItem (Index n, const ModifyOp &op) const |
void | modifyValue (const ModifyOp &op) const |
LeafNode () | |
Default constructor. | |
LeafNode (const Coord &coords, const ValueType &value=zeroVal< ValueType >(), bool active=false) | |
Constructor. | |
LeafNode (PartialCreate, const Coord &coords, const ValueType &value=zeroVal< ValueType >(), bool active=false) | |
"Partial creation" constructor used during file input | |
LeafNode (const LeafNode &) | |
Deep copy constructor. | |
LeafNode (const LeafNode< OtherValueType, Log2Dim > &other) | |
Value conversion copy constructor. | |
LeafNode (const LeafNode< OtherValueType, Log2Dim > &other, const ValueType &offValue, const ValueType &onValue, TopologyCopy) | |
Topology copy constructor. | |
LeafNode (const LeafNode< OtherValueType, Log2Dim > &other, const ValueType &background, TopologyCopy) | |
Topology copy constructor. | |
LeafNode (const Coord &xyz, bool value, bool active) | |
LeafNode (PartialCreate, const Coord &xyz, bool value, bool active) | |
LeafNode (const LeafNode< ValueT, Log2Dim > &other) | |
LeafNode (const LeafNode< ValueT, Log2Dim > &other, bool background, TopologyCopy) | |
LeafNode (const LeafNode< ValueT, Log2Dim > &other, TopologyCopy) | |
LeafNode (const Coord &xyz, const NodeMaskType &mask, const Buffer &buff, const Index32 trans) | |
LeafNode (const LeafNode< ValueT, Log2Dim > &other, bool offValue, bool onValue, TopologyCopy) | |
LeafNode & | operator= (const LeafNode &)=default |
Deep assignment operator. | |
~LeafNode () | |
Destructor. | |
void | nodeCount (std::vector< Index64 > &) const |
no-op | |
void | nodeCount (std::vector< Index32 > &) const |
Index64 | onVoxelCount () const |
Return the number of voxels marked On. | |
Index64 | offVoxelCount () const |
Return the number of voxels marked Off. | |
Index64 | onLeafVoxelCount () const |
Index64 | offLeafVoxelCount () const |
bool | isEmpty () const |
Return true if this node has no active voxels. | |
bool | isDense () const |
Return true if this node contains only active voxels. | |
bool | isAllocated () const |
Return true if memory for this node's buffer has been allocated. | |
bool | allocate () |
Allocate memory for this node's buffer if it has not already been allocated. | |
Index64 | memUsage () const |
Return the memory in bytes occupied by this node. | |
Index64 | memUsageIfLoaded () const |
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. | |
void | setOrigin (const Coord &origin) |
Set the grid index coordinates of this node's local origin. | |
const Coord & | origin () const |
Return the grid index coordinates of this node's local origin. | |
void | getOrigin (Coord &origin) const |
void | getOrigin (Int32 &x, Int32 &y, Int32 &z) const |
Coord | offsetToGlobalCoord (Index n) const |
Return the global coordinates for a linear table offset. | |
Index32 | transientData () const |
Return the transient data value. | |
void | setTransientData (Index32 transientData) |
Set the transient data value. | |
std::string | str () const |
Return a string representation of this node. | |
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. | |
bool | operator== (const LeafNode &other) const |
Check for buffer, state and origin equivalence. | |
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. | |
const Buffer & | buffer () const |
Buffer & | buffer () |
void | readTopology (std::istream &is, bool fromHalf=false) |
Read in just the topology. | |
void | writeTopology (std::ostream &os, bool toHalf=false) const |
Write out just the topology. | |
void | readBuffers (std::istream &is, bool fromHalf=false) |
Read buffers from a stream. | |
void | readBuffers (std::istream &is, const CoordBBox &bbox, bool fromHalf=false) |
Read buffers that intersect the given bounding box. | |
void | writeBuffers (std::ostream &os, bool toHalf=false) const |
Write buffers to a stream. | |
size_t | streamingSize (bool toHalf=false) const |
const ValueType & | getValue (const Coord &xyz) const |
Return the value of the voxel at the given coordinates. | |
const ValueType & | getValue (Index offset) const |
Return the value of the voxel at the given linear offset. | |
const ValueType & | getValue (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. | |
bool | probeValue (const Coord &xyz, ValueType &val) const |
Return true if the voxel at the given coordinates is active. | |
bool | probeValue (Index offset, ValueType &val) const |
Return true if the voxel at the given offset is active. | |
void | setActiveState (const Coord &xyz, bool on) |
Set the active state of the voxel at the given coordinates but don't change its value. | |
void | setActiveState (Index offset, bool on) |
Set the active state of the voxel at the given offset but don't change its value. | |
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. | |
void | setValueOnly (Index offset, const ValueType &val) |
Set the value of the voxel at the given offset but don't change its active state. | |
void | setValueOff (const Coord &xyz) |
Mark the voxel at the given coordinates as inactive but don't change its value. | |
void | setValueOff (Index offset) |
Mark the voxel at the given offset as inactive but don't change its value. | |
void | setValueOff (const Coord &xyz, const ValueType &val) |
Set the value of the voxel at the given coordinates and mark the voxel as inactive. | |
void | setValueOff (Index offset, const ValueType &val) |
Set the value of the voxel at the given offset and mark the voxel as inactive. | |
void | setValueOn (const Coord &xyz) |
Mark the voxel at the given coordinates as active but don't change its value. | |
void | setValueOn (Index offset) |
Mark the voxel at the given offset as active but don't change its value. | |
void | setValueOn (const Coord &xyz, const ValueType &val) |
Set the value of the voxel at the given coordinates and mark the voxel as active. | |
void | setValueOn (Index offset, const ValueType &val) |
Set the value of the voxel at the given offset and mark the voxel as active. | |
void | setValue (const Coord &xyz, const ValueType &val) |
Set the value of the voxel at the given coordinates and mark the voxel as active. | |
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. | |
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. | |
void | modifyValueAndActiveState (const Coord &xyz, const ModifyOp &op) |
Apply a functor to the voxel at the given coordinates. | |
void | setValuesOn () |
Mark all voxels as active but don't change their values. | |
void | setValuesOff () |
Mark all voxels as inactive but don't change their values. | |
bool | isValueOn (const Coord &xyz) const |
Return true if the voxel at the given coordinates is active. | |
bool | isValueOn (Index offset) const |
Return true if the voxel at the given offset is active. | |
bool | isValueOff (const Coord &xyz) const |
Return true if the voxel at the given coordinates is inactive. | |
bool | isValueOff (Index offset) const |
Return true if the voxel at the given offset is inactive. | |
void | clip (const CoordBBox &, const ValueType &background) |
Set all voxels that lie outside the given axis-aligned box to the background. | |
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. | |
void | fill (const ValueType &value) |
Set all voxels to the specified value but don't change their active states. | |
void | fill (const ValueType &value, bool active) |
Set all voxels to the specified value and active state. | |
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. | |
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. | |
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. | |
void | copyFromDense (const CoordBBox &bbox, const DenseT &dense, bool background, bool tolerance) |
const ValueType & | getValueAndCache (const Coord &xyz, AccessorT &) const |
Return the value of the voxel at the given coordinates. | |
bool | isValueOnAndCache (const Coord &xyz, AccessorT &) const |
Return true if the voxel at the given coordinates is active. | |
void | setValueAndCache (const Coord &xyz, const ValueType &val, AccessorT &) |
Change the value of the voxel at the given coordinates and mark it as active. | |
void | setValueOnlyAndCache (const Coord &xyz, const ValueType &val, AccessorT &) |
Change the value of the voxel at the given coordinates but preserve its state. | |
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. | |
void | modifyValueAndActiveStateAndCache (const Coord &xyz, const ModifyOp &op, 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. | |
void | setActiveStateAndCache (const Coord &xyz, bool on, AccessorT &) |
Set the active state of the voxel at the given coordinates without changing its value. | |
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. | |
const ValueType & | getFirstValue () const |
Return a const reference to the first value in the buffer. | |
const ValueType & | getLastValue () const |
Return a const reference to the last value in the buffer. | |
void | resetBackground (const ValueType &oldBackground, const ValueType &newBackground) |
Replace inactive occurrences of oldBackground with newBackground, and inactive occurrences of -oldBackground with -newBackground. | |
void | negate () |
void | voxelizeActiveTiles (bool=true) |
No-op. | |
void | merge (const LeafNode &) |
void | merge (const ValueType &tileValue, bool tileActive) |
void | merge (const LeafNode &other, const ValueType &, const ValueType &) |
void | merge (const LeafNode &other, bool, bool) |
void | merge (bool tileValue, bool tileActive) |
void | topologyUnion (const LeafNode< OtherType, Log2Dim > &other, const bool preserveTiles=false) |
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. | |
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. | |
void | topologyIntersection (const LeafNode< OtherType, Log2Dim > &other, const bool &) |
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. | |
void | topologyDifference (const LeafNode< OtherType, Log2Dim > &other, const bool &) |
void | combine (const LeafNode &other, CombineOp &op) |
void | combine (const ValueType &value, bool valueIsActive, CombineOp &op) |
void | combine (bool value, bool valueIsActive, CombineOp &op) |
void | combine2 (const LeafNode &other, const OtherType &, bool valueIsActive, CombineOp &) |
void | combine2 (const ValueType &, const OtherNodeT &other, bool valueIsActive, CombineOp &) |
void | combine2 (const LeafNode &b0, const OtherNodeT &b1, CombineOp &) |
void | combine2 (bool value, const OtherNodeT &other, bool valueIsActive, CombineOp &op) |
void | prune (const ValueType &=zeroVal< ValueType >()) |
This function exists only to enable template instantiation. | |
void | addLeaf (LeafNode *) |
void | addLeafAndCache (LeafNode *, AccessorT &) |
NodeT * | stealNode (const Coord &, const ValueType &, bool) |
NodeT * | probeNode (const Coord &) |
const NodeT * | probeConstNode (const Coord &) const |
void | getNodes (ArrayT &) const |
void | stealNodes (ArrayT &, const ValueType &, bool) |
void | addTile (Index level, const Coord &, const ValueType &, bool) |
void | addTile (Index offset, const ValueType &, bool) |
void | addTileAndCache (Index, const Coord &, const ValueType &, bool, AccessorT &) |
void | addTileAndCache (Index level, const Coord &xyz, bool val, bool active, AccessorT &) |
LeafNode * | touchLeaf (const Coord &) |
Return a pointer to this node. | |
LeafNode * | touchLeafAndCache (const Coord &, AccessorT &) |
NodeT * | probeNodeAndCache (const Coord &, AccessorT &) |
LeafNode * | probeLeaf (const Coord &) |
const LeafNode * | probeLeaf (const Coord &) const |
LeafNode * | probeLeafAndCache (const Coord &, AccessorT &) |
const LeafNode * | probeLeafAndCache (const Coord &, AccessorT &) const |
const LeafNode * | probeConstLeaf (const Coord &) const |
Return a const pointer to this node. | |
const LeafNode * | probeConstLeafAndCache (const Coord &, AccessorT &) const |
const NodeT * | probeConstNodeAndCache (const Coord &, AccessorT &) const |
bool | isConstant (ValueType &firstValue, bool &state, const ValueType &tolerance=zeroVal< ValueType >()) const |
bool | isConstant (ValueType &minValue, ValueType &maxValue, bool &state, const ValueType &tolerance=zeroVal< ValueType >()) const |
ValueType | medianAll (ValueType *tmp=nullptr) const |
Computes the median value of all the active AND inactive voxels in this node. | |
Index | medianOn (ValueType &value, ValueType *tmp=nullptr) const |
Computes the median value of all the active voxels in this node. | |
Index | medianOff (ValueType &value, ValueType *tmp=nullptr) const |
Computes the median value of all the inactive voxels in this node. | |
bool | isInactive () const |
Return true if all of this node's values are inactive. | |
const ValueType & | getValueUnsafe (Index offset) const |
Return the value of the voxel at the given offset. | |
bool | getValueUnsafe (Index offset, ValueType &value) const |
Return true if the voxel at the given offset is active and set value. | |
void | setActiveStateUnsafe (Index offset, bool on) |
Set the active state of the voxel at the given offset but don't change its value. | |
void | setValueOnlyUnsafe (Index offset, const ValueType &value) |
Set the value of the voxel at the given coordinates but don't change its active state. | |
void | setValueOnUnsafe (Index offset) |
Mark the voxel at the given offset as active but don't change its value. | |
void | setValueOnUnsafe (Index offset, const ValueType &value) |
Set the value of the voxel at the given coordinates and mark the voxel as active. | |
void | setValueOffUnsafe (Index offset) |
Mark the voxel at the given offset as inactive but don't change its value. | |
void | setValueOffUnsafe (Index offset, const ValueType &value) |
Set the value of the voxel at the given coordinates and mark the voxel as active. | |
bool | isValueMaskOn (Index n) const |
bool | isValueMaskOn () const |
bool | isValueMaskOff (Index n) const |
bool | isValueMaskOff () const |
const NodeMaskType & | getValueMask () const |
NodeMaskType & | getValueMask () |
const NodeMaskType & | valueMask () const |
void | setValueMask (const NodeMaskType &mask) |
bool | isChildMaskOn (Index) const |
bool | isChildMaskOff (Index) const |
bool | isChildMaskOff () const |
ValueT & | operator* () const |
Return a reference to the item to which this iterator is pointing. | |
ValueT * | operator-> () const |
Return a pointer to the item to which this iterator is pointing. | |
bool | operator== (const IteratorBase &other) const |
bool | operator!= (const IteratorBase &other) const |
NodeT * | getParentNode () const |
Return a pointer to the node (if any) over which this iterator is iterating. | |
NodeT & | parent () const |
Return a reference to the node over which this iterator is iterating. | |
Index | offset () const |
Return this iterator's position as an index into the parent node's table. | |
Index | pos () const |
Identical to offset. | |
bool | test () const |
Return true if this iterator is not yet exhausted. | |
operator bool () const | |
Return true if this iterator is not yet exhausted. | |
bool | next () |
Advance to the next item in the parent node's table. | |
void | increment () |
Advance to the next item in the parent node's table. | |
void | increment (Index n) |
Advance n items in the parent node's table. | |
IteratorBase & | operator++ () |
Advance to the next item in the parent node's table. | |
bool | isValueOn () const |
Return true if this iterator is pointing to an active value. Return false if it is pointing to either an inactive value or a child node. | |
void | setValueOn (bool on=true) const |
If this iterator is pointing to a value, set the value's active state. Otherwise, do nothing. | |
void | setValueOff () const |
If this iterator is pointing to a value, mark the value as inactive. | |
Coord | getCoord () const |
Return the coordinates of the item to which this iterator is pointing. | |
void | getCoord (Coord &xyz) const |
Return in xyz the coordinates of the item to which this iterator is pointing. | |
Static Public Member Functions | |
static Index | log2dim () |
Return log2 of the dimension of this LeafNode, e.g. 3 if dimensions are 8^3. | |
static Index | dim () |
Return the number of voxels in each coordinate dimension. | |
static Index | size () |
Return the total number of voxels represented by this LeafNode. | |
static Index | numValues () |
Return the total number of voxels represented by this LeafNode. | |
static Index | getLevel () |
Return the level of this node, which by definition is zero for LeafNodes. | |
static void | getNodeLog2Dims (std::vector< Index > &dims) |
Append the Log2Dim of this LeafNode to the specified vector. | |
static Index | getChildDim () |
Return the dimension of child nodes of this LeafNode, which is one for voxels. | |
static Index64 | leafCount () |
Return the leaf count for this node, which is one. | |
static Index64 | nonLeafCount () |
Return the non-leaf count for this node, which is zero. | |
static Index32 | childCount () |
Return the child count for this node, which is zero. | |
static Index64 | onTileCount () |
static Index64 | offTileCount () |
static Index | coordToOffset (const Coord &xyz) |
Return the linear table offset of the given global or local coordinates. | |
static Coord | offsetToLocalCoord (Index n) |
Return the local coordinates for a linear table offset, where offset 0 has coordinates (0, 0, 0). | |
static Index | getValueLevel (const Coord &) |
Return the level (i.e., 0) at which leaf node values reside. | |
static bool | hasActiveTiles () |
Return false since leaf nodes never contain tiles. | |
static Index | getValueLevelAndCache (const Coord &, AccessorT &) |
Return the LEVEL (=0) at which leaf node values reside. | |
Static Public Attributes | |
static const Index | LOG2DIM |
static const Index | TOTAL |
static const Index | DIM |
static const Index | NUM_VALUES |
static const Index | NUM_VOXELS |
static const Index | SIZE |
static const Index | LEVEL |
static const bool | IsSparseIterator |
static const bool | IsDenseIterator |
Protected Types | |
using | MaskOnIterator |
using | MaskOffIterator |
using | MaskDenseIterator |
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. | |
using BaseT |
using BaseT = SparseIteratorBase<MaskIterT, ValueIter, NodeT, ValueT> |
using Buffer |
using BuildType |
using ChildAllCIter |
using ChildAllIter |
using ChildOffCIter |
using ChildOffIter |
using ChildOnCIter |
using ChildOnIter |
using LeafNodeType |
|
protected |
|
protected |
|
protected |
using NodeMaskType |
|
inherited |
|
inherited |
|
inherited |
using Ptr |
using ValueAllCIter |
using ValueAllIter |
using ValueOffCIter |
using ValueOffIter |
using ValueOnCIter |
using ValueOnIter |
using ValueType |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Destructor.
|
inline |
|
inline |
Allocate memory for this node's buffer if it has not already been allocated.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinestatic |
Return the child count for this node, which is zero.
Set all voxels that lie outside the given axis-aligned box to the background.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Return the linear table offset of the given global or local coordinates.
|
inline |
|
inline |
|
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.
bbox | inclusive bounding box of the voxels to be copied into this node |
dense | dense grid with a stride in z of one (see tools::Dense in tools/Dense.h for the required API) |
background | background value of the tree that this node belongs to |
tolerance | tolerance within which a value equals the background value |
|
inline |
Copy into a dense grid the values of the voxels that lie within a given bounding box.
bbox | inclusive bounding box of the voxels to be copied into the dense grid |
dense | dense grid with a stride in z of one (see tools::Dense in tools/Dense.h for the required API) |
Set all voxels within an axis-aligned box to the specified value and active state.
|
inlinestatic |
Return the number of voxels in each coordinate dimension.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
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.
|
inlinestaticprotected |
Compute the origin of the leaf node that contains the voxel with the given coordinates.
Set all voxels within an axis-aligned box to the specified value and active state.
|
inline |
Set all voxels to the specified value but don't change their active states.
|
inline |
Set all voxels to the specified value and active state.
|
inlinestatic |
Return the dimension of child nodes of this LeafNode, which is one for voxels.
|
inlineinherited |
Return the coordinates of the item to which this iterator is pointing.
|
inlineinherited |
Return in xyz the coordinates of the item to which this iterator is pointing.
|
inline |
Return a const reference to the first value in the buffer.
|
inline |
|
inline |
|
inline |
Return a const reference to the last value in the buffer.
|
inlinestatic |
Return the level of this node, which by definition is zero for LeafNodes.
|
inline |
Return the bounding box of this node, i.e., the full index space spanned by this leaf node.
|
inlinestatic |
Append the Log2Dim of this LeafNode to the specified vector.
|
inline |
|
inline |
|
inlineinherited |
Return a pointer to the node (if any) over which this iterator is iterating.
|
inline |
|
inline |
|
inline |
Return the value of the voxel at the given coordinates.
|
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.
|
inline |
Return the value of the voxel at the given linear offset.
Return the value of the voxel at the given coordinates.
Return the level (i.e., 0) at which leaf node values reside.
Return the LEVEL (=0) at which leaf node values reside.
|
inline |
|
inline |
Return the value of the voxel at the given offset.
Return true if the voxel at the given offset is active and set value.
|
inlinestatic |
Return false
since leaf nodes never contain tiles.
|
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.
|
inlineinherited |
Advance to the next item in the parent node's table.
|
inlineinherited |
Advance n items in the parent node's table.
|
inline |
Return true
if memory for this node's buffer has been allocated.
|
inline |
|
inline |
|
inline |
|
inline |
Return true
if all of this node's values have the same active state and are in the range this->getFirstValue() +/- tolerance.
firstValue | Is updated with the first value of this leaf node. |
state | Is updated with the state of all values IF method returns true . Else the value is undefined! |
tolerance | The tolerance used to determine if values are approximately equal to the for value. |
|
inline |
Return true
if all of this node's values have the same active state and the range (maxValue - minValue) < tolerance.
minValue | Is updated with the minimum of all values IF method returns true . Else the value is undefined! |
maxValue | Is updated with the maximum of all values IF method returns true . Else the value is undefined! |
state | Is updated with the state of all values IF method returns true . Else the value is undefined! |
tolerance | The tolerance used to determine if values are approximately constant. |
|
inline |
Return true
if this node contains only active voxels.
|
inline |
Return true
if this node has no active voxels.
|
inline |
Return true
if all of this node's values are inactive.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Return true
if the voxel at the given coordinates is inactive.
|
inline |
Return true
if the voxel at the given offset is inactive.
|
inline |
Return true
if the voxel at the given coordinates is active.
|
inline |
Return true
if the voxel at the given offset is active.
|
inlineinherited |
Return true
if this iterator is pointing to an active value. Return false
if it is pointing to either an inactive value or a child node.
|
inline |
Return true
if the voxel at the given coordinates is active.
|
inlinestatic |
Return the leaf count for this node, which is one.
|
inline |
Default constructor.
|
inlineexplicit |
Constructor.
coords | the grid index coordinates of a voxel |
value | a value with which to fill the buffer |
active | the active state to which to initialize all voxels |
|
inline |
|
inline |
Value conversion copy constructor.
|
inline |
Topology copy constructor.
|
inline |
Topology copy constructor.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
"Partial creation" constructor used during file input
coords | the grid index coordinates of a voxel |
value | a value with which to fill the buffer |
active | the active state to which to initialize all voxels |
This constructor does not allocate memory for voxel values.
|
inline |
|
inline |
|
inlinestatic |
Return log2 of the dimension of this LeafNode, e.g. 3 if dimensions are 8^3.
|
inline |
Computes the median value of all the active AND inactive voxels in this node.
tmp | Optional 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. |
Computes the median value of all the inactive voxels in this node.
value | If the return value is non zero value is updated with the median value. |
tmp | Optional 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. |
Computes the median value of all the active voxels in this node.
value | If the return value is non zero value is updated with the median value. |
tmp | Optional 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. |
|
inline |
Return the memory in bytes occupied by this node.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Apply a functor to the value of the voxel at the given coordinates and mark the voxel as active.
|
inline |
|
inline |
|
inline |
Apply a functor to the value of the voxel at the given offset and mark the voxel as active.
|
inline |
Apply a functor to the voxel at the given coordinates.
|
inline |
Apply a functor to the voxel at the given coordinates.
|
inline |
Apply a functor to the value of the voxel at the given coordinates and mark the voxel as active.
|
inline |
|
inlineinherited |
Advance to the next item in the parent node's table.
|
inline |
|
inline |
no-op
|
inlinestatic |
Return the non-leaf count for this node, which is zero.
|
inlinestatic |
Return the total number of voxels represented by this LeafNode.
|
inline |
|
inlineinherited |
Return this iterator's position as an index into the parent node's table.
Return the global coordinates for a linear table offset.
Return the local coordinates for a linear table offset, where offset 0 has coordinates (0, 0, 0).
|
inlinestatic |
|
inline |
Return the number of voxels marked Off.
|
inline |
|
inlinestatic |
|
inline |
Return the number of voxels marked On.
|
inlineinherited |
Return true
if this iterator is not yet exhausted.
|
inlineinherited |
|
inlineinherited |
Return a reference to the item to which this iterator is pointing.
|
inlineinherited |
Advance to the next item in the parent node's table.
|
inlineinherited |
Return a pointer to the item to which this iterator is pointing.
Check for buffer, state and origin equivalence.
|
inlineinherited |
|
inline |
Return the grid index coordinates of this node's local origin.
|
inlineinherited |
Return a reference to the node over which this iterator is iterating.
ValueError | if there is no parent node. |
|
inlineinherited |
Identical to offset.
|
inline |
|
inline |
|
inline |
|
inline |
Return true
if the voxel at the given coordinates is active.
xyz | the coordinates of the voxel to be probed | |
[out] | val | the value of the voxel at the given coordinates |
Return true
if the voxel at the given offset is active.
offset | the linear offset of the voxel to be probed | |
[out] | val | the value of the voxel at the given coordinates |
Return true
if the voxel at the given coordinates is active and return the voxel value in val.
This function exists only to enable template instantiation.
|
inline |
Read buffers from a stream.
is | the stream from which to read |
fromHalf | if true, floating-point input values are assumed to be 16-bit |
|
inline |
Read buffers that intersect the given bounding box.
is | the stream from which to read |
bbox | an index-space bounding box |
fromHalf | if true, floating-point input values are assumed to be 16-bit |
|
inline |
Read in just the topology.
is | the stream from which to read |
fromHalf | if true, floating-point input values are assumed to be 16-bit |
Replace inactive occurrences of oldBackground with newBackground, and inactive occurrences of -oldBackground with -newBackground.
|
inline |
Set the active state of the voxel at the given coordinates but don't change its value.
|
inline |
Set the active state of the voxel at the given offset but don't change its value.
|
inline |
Set the active state of the voxel at the given coordinates without changing its value.
|
inline |
Set the active state of the voxel at the given offset but don't change its value.
|
inline |
|
inline |
|
inline |
Set the grid index coordinates of this node's local origin.
|
inline |
Set the transient data value.
|
inline |
Set the value of the voxel at the given coordinates and mark the voxel as active.
|
inline |
Change the value of the voxel at the given coordinates and mark it as active.
|
inline |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inline |
Mark the voxel at the given coordinates as inactive but don't change its value.
Set the value of the voxel at the given coordinates and mark the voxel as inactive.
|
inline |
Mark the voxel at the given offset as inactive but don't change its value.
Set the value of the voxel at the given offset and mark the voxel as inactive.
|
inlineinherited |
If this iterator is pointing to a value, mark the value as inactive.
If this iterator is pointing to a child node, then the current item in the parent node's table is required to be inactive. In that case, this method has no effect.
Change the value of the voxel at the given coordinates and mark it as inactive.
|
inline |
Mark the voxel at the given offset as inactive but don't change its value.
Set the value of the voxel at the given coordinates and mark the voxel as active.
|
inline |
Mark the voxel at the given coordinates as active but don't change its value.
Set the value of the voxel at the given coordinates and mark the voxel as active.
|
inline |
Mark the voxel at the given offset as active but don't change its value.
Set the value of the voxel at the given offset and mark the voxel as active.
|
inlineinherited |
If this iterator is pointing to a value, set the value's active state. Otherwise, do nothing.
Set the value of the voxel at the given coordinates but don't change its active state.
Set the value of the voxel at the given offset but don't change its active state.
Change the value of the voxel at the given coordinates but preserve its state.
Set the value of the voxel at the given coordinates but don't change its active state.
|
inline |
Mark the voxel at the given offset as active but don't change its value.
Set the value of the voxel at the given coordinates and mark the voxel as active.
|
inline |
Mark all voxels as inactive but don't change their values.
|
inline |
Mark all voxels as active but don't change their values.
|
inlineprotected |
|
inline |
|
inline |
Return a string representation of this node.
size_t streamingSize | ( | bool | toHalf = false | ) | const |
|
inline |
Exchange this node's data buffer with the given data buffer without changing the active states of the values.
|
inlineinherited |
Return true
if this iterator is not yet exhausted.
|
inline |
|
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.
|
inline |
|
inline |
|
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.
|
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.
|
inline |
Return the transient data value.
|
inline |
|
inline |
No-op.
This function exists only to enable template instantiation.
|
inline |
Write buffers to a stream.
os | the stream to which to write |
toHalf | if true, output floating-point values as 16-bit half floats |
|
inline |
Write out just the topology.
os | the stream to which to write |
toHalf | if true, output floating-point values as 16-bit half floats |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
static |
|
staticinherited |
|
staticinherited |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |