4 #ifndef OPENVDB_TREE_LEAF_NODE_BOOL_HAS_BEEN_INCLUDED 5 #define OPENVDB_TREE_LEAF_NODE_BOOL_HAS_BEEN_INCLUDED 16 #include <type_traits> 27 template<Index Log2Dim>
39 static const Index LOG2DIM = Log2Dim;
40 static const Index TOTAL = Log2Dim;
41 static const Index DIM = 1 << TOTAL;
42 static const Index NUM_VALUES = 1 << 3 * Log2Dim;
43 static const Index NUM_VOXELS = NUM_VALUES;
44 static const Index SIZE = NUM_VALUES;
49 template<
typename ValueType>
54 template<
typename OtherNodeType>
55 struct SameConfiguration {
67 explicit LeafNode(
const Coord& xyz,
bool value =
false,
bool active =
false);
79 template<
typename OtherValueType>
95 template<
typename ValueType>
111 template<typename ValueType>
112 LeafNode(const
LeafNode<ValueType, Log2Dim>& other,
bool offValue,
bool onValue, TopologyCopy);
113 template<typename ValueType>
114 LeafNode(const
LeafNode<ValueType, Log2Dim>& other,
bool background, TopologyCopy);
124 static
Index log2dim() {
return Log2Dim; }
148 bool isEmpty()
const {
return mValueMask.isOff(); }
150 bool isDense()
const {
return mValueMask.isOn(); }
167 void evalActiveBoundingBox(
CoordBBox& bbox,
bool visitVoxels =
true)
const;
174 void setOrigin(
const Coord& origin) { mOrigin = origin; }
177 const Coord&
origin()
const {
return mOrigin; }
178 void getOrigin(Coord& origin)
const { origin = mOrigin; }
183 static Index coordToOffset(
const Coord& xyz);
186 static Coord offsetToLocalCoord(
Index n);
188 Coord offsetToGlobalCoord(
Index n)
const;
196 std::string str()
const;
200 template<
typename OtherType, Index OtherLog2Dim>
220 void readTopology(std::istream&,
bool fromHalf =
false);
222 void writeTopology(std::ostream&,
bool toHalf =
false)
const;
225 void readBuffers(std::istream&,
bool fromHalf =
false);
226 void readBuffers(std::istream& is,
const CoordBBox&,
bool fromHalf =
false);
228 void writeBuffers(std::ostream&,
bool toHalf =
false)
const;
234 const bool& getValue(
const Coord& xyz)
const;
236 const bool& getValue(
Index offset)
const;
241 bool probeValue(
const Coord& xyz,
bool& val)
const;
247 void setActiveState(
const Coord& xyz,
bool on);
252 void setValueOnly(
const Coord& xyz,
bool val);
254 void setValueOnly(
Index offset,
bool val) { assert(offset<SIZE); mBuffer.setValue(offset,val); }
257 void setValueOff(
const Coord& xyz) { mValueMask.setOff(this->coordToOffset(xyz)); }
262 void setValueOff(
const Coord& xyz,
bool val);
264 void setValueOff(
Index offset,
bool val);
267 void setValueOn(
const Coord& xyz) { mValueMask.setOn(this->coordToOffset(xyz)); }
272 void setValueOn(
const Coord& xyz,
bool val);
274 void setValue(
const Coord& xyz,
bool val) { this->setValueOn(xyz, val); }
276 void setValueOn(
Index offset,
bool val);
280 template<
typename ModifyOp>
281 void modifyValue(
Index offset,
const ModifyOp& op);
284 template<
typename ModifyOp>
285 void modifyValue(
const Coord& xyz,
const ModifyOp& op);
288 template<
typename ModifyOp>
289 void modifyValueAndActiveState(
const Coord& xyz,
const ModifyOp& op);
297 bool isValueOn(
const Coord& xyz)
const {
return mValueMask.isOn(this->coordToOffset(xyz)); }
299 bool isValueOn(
Index offset)
const { assert(offset < SIZE);
return mValueMask.isOn(offset); }
308 void fill(
const CoordBBox& bbox,
bool value,
bool active =
true);
313 void fill(
const bool& value);
315 void fill(
const bool& value,
bool active);
328 template<
typename DenseT>
347 template<
typename DenseT>
352 template<
typename AccessorT>
353 const bool&
getValueAndCache(
const Coord& xyz, AccessorT&)
const {
return this->getValue(xyz);}
357 template<
typename AccessorT>
362 template<
typename AccessorT>
363 void setValueAndCache(
const Coord& xyz,
bool val, AccessorT&) { this->setValueOn(xyz, val); }
368 template<
typename AccessorT>
373 template<
typename AccessorT>
376 this->setValueOff(xyz, value);
382 template<
typename ModifyOp,
typename AccessorT>
385 this->modifyValue(xyz, op);
390 template<
typename ModifyOp,
typename AccessorT>
393 this->modifyValueAndActiveState(xyz, op);
399 template<
typename AccessorT>
402 this->setActiveState(xyz, on);
408 template<
typename AccessorT>
411 return this->probeValue(xyz, val);
416 template<
typename AccessorT>
422 const bool&
getFirstValue()
const {
if (mValueMask.isOn(0))
return Buffer::sOn;
else return Buffer::sOff; }
426 const bool&
getLastValue()
const {
if (mValueMask.isOn(SIZE-1))
return Buffer::sOn;
else return Buffer::sOff; }
431 bool isConstant(
bool& constValue,
bool& state,
bool tolerance = 0)
const;
438 bool medianAll()
const;
459 void resetBackground(
bool oldBackground,
bool newBackground);
461 void negate() { mBuffer.mData.toggle(); }
463 template<MergePolicy Policy>
464 void merge(
const LeafNode& other,
bool bg =
false,
bool otherBG =
false);
465 template<MergePolicy Policy>
void merge(
bool tileValue,
bool tileActive);
477 template<
typename OtherType>
491 template<
typename OtherType>
505 template<
typename OtherType>
508 template<
typename CombineOp>
510 template<
typename CombineOp>
511 void combine(
bool,
bool valueIsActive, CombineOp& op);
513 template<
typename CombineOp,
typename OtherType >
514 void combine2(
const LeafNode& other,
const OtherType&,
bool valueIsActive, CombineOp&);
515 template<
typename CombineOp,
typename OtherNodeT >
516 void combine2(
bool,
const OtherNodeT& other,
bool valueIsActive, CombineOp&);
517 template<
typename CombineOp,
typename OtherNodeT >
518 void combine2(
const LeafNode& b0,
const OtherNodeT& b1, CombineOp&);
524 template<
typename AccessorT>
526 template<
typename NodeT>
528 template<
typename NodeT>
530 template<
typename NodeT>
532 template<
typename ArrayT>
void getNodes(ArrayT&)
const {}
536 void addTile(
Index level,
const Coord&,
bool val,
bool active);
537 void addTile(
Index offset,
bool val,
bool active);
538 template<
typename AccessorT>
539 void addTileAndCache(
Index level,
const Coord&,
bool val,
bool active, AccessorT&);
544 template<
typename AccessorT>
547 template<
typename AccessorT>
549 template<
typename NodeT,
typename AccessorT>
553 if (!(std::is_same<NodeT, LeafNode>::value))
return nullptr;
554 return reinterpret_cast<NodeT*
>(
this);
561 template<
typename AccessorT>
564 template<
typename AccessorT>
566 template<
typename NodeT,
typename AccessorT>
570 if (!(std::is_same<NodeT, LeafNode>::value))
return nullptr;
571 return reinterpret_cast<const NodeT*
>(
this);
584 template<
typename MaskIterT,
typename NodeT,
typename ValueT>
588 public SparseIteratorBase<MaskIterT, ValueIter<MaskIterT, NodeT, ValueT>, NodeT, ValueT>
595 const bool&
getItem(
Index pos)
const {
return this->parent().getValue(pos); }
596 const bool&
getValue()
const {
return this->getItem(this->pos()); }
599 void setItem(
Index pos,
bool value)
const { this->parent().setValueOnly(pos, value); }
601 void setValue(
bool value)
const { this->setItem(this->pos(), value); }
604 template<
typename ModifyOp>
605 void modifyItem(
Index n,
const ModifyOp& op)
const { this->parent().modifyValue(n, op); }
607 template<
typename ModifyOp>
608 void modifyValue(
const ModifyOp& op)
const { this->modifyItem(this->pos(), op); }
612 template<
typename MaskIterT,
typename NodeT>
618 MaskIterT, ChildIter<MaskIterT, NodeT>, NodeT, bool>(iter, parent) {}
621 template<
typename NodeT,
typename ValueT>
623 MaskDenseIter, DenseIter<NodeT, ValueT>, NodeT, void, ValueT>
633 value = this->parent().getValue(pos);
642 void unsetItem(
Index pos,
const ValueT& val)
const {this->parent().setValueOnly(pos, val);}
647 using ValueOnCIter = ValueIter<MaskOnIter, const LeafNode, const bool>;
758 template<Index Log2Dim>
766 template<Index Log2Dim>
771 , mOrigin(xyz & (~(DIM - 1)))
776 template<Index Log2Dim>
781 , mOrigin(xyz & (~(DIM - 1)))
789 template<Index Log2Dim>
793 , mBuffer(other.mBuffer)
794 , mOrigin(other.mOrigin)
795 , mTransientData(other.mTransientData)
801 template<Index Log2Dim>
802 template<
typename ValueT>
807 , mTransientData(other.mTransientData)
811 static inline bool convertValue(
const ValueT& val) {
return bool(val); }
815 mBuffer.setValue(i, Local::convertValue(other.mBuffer[i]));
820 template<Index Log2Dim>
821 template<
typename ValueT>
826 , mBuffer(background)
828 , mTransientData(other.mTransientData)
833 template<Index Log2Dim>
834 template<
typename ValueT>
840 , mTransientData(other.mTransientData)
844 template<Index Log2Dim>
852 , mOrigin(xyz & (~(DIM - 1)))
853 , mTransientData(trans)
857 template<Index Log2Dim>
858 template<
typename ValueT>
865 , mTransientData(other.mTransientData)
868 if (mValueMask.
isOn(i)) {
875 template<Index Log2Dim>
885 template<Index Log2Dim>
890 return sizeof(*this);
894 template<Index Log2Dim>
899 return sizeof(*this);
903 template<Index Log2Dim>
908 if (bbox.isInside(this_bbox))
return;
912 for(; iter; ++iter) this_bbox.expand(this->offsetToLocalCoord(iter.pos()));
913 this_bbox.translate(this->
origin());
915 bbox.expand(this_bbox);
920 template<Index Log2Dim>
921 template<
typename OtherType, Index OtherLog2Dim>
926 return (Log2Dim == OtherLog2Dim && mValueMask == other->
getValueMask());
930 template<Index Log2Dim>
934 std::ostringstream ostr;
935 ostr <<
"LeafNode @" << mOrigin <<
": ";
936 for (
Index32 n = 0; n <
SIZE; ++n) ostr << (mValueMask.
isOn(n) ?
'#' :
'.');
944 template<Index Log2Dim>
948 assert ((xyz[0] & (DIM-1u)) < DIM && (xyz[1] & (DIM-1u)) < DIM && (xyz[2] & (DIM-1u)) < DIM);
949 return ((xyz[0] & (DIM-1u)) << 2*Log2Dim)
950 + ((xyz[1] & (DIM-1u)) << Log2Dim)
951 + (xyz[2] & (DIM-1u));
955 template<Index Log2Dim>
959 assert(n < (1 << 3*Log2Dim));
961 xyz.setX(n >> 2*Log2Dim);
962 n &= ((1 << 2*Log2Dim) - 1);
963 xyz.setY(n >> Log2Dim);
964 xyz.setZ(n & ((1 << Log2Dim) - 1));
969 template<Index Log2Dim>
980 template<Index Log2Dim>
988 template<Index Log2Dim>
996 template<Index Log2Dim>
1006 bool background =
false;
1008 background = *
static_cast<const bool*
>(bgPtr);
1010 this->
clip(clipBBox, background);
1014 template<Index Log2Dim>
1019 mValueMask.
load(is);
1021 is.read(reinterpret_cast<char*>(&mOrigin),
sizeof(Coord::ValueType) * 3);
1025 mBuffer.mData.load(is);
1030 int8_t numBuffers = 0;
1031 is.read(reinterpret_cast<char*>(&numBuffers),
sizeof(int8_t));
1035 std::unique_ptr<bool[]> buf{
new bool[
SIZE]};
1036 io::readData<bool>(is, buf.get(),
SIZE,
true);
1039 mBuffer.mData.setOff();
1041 if (buf[i]) mBuffer.mData.setOn(i);
1044 if (numBuffers > 1) {
1047 for (
int i = 1; i < numBuffers; ++i) {
1048 io::readData<bool>(is, buf.get(),
SIZE,
true);
1055 template<Index Log2Dim>
1060 mValueMask.
save(os);
1062 os.write(reinterpret_cast<const char*>(&mOrigin),
sizeof(Coord::ValueType) * 3);
1064 mBuffer.mData.save(os);
1071 template<Index Log2Dim>
1075 return mOrigin == other.mOrigin &&
1077 mBuffer == other.mBuffer;
1081 template<Index Log2Dim>
1092 template<Index Log2Dim>
1096 if (!mValueMask.
isConstant(state))
return false;
1099 if (!tolerance && !(mBuffer.mData.isOn() || mBuffer.mData.isOff()))
return false;
1101 constValue = mBuffer.mData.isOn();
1107 template<Index Log2Dim>
1111 const Index countTrue = mBuffer.mData.countOn();
1112 return countTrue > (NUM_VALUES >> 1);
1115 template<Index Log2Dim>
1121 state = countTrueOn > (NUM_VALUES >> 1);
1125 template<Index Log2Dim>
1129 const NodeMaskType tmp = mBuffer.mData & (!mValueMask);
1131 state = countTrueOff > (NUM_VALUES >> 1);
1138 template<Index Log2Dim>
1145 template<Index Log2Dim>
1149 assert(offset < SIZE);
1154 template<Index Log2Dim>
1155 template<
typename AccessorT>
1158 bool val,
bool active, AccessorT&)
1160 this->
addTile(level, xyz, val, active);
1167 template<Index Log2Dim>
1172 if (mBuffer.mData.isOn(this->coordToOffset(xyz)))
return Buffer::sOn;
else return Buffer::sOff;
1176 template<Index Log2Dim>
1180 assert(offset < SIZE);
1182 if (mBuffer.mData.isOn(offset))
return Buffer::sOn;
else return Buffer::sOff;
1186 template<Index Log2Dim>
1191 val = mBuffer.mData.isOn(offset);
1192 return mValueMask.
isOn(offset);
1196 template<Index Log2Dim>
1204 template<Index Log2Dim>
1208 assert(offset < SIZE);
1209 mValueMask.
setOn(offset);
1210 mBuffer.mData.set(offset, val);
1214 template<Index Log2Dim>
1222 template<Index Log2Dim>
1230 template<Index Log2Dim>
1238 template<Index Log2Dim>
1242 assert(offset < SIZE);
1243 mValueMask.
setOff(offset);
1244 mBuffer.mData.set(offset, val);
1248 template<Index Log2Dim>
1249 template<
typename ModifyOp>
1253 bool val = mBuffer.mData.isOn(offset);
1255 mBuffer.mData.set(offset, val);
1256 mValueMask.
setOn(offset);
1260 template<Index Log2Dim>
1261 template<
typename ModifyOp>
1269 template<Index Log2Dim>
1270 template<
typename ModifyOp>
1275 bool val = mBuffer.mData.isOn(offset), state = mValueMask.
isOn(offset);
1277 mBuffer.mData.set(offset, val);
1278 mValueMask.
set(offset, state);
1285 template<Index Log2Dim>
1289 if (newBackground != oldBackground) {
1293 mBuffer.mData = (mBuffer.mData & mValueMask) | bgMask;
1301 template<Index Log2Dim>
1302 template<MergePolicy Policy>
1309 const Index n = iter.pos();
1310 if (mValueMask.
isOff(n)) {
1311 mBuffer.mData.set(n, other.mBuffer.mData.isOn(n));
1312 mValueMask.
setOn(n);
1318 template<Index Log2Dim>
1319 template<MergePolicy Policy>
1325 if (!tileActive)
return;
1327 if (tileValue) mBuffer.mData |= !mValueMask;
1328 else mBuffer.mData &= mValueMask;
1337 template<Index Log2Dim>
1338 template<
typename OtherType>
1346 template<Index Log2Dim>
1347 template<
typename OtherType>
1356 template<Index Log2Dim>
1357 template<
typename OtherType>
1369 template<Index Log2Dim>
1374 if (!clipBBox.hasOverlap(nodeBBox)) {
1376 this->
fill(nodeBBox, background,
false);
1377 }
else if (clipBBox.isInside(nodeBBox)) {
1387 nodeBBox.intersect(clipBBox);
1389 int &x = xyz.x(), &y = xyz.y(), &z = xyz.z();
1390 for (x = nodeBBox.min().x(); x <= nodeBBox.max().x(); ++x) {
1391 for (y = nodeBBox.min().y(); y <= nodeBBox.max().y(); ++y) {
1392 for (z = nodeBBox.min().z(); z <= nodeBBox.max().z(); ++z) {
1409 template<Index Log2Dim>
1414 clippedBBox.intersect(bbox);
1415 if (!clippedBBox)
return;
1417 for (
Int32 x = clippedBBox.min().x(); x <= clippedBBox.max().x(); ++x) {
1418 const Index offsetX = (x & (DIM-1u))<<2*Log2Dim;
1419 for (
Int32 y = clippedBBox.min().y(); y <= clippedBBox.max().y(); ++y) {
1420 const Index offsetXY = offsetX + ((y & (DIM-1u))<< Log2Dim);
1421 for (
Int32 z = clippedBBox.min().z(); z <= clippedBBox.max().z(); ++z) {
1422 const Index offset = offsetXY + (z & (DIM-1u));
1423 mValueMask.
set(offset, active);
1424 mBuffer.mData.set(offset, value);
1430 template<Index Log2Dim>
1434 mBuffer.
fill(value);
1437 template<Index Log2Dim>
1441 mBuffer.
fill(value);
1442 mValueMask.
set(active);
1449 template<Index Log2Dim>
1450 template<
typename DenseT>
1454 using DenseValueType =
typename DenseT::ValueType;
1456 const size_t xStride = dense.xStride(), yStride = dense.yStride(), zStride = dense.zStride();
1457 const Coord&
min = dense.bbox().min();
1458 DenseValueType* t0 = dense.data() + zStride * (bbox.min()[2] - min[2]);
1459 const Int32 n0 = bbox.min()[2] & (DIM-1u);
1460 for (
Int32 x = bbox.min()[0], ex = bbox.max()[0] + 1; x < ex; ++x) {
1461 DenseValueType* t1 = t0 + xStride * (x - min[0]);
1463 for (
Int32 y = bbox.min()[1], ey = bbox.max()[1] + 1; y < ey; ++y) {
1464 DenseValueType* t2 = t1 + yStride * (y - min[1]);
1466 for (
Int32 z = bbox.min()[2], ez = bbox.max()[2] + 1; z < ez; ++z, t2 += zStride) {
1467 *t2 = DenseValueType(mBuffer.mData.isOn(n2++));
1474 template<Index Log2Dim>
1475 template<
typename DenseT>
1478 bool background,
bool tolerance)
1480 using DenseValueType =
typename DenseT::ValueType;
1482 inline static bool toBool(
const DenseValueType& v) {
return !
math::isZero(v); }
1485 const size_t xStride = dense.xStride(), yStride = dense.yStride(), zStride = dense.zStride();
1486 const Coord&
min = dense.bbox().min();
1487 const DenseValueType* s0 = dense.data() + zStride * (bbox.min()[2] - min[2]);
1488 const Int32 n0 = bbox.min()[2] & (DIM-1u);
1489 for (
Int32 x = bbox.min()[0], ex = bbox.max()[0] + 1; x < ex; ++x) {
1490 const DenseValueType* s1 = s0 + xStride * (x - min[0]);
1492 for (
Int32 y = bbox.min()[1], ey = bbox.max()[1] + 1; y < ey; ++y) {
1493 const DenseValueType* s2 = s1 + yStride * (y - min[1]);
1495 for (
Int32 z = bbox.min()[2], ez = bbox.max()[2]+1; z < ez; ++z, ++n2, s2 += zStride) {
1497 if (tolerance || (background == Local::toBool(*s2))) {
1498 mValueMask.setOff(n2);
1499 mBuffer.mData.set(n2, background);
1501 mValueMask.setOn(n2);
1502 mBuffer.mData.set(n2, Local::toBool(*s2));
1513 template<Index Log2Dim>
1514 template<
typename CombineOp>
1520 bool result =
false, aVal = mBuffer.mData.isOn(i), bVal = other.mBuffer.mData.isOn(i);
1522 .setAIsActive(mValueMask.isOn(i))
1525 .setResultRef(result));
1527 mBuffer.mData.set(i, result);
1532 template<Index Log2Dim>
1533 template<
typename CombineOp>
1538 args.
setBRef(value).setBIsActive(valueIsActive);
1540 bool result =
false, aVal = mBuffer.mData.isOn(i);
1542 .setAIsActive(mValueMask.isOn(i))
1543 .setResultRef(result));
1545 mBuffer.mData.set(i, result);
1553 template<Index Log2Dim>
1554 template<
typename CombineOp,
typename OtherType>
1557 bool valueIsActive, CombineOp& op)
1560 args.
setBRef(value).setBIsActive(valueIsActive);
1562 bool result =
false, aVal = other.mBuffer.mData.isOn(i);
1565 .setResultRef(result));
1567 mBuffer.mData.set(i, result);
1572 template<Index Log2Dim>
1573 template<
typename CombineOp,
typename OtherNodeT>
1576 bool valueIsActive, CombineOp& op)
1579 args.
setARef(value).setAIsActive(valueIsActive);
1581 bool result =
false, bVal = other.mBuffer.mData.isOn(i);
1583 .setBIsActive(other.valueMask().isOn(i))
1584 .setResultRef(result));
1586 mBuffer.mData.set(i, result);
1591 template<Index Log2Dim>
1592 template<
typename CombineOp,
typename OtherNodeT>
1599 mValueMask.set(i, b0.
valueMask().
isOn(i) || b1.valueMask().isOn(i));
1601 bool result =
false, b0Val = b0.mBuffer.mData.isOn(i), b1Val = b1.mBuffer.mData.isOn(i);
1605 .setBIsActive(b1.valueMask().isOn(i))
1606 .setResultRef(result));
1608 mBuffer.mData.set(i, result);
1617 #endif // OPENVDB_TREE_LEAF_NODE_BOOL_HAS_BEEN_INCLUDED bool isChildMaskOn(Index) const
Definition: LeafNodeBool.h:712
ChildOffCIter cbeginChildOff() const
Definition: LeafNodeBool.h:684
OPENVDB_API uint32_t getFormatVersion(std::ios_base &)
Return the file format version number associated with the given input stream.
ChildAllCIter endChildAll() const
Definition: LeafNodeBool.h:698
const bool & getFirstValue() const
Return a const reference to the first entry in the buffer.
Definition: LeafNodeBool.h:422
NodeMaskType mValueMask
Bitmask that determines which voxels are active.
Definition: LeafNodeBool.h:724
void setValueOffAndCache(const Coord &xyz, bool value, AccessorT &)
Change the value of the voxel at the given coordinates and mark it as inactive.
Definition: LeafNodeBool.h:374
void getOrigin(Int32 &x, Int32 &y, Int32 &z) const
Return the grid index coordinates of this node's local origin.
Definition: LeafNodeBool.h:179
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.
Definition: LeafNode.h:1204
ValueType medianAll(ValueType *tmp=nullptr) const
Computes the median value of all the active AND inactive voxels in this node.
Definition: LeafNode.h:1511
static Index64 onTileCount()
Definition: LeafNodeBool.h:144
void readBuffers(std::istream &is, bool fromHalf=false)
Read buffers from a stream.
Definition: LeafNode.h:1304
void unsetItem(Index pos, const ValueT &val) const
Definition: LeafNodeBool.h:642
const bool & getValueAndCache(const Coord &xyz, AccessorT &) const
Return the value of the voxel at the given coordinates.
Definition: LeafNodeBool.h:353
void setOn(Index32 n)
Set the nth bit on.
Definition: NodeMasks.h:452
Index64 offLeafVoxelCount() const
Definition: LeafNodeBool.h:143
SharedPtr< LeafNodeType > Ptr
Definition: LeafNodeBool.h:36
ValueOnCIter cbeginValueOn() const
Definition: LeafNode.h:297
void modifyValueAndActiveState(const Coord &xyz, const ModifyOp &op)
Apply a functor to the voxel at the given coordinates.
Definition: LeafNode.h:456
Definition: NodeMasks.h:208
ValueAllIter endValueAll()
Definition: LeafNodeBool.h:677
bool operator==(const LeafNode &other) const
Check for buffer, state and origin equivalence.
Definition: LeafNode.h:1419
ValueOffCIter endValueOff() const
Definition: LeafNodeBool.h:673
const LeafNode * probeLeaf(const Coord &) const
Return a const pointer to this node.
Definition: LeafNodeBool.h:560
Definition: version.h.in:250
DenseIter< LeafNode, bool > ChildAllIter
Definition: LeafNodeBool.h:656
General-purpose arithmetic and comparison routines, most of which accept arbitrary value types (or at...
ValueOffCIter beginValueOff() const
Definition: LeafNodeBool.h:663
LeafNode()
Default constructor.
Definition: LeafNode.h:902
bool isValueOn(Index offset) const
Return true if the voxel at the given offset is active.
Definition: LeafNodeBool.h:299
void setValueMaskOn(Index n)
Definition: LeafNodeBool.h:717
static Index numValues()
Definition: LeafNodeBool.h:128
ChildAllIter endChildAll()
Definition: LeafNodeBool.h:699
CombineArgs & setBRef(const BValueType &b)
Redirect the B value to a new external source.
Definition: Types.h:623
static void evalNodeOrigin(Coord &xyz)
Compute the origin of the leaf node that contains the voxel with the given coordinates.
Definition: LeafNodeBool.h:721
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.
Definition: LeafNode.h:1687
void setItem(Index pos, bool value) const
Definition: LeafNodeBool.h:599
void setValueOff(const Coord &xyz)
Mark the voxel at the given coordinates as inactive but don't change its value.
Definition: LeafNode.h:407
CombineArgs & setARef(const AValueType &a)
Redirect the A value to a new external source.
Definition: Types.h:621
const NodeT * probeConstNode(const Coord &) const
This function exists only to enable template instantiation.
Definition: LeafNodeBool.h:531
void readTopology(std::istream &is, bool fromHalf=false)
Read in just the topology.
Definition: LeafNode.h:1268
void setValueOnlyAndCache(const Coord &xyz, bool val, AccessorT &)
Change the value of the voxel at the given coordinates but preserve its state.
Definition: LeafNodeBool.h:369
ValueOnCIter cbeginValueOn() const
Definition: LeafNodeBool.h:659
const NodeT * probeConstNodeAndCache(const Coord &, AccessorT &) const
Return a const pointer to this node.
Definition: LeafNodeBool.h:567
static Index32 leafCount()
Definition: LeafNodeBool.h:133
Base class for iterators over internal and leaf nodes.
Definition: Iterator.h:29
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...
Definition: LeafNode.h:435
bool operator!=(const Vec3< T0 > &v0, const Vec3< T1 > &v1)
Inequality operator, does exact floating point comparisons.
Definition: Vec3.h:481
LeafNode specialization for values of type bool that stores both the active states and the values of ...
Definition: LeafNodeBool.h:28
Buffer mBuffer
Bitmask representing the values of voxels.
Definition: LeafNodeBool.h:726
ValueIter< MaskDenseIter, const LeafNode, const bool > ValueAllCIter
Definition: LeafNodeBool.h:651
void combine(const LeafNode &other, CombineOp &op)
Definition: LeafNode.h:1720
Index64 onVoxelCount() const
Return the number of active voxels.
Definition: LeafNodeBool.h:139
DenseIter< const LeafNode, const bool > ChildAllCIter
Definition: LeafNodeBool.h:657
ChildIter(const MaskIterT &iter, NodeT *parent)
Definition: LeafNodeBool.h:617
void setActiveStateAndCache(const Coord &xyz, bool on, AccessorT &)
Set the active state of the voxel at the given coordinates without changing its value.
Definition: LeafNodeBool.h:400
CoordBBox getNodeBoundingBox() const
Return the bounding box of this node, i.e., the full index space spanned by this leaf node...
Definition: LeafNode.h:167
NodeMaskType & getValueMask()
Definition: LeafNodeBool.h:710
void setValueOn(const Coord &xyz)
Mark the voxel at the given coordinates as active but don't change its value.
Definition: LeafNode.h:417
ChildOnIter endChildOn()
Definition: LeafNodeBool.h:693
ChildOffIter beginChildOff()
Definition: LeafNodeBool.h:686
std::shared_ptr< T > SharedPtr
Definition: Types.h:114
void setValue(Index i, const ValueType &)
Set the i'th value of this buffer to the specified value.
Definition: LeafBuffer.h:232
void setValue(bool value) const
Definition: LeafNodeBool.h:601
void setActiveState(const Coord &xyz, bool on)
Set the active state of the voxel at the given coordinates but don't change its value.
Definition: LeafNode.h:1095
bool isChildMaskOff(Index) const
Definition: LeafNodeBool.h:713
typename BaseT::NonConstValueType NonConstValueT
Definition: LeafNodeBool.h:626
Definition: NodeMasks.h:270
void addLeaf(LeafNode *)
This function exists only to enable template instantiation.
Definition: LeafNodeBool.h:523
void resetBackground(const ValueType &oldBackground, const ValueType &newBackground)
Replace inactive occurrences of oldBackground with newBackground, and inactive occurrences of -oldBac...
Definition: LeafNode.h:1609
void setValueMask(Index n, bool on)
Definition: LeafNodeBool.h:716
const ValueType & getValue(const Coord &xyz) const
Return the value of the voxel at the given coordinates.
Definition: LeafNode.h:1045
void addLeafAndCache(LeafNode *, AccessorT &)
This function exists only to enable template instantiation.
Definition: LeafNodeBool.h:525
static const Index SIZE
Definition: LeafNode.h:53
This struct collects both input and output arguments to "grid combiner" functors used with the tree::...
Definition: Types.h:568
ValueOffCIter cbeginValueOff() const
Definition: LeafNodeBool.h:662
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...
Definition: LeafNode.h:1231
ValueAllIter beginValueAll()
Definition: LeafNodeBool.h:667
void setValuesOff()
Mark all voxels as inactive but don't change their values.
Definition: LeafNodeBool.h:294
static Coord offsetToLocalCoord(Index n)
Return the local coordinates for a linear table offset, where offset 0 has coordinates (0...
Definition: LeafNode.h:1020
void swap(Buffer &other)
Exchange this node's data buffer with the given data buffer without changing the active states of the...
Definition: LeafNodeBool.h:212
const Coord & origin() const
Return the grid index coordinates of this node's local origin.
Definition: LeafNode.h:173
const bool & getLastValue() const
Return a const reference to the last entry in the buffer.
Definition: LeafNodeBool.h:426
ValueOffIter endValueOff()
Definition: LeafNodeBool.h:674
ValueOnCIter cendValueOn() const
Definition: LeafNodeBool.h:669
void modifyItem(Index n, const ModifyOp &op) const
Definition: LeafNodeBool.h:605
void denseFill(const CoordBBox &bbox, bool val, bool on=true)
Set all voxels within an axis-aligned box to the specified value and active state.
Definition: LeafNodeBool.h:310
void nodeCount(std::vector< Index32 > &) const
no-op
Definition: LeafNodeBool.h:135
void merge(const LeafNode &)
Definition: LeafNode.h:1630
typename std::remove_const< UnsetItemT >::type NonConstValueType
Definition: Iterator.h:184
void modifyValue(const ModifyOp &op) const
Definition: LeafNodeBool.h:608
NodeT * probeNodeAndCache(const Coord &, AccessorT &)
Return a pointer to this node.
Definition: LeafNodeBool.h:550
Index64 offVoxelCount() const
Return the number of inactive voxels.
Definition: LeafNodeBool.h:141
Index64 memUsage() const
Return the memory in bytes occupied by this node.
Definition: LeafNode.h:1429
bool ValueType
Definition: LeafNodeBool.h:33
ValueIter< MaskOnIter, const LeafNode, const bool > ValueOnCIter
Definition: LeafNodeBool.h:647
ChildOffCIter cendChildOff() const
Definition: LeafNodeBool.h:694
static bool hasActiveTiles()
Return false since leaf nodes never contain tiles.
Definition: LeafNodeBool.h:302
ValueOffIter beginValueOff()
Definition: LeafNodeBool.h:664
void setValueMaskOff(Index n)
Definition: LeafNodeBool.h:718
static void getNodeLog2Dims(std::vector< Index > &dims)
Definition: LeafNodeBool.h:130
static const Index LOG2DIM
Definition: LeafNode.h:48
ValueIter(const MaskIterT &iter, NodeT *parent)
Definition: LeafNodeBool.h:593
void setValueOnly(Index offset, bool val)
Set the value of the voxel at the given offset but don't change its active state. ...
Definition: LeafNodeBool.h:254
BBox< Coord > CoordBBox
Definition: NanoVDB.h:2535
void setValueMask(const NodeMaskType &mask)
Definition: LeafNodeBool.h:711
void addTile(Index level, const Coord &, const ValueType &, bool)
Definition: LeafNode.h:1580
static Index coordToOffset(const Coord &xyz)
Return the linear table offset of the given global or local coordinates.
Definition: LeafNode.h:1010
ValueAllCIter cendValueAll() const
Definition: LeafNodeBool.h:675
uint64_t Index64
Definition: Types.h:53
bool isZero(const Type &x)
Return true if x is exactly equal to zero.
Definition: Math.h:337
ChildOnIter beginChildOn()
Definition: LeafNodeBool.h:683
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.
Definition: LeafNode.h:1103
Tag dispatch class that distinguishes topology copy constructors from deep copy constructors.
Definition: Types.h:683
ChildOnCIter endChildOn() const
Definition: LeafNodeBool.h:692
static Index getValueLevel(const Coord &)
Return the level (0) at which leaf node values reside.
Definition: LeafNodeBool.h:244
void evalActiveBoundingBox(CoordBBox &bbox, bool visitVoxels=true) const
Definition: LeafNode.h:1449
const NodeMaskType & getValueMask() const
Definition: LeafNodeBool.h:708
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.
Definition: LeafNode.h:1696
LeafNode * touchLeafAndCache(const Coord &, AccessorT &)
Return a pointer to this node.
Definition: LeafNodeBool.h:545
bool isValueMaskOn() const
Definition: LeafNodeBool.h:705
void setOrigin(const Coord &origin)
Set the grid index coordinates of this node's local origin.
Definition: LeafNodeBool.h:174
bool operator!=(const LeafNode &other) const
Definition: LeafNode.h:201
ChildAllCIter cbeginChildAll() const
Definition: LeafNodeBool.h:687
static Index size()
Definition: LeafNodeBool.h:127
bool isDense() const
Return true if this node only contains active voxels.
Definition: LeafNodeBool.h:150
bool isValueMaskOff(Index n) const
Definition: LeafNodeBool.h:706
void set(Index32 n, bool On)
Set the nth bit to the specified state.
Definition: NodeMasks.h:462
LeafNode * probeLeafAndCache(const Coord &, AccessorT &)
Return a pointer to this node.
Definition: LeafNodeBool.h:548
Templated block class to hold specific data types and a fixed number of values determined by Log2Dim...
Definition: LeafNode.h:37
void writeBuffers(std::ostream &os, bool toHalf=false) const
Write buffers to a stream.
Definition: LeafNode.h:1402
NodeT * stealNode(const Coord &, const ValueType &, bool)
This function exists only to enable template instantiation.
Definition: LeafNodeBool.h:527
Index64 onLeafVoxelCount() const
Definition: LeafNodeBool.h:142
void getNodes(ArrayT &) const
This function exists only to enable template instantiation.
Definition: LeafNodeBool.h:532
void writeTopology(std::ostream &os, bool toHalf=false) const
Write out just the topology.
Definition: LeafNode.h:1276
static Index32 nonLeafCount()
Definition: LeafNodeBool.h:136
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 acti...
Definition: LeafNode.h:1467
bool isValueMaskOff() const
Definition: LeafNodeBool.h:707
ValueOnIter beginValueOn()
Definition: LeafNodeBool.h:661
bool isAllocated() const
Return true if memory for this node's buffer has been allocated.
Definition: LeafNodeBool.h:154
Index32 countOn() const
Return the total number of on bits.
Definition: NodeMasks.h:443
void setValueOff(Index offset)
Mark the voxel at the given offset as inactive but don't change its value.
Definition: LeafNodeBool.h:259
Coord mOrigin
Global grid index coordinates (x,y,z) of the local origin of this node.
Definition: LeafNodeBool.h:728
bool BuildType
Definition: LeafNodeBool.h:32
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...
Definition: LeafNodeBool.h:409
ChildAllCIter cendChildAll() const
Definition: LeafNodeBool.h:697
Index medianOn(ValueType &value, ValueType *tmp=nullptr) const
Computes the median value of all the active voxels in this node.
Definition: LeafNode.h:1529
Definition: Exceptions.h:13
const Coord & origin() const
Return the grid index coordinates of this node's local origin.
Definition: LeafNodeBool.h:177
ValueOffCIter cendValueOff() const
Definition: LeafNodeBool.h:672
Buffer & buffer()
Definition: LeafNodeBool.h:214
Definition: PointDataGrid.h:170
ChildAllIter beginChildAll()
Definition: LeafNodeBool.h:689
const bool & getItem(Index pos) const
Definition: LeafNodeBool.h:595
bool isEmpty() const
Return true if this node has no active voxels.
Definition: LeafNodeBool.h:148
ValueOnCIter beginValueOn() const
Definition: LeafNodeBool.h:660
const LeafNode * probeConstLeafAndCache(const Coord &, AccessorT &) const
Return a const pointer to this node.
Definition: LeafNodeBool.h:565
typename NodeMaskType::OffIterator MaskOffIter
Definition: LeafNodeBool.h:581
ValueAllCIter beginValueAll() const
Definition: LeafNodeBool.h:666
bool isConstant(bool &isOn) const
Definition: NodeMasks.h:526
OnIterator beginOn() const
Definition: NodeMasks.h:352
ValueIter< MaskOffIter, const LeafNode, const bool > ValueOffCIter
Definition: LeafNodeBool.h:649
ChildIter< MaskOnIter, LeafNode > ChildOnIter
Definition: LeafNodeBool.h:652
void modifyValueAndActiveStateAndCache(const Coord &xyz, const ModifyOp &op, AccessorT &)
Definition: LeafNodeBool.h:391
Index32 transientData() const
Return the transient data value.
Definition: LeafNodeBool.h:191
void stealNodes(ArrayT &, const ValueType &, bool)
This function exists only to enable template instantiation.
Definition: LeafNodeBool.h:533
static Index getChildDim()
Definition: LeafNodeBool.h:131
std::string str() const
Return a string representation of this node.
Definition: LeafNode.h:997
static Index dim()
Return the number of voxels in each dimension.
Definition: LeafNodeBool.h:126
ValueAllCIter endValueAll() const
Definition: LeafNodeBool.h:676
Index32 Index
Definition: Types.h:54
LeafNode * touchLeaf(const Coord &)
Return a pointer to this node.
Definition: LeafNodeBool.h:543
ChildOffCIter beginChildOff() const
Definition: LeafNodeBool.h:685
void addTileAndCache(Index, const Coord &, const ValueType &, bool, AccessorT &)
Definition: LeafNode.h:1597
const NodeMaskType & getValueMask() const
Definition: LeafNode.h:854
static Index getLevel()
Definition: LeafNodeBool.h:129
CoordBBox getNodeBoundingBox() const
Return the bounding box of this node, i.e., the full index space spanned by this leaf node...
Definition: LeafNodeBool.h:171
bool allocate()
Allocate memory for this node's buffer if it has not already been allocated.
Definition: LeafNodeBool.h:158
ValueIter< MaskDenseIter, LeafNode, const bool > ValueAllIter
Definition: LeafNodeBool.h:650
Index64 memUsageIfLoaded() const
Definition: LeafNode.h:1439
Coord offsetToGlobalCoord(Index n) const
Return the global coordinates for a linear table offset.
Definition: LeafNode.h:1034
bool isOn(Index32 n) const
Return true if the nth bit is on.
Definition: NodeMasks.h:502
void fill(const ValueType &)
Populate this buffer with a constant value.
Definition: LeafBuffer.h:274
ChildIter< MaskOnIter, const LeafNode > ChildOnCIter
Definition: LeafNodeBool.h:653
bool getItem(Index pos, void *&child, NonConstValueT &value) const
Definition: LeafNodeBool.h:631
void setValueOn(Index offset)
Mark the voxel at the given offset as active but don't change its value.
Definition: LeafNodeBool.h:269
ValueOnCIter endValueOn() const
Definition: LeafNodeBool.h:670
static Index getValueLevelAndCache(const Coord &, AccessorT &)
Return the LEVEL (=0) at which leaf node values reside.
Definition: LeafNodeBool.h:417
bool probeValue(const Coord &xyz, ValueType &val) const
Return true if the voxel at the given coordinates is active.
Definition: LeafNode.h:1061
OffIterator beginOff() const
Definition: NodeMasks.h:354
void setValueOff(const Coord &xyz)
Mark the voxel at the given coordinates as inactive but don't change its value.
Definition: LeafNodeBool.h:257
const Buffer & buffer() const
Definition: LeafNodeBool.h:213
NodeT * probeNode(const Coord &)
This function exists only to enable template instantiation.
Definition: LeafNodeBool.h:529
OPENVDB_API const void * getGridBackgroundValuePtr(std::ios_base &)
Return a pointer to the background value of the grid currently being read from or written to the give...
Index32 countOff() const
Return the total number of on bits.
Definition: NodeMasks.h:450
void voxelizeActiveTiles(bool=true)
No-op.
Definition: LeafNodeBool.h:469
void clip(const CoordBBox &, const ValueType &background)
Set all voxels that lie outside the given axis-aligned box to the background.
Definition: LeafNode.h:1121
ChildOnCIter cendChildOn() const
Definition: LeafNodeBool.h:691
ValueAllCIter cbeginValueAll() const
Definition: LeafNodeBool.h:665
void setValueOn(const Coord &xyz)
Mark the voxel at the given coordinates as active but don't change its value.
Definition: LeafNodeBool.h:267
Bit mask for the internal and leaf nodes of VDB. This is a 64-bit implementation. ...
Definition: NodeMasks.h:307
void setTransientData(Index32 transientData)
Set the transient data value.
Definition: LeafNodeBool.h:193
ChildIter< MaskOffIter, LeafNode > ChildOffIter
Definition: LeafNodeBool.h:654
const LeafNode * probeConstLeaf(const Coord &) const
Return a const pointer to this node.
Definition: LeafNodeBool.h:563
bool isConstant(ValueType &firstValue, bool &state, const ValueType &tolerance=zeroVal< ValueType >()) const
Definition: LeafNode.h:1475
bool isInactive() const
Return true if all of this node's values are inactive.
Definition: LeafNodeBool.h:457
bool isValueOnAndCache(const Coord &xyz, AccessorT &) const
Return true if the voxel at the given coordinates is active.
Definition: LeafNodeBool.h:358
const NodeMaskType & valueMask() const
Definition: LeafNode.h:856
const bool & getValue() const
Definition: LeafNodeBool.h:596
ChildAllCIter beginChildAll() const
Definition: LeafNodeBool.h:688
bool isChildMaskOff() const
Definition: LeafNodeBool.h:714
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 ...
Definition: LeafNode.h:1679
bool isValueMaskOn(Index n) const
Definition: LeafNodeBool.h:704
static Index64 offTileCount()
Definition: LeafNodeBool.h:145
ChildIter< MaskOffIter, const LeafNode > ChildOffCIter
Definition: LeafNodeBool.h:655
LeafNode * probeLeaf(const Coord &)
Return a pointer to this node.
Definition: LeafNodeBool.h:546
ValueIter()
Definition: LeafNodeBool.h:592
DenseIter(const MaskDenseIter &iter, NodeT *parent)
Definition: LeafNodeBool.h:629
ChildOffCIter endChildOff() const
Definition: LeafNodeBool.h:695
void setValue(const Coord &xyz, bool val)
Set the value of the voxel at the given coordinates and mark the voxel as active. ...
Definition: LeafNodeBool.h:274
Index medianOff(ValueType &value, ValueType *tmp=nullptr) const
Computes the median value of all the inactive voxels in this node.
Definition: LeafNode.h:1553
~LeafNode()
Destructor.
Definition: LeafNode.h:990
const NodeMaskType & valueMask() const
Definition: LeafNodeBool.h:709
Definition: NodeMasks.h:239
void setValuesOn()
Mark all voxels as active but don't change their values.
Definition: LeafNodeBool.h:292
typename NodeMaskType::DenseIterator MaskDenseIter
Definition: LeafNodeBool.h:582
#define OPENVDB_VERSION_NAME
The version namespace name for this library version.
Definition: version.h.in:121
ChildOnCIter cbeginChildOn() const
Definition: LeafNodeBool.h:681
Base class for sparse iterators over internal and leaf nodes.
Definition: Iterator.h:114
void setValueAndCache(const Coord &xyz, bool val, AccessorT &)
Change the value of the voxel at the given coordinates and mark it as active.
Definition: LeafNodeBool.h:363
ValueIter< MaskOffIter, LeafNode, const bool > ValueOffIter
Definition: LeafNodeBool.h:648
void setActiveState(Index offset, bool on)
Set the active state of the voxel at the given offset but don't change its value. ...
Definition: LeafNodeBool.h:249
void prune(const ValueType &=zeroVal< ValueType >())
This function exists only to enable template instantiation.
Definition: LeafNodeBool.h:522
void load(std::istream &is)
Definition: NodeMasks.h:569
bool resultIsActive() const
Definition: Types.h:632
ValueType combine(const ValueType &v0, const ValueType &v1, const ValueType &v2, const openvdb::Vec3d &w)
Combine different value types.
Definition: AttributeTransferUtil.h:141
void getOrigin(Coord &origin) const
Return the grid index coordinates of this node's local origin.
Definition: LeafNodeBool.h:178
ChildOnCIter beginChildOn() const
Definition: LeafNodeBool.h:682
int32_t Int32
Definition: Types.h:56
ValueOnIter endValueOn()
Definition: LeafNodeBool.h:671
bool isValueOn(const Coord &xyz) const
Return true if the voxel at the given coordinates is active.
Definition: LeafNodeBool.h:297
void save(std::ostream &os) const
Definition: NodeMasks.h:565
void setOff(Index32 n)
Set the nth bit off.
Definition: NodeMasks.h:457
DenseIter()
Definition: LeafNodeBool.h:628
Base class for dense iterators over internal and leaf nodes.
Definition: Iterator.h:178
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...
Definition: LeafNodeBool.h:383
void combine2(const LeafNode &other, const OtherType &, bool valueIsActive, CombineOp &)
Definition: LeafNode.h:1760
bool isOff(Index32 n) const
Return true if the nth bit is off.
Definition: NodeMasks.h:508
bool operator==(const Vec3< T0 > &v0, const Vec3< T1 > &v1)
Equality operator, does exact floating point comparisons.
Definition: Vec3.h:473
ValueIter< MaskOnIter, LeafNode, const bool > ValueOnIter
Definition: LeafNodeBool.h:646
typename NodeMaskType::OnIterator MaskOnIter
Definition: LeafNodeBool.h:580
void negate()
Definition: LeafNodeBool.h:461
ChildOffIter endChildOff()
Definition: LeafNodeBool.h:696
uint32_t Index32
Definition: Types.h:52
#define OPENVDB_USE_VERSION_NAMESPACE
Definition: version.h.in:212
const LeafNode * probeLeafAndCache(const Coord &, AccessorT &) const
Return a const pointer to this node.
Definition: LeafNodeBool.h:562
Tag dispatch class that distinguishes constructors during file input.
Definition: Types.h:689
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.
Definition: LeafNode.h:1161
ChildIter()
Definition: LeafNodeBool.h:616