OpenVDB
1.1.0
|
Templated block class to hold specific data types and a fixed number of values determined by Log2Dim. The actual coordinate dimension of the block is 2^Log2Dim, i.e. Log2Dim=3 corresponds to a LeafNode that spans a 8^3 block. More...
#include <LeafNode.h>
Classes | |
class | Buffer |
Stores the actual values in the LeafNode. Its dimension it fixed to 2^(3*Log2Dim) More... | |
struct | ChildAll |
struct | ChildIter |
Leaf nodes have no children, so their child iterators have no get/set accessors. More... | |
struct | ChildOff |
struct | ChildOn |
struct | DenseIter |
struct | ValueAll |
struct | ValueConverter |
ValueConverter<T>::Type is the type of a LeafNode having the same child hierarchy and dimensions as this node but a different value type, T. More... | |
struct | ValueIter |
struct | ValueOff |
struct | ValueOn |
Public Member Functions | |
LeafNode () | |
Default constructor. | |
LeafNode (const Coord &coords, const ValueType &value=zeroVal< ValueType >(), bool active=false) | |
Constructor. | |
LeafNode (const LeafNode &) | |
Deep copy constructor. | |
template<typename OtherValueType > | |
LeafNode (const LeafNode< OtherValueType, Log2Dim > &other, const ValueType &offValue, const ValueType &onValue, TopologyCopy) | |
Topology copy constructor. | |
template<typename OtherValueType > | |
LeafNode (const LeafNode< OtherValueType, Log2Dim > &other, const ValueType &background, TopologyCopy) | |
Topology copy constructor. | |
~LeafNode () | |
Destructor. | |
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. | |
Index64 | memUsage () const |
Return the memory in bytes occupied by this node. | |
void | evalActiveVoxelBoundingBox (CoordBBox &) const |
Expand the given bounding box so that it includes this leaf node's active voxels. | |
CoordBBox | getNodeBoundingBox () const |
Return the bounding box of this node, i.e., the full index space spanned by this leaf node. | |
const Coord & | getOrigin () const |
Get 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 | offset2globalCoord (Index n) const |
Get the global coordinates for a linear table offset. | |
std::string | str () const |
Return a string representation of this node. | |
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. | |
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 | 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. | |
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 at the given coordinates, but don't change its value. | |
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) |
Change the value of the voxel at the given coordinates and mark the voxel as inactive. | |
void | setValueOff (Index offset, const ValueType &val) |
Change 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 | setValue (const Coord &xyz, const ValueType &val) |
Identical to setValueOn. | |
void | setValueOn (Index offset, const ValueType &val) |
Change the value of the voxel at the given offset and mark the voxel as active. | |
void | setValueOnMin (const Coord &xyz, const ValueType &val) |
Set the value of the voxel at the given coordinates to the minimum of its current value and the given value, and mark the voxel as active. | |
void | setValueOnMin (Index offset, const ValueType &val) |
Set the value of the voxel at the given offset to the minimum of its current value and the given value, and mark the voxel as active. | |
void | setValueOnMax (const Coord &xyz, const ValueType &val) |
Set the value of the voxel at the given coordinates to the maximum of its current value and the given value, and mark the voxel as active. | |
void | setValueOnMax (Index offset, const ValueType &val) |
Set the value of the voxel at the given offset to the maximum of its current value and the given value, and mark the voxel as active. | |
void | setValueOnSum (const Coord &xyz, const ValueType &val) |
Set the value of the voxel at the given coordinates to the sum of its current value and the given value, and mark the voxel as active. | |
void | setValueOnSum (Index offset, const ValueType &val) |
Set the value of the voxel at the given offset to the sum of its current value and the given value, and mark the voxel as active. | |
void | setValueOnly (const Coord &xyz, const ValueType &val) |
Change the value of the voxel at the given coordinates without altering the voxel's active state. | |
void | setValueOnly (Index offset, const ValueType &val) |
Change the value of the voxel at the given offset without altering the voxel's active state. | |
void | addValue (const ValueType &val) |
Add the given value to all active voxels, leaving inactive voxels unchanged. | |
void | scaleValue (const ValueType &scale) |
Multiply all active voxels by the given value, leaving inactive voxels unchanged. | |
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. | |
void | fill (const CoordBBox &bbox, const ValueType &, bool active=true) |
Set all voxels within an axis-aligned box to a constant value. (The bbox coordinates are inclusive.) | |
void | fill (const ValueType &value) |
Sets all values to the specified value. Their state is unchanged. | |
void | fill (const ValueType &value, bool active) |
Sets all values to the specified value and state. | |
template<typename AccessorT > | |
const ValueType & | getValueAndCache (const Coord &xyz, AccessorT &) const |
Return the value of the voxel at the given coordinates. | |
template<typename AccessorT > | |
bool | isValueOnAndCache (const Coord &xyz, AccessorT &) const |
Return true if the voxel at the given coordinates is active. | |
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. | |
template<typename AccessorT > | |
void | setValueOnlyAndCache (const Coord &xyz, const ValueType &val, AccessorT &) |
Change the value of the voxel at the given coordinates but preserve its state. | |
template<typename AccessorT > | |
void | setValueOnSumAndCache (const Coord &xyz, const ValueType &val, AccessorT &) |
template<typename AccessorT > | |
void | setValueOffAndCache (const Coord &xyz, const ValueType &value, AccessorT &) |
Change the value of the voxel at the given coordinates and mark it as inactive. | |
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. | |
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. | |
template<typename AccessorT > | |
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. | |
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 | signedFloodFill (const ValueType &background) |
Overwrites the inactive voxels with a new value whos magnitude is equal to the specified background value and sign is consistant with the lexicographically closest active voxel. The net effect is a propagation of signs from the active voxels to the inactive voxels. | |
void | signedFloodFill (const ValueType &outside, const ValueType &inside) |
Sets the inactive voxels to either the outside or inside value, depending on the sign of the closest corresponding active voxels. More specefically, an inactive voxel is set to the outside value if the closest active voxel in the lexicographic direction is positive, else it is set to the inside value. | |
void | negate () |
void | merge (const LeafNode &) |
void | merge (const LeafNode &other, const ValueType &, const ValueType &) |
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. | |
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. | |
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 > | |
void | combine2 (const LeafNode &other, const ValueType &, bool valueIsActive, CombineOp &) |
template<typename CombineOp > | |
void | combine2 (const ValueType &, 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. | |
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 |
bool | isConstant (ValueType &constValue, bool &state, const ValueType &tolerance=zeroVal< ValueType >()) const |
bool | isInactive () const |
Return true if all of this node's values are inactive. | |
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 PruneOp > | |
void | pruneOp (PruneOp &) |
This function exists only to enable template instantiation. | |
void | prune (const ValueType &=zeroVal< ValueType >()) |
This function exists only to enable template instantiation. | |
void | pruneInactive (const ValueType &) |
This function exists only to enable template instantiation. | |
LeafNode * | touchLeaf (const Coord &) |
return a pointer to itself | |
template<typename AccessorT > | |
LeafNode * | touchLeafAndCache (const Coord &, AccessorT &) |
return a pointer to itself | |
LeafNode * | probeLeaf (const Coord &) |
return a pointer to itself | |
template<typename AccessorT > | |
LeafNode * | probeLeafAndCache (const Coord &, AccessorT &) |
return a pointer to itself | |
const LeafNode * | probeConstLeaf (const Coord &) const |
return a const pointer to itself | |
template<typename AccessorT > | |
const LeafNode * | probeConstLeafAndCache (const Coord &, AccessorT &) const |
return a const pointer to itself |
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 Index32 | leafCount () |
Return the leaf count for this node, which is one. | |
static Index32 | nonLeafCount () |
Return the non-leaf count for this node, which is zero. | |
static Index | coord2offset (const Coord &xyz) |
Return the linear table offset of the given coordinates. | |
static void | offset2coord (Index n, Coord &xyz) |
Get the local coordinates for a linear table offset. | |
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. | |
template<typename AccessorT > | |
static Index | getValueLevelAndCache (const Coord &, AccessorT &) |
Return the LEVEL (=0) at which leaf node values reside. |
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 | MaskOnIterator |
typedef NodeMaskType::OffIterator | MaskOffIterator |
typedef NodeMaskType::DenseIterator | MaskDenseIterator |
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. | |
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 | |
Buffer | mBuffer |
Buffer containing the actual data values. | |
NodeMaskType | mValueMask |
Bitmask that determines which voxels are active. | |
Coord | mOrigin |
Global grid index coordinates (x,y,z) of the local origin of this node. |
Templated block class to hold specific data types and a fixed number of values determined by Log2Dim. The actual coordinate dimension of the block is 2^Log2Dim, i.e. Log2Dim=3 corresponds to a LeafNode that spans a 8^3 block.
typedef DenseIter<const LeafNode, const ValueType, ChildAll> ChildAllCIter |
typedef DenseIter<LeafNode, ValueType, ChildAll> ChildAllIter |
typedef ChildIter<MaskOffIterator, const LeafNode, ChildOff> ChildOffCIter |
typedef ChildIter<MaskOffIterator, LeafNode, ChildOff> ChildOffIter |
typedef ChildIter<MaskOnIterator, const LeafNode, ChildOn> ChildOnCIter |
typedef ChildIter<MaskOnIterator, LeafNode, ChildOn> ChildOnIter |
typedef LeafNode<ValueType, Log2Dim> LeafNodeType |
|
protected |
|
protected |
|
protected |
typedef util::NodeMask<Log2Dim> NodeMaskType |
typedef ValueIter<MaskDenseIterator,const LeafNode,const ValueType,ValueAll> ValueAllCIter |
typedef ValueIter<MaskDenseIterator, LeafNode, const ValueType, ValueAll> ValueAllIter |
typedef ValueIter<MaskOffIterator,const LeafNode,const ValueType,ValueOff> ValueOffCIter |
typedef ValueIter<MaskOffIterator, LeafNode, const ValueType, ValueOff> ValueOffIter |
typedef ValueIter<MaskOnIterator, const LeafNode, const ValueType, ValueOn> ValueOnCIter |
typedef ValueIter<MaskOnIterator, LeafNode, const ValueType, ValueOn> ValueOnIter |
typedef T ValueType |
LeafNode | ( | ) |
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 |
Topology copy constructor.
|
inline |
Topology copy constructor.
|
inline |
Destructor.
|
inline |
Add the given value to all active voxels, leaving inactive voxels unchanged.
|
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 |
Return the linear table offset of the given coordinates.
|
inlinestatic |
Return the number of voxels in each coordinate 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.
|
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 a constant value. (The bbox coordinates are inclusive.)
|
inline |
Sets all values to the specified value. Their state is unchanged.
|
inline |
Sets all values to the specified value and state.
|
inlinestatic |
Return the dimension of child nodes of this LeafNode, which is one for voxels.
|
inline |
Return a const reference to the first value in the buffer.
|
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 |
Get the grid index coordinates of this node's local origin.
|
inline |
|
inline |
Return the value of the voxel at the given coordinates.
|
inline |
Return the value of the voxel at the given linear offset.
|
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.
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 |
|
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 values 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 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 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 |
Return the leaf count for this node, which is one.
|
inlinestatic |
Return log2 of the dimension of this LeafNode, e.g. 3 if dimensions are 8^3.
|
inline |
Return the memory in bytes occupied by this node.
|
inline |
|
inline |
|
inlinestatic |
Return the non-leaf count for this node, which is zero.
|
inlinestatic |
Return the total number of voxels represented by this LeafNode.
|
inline |
Get the local coordinates for a linear table offset.
Get the global coordinates for a linear table offset.
|
inline |
Return the number of voxels marked Off.
|
inline |
|
inline |
Return the number of voxels marked On.
|
inline |
|
inline |
Check for buffer, state and origin equivalence.
return a const pointer to itself
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 |
This function exists only to enable template instantiation.
|
inline |
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 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 |
Multiply all active voxels by the given value, leaving inactive voxels unchanged.
|
inline |
Set the active state at the given coordinates, but don't change its value.
|
inline |
Set the active state of the voxel at the given coordinates without changing its value.
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.
Change the value of the voxel at the given coordinates and mark the voxel as inactive.
Change the value of the voxel at the given offset and mark the voxel as inactive.
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.
Set the value of the voxel at the given coordinates and mark the voxel as active.
Change the value of the voxel at the given offset and mark the voxel as active.
Change the value of the voxel at the given coordinates without altering the voxel's active state.
Change the value of the voxel at the given offset without altering the voxel's active state.
This method is very fast since it effectively ignores the active state of the voxel.
Change the value of the voxel at the given coordinates but preserve its state.
Set the value of the voxel at the given coordinates to the maximum of its current value and the given value, and mark the voxel as active.
Set the value of the voxel at the given offset to the maximum of its current value and the given value, and mark the voxel as active.
Set the value of the voxel at the given coordinates to the minimum of its current value and the given value, and mark the voxel as active.
Set the value of the voxel at the given offset to the minimum of its current value and the given value, and mark the voxel as active.
Set the value of the voxel at the given coordinates to the sum of its current value and the given value, and mark the voxel as active.
Set the value of the voxel at the given offset to the sum of its current value and the given value, and mark the voxel as active.
Set the value of the voxel at the given coordinates to the sum of its current value and the given value, 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.
|
inline |
Overwrites the inactive voxels with a new value whos magnitude is equal to the specified background value and sign is consistant with the lexicographically closest active voxel. The net effect is a propagation of signs from the active voxels to the inactive voxels.
Sets the inactive voxels to either the outside or inside value, depending on the sign of the closest corresponding active voxels. More specefically, an inactive voxel is set to the outside value if the closest active voxel in the lexicographic direction is positive, else it is set to the inside value.
|
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.
|
inline |
Intersect this node's set of active values with the active values of the other node, whose ValueType
may be different.
The last dummy arguemnt 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.
|
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 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 |
|
static |
|
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 |
|
static |