OpenVDB
2.0.0
|
LeafNode specialization for values of type bool that stores both the active states and the values of (2^Log2Dim)^3 voxels as bit masks. More...
#include <LeafNodeBool.h>
Classes | |
class | Buffer |
struct | ChildIter |
Leaf nodes have no children, so their child iterators have no get/set accessors. More... | |
struct | DenseIter |
struct | ValueConverter |
ValueConverter<T>::Type is the type of a LeafNode having the same dimensions as this node but a different value type, T. More... | |
struct | ValueIter |
Public Types | |
typedef LeafNode< bool, Log2Dim > | LeafNodeType |
typedef boost::shared_ptr < LeafNodeType > | Ptr |
typedef bool | ValueType |
typedef util::NodeMask< Log2Dim > | NodeMaskType |
typedef ValueIter< MaskOnIter, LeafNode, bool > | ValueOnIter |
typedef ValueIter< MaskOnIter, const LeafNode, const bool > | ValueOnCIter |
typedef ValueIter< MaskOffIter, LeafNode, bool > | ValueOffIter |
typedef ValueIter< MaskOffIter, const LeafNode, const bool > | ValueOffCIter |
typedef ValueIter < MaskDenseIter, LeafNode, bool > | ValueAllIter |
typedef ValueIter < MaskDenseIter, const LeafNode, const bool > | ValueAllCIter |
typedef ChildIter< MaskOnIter, LeafNode > | ChildOnIter |
typedef ChildIter< MaskOnIter, const LeafNode > | ChildOnCIter |
typedef ChildIter< MaskOffIter, LeafNode > | ChildOffIter |
typedef ChildIter< MaskOffIter, const LeafNode > | ChildOffCIter |
typedef DenseIter< LeafNode, bool > | ChildAllIter |
typedef DenseIter< const LeafNode, const bool > | ChildAllCIter |
Public Member Functions | |
LeafNode () | |
Default constructor. More... | |
LeafNode (const Coord &xyz, bool value=false, bool active=false) | |
LeafNode (const LeafNode &) | |
Deep copy constructor. More... | |
template<typename ValueType > | |
LeafNode (const LeafNode< ValueType, Log2Dim > &other, TopologyCopy) | |
Topology copy constructor. More... | |
template<typename ValueType > | |
LeafNode (const LeafNode< ValueType, Log2Dim > &other, bool offValue, bool onValue, TopologyCopy) | |
template<typename ValueType > | |
LeafNode (const LeafNode< ValueType, Log2Dim > &other, bool background, TopologyCopy) | |
~LeafNode () | |
Destructor. More... | |
Index64 | onVoxelCount () const |
Return the number of active voxels. More... | |
Index64 | offVoxelCount () const |
Return the number of inactive voxels. 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 only contains active voxels. More... | |
Index64 | memUsage () const |
Return the memory in bytes occupied by this node. More... | |
void | evalActiveBoundingBox (CoordBBox &, bool visitVoxels=true) const |
OPENVDB_DEPRECATED void | evalActiveVoxelBoundingBox (CoordBBox &bbox) 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... | |
OPENVDB_DEPRECATED const Coord & | getOrigin () const |
Return 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 &) const |
Check for buffer equivalence by value. More... | |
bool | operator!= (const LeafNode &) 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 Buffer & | buffer () const |
Buffer & | buffer () |
void | readTopology (std::istream &, bool fromHalf=false) |
Read in just the topology. More... | |
void | writeTopology (std::ostream &, bool toHalf=false) const |
Write out just the topology. More... | |
void | readBuffers (std::istream &, bool fromHalf=false) |
Read in the topology and the origin. More... | |
void | writeBuffers (std::ostream &, bool toHalf=false) const |
Write out the topology and the origin. More... | |
const bool & | getValue (const Coord &xyz) const |
Return the value of the voxel at the given coordinates. More... | |
const bool & | getValue (Index offset) const |
Return the value of the voxel at the given offset. More... | |
bool | probeValue (const Coord &xyz, bool &val) const |
Return true if the voxel at the given coordinates is active. More... | |
void | setActiveState (const Coord &xyz, bool on) |
Set the active state of the voxel at the given coordinates but don't change its value. More... | |
void | setActiveState (Index offset, bool on) |
Set the active state of the voxel at the given offset but don't change its value. More... | |
void | setValueOnly (const Coord &xyz, bool val) |
Set the value of the voxel at the given coordinates but don't change its active state. More... | |
void | setValueOnly (Index offset, bool val) |
Set the value of the voxel at the given offset but don't change its active state. More... | |
void | setValueOff (const Coord &xyz) |
Mark the voxel at the given coordinates as inactive but don't change its value. More... | |
void | setValueOff (Index offset) |
Mark the voxel at the given offset as inactive but don't change its value. More... | |
void | setValueOff (const Coord &xyz, bool val) |
Set the value of the voxel at the given coordinates and mark the voxel as inactive. More... | |
void | setValueOff (Index offset, bool val) |
Set the value of the voxel at the given offset and mark the voxel as inactive. More... | |
void | setValueOn (const Coord &xyz) |
Mark the voxel at the given coordinates as active but don't change its value. More... | |
void | setValueOn (Index offset) |
Mark the voxel at the given offset as active but don't change its value. More... | |
void | setValueOn (const Coord &xyz, bool val) |
Set the value of the voxel at the given coordinates and mark the voxel as active. More... | |
void | setValue (const Coord &xyz, bool val) |
Set the value of the voxel at the given coordinates and mark the voxel as active. More... | |
void | setValueOn (Index offset, bool val) |
Set the value of the voxel at the given offset and mark the voxel as active. More... | |
template<typename ModifyOp > | |
void | modifyValue (Index offset, const ModifyOp &op) |
Apply a functor to the value of the voxel at the given offset and mark the voxel as active. More... | |
template<typename ModifyOp > | |
void | modifyValue (const Coord &xyz, const ModifyOp &op) |
Apply a functor to the value of the voxel at the given coordinates and mark the voxel as active. More... | |
template<typename ModifyOp > | |
void | modifyValueAndActiveState (const Coord &xyz, const ModifyOp &op) |
Apply a functor to the voxel at the given coordinates. More... | |
void | setValuesOn () |
Mark all voxels as active but don't change their values. More... | |
void | setValuesOff () |
Mark all voxels as inactive but don't change their values. More... | |
bool | isValueOn (const Coord &xyz) const |
Return true if the voxel at the given coordinates is active. More... | |
bool | isValueOn (Index offset) const |
Return true if the voxel at the given offset is active. More... | |
void | fill (const CoordBBox &bbox, bool value, bool active=true) |
Set all voxels within an axis-aligned box to the specified value and active state. More... | |
void | fill (const bool &value) |
Set all voxels to the specified value but don't change their active states. More... | |
void | fill (const bool &value, bool active) |
Set all voxels to the specified value and active state. More... | |
template<typename DenseT > | |
void | copyToDense (const CoordBBox &bbox, DenseT &dense) const |
Copy into a dense grid the values of the voxels that lie within a given bounding box. More... | |
template<typename DenseT > | |
void | copyFromDense (const CoordBBox &bbox, const DenseT &dense, bool background, bool 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 bool & | getValueAndCache (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, bool val, AccessorT &) |
Change the value of the voxel at the given coordinates and mark it as active. More... | |
template<typename AccessorT > | |
void | setValueOnlyAndCache (const Coord &xyz, bool val, AccessorT &) |
Change the value of the voxel at the given coordinates but preserve its state. More... | |
template<typename AccessorT > | |
void | setValueOffAndCache (const Coord &xyz, bool value, AccessorT &) |
Change the value of the voxel at the given coordinates and mark it as inactive. More... | |
template<typename ModifyOp , typename AccessorT > | |
void | modifyValueAndCache (const Coord &xyz, const ModifyOp &op, AccessorT &) |
Apply a functor to the value of the voxel at the given coordinates and mark the voxel as active. More... | |
template<typename ModifyOp , typename AccessorT > | |
void | modifyValueAndActiveStateAndCache (const Coord &xyz, const ModifyOp &op, AccessorT &) |
template<typename AccessorT > | |
void | setActiveStateAndCache (const Coord &xyz, bool on, AccessorT &) |
Set the active state of the voxel at the given coordinates without changing its value. More... | |
template<typename AccessorT > | |
bool | probeValueAndCache (const Coord &xyz, bool &val, AccessorT &) const |
Return true if the voxel at the given coordinates is active and return the voxel value in val. More... | |
const bool & | getFirstValue () const |
Return a const reference to the first entry in the buffer. More... | |
const bool & | getLastValue () const |
Return a const reference to the last entry in the buffer. More... | |
bool | isConstant (bool &constValue, bool &state, bool tolerance=0) const |
bool | isInactive () const |
Return true if all of this node's values are inactive. More... | |
void | resetBackground (bool oldBackground, bool newBackground) |
void | negate () |
template<MergePolicy Policy> | |
void | merge (const LeafNode &other, bool bg=false, bool otherBG=false) |
template<MergePolicy Policy> | |
void | merge (bool tileValue, bool tileActive) |
void | voxelizeActiveTiles () |
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 bool &) |
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 bool &) |
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 (bool, bool valueIsActive, CombineOp &op) |
template<typename CombineOp > | |
void | combine2 (const LeafNode &other, bool, bool valueIsActive, CombineOp &) |
template<typename CombineOp > | |
void | combine2 (bool, const LeafNode &other, bool valueIsActive, CombineOp &) |
template<typename CombineOp > | |
void | combine2 (const LeafNode &b0, const LeafNode &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 &, bool val, bool active) |
void | addTile (Index offset, bool val, bool active) |
template<typename AccessorT > | |
void | addTileAndCache (Index level, const Coord &, bool val, bool active, AccessorT &) |
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 () |
bool | isValueMaskOn (Index n) const |
bool | isValueMaskOn () const |
bool | isValueMaskOff (Index n) const |
bool | isValueMaskOff () const |
const NodeMaskType & | getValueMask () const |
NodeMaskType & | getValueMask () |
void | setValueMask (const NodeMaskType &mask) |
bool | isChildMaskOn (Index) const |
bool | isChildMaskOff (Index) const |
bool | isChildMaskOff () const |
template<typename ValueT > | |
LeafNode (const LeafNode< ValueT, Log2Dim > &other, TopologyCopy) | |
template<typename ValueT > | |
LeafNode (const LeafNode< ValueT, Log2Dim > &other, bool offValue, bool onValue, TopologyCopy) | |
template<typename ValueT > | |
LeafNode (const LeafNode< ValueT, Log2Dim > &other, bool background, TopologyCopy) | |
const Coord & | origin () const |
Return the grid index coordinates of this node's local origin. More... | |
void | getOrigin (Coord &origin) const |
Return the grid index coordinates of this node's local origin. More... | |
void | getOrigin (Int32 &x, Int32 &y, Int32 &z) const |
Return the grid index coordinates of this node's local origin. More... | |
void | signedFloodFill (bool) |
This function exists only to enable template instantiation. More... | |
void | signedFloodFill (bool, bool) |
This function exists only to enable template instantiation. More... | |
template<typename PruneOp > | |
void | pruneOp (PruneOp &) |
This function exists only to enable template instantiation. More... | |
void | prune (const ValueType &=zeroVal< ValueType >()) |
This function exists only to enable template instantiation. More... | |
void | pruneInactive (const 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... | |
LeafNode * | touchLeaf (const Coord &) |
Return a pointer to this node. More... | |
template<typename AccessorT > | |
LeafNode * | touchLeafAndCache (const Coord &, AccessorT &) |
Return a pointer to this node. More... | |
LeafNode * | probeLeaf (const Coord &) |
Return a pointer to this node. More... | |
template<typename AccessorT > | |
LeafNode * | probeLeafAndCache (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... | |
const LeafNode * | probeLeaf (const Coord &) const |
Return a const pointer to this node. More... | |
template<typename AccessorT > | |
const LeafNode * | probeLeafAndCache (const Coord &, AccessorT &) const |
Return a const pointer to this node. More... | |
const LeafNode * | probeConstLeaf (const Coord &) const |
Return a const pointer to this node. More... | |
template<typename AccessorT > | |
const LeafNode * | probeConstLeafAndCache (const Coord &, AccessorT &) 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... | |
Static Public Member Functions | |
static Index | log2dim () |
Return log2 of the size of the buffer storage. More... | |
static Index | dim () |
Return the number of voxels in each dimension. More... | |
static Index | size () |
static Index | numValues () |
static Index | getLevel () |
static void | getNodeLog2Dims (std::vector< Index > &dims) |
static Index | getChildDim () |
static Index32 | leafCount () |
static Index32 | nonLeafCount () |
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 (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 | |
typedef NodeMaskType::OnIterator | MaskOnIter |
typedef NodeMaskType::OffIterator | MaskOffIter |
typedef NodeMaskType::DenseIterator | MaskDenseIter |
Protected Member Functions | |
void | setValueMask (Index n, bool on) |
void | setValueMaskOn (Index n) |
void | setValueMaskOff (Index n) |
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) |
Protected Attributes | |
NodeMaskType | mValueMask |
Bitmask that determines which voxels are active. More... | |
Buffer | mBuffer |
Bitmask representing the values of voxels. More... | |
Coord | mOrigin |
Global grid index coordinates (x,y,z) of the local origin of this node. More... | |
Static Protected Attributes | |
static const bool | sOn = true |
static const bool | sOff = false |
Friends | |
template<typename , Index > | |
class | LeafNode |
During topology-only construction, access is needed to protected/private members of other template instances. More... | |
struct | ValueIter< MaskOnIter, LeafNode, bool > |
struct | ValueIter< MaskOffIter, LeafNode, bool > |
struct | ValueIter< MaskDenseIter, LeafNode, bool > |
struct | ValueIter< MaskOnIter, const LeafNode, bool > |
struct | ValueIter< MaskOffIter, const LeafNode, bool > |
struct | ValueIter< MaskDenseIter, const LeafNode, bool > |
class | IteratorBase< MaskOnIter, LeafNode > |
class | IteratorBase< MaskOffIter, LeafNode > |
class | IteratorBase< MaskDenseIter, LeafNode > |
LeafNode specialization for values of type bool that stores both the active states and the values of (2^Log2Dim)^3 voxels as bit masks.
typedef DenseIter<const LeafNode, const bool> ChildAllCIter |
typedef DenseIter<LeafNode, bool> ChildAllIter |
typedef ChildIter<MaskOffIter, const LeafNode> ChildOffCIter |
typedef ChildIter<MaskOffIter, LeafNode> ChildOffIter |
typedef ChildIter<MaskOnIter, const LeafNode> ChildOnCIter |
typedef ChildIter<MaskOnIter, LeafNode> ChildOnIter |
typedef LeafNode<bool, Log2Dim> LeafNodeType |
|
protected |
|
protected |
|
protected |
typedef util::NodeMask<Log2Dim> NodeMaskType |
typedef boost::shared_ptr<LeafNodeType> Ptr |
typedef ValueIter<MaskDenseIter, const LeafNode, const bool> ValueAllCIter |
typedef ValueIter<MaskDenseIter, LeafNode, bool> ValueAllIter |
typedef ValueIter<MaskOffIter, const LeafNode, const bool> ValueOffCIter |
typedef ValueIter<MaskOffIter, LeafNode, bool> ValueOffIter |
typedef ValueIter<MaskOnIter, const LeafNode, const bool> ValueOnCIter |
typedef ValueIter<MaskOnIter, LeafNode, bool> ValueOnIter |
typedef bool ValueType |
|
inline |
Default constructor.
|
inlineexplicit |
Constructor
xyz | the coordinates of a voxel that lies within the node |
value | the initial value for all of this node's voxels |
active | the active state to which to initialize all voxels |
LeafNode | ( | const LeafNode< ValueType, Log2Dim > & | other, |
TopologyCopy | |||
) |
Topology copy constructor.
LeafNode | ( | const LeafNode< ValueType, Log2Dim > & | other, |
bool | offValue, | ||
bool | onValue, | ||
TopologyCopy | |||
) |
Topology copy constructor
LeafNode | ( | const LeafNode< ValueType, Log2Dim > & | other, |
bool | background, | ||
TopologyCopy | |||
) |
|
inline |
Destructor.
|
inline |
|
inline |
|
inline |
|
inline |
This function exists only to enable template instantiation.
|
inline |
This function exists only to enable template instantiation.
|
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 |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinestatic |
Return the linear table offset of the given global or local coordinates.
|
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) |
|
inlinestatic |
Return the number of voxels in each dimension.
|
inlinestaticprotected |
|
inlinestaticprotected |
|
inlinestaticprotected |
|
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.
|
inline |
|
inlinestaticprotected |
Compute the origin of the leaf node that contains the voxel with the given coordinates.
|
inline |
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 |
|
inline |
Return a const reference to the first entry in the buffer.
|
inline |
Return a const reference to the last entry in the buffer.
|
inlinestatic |
|
inline |
Return the bounding box of this node, i.e., the full index space spanned by this leaf node.
|
inlinestatic |
|
inline |
Return the grid index coordinates of this node's local origin.
|
inline |
Return the grid index coordinates of this node's local origin.
Return the grid index coordinates of this node's local origin.
|
inline |
Return the value of the voxel at the given coordinates.
|
inline |
Return the value of the voxel at the given offset.
|
inline |
Return the value of the voxel at the given coordinates.
|
inlinestatic |
Return the level (0) at which leaf node values reside.
|
inlinestatic |
Return the LEVEL (=0) at which leaf node values reside.
|
inline |
|
inline |
|
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.
|
inline |
|
inline |
|
inline |
|
inline |
Return true
if all of this node's voxels have the same active state and are equal to within the given tolerance, and return the value in constValue and the active state in state.
|
inline |
Return true
if this node only contains 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 active.
|
inline |
Return true
if the voxel at the given offset is active.
|
inline |
Return true
if the voxel at the given coordinates is active.
|
inlinestatic |
|
inlinestatic |
Return log2 of the size of the buffer storage.
|
inline |
Return the memory in bytes occupied by this node.
|
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 value of the voxel at the given coordinates and mark the voxel as active.
|
inline |
Apply a functor to the voxel at the given coordinates.
|
inline |
Apply a functor to the voxel at the given coordinates.
|
inline |
Apply a functor to the value of the voxel at the given coordinates and mark the voxel as active.
|
inline |
|
inlinestatic |
|
inlinestatic |
|
inline |
|
inline |
Return the global coordinates for a linear table offset.
|
inlinestatic |
Return the local coordinates for a linear table offset, where offset 0 has coordinates (0, 0, 0).
|
inlinestatic |
|
inline |
Return the number of inactive voxels.
|
inline |
|
inlinestatic |
|
inline |
Return the number of active voxels.
|
inline |
|
inline |
Check for buffer equivalence by value.
|
inline |
Return the grid index coordinates of this node's local origin.
|
inline |
Return a const
pointer to this node.
|
inline |
Return a const
pointer to this node.
|
inline |
This function exists only to enable template instantiation.
|
inline |
Return a const
pointer to this node.
|
inline |
Return a pointer to this node.
|
inline |
Return a const
pointer to this node.
|
inline |
Return a pointer to this node.
|
inline |
Return a const
pointer to this node.
|
inline |
This function exists only to enable template instantiation.
|
inline |
Return a pointer to this node.
|
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 |
|
inline |
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 |
This function exists only to enable template instantiation.
|
inline |
This function exists only to enable template instantiation.
|
inline |
Read in the topology and the origin.
|
inline |
Read in just the topology.
|
inline |
|
inline |
Set the active state of the voxel at the given coordinates but don't change its value.
|
inline |
Set the active state of the voxel at the given 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 grid index coordinates of this node's local origin.
|
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.
|
inline |
Mark the voxel at the given offset as inactive but don't change its value.
|
inline |
Set the value of the voxel at the given coordinates and mark the voxel as inactive.
|
inline |
Set the value of the voxel at the given offset and mark the voxel as inactive.
|
inline |
Change the value of the voxel at the given coordinates and mark it as inactive.
|
inline |
Mark the voxel at the given coordinates as active but don't change its value.
|
inline |
Mark the voxel at the given offset as active but don't change its value.
|
inline |
Set the value of the voxel at the given coordinates and mark the voxel as active.
|
inline |
Set the value of the voxel at the given offset and mark the voxel as active.
|
inline |
Set the value of the voxel at the given coordinates but don't change its active state.
|
inline |
Set the value of the voxel at the given offset but don't change its active state.
|
inline |
Change the value of the voxel at the given coordinates but preserve its state.
|
inline |
Mark all voxels as inactive but don't change their values.
|
inline |
Mark all voxels as active but don't change their values.
|
inline |
This function exists only to enable template instantiation.
|
inline |
This function exists only to enable template instantiation.
|
inlinestatic |
|
inline |
This function exists only to enable template instantiation.
|
inline |
Return a string representation of this node.
|
inline |
Exchange this node's data buffer with the given data buffer without changing the active states of the values.
|
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 |
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 a pointer to this node.
|
inline |
Return a pointer to this node.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Calls the templated functor BBoxOp with bounding box information. An additional level argument is provided to the callback.
|
inline |
|
inline |
Write out the topology and the origin.
|
inline |
Write out just the topology.
|
friend |
Allow iterators to call mask accessor methods (see below).
|
friend |
Allow iterators to call mask accessor methods (see below).
|
friend |
Allow iterators to call mask accessor methods (see below).
|
friend |
During topology-only construction, access is needed to protected/private members of other template instances.
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
static |
|
static |
|
protected |
Bitmask representing the values of voxels.
|
protected |
Global grid index coordinates (x,y,z) of the local origin of this node.
|
protected |
Bitmask that determines which voxels are active.
|
static |
|
static |
|
static |
|
staticprotected |
|
staticprotected |
|
static |