4#ifndef OPENVDB_TREE_LEAF_NODE_BOOL_HAS_BEEN_INCLUDED
5#define OPENVDB_TREE_LEAF_NODE_BOOL_HAS_BEEN_INCLUDED
27template<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 {
79 template<
typename OtherValueType>
95 template<
typename ValueType>
124 static
Index log2dim() {
return Log2Dim; }
148 bool isEmpty()
const {
return mValueMask.isOff(); }
150 bool isDense()
const {
return mValueMask.isOn(); }
162 Index64 memUsageIfLoaded()
const;
167 void evalActiveBoundingBox(
CoordBBox& bbox,
bool visitVoxels =
true)
const;
190#if OPENVDB_ABI_VERSION_NUMBER >= 9
198 std::string str()
const;
202 template<
typename OtherType, Index OtherLog2Dim>
206 bool operator==(
const LeafNode&)
const;
207 bool operator!=(
const LeafNode&)
const;
222 void readTopology(std::istream&,
bool fromHalf =
false);
224 void writeTopology(std::ostream&,
bool toHalf =
false)
const;
227 void readBuffers(std::istream&,
bool fromHalf =
false);
228 void readBuffers(std::istream& is,
const CoordBBox&,
bool fromHalf =
false);
230 void writeBuffers(std::ostream&,
bool toHalf =
false)
const;
236 const bool& getValue(
const Coord& xyz)
const;
238 const bool& getValue(
Index offset)
const;
243 bool probeValue(
const Coord& xyz,
bool& val)
const;
249 void setActiveState(
const Coord& xyz,
bool on);
254 void setValueOnly(
const Coord& xyz,
bool val);
256 void setValueOnly(
Index offset,
bool val) { assert(offset<SIZE); mBuffer.setValue(offset,val); }
264 void setValueOff(
const Coord& xyz,
bool val);
266 void setValueOff(
Index offset,
bool val);
274 void setValueOn(
const Coord& xyz,
bool val);
278 void setValueOn(
Index offset,
bool val);
282 template<
typename ModifyOp>
283 void modifyValue(
Index offset,
const ModifyOp& op);
286 template<
typename ModifyOp>
287 void modifyValue(
const Coord& xyz,
const ModifyOp& op);
290 template<
typename ModifyOp>
291 void modifyValueAndActiveState(
const Coord& xyz,
const ModifyOp& op);
299 bool isValueOn(
const Coord& xyz)
const {
return mValueMask.isOn(this->coordToOffset(xyz)); }
301 bool isValueOn(
Index offset)
const { assert(offset < SIZE);
return mValueMask.isOn(offset); }
307 void clip(
const CoordBBox&,
bool background);
315 void fill(
const bool&
value);
317 void fill(
const bool&
value,
bool active);
330 template<
typename DenseT>
331 void copyToDense(
const CoordBBox& bbox, DenseT& dense)
const;
349 template<
typename DenseT>
350 void copyFromDense(
const CoordBBox& bbox,
const DenseT& dense,
bool background,
bool tolerance);
354 template<
typename AccessorT>
359 template<
typename AccessorT>
364 template<
typename AccessorT>
370 template<
typename AccessorT>
375 template<
typename AccessorT>
378 this->setValueOff(xyz,
value);
384 template<
typename ModifyOp,
typename AccessorT>
387 this->modifyValue(xyz, op);
392 template<
typename ModifyOp,
typename AccessorT>
395 this->modifyValueAndActiveState(xyz, op);
401 template<
typename AccessorT>
404 this->setActiveState(xyz, on);
410 template<
typename AccessorT>
413 return this->probeValue(xyz, val);
418 template<
typename AccessorT>
424 const bool&
getFirstValue()
const {
if (mValueMask.isOn(0))
return Buffer::sOn;
else return Buffer::sOff; }
428 const bool&
getLastValue()
const {
if (mValueMask.isOn(SIZE-1))
return Buffer::sOn;
else return Buffer::sOff; }
433 bool isConstant(
bool& constValue,
bool& state,
bool tolerance = 0)
const;
440 bool medianAll()
const;
461 void resetBackground(
bool oldBackground,
bool newBackground);
463 void negate() { mBuffer.mData.toggle(); }
465 template<MergePolicy Policy>
466 void merge(
const LeafNode& other,
bool bg =
false,
bool otherBG =
false);
467 template<MergePolicy Policy>
void merge(
bool tileValue,
bool tileActive);
479 template<
typename OtherType>
493 template<
typename OtherType>
507 template<
typename OtherType>
510 template<
typename CombineOp>
511 void combine(
const LeafNode& other, CombineOp& op);
512 template<
typename CombineOp>
513 void combine(
bool,
bool valueIsActive, CombineOp& op);
515 template<
typename CombineOp,
typename OtherType >
516 void combine2(
const LeafNode& other,
const OtherType&,
bool valueIsActive, CombineOp&);
517 template<
typename CombineOp,
typename OtherNodeT >
518 void combine2(
bool,
const OtherNodeT& other,
bool valueIsActive, CombineOp&);
519 template<
typename CombineOp,
typename OtherNodeT >
520 void combine2(
const LeafNode& b0,
const OtherNodeT& b1, CombineOp&);
526 template<
typename AccessorT>
528 template<
typename NodeT>
530 template<
typename NodeT>
532 template<
typename NodeT>
534 template<
typename ArrayT>
void getNodes(ArrayT&)
const {}
538 void addTile(
Index level,
const Coord&,
bool val,
bool active);
539 void addTile(
Index offset,
bool val,
bool active);
540 template<
typename AccessorT>
541 void addTileAndCache(
Index level,
const Coord&,
bool val,
bool active, AccessorT&);
546 template<
typename AccessorT>
549 template<
typename AccessorT>
551 template<
typename NodeT,
typename AccessorT>
555 if (!(std::is_same<NodeT, LeafNode>::value))
return nullptr;
556 return reinterpret_cast<NodeT*
>(
this);
563 template<
typename AccessorT>
566 template<
typename AccessorT>
568 template<
typename NodeT,
typename AccessorT>
572 if (!(std::is_same<NodeT, LeafNode>::value))
return nullptr;
573 return reinterpret_cast<const NodeT*
>(
this);
586 template<
typename MaskIterT,
typename NodeT,
typename ValueT>
590 public SparseIteratorBase<MaskIterT, ValueIter<MaskIterT, NodeT, ValueT>, NodeT, ValueT>
597 const bool&
getItem(
Index pos)
const {
return this->parent().getValue(pos); }
598 const bool&
getValue()
const {
return this->getItem(this->pos()); }
606 template<
typename ModifyOp>
607 void modifyItem(
Index n,
const ModifyOp& op)
const { this->parent().modifyValue(n, op); }
609 template<
typename ModifyOp>
610 void modifyValue(
const ModifyOp& op)
const { this->modifyItem(this->pos(), op); }
614 template<
typename MaskIterT,
typename NodeT>
620 MaskIterT, ChildIter<MaskIterT, NodeT>, NodeT, bool>(iter, parent) {}
623 template<
typename NodeT,
typename ValueT>
625 MaskDenseIter, DenseIter<NodeT, ValueT>, NodeT, void, ValueT>
635 value = this->parent().getValue(pos);
644 void unsetItem(
Index pos,
const ValueT& val)
const {this->parent().setValueOnly(pos, val);}
649 using ValueOnCIter = ValueIter<MaskOnIter, const LeafNode, const bool>;
731#if OPENVDB_ABI_VERSION_NUMBER >= 9
762template<Index Log2Dim>
770template<Index Log2Dim>
775 , mOrigin(xyz & (~(DIM - 1)))
780template<Index Log2Dim>
785 , mOrigin(xyz & (~(DIM - 1)))
793template<Index Log2Dim>
796 : mValueMask(other.valueMask())
797 , mBuffer(other.mBuffer)
798 , mOrigin(other.mOrigin)
799#if OPENVDB_ABI_VERSION_NUMBER >= 9
800 , mTransientData(other.mTransientData)
807template<Index Log2Dim>
808template<
typename ValueT>
811 : mValueMask(other.valueMask())
812 , mOrigin(other.origin())
813#if OPENVDB_ABI_VERSION_NUMBER >= 9
814 , mTransientData(other.mTransientData)
819 static inline bool convertValue(
const ValueT& val) {
return bool(val); }
823 mBuffer.
setValue(i, Local::convertValue(other.mBuffer[i]));
828template<Index Log2Dim>
829template<
typename ValueT>
833 : mValueMask(other.valueMask())
834 , mBuffer(background)
835 , mOrigin(other.origin())
836#if OPENVDB_ABI_VERSION_NUMBER >= 9
837 , mTransientData(other.mTransientData)
843template<Index Log2Dim>
844template<
typename ValueT>
847 : mValueMask(other.valueMask())
848 , mBuffer(other.valueMask())
849 , mOrigin(other.origin())
850#if OPENVDB_ABI_VERSION_NUMBER >= 9
851 , mTransientData(other.mTransientData)
856template<Index Log2Dim>
861#
if OPENVDB_ABI_VERSION_NUMBER < 9
867 , mOrigin(xyz & (~(DIM - 1)))
868#if OPENVDB_ABI_VERSION_NUMBER >= 9
869 , mTransientData(trans)
874template<Index Log2Dim>
875template<
typename ValueT>
879 : mValueMask(other.valueMask())
881 , mOrigin(other.origin())
882#if OPENVDB_ABI_VERSION_NUMBER >= 9
883 , mTransientData(other.mTransientData)
887 if (mValueMask.
isOn(i)) {
894template<Index Log2Dim>
904template<Index Log2Dim>
909 return sizeof(*this);
913template<Index Log2Dim>
918 return sizeof(*this);
922template<Index Log2Dim>
926 CoordBBox this_bbox = this->getNodeBoundingBox();
927 if (bbox.
isInside(this_bbox))
return;
931 for(; iter; ++iter) this_bbox.
expand(this->offsetToLocalCoord(iter.pos()));
939template<Index Log2Dim>
940template<
typename OtherType, Index OtherLog2Dim>
945 return (Log2Dim == OtherLog2Dim && mValueMask == other->
getValueMask());
949template<Index Log2Dim>
953 std::ostringstream ostr;
954 ostr <<
"LeafNode @" << mOrigin <<
": ";
955 for (
Index32 n = 0; n < SIZE; ++n) ostr << (mValueMask.isOn(n) ?
'#' :
'.');
963template<Index Log2Dim>
967 assert ((xyz[0] & (DIM-1u)) < DIM && (xyz[1] & (DIM-1u)) < DIM && (xyz[2] & (DIM-1u)) < DIM);
968 return ((xyz[0] & (DIM-1u)) << 2*Log2Dim)
969 + ((xyz[1] & (DIM-1u)) << Log2Dim)
970 + (xyz[2] & (DIM-1u));
974template<Index Log2Dim>
978 assert(n < (1 << 3*Log2Dim));
980 xyz.
setX(n >> 2*Log2Dim);
981 n &= ((1 << 2*Log2Dim) - 1);
982 xyz.
setY(n >> Log2Dim);
983 xyz.
setZ(n & ((1 << Log2Dim) - 1));
988template<Index Log2Dim>
992 return (this->offsetToLocalCoord(n) + this->origin());
999template<Index Log2Dim>
1003 mValueMask.load(is);
1007template<Index Log2Dim>
1011 mValueMask.save(os);
1015template<Index Log2Dim>
1022 this->readBuffers(is, fromHalf);
1025 bool background =
false;
1027 background = *
static_cast<const bool*
>(bgPtr);
1029 this->clip(clipBBox, background);
1033template<Index Log2Dim>
1038 mValueMask.load(is);
1044 mBuffer.mData.load(is);
1049 int8_t numBuffers = 0;
1050 is.read(
reinterpret_cast<char*
>(&numBuffers),
sizeof(int8_t));
1054 std::unique_ptr<bool[]> buf{
new bool[SIZE]};
1055 io::readData<bool>(is, buf.get(), SIZE,
true);
1058 mBuffer.mData.setOff();
1059 for (
Index i = 0; i < SIZE; ++i) {
1060 if (buf[i]) mBuffer.mData.setOn(i);
1063 if (numBuffers > 1) {
1066 for (
int i = 1; i < numBuffers; ++i) {
1067 io::readData<bool>(is, buf.get(), SIZE,
true);
1074template<Index Log2Dim>
1079 mValueMask.save(os);
1081 os.write(
reinterpret_cast<const char*
>(&mOrigin),
sizeof(
Coord::ValueType) * 3);
1083 mBuffer.mData.save(os);
1090template<Index Log2Dim>
1094 return mOrigin == other.mOrigin &&
1096 mBuffer == other.mBuffer;
1100template<Index Log2Dim>
1104 return !(this->operator==(other));
1111template<Index Log2Dim>
1115 if (!mValueMask.isConstant(state))
return false;
1118 if (!tolerance && !(mBuffer.mData.isOn() || mBuffer.mData.isOff()))
return false;
1120 constValue = mBuffer.mData.isOn();
1126template<Index Log2Dim>
1130 const Index countTrue = mBuffer.mData.countOn();
1131 return countTrue > (NUM_VALUES >> 1);
1134template<Index Log2Dim>
1139 const Index countTrueOn = tmp.
countOn(), countOn = mValueMask.countOn();
1140 state = countTrueOn > (NUM_VALUES >> 1);
1144template<Index Log2Dim>
1148 const NodeMaskType tmp = mBuffer.mData & (!mValueMask);
1149 const Index countTrueOff = tmp.
countOn(), countOff = mValueMask.countOff();
1150 state = countTrueOff > (NUM_VALUES >> 1);
1157template<Index Log2Dim>
1161 this->addTile(this->coordToOffset(xyz), val, active);
1164template<Index Log2Dim>
1168 assert(offset < SIZE);
1169 this->setValueOnly(offset, val);
1170 this->setActiveState(offset, active);
1173template<Index Log2Dim>
1174template<
typename AccessorT>
1177 bool val,
bool active, AccessorT&)
1179 this->addTile(level, xyz, val, active);
1186template<Index Log2Dim>
1191 if (mBuffer.mData.isOn(this->coordToOffset(xyz)))
return Buffer::sOn;
else return Buffer::sOff;
1195template<Index Log2Dim>
1199 assert(offset < SIZE);
1201 if (mBuffer.mData.isOn(offset))
return Buffer::sOn;
else return Buffer::sOff;
1205template<Index Log2Dim>
1209 const Index offset = this->coordToOffset(xyz);
1210 val = mBuffer.mData.isOn(offset);
1211 return mValueMask.isOn(offset);
1215template<Index Log2Dim>
1219 this->setValueOn(this->coordToOffset(xyz), val);
1223template<Index Log2Dim>
1227 assert(offset < SIZE);
1228 mValueMask.setOn(offset);
1229 mBuffer.mData.set(offset, val);
1233template<Index Log2Dim>
1237 this->setValueOnly(this->coordToOffset(xyz), val);
1241template<Index Log2Dim>
1245 mValueMask.set(this->coordToOffset(xyz), on);
1249template<Index Log2Dim>
1253 this->setValueOff(this->coordToOffset(xyz), val);
1257template<Index Log2Dim>
1261 assert(offset < SIZE);
1262 mValueMask.setOff(offset);
1263 mBuffer.mData.set(offset, val);
1267template<Index Log2Dim>
1268template<
typename ModifyOp>
1272 bool val = mBuffer.mData.isOn(offset);
1274 mBuffer.mData.set(offset, val);
1275 mValueMask.setOn(offset);
1279template<Index Log2Dim>
1280template<
typename ModifyOp>
1284 this->modifyValue(this->coordToOffset(xyz), op);
1288template<Index Log2Dim>
1289template<
typename ModifyOp>
1293 const Index offset = this->coordToOffset(xyz);
1294 bool val = mBuffer.mData.isOn(offset), state = mValueMask.isOn(offset);
1296 mBuffer.mData.set(offset, val);
1297 mValueMask.set(offset, state);
1304template<Index Log2Dim>
1308 if (newBackground != oldBackground) {
1312 mBuffer.mData = (mBuffer.mData & mValueMask) | bgMask;
1320template<Index Log2Dim>
1321template<MergePolicy Policy>
1328 const Index n = iter.pos();
1329 if (mValueMask.isOff(n)) {
1330 mBuffer.mData.set(n, other.mBuffer.mData.isOn(n));
1331 mValueMask.setOn(n);
1337template<Index Log2Dim>
1338template<MergePolicy Policy>
1344 if (!tileActive)
return;
1346 if (tileValue) mBuffer.mData |= !mValueMask;
1347 else mBuffer.mData &= mValueMask;
1356template<Index Log2Dim>
1357template<
typename OtherType>
1365template<Index Log2Dim>
1366template<
typename OtherType>
1375template<Index Log2Dim>
1376template<
typename OtherType>
1388template<Index Log2Dim>
1392 CoordBBox nodeBBox = this->getNodeBoundingBox();
1395 this->fill(nodeBBox, background,
false);
1396 }
else if (clipBBox.
isInside(nodeBBox)) {
1408 int &x = xyz.
x(), &y = xyz.
y(), &z = xyz.
z();
1409 for (x = nodeBBox.
min().
x(); x <= nodeBBox.
max().
x(); ++x) {
1410 for (y = nodeBBox.
min().
y(); y <= nodeBBox.
max().
y(); ++y) {
1411 for (z = nodeBBox.
min().
z(); z <= nodeBBox.
max().
z(); ++z) {
1412 mask.
setOn(
static_cast<Index32>(this->coordToOffset(xyz)));
1420 this->setValueOff(maskIter.pos(), background);
1428template<Index Log2Dim>
1432 auto clippedBBox = this->getNodeBoundingBox();
1433 clippedBBox.intersect(bbox);
1434 if (!clippedBBox)
return;
1436 for (
Int32 x = clippedBBox.min().x(); x <= clippedBBox.max().x(); ++x) {
1437 const Index offsetX = (x & (DIM-1u))<<2*Log2Dim;
1438 for (
Int32 y = clippedBBox.min().y(); y <= clippedBBox.max().y(); ++y) {
1439 const Index offsetXY = offsetX + ((y & (DIM-1u))<< Log2Dim);
1440 for (
Int32 z = clippedBBox.min().z(); z <= clippedBBox.max().z(); ++z) {
1441 const Index offset = offsetXY + (z & (DIM-1u));
1442 mValueMask.set(offset, active);
1443 mBuffer.mData.set(offset,
value);
1449template<Index Log2Dim>
1453 mBuffer.fill(
value);
1456template<Index Log2Dim>
1460 mBuffer.fill(
value);
1461 mValueMask.set(active);
1468template<Index Log2Dim>
1469template<
typename DenseT>
1473 using DenseValueType =
typename DenseT::ValueType;
1475 const size_t xStride = dense.xStride(), yStride = dense.yStride(), zStride = dense.zStride();
1476 const Coord& min = dense.bbox().min();
1477 DenseValueType* t0 = dense.data() + zStride * (bbox.
min()[2] - min[2]);
1478 const Int32 n0 = bbox.
min()[2] & (DIM-1u);
1479 for (
Int32 x = bbox.
min()[0], ex = bbox.
max()[0] + 1; x < ex; ++x) {
1480 DenseValueType* t1 = t0 + xStride * (x - min[0]);
1481 const Int32 n1 = n0 + ((x & (DIM-1u)) << 2*LOG2DIM);
1482 for (
Int32 y = bbox.
min()[1], ey = bbox.
max()[1] + 1; y < ey; ++y) {
1483 DenseValueType* t2 = t1 + yStride * (y - min[1]);
1484 Int32 n2 = n1 + ((y & (DIM-1u)) << LOG2DIM);
1485 for (
Int32 z = bbox.
min()[2], ez = bbox.
max()[2] + 1; z < ez; ++z, t2 += zStride) {
1486 *t2 = DenseValueType(mBuffer.mData.isOn(n2++));
1493template<Index Log2Dim>
1494template<
typename DenseT>
1497 bool background,
bool tolerance)
1499 using DenseValueType =
typename DenseT::ValueType;
1501 inline static bool toBool(
const DenseValueType& v) {
return !math::isZero(v); }
1504 const size_t xStride = dense.xStride(), yStride = dense.yStride(), zStride = dense.zStride();
1505 const Coord& min = dense.bbox().min();
1506 const DenseValueType* s0 = dense.data() + zStride * (bbox.
min()[2] - min[2]);
1507 const Int32 n0 = bbox.
min()[2] & (DIM-1u);
1508 for (
Int32 x = bbox.
min()[0], ex = bbox.
max()[0] + 1; x < ex; ++x) {
1509 const DenseValueType* s1 = s0 + xStride * (x - min[0]);
1510 const Int32 n1 = n0 + ((x & (DIM-1u)) << 2*LOG2DIM);
1511 for (
Int32 y = bbox.
min()[1], ey = bbox.
max()[1] + 1; y < ey; ++y) {
1512 const DenseValueType* s2 = s1 + yStride * (y - min[1]);
1513 Int32 n2 = n1 + ((y & (DIM-1u)) << LOG2DIM);
1514 for (
Int32 z = bbox.
min()[2], ez = bbox.
max()[2]+1; z < ez; ++z, ++n2, s2 += zStride) {
1516 if (tolerance || (background == Local::toBool(*s2))) {
1517 mValueMask.setOff(n2);
1518 mBuffer.mData.set(n2, background);
1520 mValueMask.setOn(n2);
1521 mBuffer.mData.set(n2, Local::toBool(*s2));
1532template<Index Log2Dim>
1533template<
typename CombineOp>
1538 for (
Index i = 0; i < SIZE; ++i) {
1539 bool result =
false, aVal = mBuffer.mData.isOn(i), bVal = other.mBuffer.mData.isOn(i);
1546 mBuffer.mData.set(i, result);
1551template<Index Log2Dim>
1552template<
typename CombineOp>
1558 for (
Index i = 0; i < SIZE; ++i) {
1559 bool result =
false, aVal = mBuffer.mData.isOn(i);
1564 mBuffer.mData.set(i, result);
1572template<Index Log2Dim>
1573template<
typename CombineOp,
typename OtherType>
1576 bool valueIsActive, CombineOp& op)
1580 for (
Index i = 0; i < SIZE; ++i) {
1581 bool result =
false, aVal = other.mBuffer.mData.isOn(i);
1586 mBuffer.mData.set(i, result);
1591template<Index Log2Dim>
1592template<
typename CombineOp,
typename OtherNodeT>
1595 bool valueIsActive, CombineOp& op)
1599 for (
Index i = 0; i < SIZE; ++i) {
1600 bool result =
false, bVal = other.mBuffer.mData.isOn(i);
1605 mBuffer.mData.set(i, result);
1610template<Index Log2Dim>
1611template<
typename CombineOp,
typename OtherNodeT>
1616 for (
Index i = 0; i < SIZE; ++i) {
1618 mValueMask.set(i, b0.
valueMask().
isOn(i) || b1.valueMask().isOn(i));
1620 bool result =
false, b0Val = b0.mBuffer.mData.isOn(i), b1Val = b1.mBuffer.mData.isOn(i);
1627 mBuffer.mData.set(i, result);
ValueT value
Definition GridBuilder.h:1290
ChildT * child
Definition GridBuilder.h:1289
General-purpose arithmetic and comparison routines, most of which accept arbitrary value types (or at...
This struct collects both input and output arguments to "grid combiner" functors used with the tree::...
Definition Types.h:569
CombineArgs & setARef(const AValueType &a)
Redirect the A value to a new external source.
Definition Types.h:621
CombineArgs & setBIsActive(bool b)
Set the active state of the B value.
Definition Types.h:637
CombineArgs & setResultRef(AValueType &val)
Redirect the result value to a new external destination.
Definition Types.h:625
CombineArgs & setBRef(const BValueType &b)
Redirect the B value to a new external source.
Definition Types.h:623
bool resultIsActive() const
Definition Types.h:632
CombineArgs & setAIsActive(bool b)
Set the active state of the A value.
Definition Types.h:635
Tag dispatch class that distinguishes constructors during file input.
Definition Types.h:689
Tag dispatch class that distinguishes topology copy constructors from deep copy constructors.
Definition Types.h:683
Axis-aligned bounding box of signed integer coordinates.
Definition Coord.h:251
void translate(const Coord &t)
Translate this bounding box by (tx, ty, tz).
Definition Coord.h:460
void expand(ValueType padding)
Pad this bounding box with the specified padding.
Definition Coord.h:420
const Coord & min() const
Definition Coord.h:323
bool hasOverlap(const CoordBBox &b) const
Return true if the given bounding box overlaps with this bounding box.
Definition Coord.h:414
const Coord & max() const
Definition Coord.h:324
bool isInside(const Coord &xyz) const
Return true if point (x, y, z) is inside this bounding box.
Definition Coord.h:402
void intersect(const CoordBBox &bbox)
Intersect this bounding box with the given bounding box.
Definition Coord.h:446
void reset()
Definition Coord.h:329
Signed (x, y, z) 32-bit integer coordinates.
Definition Coord.h:25
Int32 ValueType
Definition Coord.h:32
Int32 y() const
Definition Coord.h:131
Int32 x() const
Definition Coord.h:130
Coord & setZ(Int32 z)
Definition Coord.h:81
Coord & setY(Int32 y)
Definition Coord.h:80
Int32 z() const
Definition Coord.h:132
Coord & setX(Int32 x)
Definition Coord.h:79
Base class for iterators over internal and leaf nodes.
Definition Iterator.h:30
void setValue(Index i, const ValueType &)
Set the i'th value of this buffer to the specified value.
Definition LeafBuffer.h:232
LeafNode specialization for values of type bool that stores both the active states and the values of ...
Definition LeafNodeBool.h:29
void stealNodes(ArrayT &, const ValueType &, bool)
Definition LeafNodeBool.h:535
LeafNode & operator=(const LeafNode &)=default
Deep assignment operator.
bool isValueOn(Index offset) const
Return true if the voxel at the given offset is active.
Definition LeafNodeBool.h:301
static Index64 onTileCount()
Definition LeafNodeBool.h:144
void getOrigin(Int32 &x, Int32 &y, Int32 &z) const
Definition LeafNodeBool.h:179
ChildOnCIter cbeginChildOn() const
Definition LeafNodeBool.h:683
bool BuildType
Definition LeafNodeBool.h:32
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
NodeMaskType & getValueMask()
Definition LeafNodeBool.h:712
void setValueOn(Index offset)
Mark the voxel at the given offset as active but don't change its value.
Definition LeafNodeBool.h:271
bool isChildMaskOn(Index) const
Definition LeafNodeBool.h:714
ChildOnCIter beginChildOn() const
Definition LeafNodeBool.h:684
ChildOnIter beginChildOn()
Definition LeafNodeBool.h:685
bool isValueOn(const Coord &xyz) const
Return true if the voxel at the given coordinates is active.
Definition LeafNodeBool.h:299
ValueOnIter endValueOn()
Definition LeafNodeBool.h:673
bool isChildMaskOff() const
Definition LeafNodeBool.h:716
ValueOffCIter cbeginValueOff() const
Definition LeafNodeBool.h:664
Index32 transientData() const
Return the transient data value.
Definition LeafNodeBool.h:192
SharedPtr< LeafNodeType > Ptr
Definition LeafNodeBool.h:36
static Index getChildDim()
Definition LeafNodeBool.h:131
void setValueMask(const NodeMaskType &mask)
Definition LeafNodeBool.h:713
ChildOnIter endChildOn()
Definition LeafNodeBool.h:695
ValueAllIter endValueAll()
Definition LeafNodeBool.h:679
LeafNode * touchLeaf(const Coord &)
Return a pointer to this node.
Definition LeafNodeBool.h:545
LeafNode * probeLeaf(const Coord &)
Definition LeafNodeBool.h:548
bool isValueMaskOff() const
Definition LeafNodeBool.h:709
void prune(const ValueType &=zeroVal< ValueType >())
This function exists only to enable template instantiation.
Definition LeafNodeBool.h:524
bool isValueMaskOn() const
Definition LeafNodeBool.h:707
DenseIter< const LeafNode, const bool > ChildAllCIter
Definition LeafNodeBool.h:659
void getNodes(ArrayT &) const
Definition LeafNodeBool.h:534
NodeMaskType mValueMask
Bitmask that determines which voxels are active.
Definition LeafNodeBool.h:726
void setValuesOff()
Mark all voxels as inactive but don't change their values.
Definition LeafNodeBool.h:296
ValueAllCIter endValueAll() const
Definition LeafNodeBool.h:678
ChildIter< MaskOnIter, const LeafNode > ChildOnCIter
Definition LeafNodeBool.h:655
Index64 onLeafVoxelCount() const
Definition LeafNodeBool.h:142
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:256
ChildOffCIter endChildOff() const
Definition LeafNodeBool.h:697
ValueAllCIter cbeginValueAll() const
Definition LeafNodeBool.h:667
NodeT * probeNode(const Coord &)
Definition LeafNodeBool.h:531
ValueOnCIter beginValueOn() const
Definition LeafNodeBool.h:662
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:312
static void evalNodeOrigin(Coord &xyz)
Compute the origin of the leaf node that contains the voxel with the given coordinates.
Definition LeafNodeBool.h:723
const Buffer & buffer() const
Definition LeafNodeBool.h:215
LeafNode * probeLeafAndCache(const Coord &, AccessorT &)
Definition LeafNodeBool.h:550
void setValueMaskOn(Index n)
Definition LeafNodeBool.h:719
Index64 offLeafVoxelCount() const
Definition LeafNodeBool.h:143
const LeafNode * probeLeaf(const Coord &) const
Return a const pointer to this node.
Definition LeafNodeBool.h:562
void setOrigin(const Coord &origin)
Set the grid index coordinates of this node's local origin.
Definition LeafNodeBool.h:174
const Coord & origin() const
Return the grid index coordinates of this node's local origin.
Definition LeafNodeBool.h:177
static Index getValueLevel(const Coord &)
Return the level (0) at which leaf node values reside.
Definition LeafNodeBool.h:246
typename NodeMaskType::OnIterator MaskOnIter
Definition LeafNodeBool.h:582
bool isInactive() const
Return true if all of this node's values are inactive.
Definition LeafNodeBool.h:459
Buffer mBuffer
Bitmask representing the values of voxels.
Definition LeafNodeBool.h:728
ValueIter< MaskOnIter, const LeafNode, const bool > ValueOnCIter
Definition LeafNodeBool.h:649
bool isValueMaskOff(Index n) const
Definition LeafNodeBool.h:708
ValueOnCIter cendValueOn() const
Definition LeafNodeBool.h:671
bool isAllocated() const
Return true if memory for this node's buffer has been allocated.
Definition LeafNodeBool.h:154
static Index getValueLevelAndCache(const Coord &, AccessorT &)
Return the LEVEL (=0) at which leaf node values reside.
Definition LeafNodeBool.h:419
static Index numValues()
Definition LeafNodeBool.h:128
ValueOffCIter beginValueOff() const
Definition LeafNodeBool.h:665
ValueIter< MaskOffIter, LeafNode, const bool > ValueOffIter
Definition LeafNodeBool.h:650
ChildAllCIter cbeginChildAll() const
Definition LeafNodeBool.h:689
ChildOffIter endChildOff()
Definition LeafNodeBool.h:698
ChildAllIter beginChildAll()
Definition LeafNodeBool.h:691
static Index getLevel()
Definition LeafNodeBool.h:129
bool isValueOnAndCache(const Coord &xyz, AccessorT &) const
Return true if the voxel at the given coordinates is active.
Definition LeafNodeBool.h:360
void addLeaf(LeafNode *)
Definition LeafNodeBool.h:525
ValueOnIter beginValueOn()
Definition LeafNodeBool.h:663
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:385
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:376
ChildIter< MaskOffIter, const LeafNode > ChildOffCIter
Definition LeafNodeBool.h:657
NodeT * probeNodeAndCache(const Coord &, AccessorT &)
Definition LeafNodeBool.h:552
ValueIter< MaskDenseIter, LeafNode, const bool > ValueAllIter
Definition LeafNodeBool.h:652
ChildOffCIter cbeginChildOff() const
Definition LeafNodeBool.h:686
ChildOffIter beginChildOff()
Definition LeafNodeBool.h:688
bool isChildMaskOff(Index) const
Definition LeafNodeBool.h:715
Index64 onVoxelCount() const
Return the number of active voxels.
Definition LeafNodeBool.h:139
typename NodeMaskType::OffIterator MaskOffIter
Definition LeafNodeBool.h:583
ChildOffCIter beginChildOff() const
Definition LeafNodeBool.h:687
static Index64 offTileCount()
Definition LeafNodeBool.h:145
void setValueOff(const Coord &xyz)
Mark the voxel at the given coordinates as inactive but don't change its value.
Definition LeafNodeBool.h:259
bool ValueType
Definition LeafNodeBool.h:33
ValueOffIter endValueOff()
Definition LeafNodeBool.h:676
void setValueOff(Index offset)
Mark the voxel at the given offset as inactive but don't change its value.
Definition LeafNodeBool.h:261
const LeafNode * probeConstLeafAndCache(const Coord &, AccessorT &) const
Definition LeafNodeBool.h:567
ChildAllCIter endChildAll() const
Definition LeafNodeBool.h:700
const NodeT * probeConstNodeAndCache(const Coord &, AccessorT &) const
Definition LeafNodeBool.h:569
ValueOnCIter cbeginValueOn() const
Definition LeafNodeBool.h:661
static void getNodeLog2Dims(std::vector< Index > &dims)
Definition LeafNodeBool.h:130
ChildOnCIter endChildOn() const
Definition LeafNodeBool.h:694
const LeafNode * probeConstLeaf(const Coord &) const
Definition LeafNodeBool.h:565
static Index32 nonLeafCount()
Definition LeafNodeBool.h:136
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:411
ChildOnCIter cendChildOn() const
Definition LeafNodeBool.h:693
static bool hasActiveTiles()
Return false since leaf nodes never contain tiles.
Definition LeafNodeBool.h:304
ChildAllCIter cendChildAll() const
Definition LeafNodeBool.h:699
ValueIter< MaskOnIter, LeafNode, const bool > ValueOnIter
Definition LeafNodeBool.h:648
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:371
DenseIter< LeafNode, bool > ChildAllIter
Definition LeafNodeBool.h:658
ChildAllIter endChildAll()
Definition LeafNodeBool.h:701
void setValueMask(Index n, bool on)
Definition LeafNodeBool.h:718
const NodeMaskType & valueMask() const
Definition LeafNodeBool.h:711
Index64 offVoxelCount() const
Return the number of inactive voxels.
Definition LeafNodeBool.h:141
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:214
ValueAllCIter cendValueAll() const
Definition LeafNodeBool.h:677
ChildIter< MaskOnIter, LeafNode > ChildOnIter
Definition LeafNodeBool.h:654
void negate()
Definition LeafNodeBool.h:463
ChildAllCIter beginChildAll() const
Definition LeafNodeBool.h:690
const LeafNode * probeLeafAndCache(const Coord &, AccessorT &) const
Definition LeafNodeBool.h:564
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:402
void getOrigin(Coord &origin) const
Definition LeafNodeBool.h:178
void setValuesOn()
Mark all voxels as active but don't change their values.
Definition LeafNodeBool.h:294
void setTransientData(Index32 transientData)
Set the transient data value.
Definition LeafNodeBool.h:194
void nodeCount(std::vector< Index32 > &) const
no-op
Definition LeafNodeBool.h:135
static Index size()
Definition LeafNodeBool.h:127
ChildOffCIter cendChildOff() const
Definition LeafNodeBool.h:696
typename NodeMaskType::DenseIterator MaskDenseIter
Definition LeafNodeBool.h:584
bool isEmpty() const
Return true if this node has no active voxels.
Definition LeafNodeBool.h:148
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:365
ValueOffIter beginValueOff()
Definition LeafNodeBool.h:666
const NodeT * probeConstNode(const Coord &) const
Definition LeafNodeBool.h:533
void setValueOn(const Coord &xyz)
Mark the voxel at the given coordinates as active but don't change its value.
Definition LeafNodeBool.h:269
Buffer & buffer()
Definition LeafNodeBool.h:216
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:251
static Index32 leafCount()
Definition LeafNodeBool.h:133
bool allocate()
Allocate memory for this node's buffer if it has not already been allocated.
Definition LeafNodeBool.h:158
const NodeMaskType & getValueMask() const
Definition LeafNodeBool.h:710
const bool & getFirstValue() const
Return a const reference to the first entry in the buffer.
Definition LeafNodeBool.h:424
void addLeafAndCache(LeafNode *, AccessorT &)
Definition LeafNodeBool.h:527
const bool & getLastValue() const
Return a const reference to the last entry in the buffer.
Definition LeafNodeBool.h:428
ValueOffCIter cendValueOff() const
Definition LeafNodeBool.h:674
ValueIter< MaskDenseIter, const LeafNode, const bool > ValueAllCIter
Definition LeafNodeBool.h:653
const bool & getValueAndCache(const Coord &xyz, AccessorT &) const
Return the value of the voxel at the given coordinates.
Definition LeafNodeBool.h:355
void setValueMaskOff(Index n)
Definition LeafNodeBool.h:720
bool isDense() const
Return true if this node only contains active voxels.
Definition LeafNodeBool.h:150
ValueOffCIter endValueOff() const
Definition LeafNodeBool.h:675
NodeT * stealNode(const Coord &, const ValueType &, bool)
Definition LeafNodeBool.h:529
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:276
ValueOnCIter endValueOn() const
Definition LeafNodeBool.h:672
void voxelizeActiveTiles(bool=true)
No-op.
Definition LeafNodeBool.h:471
void modifyValueAndActiveStateAndCache(const Coord &xyz, const ModifyOp &op, AccessorT &)
Definition LeafNodeBool.h:393
LeafNode * touchLeafAndCache(const Coord &, AccessorT &)
Definition LeafNodeBool.h:547
ValueAllCIter beginValueAll() const
Definition LeafNodeBool.h:668
Coord mOrigin
Global grid index coordinates (x,y,z) of the local origin of this node.
Definition LeafNodeBool.h:730
static Index dim()
Return the number of voxels in each dimension.
Definition LeafNodeBool.h:126
ChildIter< MaskOffIter, LeafNode > ChildOffIter
Definition LeafNodeBool.h:656
ValueIter< MaskOffIter, const LeafNode, const bool > ValueOffCIter
Definition LeafNodeBool.h:651
bool isValueMaskOn(Index n) const
Definition LeafNodeBool.h:706
ValueAllIter beginValueAll()
Definition LeafNodeBool.h:669
LeafNode(const LeafNode< OtherValueType, Log2Dim > &other)
Value conversion copy constructor.
Templated block class to hold specific data types and a fixed number of values determined by Log2Dim....
Definition LeafNode.h:38
static Coord offsetToLocalCoord(Index n)
Return the local coordinates for a linear table offset, where offset 0 has coordinates (0,...
Definition LeafNode.h:1032
void writeTopology(std::ostream &os, bool toHalf=false) const
Write out just the topology.
Definition LeafNode.h:1288
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
bool operator!=(const LeafNode &other) const
Definition LeafNode.h:203
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
const ValueType & getValue(const Coord &xyz) const
Return the value of the voxel at the given coordinates.
Definition LeafNode.h:1057
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 topologyDifference(const LeafNode< OtherType, Log2Dim > &other, const ValueType &)
Difference this node's set of active values with the active values of the other node,...
Definition LeafNode.h:1708
Index medianOff(ValueType &value, ValueType *tmp=nullptr) const
Computes the median value of all the inactive voxels in this node.
Definition LeafNode.h:1565
ValueType medianAll(ValueType *tmp=nullptr) const
Computes the median value of all the active AND inactive voxels in this node.
Definition LeafNode.h:1523
~LeafNode()
Destructor.
Definition LeafNode.h:1002
void readTopology(std::istream &is, bool fromHalf=false)
Read in just the topology.
Definition LeafNode.h:1280
Index medianOn(ValueType &value, ValueType *tmp=nullptr) const
Computes the median value of all the active voxels in this node.
Definition LeafNode.h:1541
void addTile(Index level, const Coord &, const ValueType &, bool)
Definition LeafNode.h:1592
void resetBackground(const ValueType &oldBackground, const ValueType &newBackground)
Replace inactive occurrences of oldBackground with newBackground, and inactive occurrences of -oldBac...
Definition LeafNode.h:1621
void modifyValueAndActiveState(const Coord &xyz, const ModifyOp &op)
Apply a functor to the voxel at the given coordinates.
Definition LeafNode.h:458
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,...
Definition LeafNode.h:1699
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
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
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
static Index coordToOffset(const Coord &xyz)
Return the linear table offset of the given global or local coordinates.
Definition LeafNode.h:1022
void setValueOff(const Coord &xyz)
Mark the voxel at the given coordinates as inactive but don't change its value.
Definition LeafNode.h:409
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
void writeBuffers(std::ostream &os, bool toHalf=false) const
Write buffers to a stream.
Definition LeafNode.h:1414
void combine(const LeafNode &other, CombineOp &op)
Definition LeafNode.h:1732
Index64 memUsageIfLoaded() const
Definition LeafNode.h:1451
void combine2(const LeafNode &other, const OtherType &, bool valueIsActive, CombineOp &)
Definition LeafNode.h:1772
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
const NodeMaskType & valueMask() const
Definition LeafNode.h:858
void readBuffers(std::istream &is, bool fromHalf=false)
Read buffers from a stream.
Definition LeafNode.h:1316
bool isConstant(ValueType &firstValue, bool &state, const ValueType &tolerance=zeroVal< ValueType >()) const
Definition LeafNode.h:1487
friend class LeafNode
Definition LeafNode.h:835
Coord offsetToGlobalCoord(Index n) const
Return the global coordinates for a linear table offset.
Definition LeafNode.h:1046
bool operator==(const LeafNode &other) const
Check for buffer, state and origin equivalence.
Definition LeafNode.h:1431
static const Index SIZE
Definition LeafNode.h:53
void evalActiveBoundingBox(CoordBBox &bbox, bool visitVoxels=true) const
Definition LeafNode.h:1461
void merge(const LeafNode &)
Definition LeafNode.h:1642
void setValueOn(const Coord &xyz)
Mark the voxel at the given coordinates as active but don't change its value.
Definition LeafNode.h:419
const NodeMaskType & getValueMask() const
Definition LeafNode.h:856
void addTileAndCache(Index, const Coord &, const ValueType &, bool, AccessorT &)
Definition LeafNode.h:1609
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
Index64 memUsage() const
Return the memory in bytes occupied by this node.
Definition LeafNode.h:1441
std::string str() const
Return a string representation of this node.
Definition LeafNode.h:1009
bool probeValue(const Coord &xyz, ValueType &val) const
Return true if the voxel at the given coordinates is active.
Definition LeafNode.h:1073
Definition NodeMasks.h:271
Bit mask for the internal and leaf nodes of VDB. This is a 64-bit implementation.
Definition NodeMasks.h:308
Index32 countOn() const
Return the total number of on bits.
Definition NodeMasks.h:443
OnIterator beginOn() const
Definition NodeMasks.h:352
OffIterator beginOff() const
Definition NodeMasks.h:354
bool isOn(Index32 n) const
Return true if the nth bit is on.
Definition NodeMasks.h:502
void setOn(Index32 n)
Set the nth bit on.
Definition NodeMasks.h:452
Definition NodeMasks.h:240
Definition NodeMasks.h:209
OPENVDB_API uint32_t getFormatVersion(std::ios_base &)
Return the file format version number associated with the given input stream.
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 Index
Definition Types.h:54
uint32_t Index32
Definition Types.h:52
@ OPENVDB_FILE_VERSION_BOOL_LEAF_OPTIMIZATION
Definition version.h.in:250
int32_t Int32
Definition Types.h:56
uint64_t Index64
Definition Types.h:53
std::shared_ptr< T > SharedPtr
Definition Types.h:114
@ MERGE_NODES
Definition Types.h:508
@ MERGE_ACTIVE_STATES_AND_NODES
Definition Types.h:509
Definition Exceptions.h:13
Base class for dense iterators over internal and leaf nodes.
Definition Iterator.h:179
typename std::remove_const< UnsetItemT >::type NonConstValueType
Definition Iterator.h:184
ChildIter(const MaskIterT &iter, NodeT *parent)
Definition LeafNodeBool.h:619
ChildIter()
Definition LeafNodeBool.h:618
bool getItem(Index pos, void *&child, NonConstValueT &value) const
Definition LeafNodeBool.h:633
DenseIter()
Definition LeafNodeBool.h:630
DenseIter(const MaskDenseIter &iter, NodeT *parent)
Definition LeafNodeBool.h:631
typename BaseT::NonConstValueType NonConstValueT
Definition LeafNodeBool.h:628
void unsetItem(Index pos, const ValueT &val) const
Definition LeafNodeBool.h:644
void setItem(Index pos, bool value) const
Definition LeafNodeBool.h:601
void modifyValue(const ModifyOp &op) const
Definition LeafNodeBool.h:610
ValueIter(const MaskIterT &iter, NodeT *parent)
Definition LeafNodeBool.h:595
const bool & getValue() const
Definition LeafNodeBool.h:598
const bool & getItem(Index pos) const
Definition LeafNodeBool.h:597
ValueIter()
Definition LeafNodeBool.h:594
void setValue(bool value) const
Definition LeafNodeBool.h:603
void modifyItem(Index n, const ModifyOp &op) const
Definition LeafNodeBool.h:607
Definition LeafNode.h:894
Base class for sparse iterators over internal and leaf nodes.
Definition Iterator.h:115
#define OPENVDB_VERSION_NAME
The version namespace name for this library version.
Definition version.h.in:121
#define OPENVDB_USE_VERSION_NAMESPACE
Definition version.h.in:212