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>
83 template<
typename ValueType>
89 template<
typename ValueType>
91 template<
typename ValueType>
126 bool isEmpty()
const {
return mValueMask.isOff(); }
128 bool isDense()
const {
return mValueMask.isOn(); }
145 void evalActiveBoundingBox(
CoordBBox& bbox,
bool visitVoxels =
true)
const;
152 void setOrigin(
const Coord& origin) { mOrigin = origin; }
155 const Coord&
origin()
const {
return mOrigin; }
156 void getOrigin(Coord& origin)
const { origin = mOrigin; }
161 static Index coordToOffset(
const Coord& xyz);
164 static Coord offsetToLocalCoord(
Index n);
166 Coord offsetToGlobalCoord(
Index n)
const;
168 #if OPENVDB_ABI_VERSION_NUMBER >= 9 176 std::string str()
const;
180 template<
typename OtherType, Index OtherLog2Dim>
200 void readTopology(std::istream&,
bool fromHalf =
false);
202 void writeTopology(std::ostream&,
bool toHalf =
false)
const;
205 void readBuffers(std::istream&,
bool fromHalf =
false);
206 void readBuffers(std::istream& is,
const CoordBBox&,
bool fromHalf =
false);
208 void writeBuffers(std::ostream&,
bool toHalf =
false)
const;
214 const bool& getValue(
const Coord& xyz)
const;
216 const bool& getValue(
Index offset)
const;
221 bool probeValue(
const Coord& xyz,
bool& val)
const;
227 void setActiveState(
const Coord& xyz,
bool on);
232 void setValueOnly(
const Coord& xyz,
bool val);
234 void setValueOnly(
Index offset,
bool val) { assert(offset<SIZE); mBuffer.setValue(offset,val); }
237 void setValueOff(
const Coord& xyz) { mValueMask.setOff(this->coordToOffset(xyz)); }
242 void setValueOff(
const Coord& xyz,
bool val);
244 void setValueOff(
Index offset,
bool val);
247 void setValueOn(
const Coord& xyz) { mValueMask.setOn(this->coordToOffset(xyz)); }
252 void setValueOn(
const Coord& xyz,
bool val);
254 void setValue(
const Coord& xyz,
bool val) { this->setValueOn(xyz, val); }
256 void setValueOn(
Index offset,
bool val);
260 template<
typename ModifyOp>
261 void modifyValue(
Index offset,
const ModifyOp& op);
264 template<
typename ModifyOp>
265 void modifyValue(
const Coord& xyz,
const ModifyOp& op);
268 template<
typename ModifyOp>
269 void modifyValueAndActiveState(
const Coord& xyz,
const ModifyOp& op);
277 bool isValueOn(
const Coord& xyz)
const {
return mValueMask.isOn(this->coordToOffset(xyz)); }
279 bool isValueOn(
Index offset)
const { assert(offset < SIZE);
return mValueMask.isOn(offset); }
293 void fill(
const bool& value);
295 void fill(
const bool& value,
bool active);
308 template<
typename DenseT>
327 template<
typename DenseT>
332 template<
typename AccessorT>
333 const bool&
getValueAndCache(
const Coord& xyz, AccessorT&)
const {
return this->getValue(xyz);}
337 template<
typename AccessorT>
342 template<
typename AccessorT>
343 void setValueAndCache(
const Coord& xyz,
bool val, AccessorT&) { this->setValueOn(xyz, val); }
348 template<
typename AccessorT>
353 template<
typename AccessorT>
356 this->setValueOff(xyz, value);
362 template<
typename ModifyOp,
typename AccessorT>
365 this->modifyValue(xyz, op);
370 template<
typename ModifyOp,
typename AccessorT>
373 this->modifyValueAndActiveState(xyz, op);
379 template<
typename AccessorT>
382 this->setActiveState(xyz, on);
388 template<
typename AccessorT>
391 return this->probeValue(xyz, val);
396 template<
typename AccessorT>
402 const bool&
getFirstValue()
const {
if (mValueMask.isOn(0))
return Buffer::sOn;
else return Buffer::sOff; }
406 const bool&
getLastValue()
const {
if (mValueMask.isOn(SIZE-1))
return Buffer::sOn;
else return Buffer::sOff; }
411 bool isConstant(
bool& constValue,
bool& state,
bool tolerance = 0)
const;
418 bool medianAll()
const;
439 void resetBackground(
bool oldBackground,
bool newBackground);
441 void negate() { mBuffer.mData.toggle(); }
443 template<MergePolicy Policy>
444 void merge(
const LeafNode& other,
bool bg =
false,
bool otherBG =
false);
445 template<MergePolicy Policy>
void merge(
bool tileValue,
bool tileActive);
457 template<
typename OtherType>
471 template<
typename OtherType>
485 template<
typename OtherType>
488 template<
typename CombineOp>
490 template<
typename CombineOp>
491 void combine(
bool,
bool valueIsActive, CombineOp& op);
493 template<
typename CombineOp,
typename OtherType >
494 void combine2(
const LeafNode& other,
const OtherType&,
bool valueIsActive, CombineOp&);
495 template<
typename CombineOp,
typename OtherNodeT >
496 void combine2(
bool,
const OtherNodeT& other,
bool valueIsActive, CombineOp&);
497 template<
typename CombineOp,
typename OtherNodeT >
498 void combine2(
const LeafNode& b0,
const OtherNodeT& b1, CombineOp&);
504 template<
typename AccessorT>
506 template<
typename NodeT>
508 template<
typename NodeT>
510 template<
typename NodeT>
512 template<
typename ArrayT>
void getNodes(ArrayT&)
const {}
516 void addTile(
Index level,
const Coord&,
bool val,
bool active);
517 void addTile(
Index offset,
bool val,
bool active);
518 template<
typename AccessorT>
519 void addTileAndCache(
Index level,
const Coord&,
bool val,
bool active, AccessorT&);
524 template<
typename AccessorT>
527 template<
typename AccessorT>
529 template<
typename NodeT,
typename AccessorT>
534 return reinterpret_cast<NodeT*
>(
this);
541 template<
typename AccessorT>
544 template<
typename AccessorT>
546 template<
typename NodeT,
typename AccessorT>
551 return reinterpret_cast<const NodeT*
>(
this);
564 template<
typename MaskIterT,
typename NodeT,
typename ValueT>
568 public SparseIteratorBase<MaskIterT, ValueIter<MaskIterT, NodeT, ValueT>, NodeT, ValueT>
575 const bool&
getItem(
Index pos)
const {
return this->parent().getValue(pos); }
576 const bool&
getValue()
const {
return this->getItem(this->pos()); }
579 void setItem(
Index pos,
bool value)
const { this->parent().setValueOnly(pos, value); }
581 void setValue(
bool value)
const { this->setItem(this->pos(), value); }
584 template<
typename ModifyOp>
585 void modifyItem(
Index n,
const ModifyOp& op)
const { this->parent().modifyValue(n, op); }
587 template<
typename ModifyOp>
588 void modifyValue(
const ModifyOp& op)
const { this->modifyItem(this->pos(), op); }
592 template<
typename MaskIterT,
typename NodeT>
598 MaskIterT, ChildIter<MaskIterT, NodeT>, NodeT, bool>(iter, parent) {}
601 template<
typename NodeT,
typename ValueT>
603 MaskDenseIter, DenseIter<NodeT, ValueT>, NodeT, void, ValueT>
613 value = this->parent().getValue(pos);
622 void unsetItem(
Index pos,
const ValueT& val)
const {this->parent().setValueOnly(pos, val);}
627 using ValueOnCIter = ValueIter<MaskOnIter, const LeafNode, const bool>;
709 #if OPENVDB_ABI_VERSION_NUMBER >= 9 740 template<Index Log2Dim>
748 template<Index Log2Dim>
753 , mOrigin(xyz & (~(DIM - 1)))
758 template<Index Log2Dim>
763 , mOrigin(xyz & (~(DIM - 1)))
771 template<Index Log2Dim>
775 , mBuffer(other.mBuffer)
776 , mOrigin(other.mOrigin)
777 #if OPENVDB_ABI_VERSION_NUMBER >= 9
778 , mTransientData(other.mTransientData)
785 template<Index Log2Dim>
786 template<
typename ValueT>
791 #if OPENVDB_ABI_VERSION_NUMBER >= 9
792 , mTransientData(other.mTransientData)
797 static inline bool convertValue(
const ValueT& val) {
return bool(val); }
801 mBuffer.setValue(i, Local::convertValue(other.mBuffer[i]));
806 template<Index Log2Dim>
807 template<
typename ValueT>
812 , mBuffer(background)
814 #if OPENVDB_ABI_VERSION_NUMBER >= 9
815 , mTransientData(other.mTransientData)
821 template<Index Log2Dim>
822 template<
typename ValueT>
828 #if OPENVDB_ABI_VERSION_NUMBER >= 9
829 , mTransientData(other.mTransientData)
835 template<Index Log2Dim>
836 template<
typename ValueT>
843 #if OPENVDB_ABI_VERSION_NUMBER >= 9
844 , mTransientData(other.mTransientData)
847 if (offValue) {
if (!onValue) mBuffer.mData.toggle();
else mBuffer.mData.setOn(); }
851 template<Index Log2Dim>
861 template<Index Log2Dim>
866 return sizeof(*this);
870 template<Index Log2Dim>
875 return sizeof(*this);
879 template<Index Log2Dim>
884 if (bbox.isInside(this_bbox))
return;
888 for(; iter; ++iter) this_bbox.expand(this->offsetToLocalCoord(iter.pos()));
889 this_bbox.translate(this->
origin());
891 bbox.expand(this_bbox);
896 template<Index Log2Dim>
897 template<
typename OtherType, Index OtherLog2Dim>
902 return (Log2Dim == OtherLog2Dim && mValueMask == other->
getValueMask());
906 template<Index Log2Dim>
910 std::ostringstream ostr;
911 ostr <<
"LeafNode @" << mOrigin <<
": ";
912 for (
Index32 n = 0; n <
SIZE; ++n) ostr << (mValueMask.
isOn(n) ?
'#' :
'.');
920 template<Index Log2Dim>
924 assert ((xyz[0] & (DIM-1u)) < DIM && (xyz[1] & (DIM-1u)) < DIM && (xyz[2] & (DIM-1u)) < DIM);
925 return ((xyz[0] & (DIM-1u)) << 2*Log2Dim)
926 + ((xyz[1] & (DIM-1u)) << Log2Dim)
927 + (xyz[2] & (DIM-1u));
931 template<Index Log2Dim>
935 assert(n < (1 << 3*Log2Dim));
937 xyz.setX(n >> 2*Log2Dim);
938 n &= ((1 << 2*Log2Dim) - 1);
939 xyz.setY(n >> Log2Dim);
940 xyz.setZ(n & ((1 << Log2Dim) - 1));
945 template<Index Log2Dim>
956 template<Index Log2Dim>
964 template<Index Log2Dim>
972 template<Index Log2Dim>
982 bool background =
false;
984 background = *
static_cast<const bool*
>(bgPtr);
986 this->
clip(clipBBox, background);
990 template<Index Log2Dim>
997 is.read(reinterpret_cast<char*>(&mOrigin),
sizeof(Coord::ValueType) * 3);
1001 mBuffer.mData.load(is);
1006 int8_t numBuffers = 0;
1007 is.read(reinterpret_cast<char*>(&numBuffers),
sizeof(int8_t));
1011 std::unique_ptr<bool[]> buf{
new bool[
SIZE]};
1012 io::readData<bool>(is, buf.get(),
SIZE,
true);
1015 mBuffer.mData.setOff();
1017 if (buf[i]) mBuffer.mData.setOn(i);
1020 if (numBuffers > 1) {
1023 for (
int i = 1; i < numBuffers; ++i) {
1024 io::readData<bool>(is, buf.get(),
SIZE,
true);
1031 template<Index Log2Dim>
1036 mValueMask.
save(os);
1038 os.write(reinterpret_cast<const char*>(&mOrigin),
sizeof(Coord::ValueType) * 3);
1040 mBuffer.mData.save(os);
1047 template<Index Log2Dim>
1051 return mOrigin == other.mOrigin &&
1053 mBuffer == other.mBuffer;
1057 template<Index Log2Dim>
1068 template<Index Log2Dim>
1072 if (!mValueMask.
isConstant(state))
return false;
1075 if (!tolerance && !(mBuffer.mData.isOn() || mBuffer.mData.isOff()))
return false;
1077 constValue = mBuffer.mData.isOn();
1083 template<Index Log2Dim>
1087 const Index countTrue = mBuffer.mData.countOn();
1088 return countTrue > (NUM_VALUES >> 1);
1091 template<Index Log2Dim>
1097 state = countTrueOn > (NUM_VALUES >> 1);
1101 template<Index Log2Dim>
1105 const NodeMaskType tmp = mBuffer.mData & (!mValueMask);
1107 state = countTrueOff > (NUM_VALUES >> 1);
1114 template<Index Log2Dim>
1121 template<Index Log2Dim>
1125 assert(offset < SIZE);
1130 template<Index Log2Dim>
1131 template<
typename AccessorT>
1134 bool val,
bool active, AccessorT&)
1136 this->
addTile(level, xyz, val, active);
1143 template<Index Log2Dim>
1148 if (mBuffer.mData.isOn(this->coordToOffset(xyz)))
return Buffer::sOn;
else return Buffer::sOff;
1152 template<Index Log2Dim>
1156 assert(offset < SIZE);
1158 if (mBuffer.mData.isOn(offset))
return Buffer::sOn;
else return Buffer::sOff;
1162 template<Index Log2Dim>
1167 val = mBuffer.mData.isOn(offset);
1168 return mValueMask.
isOn(offset);
1172 template<Index Log2Dim>
1180 template<Index Log2Dim>
1184 assert(offset < SIZE);
1185 mValueMask.
setOn(offset);
1186 mBuffer.mData.set(offset, val);
1190 template<Index Log2Dim>
1198 template<Index Log2Dim>
1206 template<Index Log2Dim>
1214 template<Index Log2Dim>
1218 assert(offset < SIZE);
1219 mValueMask.
setOff(offset);
1220 mBuffer.mData.set(offset, val);
1224 template<Index Log2Dim>
1225 template<
typename ModifyOp>
1229 bool val = mBuffer.mData.isOn(offset);
1231 mBuffer.mData.set(offset, val);
1232 mValueMask.
setOn(offset);
1236 template<Index Log2Dim>
1237 template<
typename ModifyOp>
1245 template<Index Log2Dim>
1246 template<
typename ModifyOp>
1251 bool val = mBuffer.mData.isOn(offset), state = mValueMask.
isOn(offset);
1253 mBuffer.mData.set(offset, val);
1254 mValueMask.
set(offset, state);
1261 template<Index Log2Dim>
1265 if (newBackground != oldBackground) {
1269 mBuffer.mData = (mBuffer.mData & mValueMask) | bgMask;
1277 template<Index Log2Dim>
1278 template<MergePolicy Policy>
1285 const Index n = iter.pos();
1286 if (mValueMask.
isOff(n)) {
1287 mBuffer.mData.set(n, other.mBuffer.mData.isOn(n));
1288 mValueMask.
setOn(n);
1294 template<Index Log2Dim>
1295 template<MergePolicy Policy>
1301 if (!tileActive)
return;
1303 if (tileValue) mBuffer.mData |= !mValueMask;
1304 else mBuffer.mData &= mValueMask;
1313 template<Index Log2Dim>
1314 template<
typename OtherType>
1322 template<Index Log2Dim>
1323 template<
typename OtherType>
1332 template<Index Log2Dim>
1333 template<
typename OtherType>
1345 template<Index Log2Dim>
1350 if (!clipBBox.hasOverlap(nodeBBox)) {
1352 this->
fill(nodeBBox, background,
false);
1353 }
else if (clipBBox.isInside(nodeBBox)) {
1363 nodeBBox.intersect(clipBBox);
1365 int &x = xyz.x(), &y = xyz.y(), &z = xyz.z();
1366 for (x = nodeBBox.min().x(); x <= nodeBBox.max().x(); ++x) {
1367 for (y = nodeBBox.min().y(); y <= nodeBBox.max().y(); ++y) {
1368 for (z = nodeBBox.min().z(); z <= nodeBBox.max().z(); ++z) {
1385 template<Index Log2Dim>
1390 clippedBBox.intersect(bbox);
1391 if (!clippedBBox)
return;
1393 for (
Int32 x = clippedBBox.min().x(); x <= clippedBBox.max().x(); ++x) {
1394 const Index offsetX = (x & (DIM-1u))<<2*Log2Dim;
1395 for (
Int32 y = clippedBBox.min().y(); y <= clippedBBox.max().y(); ++y) {
1396 const Index offsetXY = offsetX + ((y & (DIM-1u))<< Log2Dim);
1397 for (
Int32 z = clippedBBox.min().z(); z <= clippedBBox.max().z(); ++z) {
1398 const Index offset = offsetXY + (z & (DIM-1u));
1399 mValueMask.
set(offset, active);
1400 mBuffer.mData.set(offset, value);
1406 template<Index Log2Dim>
1410 mBuffer.
fill(value);
1413 template<Index Log2Dim>
1417 mBuffer.
fill(value);
1418 mValueMask.
set(active);
1425 template<Index Log2Dim>
1426 template<
typename DenseT>
1430 using DenseValueType =
typename DenseT::ValueType;
1432 const size_t xStride = dense.xStride(), yStride = dense.yStride(), zStride = dense.zStride();
1433 const Coord&
min = dense.bbox().min();
1434 DenseValueType* t0 = dense.data() + zStride * (bbox.min()[2] - min[2]);
1435 const Int32 n0 = bbox.min()[2] & (DIM-1u);
1436 for (
Int32 x = bbox.min()[0], ex = bbox.max()[0] + 1; x < ex; ++x) {
1437 DenseValueType* t1 = t0 + xStride * (x - min[0]);
1439 for (
Int32 y = bbox.min()[1], ey = bbox.max()[1] + 1; y < ey; ++y) {
1440 DenseValueType* t2 = t1 + yStride * (y - min[1]);
1442 for (
Int32 z = bbox.min()[2], ez = bbox.max()[2] + 1; z < ez; ++z, t2 += zStride) {
1443 *t2 = DenseValueType(mBuffer.mData.isOn(n2++));
1450 template<Index Log2Dim>
1451 template<
typename DenseT>
1454 bool background,
bool tolerance)
1456 using DenseValueType =
typename DenseT::ValueType;
1458 inline static bool toBool(
const DenseValueType& v) {
return !
math::isZero(v); }
1461 const size_t xStride = dense.xStride(), yStride = dense.yStride(), zStride = dense.zStride();
1462 const Coord&
min = dense.bbox().min();
1463 const DenseValueType* s0 = dense.data() + zStride * (bbox.min()[2] - min[2]);
1464 const Int32 n0 = bbox.min()[2] & (DIM-1u);
1465 for (
Int32 x = bbox.min()[0], ex = bbox.max()[0] + 1; x < ex; ++x) {
1466 const DenseValueType* s1 = s0 + xStride * (x - min[0]);
1468 for (
Int32 y = bbox.min()[1], ey = bbox.max()[1] + 1; y < ey; ++y) {
1469 const DenseValueType* s2 = s1 + yStride * (y - min[1]);
1471 for (
Int32 z = bbox.min()[2], ez = bbox.max()[2]+1; z < ez; ++z, ++n2, s2 += zStride) {
1473 if (tolerance || (background == Local::toBool(*s2))) {
1474 mValueMask.setOff(n2);
1475 mBuffer.mData.set(n2, background);
1477 mValueMask.setOn(n2);
1478 mBuffer.mData.set(n2, Local::toBool(*s2));
1489 template<Index Log2Dim>
1490 template<
typename CombineOp>
1496 bool result =
false, aVal = mBuffer.mData.isOn(i), bVal = other.mBuffer.mData.isOn(i);
1498 .setAIsActive(mValueMask.isOn(i))
1501 .setResultRef(result));
1503 mBuffer.mData.set(i, result);
1508 template<Index Log2Dim>
1509 template<
typename CombineOp>
1514 args.
setBRef(value).setBIsActive(valueIsActive);
1516 bool result =
false, aVal = mBuffer.mData.isOn(i);
1518 .setAIsActive(mValueMask.isOn(i))
1519 .setResultRef(result));
1521 mBuffer.mData.set(i, result);
1529 template<Index Log2Dim>
1530 template<
typename CombineOp,
typename OtherType>
1533 bool valueIsActive, CombineOp& op)
1536 args.
setBRef(value).setBIsActive(valueIsActive);
1538 bool result =
false, aVal = other.mBuffer.mData.isOn(i);
1541 .setResultRef(result));
1543 mBuffer.mData.set(i, result);
1548 template<Index Log2Dim>
1549 template<
typename CombineOp,
typename OtherNodeT>
1552 bool valueIsActive, CombineOp& op)
1555 args.
setARef(value).setAIsActive(valueIsActive);
1557 bool result =
false, bVal = other.mBuffer.mData.isOn(i);
1559 .setBIsActive(other.valueMask().isOn(i))
1560 .setResultRef(result));
1562 mBuffer.mData.set(i, result);
1567 template<Index Log2Dim>
1568 template<
typename CombineOp,
typename OtherNodeT>
1575 mValueMask.set(i, b0.
valueMask().
isOn(i) || b1.valueMask().isOn(i));
1577 bool result =
false, b0Val = b0.mBuffer.mData.isOn(i), b1Val = b1.mBuffer.mData.isOn(i);
1581 .setBIsActive(b1.valueMask().isOn(i))
1582 .setResultRef(result));
1584 mBuffer.mData.set(i, result);
1593 #endif // OPENVDB_TREE_LEAF_NODE_BOOL_HAS_BEEN_INCLUDED ChildIter< MaskOffIter, const LeafNode > ChildOffCIter
Definition: LeafNodeBool.h:635
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:229
ValueOffIter endValueOff()
Definition: LeafNodeBool.h:654
Index32 Index
Definition: Types.h:54
bool operator==(const LeafNode &other) const
Check for buffer, state and origin equivalence.
Definition: LeafNode.h:1431
ValueIter(const MaskIterT &iter, NodeT *parent)
Definition: LeafNodeBool.h:573
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:1173
Base class for iterators over internal and leaf nodes.
Definition: Iterator.h:29
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:1216
Index64 onLeafVoxelCount() const
Definition: LeafNodeBool.h:120
bool isOff(Index32 n) const
Return true if the nth bit is off.
Definition: NodeMasks.h:508
void getOrigin(Coord &origin) const
Return the grid index coordinates of this node's local origin.
Definition: LeafNodeBool.h:156
ChildT * child
Definition: GridBuilder.h:1289
void addLeaf(LeafNode *)
This function exists only to enable template instantiation.
Definition: LeafNodeBool.h:503
void setValueMask(Index n, bool on)
Definition: LeafNodeBool.h:696
const LeafNode * probeLeaf(const Coord &) const
Return a const pointer to this node.
Definition: LeafNodeBool.h:540
ChildOnCIter endChildOn() const
Definition: LeafNodeBool.h:672
uint64_t Index64
Definition: Types.h:53
void load(std::istream &is)
Definition: NodeMasks.h:569
ChildAllCIter endChildAll() const
Definition: LeafNodeBool.h:678
LeafNode * touchLeafAndCache(const Coord &, AccessorT &)
Return a pointer to this node.
Definition: LeafNodeBool.h:525
ChildOffIter endChildOff()
Definition: LeafNodeBool.h:676
bool isValueMaskOff() const
Definition: LeafNodeBool.h:687
void setOff(Index32 n)
Set the nth bit off.
Definition: NodeMasks.h:457
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:437
ValueOnCIter cbeginValueOn() const
Definition: LeafNodeBool.h:639
ValueType medianAll(ValueType *tmp=nullptr) const
Computes the median value of all the active AND inactive voxels in this node.
Definition: LeafNode.h:1523
void readBuffers(std::istream &is, bool fromHalf=false)
Read buffers from a stream.
Definition: LeafNode.h:1316
DenseIter(const MaskDenseIter &iter, NodeT *parent)
Definition: LeafNodeBool.h:609
bool ValueType
Definition: LeafNodeBool.h:33
void stealNodes(ArrayT &, const ValueType &, bool)
This function exists only to enable template instantiation.
Definition: LeafNodeBool.h:513
void prune(const ValueType &=zeroVal< ValueType >())
This function exists only to enable template instantiation.
Definition: LeafNodeBool.h:502
void setValueOff(const Coord &xyz)
Mark the voxel at the given coordinates as inactive but don't change its value.
Definition: LeafNode.h:409
void modifyValueAndActiveState(const Coord &xyz, const ModifyOp &op)
Apply a functor to the voxel at the given coordinates.
Definition: LeafNode.h:458
General-purpose arithmetic and comparison routines, most of which accept arbitrary value types (or at...
ChildOffIter beginChildOff()
Definition: LeafNodeBool.h:666
void setValueMaskOn(Index n)
Definition: LeafNodeBool.h:697
Bit mask for the internal and leaf nodes of VDB. This is a 64-bit implementation. ...
Definition: NodeMasks.h:307
bool isAllocated() const
Return true if memory for this node's buffer has been allocated.
Definition: LeafNodeBool.h:132
typename std::remove_const< UnsetItemT >::type NonConstValueType
Definition: Iterator.h:184
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:1107
bool isEmpty() const
Return true if this node has no active voxels.
Definition: LeafNodeBool.h:126
LeafNode()
Default constructor.
Definition: LeafNode.h:906
void combine(const LeafNode &other, CombineOp &op)
Definition: LeafNode.h:1732
LeafNode specialization for values of type bool that stores both the active states and the values of ...
Definition: LeafNodeBool.h:28
NodeT * probeNodeAndCache(const Coord &, AccessorT &)
Return a pointer to this node.
Definition: LeafNodeBool.h:530
void getNodes(ArrayT &) const
This function exists only to enable template instantiation.
Definition: LeafNodeBool.h:512
void readTopology(std::istream &is, bool fromHalf=false)
Read in just the topology.
Definition: LeafNode.h:1280
const ValueType & getValue(const Coord &xyz) const
Return the value of the voxel at the given coordinates.
Definition: LeafNode.h:1057
void setValueMaskOff(Index n)
Definition: LeafNodeBool.h:698
LeafNode * probeLeaf(const Coord &)
Return a pointer to this node.
Definition: LeafNodeBool.h:526
bool getItem(Index pos, void *&child, NonConstValueT &value) const
Definition: LeafNodeBool.h:611
bool isDense() const
Return true if this node only contains active voxels.
Definition: LeafNodeBool.h:128
bool isValueOn(Index offset) const
Return true if the voxel at the given offset is active.
Definition: LeafNodeBool.h:279
static Coord offsetToLocalCoord(Index n)
Return the local coordinates for a linear table offset, where offset 0 has coordinates (0...
Definition: LeafNode.h:1032
ValueAllCIter endValueAll() const
Definition: LeafNodeBool.h:656
void resetBackground(const ValueType &oldBackground, const ValueType &newBackground)
Replace inactive occurrences of oldBackground with newBackground, and inactive occurrences of -oldBac...
Definition: LeafNode.h:1621
ValueAllIter beginValueAll()
Definition: LeafNodeBool.h:647
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:1699
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
Definition: NodeMasks.h:270
ChildIter< MaskOffIter, LeafNode > ChildOffIter
Definition: LeafNodeBool.h:634
ChildAllIter beginChildAll()
Definition: LeafNodeBool.h:669
Definition: PointDataGrid.h:170
ChildOnCIter cbeginChildOn() const
Definition: LeafNodeBool.h:661
bool isValueMaskOn(Index n) const
Definition: LeafNodeBool.h:684
static Index32 nonLeafCount()
Definition: LeafNodeBool.h:114
Buffer & buffer()
Definition: LeafNodeBool.h:194
static Index getValueLevelAndCache(const Coord &, AccessorT &)
Return the LEVEL (=0) at which leaf node values reside.
Definition: LeafNodeBool.h:397
const Coord & origin() const
Return the grid index coordinates of this node's local origin.
Definition: LeafNode.h:173
void fill(const ValueType &)
Populate this buffer with a constant value.
Definition: LeafBuffer.h:280
void setValueOn(const Coord &xyz)
Mark the voxel at the given coordinates as active but don't change its value.
Definition: LeafNode.h:419
Index32 transientData() const
Return the transient data value.
Definition: LeafNodeBool.h:170
bool isValueMaskOff(Index n) const
Definition: LeafNodeBool.h:686
ChildOnCIter cendChildOn() const
Definition: LeafNodeBool.h:671
typename NodeMaskType::DenseIterator MaskDenseIter
Definition: LeafNodeBool.h:562
ValueOffCIter beginValueOff() const
Definition: LeafNodeBool.h:643
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:1243
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:363
void setValueOn(const Coord &xyz)
Mark the voxel at the given coordinates as active but don't change its value.
Definition: LeafNodeBool.h:247
ValueAllCIter cbeginValueAll() const
Definition: LeafNodeBool.h:645
bool isChildMaskOff(Index) const
Definition: LeafNodeBool.h:693
ChildOnIter beginChildOn()
Definition: LeafNodeBool.h:663
void addTile(Index level, const Coord &, const ValueType &, bool)
Definition: LeafNode.h:1592
static Index getLevel()
Definition: LeafNodeBool.h:107
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:354
void unsetItem(Index pos, const ValueT &val) const
Definition: LeafNodeBool.h:622
static const Index SIZE
Definition: LeafNode.h:53
static Index coordToOffset(const Coord &xyz)
Return the linear table offset of the given global or local coordinates.
Definition: LeafNode.h:1022
static Index getValueLevel(const Coord &)
Return the level (0) at which leaf node values reside.
Definition: LeafNodeBool.h:224
void addLeafAndCache(LeafNode *, AccessorT &)
This function exists only to enable template instantiation.
Definition: LeafNodeBool.h:505
Index64 onVoxelCount() const
Return the number of active voxels.
Definition: LeafNodeBool.h:117
void setValuesOn()
Mark all voxels as active but don't change their values.
Definition: LeafNodeBool.h:272
ValueOnCIter cendValueOn() const
Definition: LeafNodeBool.h:649
CombineArgs & setARef(const AValueType &a)
Redirect the A value to a new external source.
Definition: Types.h:582
ValueAllCIter beginValueAll() const
Definition: LeafNodeBool.h:646
ValueIter< MaskDenseIter, const LeafNode, const bool > ValueAllCIter
Definition: LeafNodeBool.h:631
ValueIter()
Definition: LeafNodeBool.h:572
BBox< Coord > CoordBBox
Definition: NanoVDB.h:1809
ValueOffCIter cendValueOff() const
Definition: LeafNodeBool.h:652
void getOrigin(Int32 &x, Int32 &y, Int32 &z) const
Return the grid index coordinates of this node's local origin.
Definition: LeafNodeBool.h:157
int32_t Int32
Definition: Types.h:56
static Index getChildDim()
Definition: LeafNodeBool.h:109
static void evalNodeOrigin(Coord &xyz)
Compute the origin of the leaf node that contains the voxel with the given coordinates.
Definition: LeafNodeBool.h:701
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:234
void merge(const LeafNode &)
Definition: LeafNode.h:1642
ChildAllCIter beginChildAll() const
Definition: LeafNodeBool.h:668
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:1479
static Index size()
Definition: LeafNodeBool.h:105
Index64 memUsage() const
Return the memory in bytes occupied by this node.
Definition: LeafNode.h:1441
Index32 countOn() const
Return the total number of on bits.
Definition: NodeMasks.h:443
ValueIter< MaskDenseIter, LeafNode, const bool > ValueAllIter
Definition: LeafNodeBool.h:630
ValueIter< MaskOffIter, const LeafNode, const bool > ValueOffCIter
Definition: LeafNodeBool.h:629
Index64 offLeafVoxelCount() const
Definition: LeafNodeBool.h:121
const bool & getValue() const
Definition: LeafNodeBool.h:576
void evalActiveBoundingBox(CoordBBox &bbox, bool visitVoxels=true) const
Definition: LeafNode.h:1461
static const Index LOG2DIM
Definition: LeafNode.h:48
void setValuesOff()
Mark all voxels as inactive but don't change their values.
Definition: LeafNodeBool.h:274
NodeT * probeNode(const Coord &)
This function exists only to enable template instantiation.
Definition: LeafNodeBool.h:509
void modifyValueAndActiveStateAndCache(const Coord &xyz, const ModifyOp &op, AccessorT &)
Definition: LeafNodeBool.h:371
bool operator!=(const LeafNode &other) const
Definition: LeafNode.h:203
ChildOnCIter beginChildOn() const
Definition: LeafNodeBool.h:662
ValueIter< MaskOnIter, LeafNode, const bool > ValueOnIter
Definition: LeafNodeBool.h:626
void voxelizeActiveTiles(bool=true)
No-op.
Definition: LeafNodeBool.h:449
void setItem(Index pos, bool value) const
Definition: LeafNodeBool.h:579
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:254
const Coord & origin() const
Return the grid index coordinates of this node's local origin.
Definition: LeafNodeBool.h:155
bool isChildMaskOn(Index) const
Definition: LeafNodeBool.h:692
ChildAllCIter cendChildAll() const
Definition: LeafNodeBool.h:677
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:1115
void writeBuffers(std::ostream &os, bool toHalf=false) const
Write buffers to a stream.
Definition: LeafNode.h:1414
ValueAllCIter cendValueAll() const
Definition: LeafNodeBool.h:655
OPENVDB_API uint32_t getFormatVersion(std::ios_base &)
Return the file format version number associated with the given input stream.
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:1708
Buffer mBuffer
Bitmask representing the values of voxels.
Definition: LeafNodeBool.h:706
static Index64 onTileCount()
Definition: LeafNodeBool.h:122
ValueOnCIter beginValueOn() const
Definition: LeafNodeBool.h:640
Index medianOn(ValueType &value, ValueType *tmp=nullptr) const
Computes the median value of all the active voxels in this node.
Definition: LeafNode.h:1541
bool isValueMaskOn() const
Definition: LeafNodeBool.h:685
void set(Index32 n, bool On)
Set the nth bit to the specified state.
Definition: NodeMasks.h:462
bool operator!=(const Vec3< T0 > &v0, const Vec3< T1 > &v1)
Inequality operator, does exact floating point comparisons.
Definition: Vec3.h:481
OnIterator beginOn() const
Definition: NodeMasks.h:352
ChildOnIter endChildOn()
Definition: LeafNodeBool.h:673
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:380
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:343
Definition: Exceptions.h:13
void setValue(bool value) const
Definition: LeafNodeBool.h:581
const Buffer & buffer() const
Definition: LeafNodeBool.h:193
bool isZero(const Type &x)
Return true if x is exactly equal to zero.
Definition: Math.h:337
void writeTopology(std::ostream &os, bool toHalf=false) const
Write out just the topology.
Definition: LeafNode.h:1288
std::string str() const
Return a string representation of this node.
Definition: LeafNode.h:1009
ValueOffIter beginValueOff()
Definition: LeafNodeBool.h:644
void negate()
Definition: LeafNodeBool.h:441
ValueOnIter beginValueOn()
Definition: LeafNodeBool.h:641
ValueT value
Definition: GridBuilder.h:1290
SharedPtr< LeafNodeType > Ptr
Definition: LeafNodeBool.h:36
static Index log2dim()
Return log2 of the size of the buffer storage.
Definition: LeafNodeBool.h:102
ChildIter< MaskOnIter, LeafNode > ChildOnIter
Definition: LeafNodeBool.h:632
ChildOffCIter endChildOff() const
Definition: LeafNodeBool.h:675
void setValueOff(const Coord &xyz)
Mark the voxel at the given coordinates as inactive but don't change its value.
Definition: LeafNodeBool.h:237
bool isChildMaskOff() const
Definition: LeafNodeBool.h:694
uint32_t Index32
Definition: Types.h:52
Index64 memUsageIfLoaded() const
Definition: LeafNode.h:1451
ValueAllIter endValueAll()
Definition: LeafNodeBool.h:657
ChildIter(const MaskIterT &iter, NodeT *parent)
Definition: LeafNodeBool.h:597
ChildOffCIter beginChildOff() const
Definition: LeafNodeBool.h:665
ChildIter()
Definition: LeafNodeBool.h:596
LeafNode * probeLeafAndCache(const Coord &, AccessorT &)
Return a pointer to this node.
Definition: LeafNodeBool.h:528
OffIterator beginOff() const
Definition: NodeMasks.h:354
static Index numValues()
Definition: LeafNodeBool.h:106
const NodeMaskType & getValueMask() const
Definition: LeafNode.h:856
bool operator==(const Vec3< T0 > &v0, const Vec3< T1 > &v1)
Equality operator, does exact floating point comparisons.
Definition: Vec3.h:473
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:349
Definition: NodeMasks.h:239
CoordBBox getNodeBoundingBox() const
Return the bounding box of this node, i.e., the full index space spanned by this leaf node...
Definition: LeafNodeBool.h:149
Coord offsetToGlobalCoord(Index n) const
Return the global coordinates for a linear table offset.
Definition: LeafNode.h:1046
void modifyItem(Index n, const ModifyOp &op) const
Definition: LeafNodeBool.h:585
DenseIter()
Definition: LeafNodeBool.h:608
bool isInactive() const
Return true if all of this node's values are inactive.
Definition: LeafNodeBool.h:437
const NodeT * probeConstNodeAndCache(const Coord &, AccessorT &) const
Return a const pointer to this node.
Definition: LeafNodeBool.h:547
typename NodeMaskType::OffIterator MaskOffIter
Definition: LeafNodeBool.h:561
void setOrigin(const Coord &origin)
Set the grid index coordinates of this node's local origin.
Definition: LeafNodeBool.h:152
bool resultIsActive() const
Definition: Types.h:593
bool isConstant(bool &isOn) const
Definition: NodeMasks.h:526
bool isConstant(ValueType &firstValue, bool &state, const ValueType &tolerance=zeroVal< ValueType >()) const
Definition: LeafNode.h:1487
ChildAllCIter cbeginChildAll() const
Definition: LeafNodeBool.h:667
static Index32 leafCount()
Definition: LeafNodeBool.h:111
const NodeMaskType & getValueMask() const
Definition: LeafNodeBool.h:688
void addTileAndCache(Index, const Coord &, const ValueType &, bool, AccessorT &)
Definition: LeafNode.h:1609
void setValueOff(Index offset)
Mark the voxel at the given offset as inactive but don't change its value.
Definition: LeafNodeBool.h:239
NodeT * stealNode(const Coord &, const ValueType &, bool)
This function exists only to enable template instantiation.
Definition: LeafNodeBool.h:507
Index64 offVoxelCount() const
Return the number of inactive voxels.
Definition: LeafNodeBool.h:119
bool isValueOnAndCache(const Coord &xyz, AccessorT &) const
Return true if the voxel at the given coordinates is active.
Definition: LeafNodeBool.h:338
DenseIter< const LeafNode, const bool > ChildAllCIter
Definition: LeafNodeBool.h:637
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:1691
void setValueMask(const NodeMaskType &mask)
Definition: LeafNodeBool.h:691
ValueIter< MaskOnIter, const LeafNode, const bool > ValueOnCIter
Definition: LeafNodeBool.h:627
ValueOffCIter endValueOff() const
Definition: LeafNodeBool.h:653
Definition: NodeMasks.h:208
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:389
ValueOnIter endValueOn()
Definition: LeafNodeBool.h:651
std::shared_ptr< T > SharedPtr
Definition: Types.h:114
bool probeValue(const Coord &xyz, ValueType &val) const
Return true if the voxel at the given coordinates is active.
Definition: LeafNode.h:1073
void setTransientData(Index32 transientData)
Set the transient data value.
Definition: LeafNodeBool.h:172
ChildAllIter endChildAll()
Definition: LeafNodeBool.h:679
LeafNode * touchLeaf(const Coord &)
Return a pointer to this node.
Definition: LeafNodeBool.h:523
const NodeMaskType & valueMask() const
Definition: LeafNode.h:858
Tag dispatch class that distinguishes topology copy constructors from deep copy constructors.
Definition: Types.h:644
bool isOn(Index32 n) const
Return true if the nth bit is on.
Definition: NodeMasks.h:502
void setValueOn(Index offset)
Mark the voxel at the given offset as active but don't change its value.
Definition: LeafNodeBool.h:249
const NodeT * probeConstNode(const Coord &) const
This function exists only to enable template instantiation.
Definition: LeafNodeBool.h:511
const LeafNode * probeConstLeafAndCache(const Coord &, AccessorT &) const
Return a const pointer to this node.
Definition: LeafNodeBool.h:545
ValueIter< MaskOffIter, LeafNode, const bool > ValueOffIter
Definition: LeafNodeBool.h:628
const bool & getValueAndCache(const Coord &xyz, AccessorT &) const
Return the value of the voxel at the given coordinates.
Definition: LeafNodeBool.h:333
typename NodeMaskType::OnIterator MaskOnIter
Definition: LeafNodeBool.h:560
Index32 countOff() const
Return the total number of on bits.
Definition: NodeMasks.h:450
Index medianOff(ValueType &value, ValueType *tmp=nullptr) const
Computes the median value of all the inactive voxels in this node.
Definition: LeafNode.h:1565
void clip(const CoordBBox &, const ValueType &background)
Set all voxels that lie outside the given axis-aligned box to the background.
Definition: LeafNode.h:1133
~LeafNode()
Destructor.
Definition: LeafNode.h:1002
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...
DenseIter< LeafNode, bool > ChildAllIter
Definition: LeafNodeBool.h:636
Coord mOrigin
Global grid index coordinates (x,y,z) of the local origin of this node.
Definition: LeafNodeBool.h:708
void save(std::ostream &os) const
Definition: NodeMasks.h:565
const bool & getFirstValue() const
Return a const reference to the first entry in the buffer.
Definition: LeafNodeBool.h:402
void combine2(const LeafNode &other, const OtherType &, bool valueIsActive, CombineOp &)
Definition: LeafNode.h:1772
Definition: version.h.in:250
static bool hasActiveTiles()
Return false since leaf nodes never contain tiles.
Definition: LeafNodeBool.h:282
const NodeMaskType & valueMask() const
Definition: LeafNodeBool.h:689
void modifyValue(const ModifyOp &op) const
Definition: LeafNodeBool.h:588
bool allocate()
Allocate memory for this node's buffer if it has not already been allocated.
Definition: LeafNodeBool.h:136
ChildIter< MaskOnIter, const LeafNode > ChildOnCIter
Definition: LeafNodeBool.h:633
CombineArgs & setBRef(const BValueType &b)
Redirect the B value to a new external source.
Definition: Types.h:584
#define OPENVDB_VERSION_NAME
The version namespace name for this library version.
Definition: version.h.in:121
bool BuildType
Definition: LeafNodeBool.h:32
This struct collects both input and output arguments to "grid combiner" functors used with the tree::...
Definition: Types.h:529
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:192
ValueOffCIter cbeginValueOff() const
Definition: LeafNodeBool.h:642
static Index dim()
Return the number of voxels in each dimension.
Definition: LeafNodeBool.h:104
Templated block class to hold specific data types and a fixed number of values determined by Log2Dim...
Definition: LeafNode.h:37
ChildOffCIter cbeginChildOff() const
Definition: LeafNodeBool.h:664
ValueType combine(const ValueType &v0, const ValueType &v1, const ValueType &v2, const openvdb::Vec3d &w)
Combine different value types.
Definition: AttributeTransferUtil.h:141
static Index64 offTileCount()
Definition: LeafNodeBool.h:123
Base class for sparse iterators over internal and leaf nodes.
Definition: Iterator.h:114
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:290
bool isValueOn(const Coord &xyz) const
Return true if the voxel at the given coordinates is active.
Definition: LeafNodeBool.h:277
typename BaseT::NonConstValueType NonConstValueT
Definition: LeafNodeBool.h:606
Base class for dense iterators over internal and leaf nodes.
Definition: Iterator.h:178
const bool & getItem(Index pos) const
Definition: LeafNodeBool.h:575
const bool & getLastValue() const
Return a const reference to the last entry in the buffer.
Definition: LeafNodeBool.h:406
const LeafNode * probeConstLeaf(const Coord &) const
Return a const pointer to this node.
Definition: LeafNodeBool.h:543
void nodeCount(std::vector< Index32 > &) const
no-op
Definition: LeafNodeBool.h:113
NodeMaskType mValueMask
Bitmask that determines which voxels are active.
Definition: LeafNodeBool.h:704
static void getNodeLog2Dims(std::vector< Index > &dims)
Definition: LeafNodeBool.h:108
#define OPENVDB_USE_VERSION_NAMESPACE
Definition: version.h.in:212
NodeMaskType & getValueMask()
Definition: LeafNodeBool.h:690
Tag dispatch class that distinguishes constructors during file input.
Definition: Types.h:650
ChildOffCIter cendChildOff() const
Definition: LeafNodeBool.h:674
const LeafNode * probeLeafAndCache(const Coord &, AccessorT &) const
Return a const pointer to this node.
Definition: LeafNodeBool.h:542
ValueOnCIter endValueOn() const
Definition: LeafNodeBool.h:650
void setOn(Index32 n)
Set the nth bit on.
Definition: NodeMasks.h:452
ValueOnCIter cbeginValueOn() const
Definition: LeafNode.h:299