12 #ifndef OPENVDB_POINTS_POINT_DATA_GRID_HAS_BEEN_INCLUDED 13 #define OPENVDB_POINTS_POINT_DATA_GRID_HAS_BEEN_INCLUDED 15 #include <openvdb/version.h> 29 #include <type_traits> 33 class TestPointDataLeaf;
51 const bool seek = destBuf ==
nullptr;
55 if (destBytes >= maximumBytes) {
57 maximumBytes <<
" bytes in voxel values.")
67 bytes16 =
static_cast<uint16_t
>(meta->pass());
69 is.seekg(
sizeof(uint16_t), std::ios_base::cur);
73 is.read(reinterpret_cast<char*>(&bytes16),
sizeof(uint16_t));
79 is.seekg(destBytes, std::ios_base::cur);
82 is.read(reinterpret_cast<char*>(destBuf), destBytes);
88 is.seekg(
int(bytes16), std::ios_base::cur);
92 std::unique_ptr<char[]> bloscBuffer(
new char[
int(bytes16)]);
93 is.read(bloscBuffer.get(), bytes16);
97 std::memcpy(destBuf, buffer.get(), destBytes);
114 if (srcBytes >= maximumBytes) {
116 maximumBytes <<
" bytes in voxel values.")
119 const char* charBuffer =
reinterpret_cast<const char*
>(srcBuf);
121 size_t compressedBytes;
122 std::unique_ptr<char[]> buffer =
bloscCompress( charBuffer, srcBytes,
123 compressedBytes,
false);
125 if (compressedBytes > 0) {
126 auto bytes16 =
static_cast<uint16_t
>(compressedBytes);
127 os.write(reinterpret_cast<const char*>(&bytes16),
sizeof(uint16_t));
128 os.write(reinterpret_cast<const char*>(buffer.get()), compressedBytes);
131 auto bytes16 =
static_cast<uint16_t
>(maximumBytes);
132 os.write(reinterpret_cast<const char*>(&bytes16),
sizeof(uint16_t));
133 os.write(reinterpret_cast<const char*>(srcBuf), srcBytes);
137 template <
typename T>
143 const size_t srcBytes = srcCount*
sizeof(T);
145 if (srcBytes >= maximumBytes) {
147 maximumBytes <<
" bytes in voxel values.")
150 const char* charBuffer =
reinterpret_cast<const char*
>(srcBuf);
155 if (compressedBytes > 0) {
156 auto bytes16 =
static_cast<uint16_t
>(compressedBytes);
157 os.write(reinterpret_cast<const char*>(&bytes16),
sizeof(uint16_t));
160 auto bytes16 =
static_cast<uint16_t
>(maximumBytes);
161 os.write(reinterpret_cast<const char*>(&bytes16),
sizeof(uint16_t));
186 #ifndef OPENVDB_DISABLE_POINT_DATA_TREE_ALIAS 205 template <
typename Po
intDataTreeT>
206 inline AttributeSet::Descriptor::Ptr
219 template <
typename Po
intDataTreeT>
230 template <
typename Po
intDataTreeT>
232 prefetch(PointDataTreeT& tree,
bool position =
true,
bool otherAttributes =
true);
238 template <
typename T, Index Log2Dim>
243 using Ptr = std::shared_ptr<PointDataLeafNode>;
259 using BaseLeaf::LOG2DIM;
260 using BaseLeaf::TOTAL;
262 using BaseLeaf::NUM_VALUES;
263 using BaseLeaf::NUM_VOXELS;
264 using BaseLeaf::SIZE;
265 using BaseLeaf::LEVEL;
276 , mAttributeSet(new
AttributeSet(*other.mAttributeSet)) { }
282 , mAttributeSet(new
AttributeSet) { assertNonModifiableUnlessZero(value); }
287 const T& value = zeroVal<T>(),
bool active =
false)
291 assertNonModifiableUnlessZero(value);
295 template<
typename OtherValueType>
302 template <
typename ValueType>
305 , mAttributeSet(new
AttributeSet) { assertNonModifiableUnlessZero(value); }
309 template <
typename ValueType>
315 const T& value = zeroVal<T>(),
bool active =
false)
317 , mAttributeSet(new
AttributeSet) { assertNonModifiableUnlessZero(value); }
328 void initializeAttributes(
const Descriptor::Ptr& descriptor,
const Index arrayLength,
331 void clearAttributes(
const bool updateValueMask =
true,
336 bool hasAttribute(
const size_t pos)
const;
339 bool hasAttribute(
const Name& attributeName)
const;
350 const size_t pos,
const Index strideOrTotalSize = 1,
351 const bool constantStride =
true,
360 const Descriptor& expected, Descriptor::Ptr& replacement);
363 void reorderAttributes(
const Descriptor::Ptr& replacement);
376 void replaceAttributeSet(
AttributeSet* attributeSet,
bool allowMismatchingDescriptors =
false);
380 void resetDescriptor(
const Descriptor::Ptr& replacement);
385 void setOffsets(
const std::vector<ValueType>& offsets,
const bool updateValueMask =
true);
389 void validateOffsets()
const;
398 const AttributeArray& constAttributeArray(
const size_t pos)
const;
411 GroupHandle groupHandle(
const AttributeSet::Descriptor::GroupIndex& index)
const;
415 GroupWriteHandle groupWriteHandle(
const AttributeSet::Descriptor::GroupIndex& index);
426 Index64 groupPointCount(
const Name& groupName)
const;
429 void updateValueMask();
438 template<
typename OtherType, Index OtherLog2Dim>
440 return BaseLeaf::hasSameTopology(other);
446 if(BaseLeaf::operator==(other) !=
true)
return false;
447 return (*this->mAttributeSet == *other.mAttributeSet);
453 template<
typename AccessorT>
459 template<
typename AccessorT>
462 template<
typename NodeT,
typename AccessorT>
466 if (!(std::is_same<NodeT,PointDataLeafNode>::value))
return nullptr;
467 return reinterpret_cast<NodeT*
>(
this);
471 template<
typename AccessorT>
478 template<
typename AccessorT>
480 template<
typename AccessorT>
483 template<
typename NodeT,
typename AccessorT>
487 if (!(std::is_same<NodeT,PointDataLeafNode>::value))
return nullptr;
488 return reinterpret_cast<const NodeT*
>(
this);
495 void readTopology(std::istream& is,
bool fromHalf =
false);
496 void writeTopology(std::ostream& os,
bool toHalf =
false)
const;
498 Index buffers()
const;
500 void readBuffers(std::istream& is,
bool fromHalf =
false);
501 void readBuffers(std::istream& is,
const CoordBBox&,
bool fromHalf =
false);
502 void writeBuffers(std::ostream& os,
bool toHalf =
false)
const;
506 #if OPENVDB_ABI_VERSION_NUMBER >= 10 510 void evalActiveBoundingBox(
CoordBBox& bbox,
bool visitVoxels =
true)
const;
522 assert(
false &&
"Cannot modify voxel values in a PointDataTree.");
529 if (value != zeroVal<T>()) this->assertNonmodifiable();
532 void setActiveState(
const Coord& xyz,
bool on) { BaseLeaf::setActiveState(xyz, on); }
538 void setValueOff(
const Coord& xyz) { BaseLeaf::setValueOff(xyz); }
544 void setValueOn(
const Coord& xyz) { BaseLeaf::setValueOn(xyz); }
555 template<
typename ModifyOp>
558 template<
typename ModifyOp>
559 void modifyValue(
const Coord&,
const ModifyOp&) { assertNonmodifiable(); }
561 template<
typename ModifyOp>
571 template<
typename AccessorT>
574 template<
typename ModifyOp,
typename AccessorT>
576 assertNonmodifiable();
579 template<
typename AccessorT>
582 template<
typename AccessorT>
584 BaseLeaf::setActiveStateAndCache(xyz, on, parent);
588 assertNonModifiableUnlessZero(newBackground);
596 friend class ::TestPointDataLeaf;
604 uint16_t mVoxelBufferSize = 0;
652 const PointDataLeafNode,
const ValueType, ChildAll>;
663 return this->beginIndex<ValueAllCIter, NullFilter>(filter);
668 return this->beginIndex<ValueOnCIter, NullFilter>(filter);
673 return this->beginIndex<ValueOffCIter, NullFilter>(filter);
676 template<
typename IterT,
typename FilterT>
680 template<
typename FilterT>
683 return this->beginIndex<ValueAllCIter, FilterT>(filter);
685 template<
typename FilterT>
688 return this->beginIndex<ValueOnCIter, FilterT>(filter);
690 template<
typename FilterT>
693 return this->beginIndex<ValueOffCIter, FilterT>(filter);
700 template<
typename FilterT>
703 #define VMASK_ this->getValueMask() 750 template<
typename T, Index Log2Dim>
755 std::swap(ptr, mAttributeSet);
759 template<
typename T, Index Log2Dim>
764 if (descriptor->size() != 1 ||
765 descriptor->find(
"P") == AttributeSet::INVALID_POS ||
771 mAttributeSet.reset(
new AttributeSet(descriptor, arrayLength, lock));
774 template<
typename T, Index Log2Dim>
779 mAttributeSet.reset(
new AttributeSet(*mAttributeSet, 0, lock));
787 if (updateValueMask) this->setValuesOff();
790 template<
typename T, Index Log2Dim>
794 return pos < mAttributeSet->
size();
797 template<
typename T, Index Log2Dim>
801 const size_t pos = mAttributeSet->find(attributeName);
802 return pos != AttributeSet::INVALID_POS;
805 template<
typename T, Index Log2Dim>
808 const size_t pos,
const Index strideOrTotalSize,
809 const bool constantStride,
813 return mAttributeSet->appendAttribute(
814 expected, replacement, pos, strideOrTotalSize, constantStride, metadata, lock);
817 template<
typename T, Index Log2Dim>
820 const Descriptor& expected, Descriptor::Ptr& replacement)
822 mAttributeSet->dropAttributes(pos, expected, replacement);
825 template<
typename T, Index Log2Dim>
832 template<
typename T, Index Log2Dim>
836 mAttributeSet->renameAttributes(expected, replacement);
839 template<
typename T, Index Log2Dim>
843 for (
size_t i = 0; i < mAttributeSet->size(); i++) {
849 template<
typename T, Index Log2Dim>
857 if (!allowMismatchingDescriptors && mAttributeSet->descriptor() != attributeSet->
descriptor()) {
861 mAttributeSet.reset(attributeSet);
864 template<
typename T, Index Log2Dim>
871 template<
typename T, Index Log2Dim>
875 if (offsets.size() != LeafNodeType::NUM_VALUES) {
879 for (
Index index = 0; index < offsets.size(); ++index) {
880 setOffsetOnly(index, offsets[index]);
883 if (updateValueMask) this->updateValueMask();
886 template<
typename T, Index Log2Dim>
891 for (
Index index = 1; index < BaseLeaf::SIZE; ++index) {
892 if (this->getValue(index-1) > this->getValue(index)) {
898 for (
size_t attributeIndex = 1; attributeIndex < mAttributeSet->size(); ++attributeIndex ) {
899 if (mAttributeSet->getConst(attributeIndex-1)->size() != mAttributeSet->getConst(attributeIndex)->size()) {
905 if (mAttributeSet->size() > 0 && this->getValue(BaseLeaf::SIZE-1) != mAttributeSet->getConst(0)->size()) {
910 template<
typename T, Index Log2Dim>
915 return *mAttributeSet->get(pos);
918 template<
typename T, Index Log2Dim>
923 return *mAttributeSet->getConst(pos);
926 template<
typename T, Index Log2Dim>
930 return this->attributeArray(pos);
933 template<
typename T, Index Log2Dim>
937 const size_t pos = mAttributeSet->find(attributeName);
939 return *mAttributeSet->get(pos);
942 template<
typename T, Index Log2Dim>
946 const size_t pos = mAttributeSet->find(attributeName);
948 return *mAttributeSet->getConst(pos);
951 template<
typename T, Index Log2Dim>
955 return this->attributeArray(attributeName);
958 template<
typename T, Index Log2Dim>
970 template<
typename T, Index Log2Dim>
974 const AttributeSet::Descriptor::GroupIndex index = this->attributeSet().groupIndex(name);
975 return this->groupHandle(index);
978 template<
typename T, Index Log2Dim>
990 template<
typename T, Index Log2Dim>
994 const AttributeSet::Descriptor::GroupIndex index = this->attributeSet().groupIndex(name);
995 return this->groupWriteHandle(index);
998 template<
typename T, Index Log2Dim>
999 template<
typename ValueIterT,
typename FilterT>
1011 FilterT newFilter(filter);
1012 newFilter.
reset(*
this);
1018 ValueIterT valueIter = IterTraitsT::begin(*
this);
1023 template<
typename T, Index Log2Dim>
1027 const Index index = LeafNodeType::coordToOffset(ijk);
1028 assert(index < BaseLeaf::SIZE);
1029 const ValueType end = this->getValue(index);
1034 template<
typename T, Index Log2Dim>
1042 template<
typename T, Index Log2Dim>
1043 template<
typename FilterT>
1048 FilterT newFilter(filter);
1049 newFilter.reset(*
this);
1053 template<
typename T, Index Log2Dim>
1057 return this->getLastValue();
1060 template<
typename T, Index Log2Dim>
1064 if (this->isEmpty())
return 0;
1065 else if (this->isDense())
return this->
pointCount();
1069 template<
typename T, Index Log2Dim>
1073 if (this->isEmpty())
return this->
pointCount();
1074 else if (this->isDense())
return 0;
1075 return iterCount(this->beginIndexOff());
1078 template<
typename T, Index Log2Dim>
1082 if (!this->attributeSet().descriptor().hasGroup(groupName)) {
1085 GroupFilter filter(groupName, this->attributeSet());
1089 return iterCount(this->beginIndexAll(filter));
1093 template<
typename T, Index Log2Dim>
1098 for (
Index n = 0; n < LeafNodeType::NUM_VALUES; n++) {
1099 end = this->getValue(n);
1100 this->setValueMask(n, (end - start) > 0);
1105 template<
typename T, Index Log2Dim>
1109 this->buffer().
setValue(offset, val);
1110 this->setValueMaskOn(offset);
1113 template<
typename T, Index Log2Dim>
1117 this->buffer().
setValue(offset, val);
1120 template<
typename T, Index Log2Dim>
1124 BaseLeaf::readTopology(is, fromHalf);
1127 template<
typename T, Index Log2Dim>
1131 BaseLeaf::writeTopology(os, toHalf);
1134 template<
typename T, Index Log2Dim>
1141 mAttributeSet->size() +
1142 mAttributeSet->size() +
1146 template<
typename T, Index Log2Dim>
1150 this->readBuffers(is, CoordBBox::inf(), fromHalf);
1153 template<
typename T, Index Log2Dim>
1162 std::string key(
"paged:" + std::to_string(index));
1163 auto it = auxData.find(key);
1164 if (it != auxData.end()) {
1172 std::string key(
"paged:" + std::to_string(index));
1173 auto it = auxData.find(key);
1174 if (it != auxData.end()) {
1180 return *pagedStream;
1186 std::string matchingKey(
"hasMatchingDescriptor");
1187 auto itMatching = auxData.find(matchingKey);
1188 return itMatching != auxData.end();
1193 std::string matchingKey(
"hasMatchingDescriptor");
1194 std::string descriptorKey(
"descriptorPtr");
1195 auto itMatching = auxData.find(matchingKey);
1196 auto itDescriptor = auxData.find(descriptorKey);
1197 if (itMatching != auxData.end()) (const_cast<io::StreamMetadata::AuxDataMap&>(auxData)).erase(itMatching);
1198 if (itDescriptor != auxData.end()) (const_cast<io::StreamMetadata::AuxDataMap&>(auxData)).erase(itDescriptor);
1202 const Descriptor::Ptr descriptor)
1204 std::string descriptorKey(
"descriptorPtr");
1205 std::string matchingKey(
"hasMatchingDescriptor");
1206 auto itMatching = auxData.find(matchingKey);
1207 if (itMatching == auxData.end()) {
1216 std::string descriptorKey(
"descriptorPtr");
1217 auto itDescriptor = auxData.find(descriptorKey);
1218 assert(itDescriptor != auxData.end());
1219 const Descriptor::Ptr descriptor = std::any_cast<AttributeSet::Descriptor::Ptr>(itDescriptor->second);
1230 const Index pass(static_cast<uint16_t>(meta->pass()));
1231 const Index maximumPass(static_cast<uint16_t>(meta->pass() >> 16));
1233 const Index attributes = (maximumPass - 4) / 2;
1237 is.read(reinterpret_cast<char*>(&mVoxelBufferSize),
sizeof(uint16_t));
1238 Local::clearMatchingDescriptor(meta->auxData());
1240 else if (pass == 1) {
1242 if (Local::hasMatchingDescriptor(meta->auxData())) {
1243 AttributeSet::Descriptor::Ptr descriptor = Local::retrieveMatchingDescriptor(meta->auxData());
1244 mAttributeSet->resetDescriptor(descriptor,
true);
1248 is.read(reinterpret_cast<char*>(&header),
sizeof(uint8_t));
1249 mAttributeSet->readDescriptor(is);
1250 if (header & uint8_t(1)) {
1252 Local::insertDescriptor(meta->auxData(), descriptor);
1256 if (header & uint8_t(2)) {
1257 uint64_t bytesToSkip;
1258 is.read(reinterpret_cast<char*>(&bytesToSkip),
sizeof(uint64_t));
1259 if (bytesToSkip > uint64_t(0)) {
1261 if (metadata && metadata->seekable()) {
1262 is.seekg(bytesToSkip, std::ios_base::cur);
1265 std::vector<uint8_t> tempData(bytesToSkip);
1266 is.read(reinterpret_cast<char*>(&tempData[0]), bytesToSkip);
1271 if (header > uint8_t(3)) {
1275 mAttributeSet->readMetadata(is);
1277 else if (pass < (attributes + 2)) {
1279 const size_t attributeIndex = pass - 2;
1281 mAttributeSet->get(attributeIndex) :
nullptr;
1284 Local::getOrInsertPagedStream(meta->auxData(),
static_cast<Index>(attributeIndex));
1290 else if (pass == attributes + 2) {
1293 const Index passValue(meta->pass());
1297 nonConstMeta.
setPass(mVoxelBufferSize);
1300 BaseLeaf::readBuffers(is, fromHalf);
1303 nonConstMeta.setPass(passValue);
1305 else if (pass < (attributes*2 + 3)) {
1307 const Index attributeIndex = pass - attributes - 3;
1309 mAttributeSet->get(attributeIndex) :
nullptr;
1312 Local::getOrInsertPagedStream(meta->auxData(), attributeIndex);
1318 if (pass > attributes + 3) {
1319 Local::destroyPagedStream(meta->auxData(), attributeIndex-1);
1322 else if (pass < buffers()) {
1324 const Index attributeIndex = pass - attributes - 4;
1325 Local::destroyPagedStream(meta->auxData(), attributeIndex);
1329 template<
typename T, Index Log2Dim>
1338 std::string key(
"paged:" + std::to_string(index));
1339 auto it = auxData.find(key);
1340 if (it != auxData.end()) {
1350 std::string key(
"paged:" + std::to_string(index));
1351 auto it = auxData.find(key);
1352 if (it != auxData.end()) {
1358 return *pagedStream;
1363 const Descriptor::Ptr descriptor)
1365 std::string descriptorKey(
"descriptorPtr");
1366 std::string matchingKey(
"hasMatchingDescriptor");
1367 auto itMatching = auxData.find(matchingKey);
1368 auto itDescriptor = auxData.find(descriptorKey);
1369 if (itMatching == auxData.end()) {
1372 assert(itDescriptor == auxData.end());
1377 bool matching = std::any_cast<
bool>(itMatching->second);
1378 if (!matching)
return;
1379 assert(itDescriptor != auxData.end());
1382 const Descriptor::Ptr existingDescriptor = std::any_cast<AttributeSet::Descriptor::Ptr>(itDescriptor->second);
1383 if (*existingDescriptor != *descriptor) {
1391 std::string matchingKey(
"hasMatchingDescriptor");
1392 auto itMatching = auxData.find(matchingKey);
1394 if (itMatching == auxData.end())
return false;
1396 if (!std::any_cast<bool>(itMatching->second))
return false;
1402 std::string descriptorKey(
"descriptorPtr");
1403 auto itDescriptor = auxData.find(descriptorKey);
1405 if (itDescriptor == auxData.end())
return nullptr;
1407 const Descriptor::Ptr descriptor = std::any_cast<AttributeSet::Descriptor::Ptr>(itDescriptor->second);
1414 std::string matchingKey(
"hasMatchingDescriptor");
1415 std::string descriptorKey(
"descriptorPtr");
1416 auto itMatching = auxData.find(matchingKey);
1417 auto itDescriptor = auxData.find(descriptorKey);
1418 if (itMatching != auxData.end()) (const_cast<io::StreamMetadata::AuxDataMap&>(auxData)).erase(itMatching);
1419 if (itDescriptor != auxData.end()) (const_cast<io::StreamMetadata::AuxDataMap&>(auxData)).erase(itDescriptor);
1429 const Index pass(static_cast<uint16_t>(meta->pass()));
1434 if (meta->countingPasses()) {
1435 const Index requiredPasses = this->buffers();
1436 if (requiredPasses > pass) {
1437 meta->setPass(requiredPasses);
1442 const Index maximumPass(static_cast<uint16_t>(meta->pass() >> 16));
1443 const Index attributes = (maximumPass - 4) / 2;
1449 Local::insertDescriptor(meta->auxData(), mAttributeSet->descriptorPtr());
1451 else if (pass == 1) {
1453 bool matchingDescriptor = Local::hasMatchingDescriptor(meta->auxData());
1454 if (matchingDescriptor) {
1455 AttributeSet::Descriptor::Ptr descriptor = Local::retrieveMatchingDescriptor(meta->auxData());
1459 os.write(reinterpret_cast<const char*>(&header),
sizeof(uint8_t));
1460 mAttributeSet->writeDescriptor(os,
false);
1466 os.write(reinterpret_cast<const char*>(&header),
sizeof(uint8_t));
1467 mAttributeSet->writeDescriptor(os,
false);
1469 mAttributeSet->writeMetadata(os,
false,
true);
1471 else if (pass < attributes + 2) {
1473 const Index attributeIndex = pass - 2;
1476 Local::destroyPagedStream(meta->auxData(), attributeIndex-1);
1479 mAttributeSet->getConst(attributeIndex) :
nullptr;
1482 Local::getOrInsertPagedStream(meta->auxData(), attributeIndex);
1485 array->writePagedBuffers(pagedStream,
false);
1488 else if (pass == attributes + 2) {
1489 const Index attributeIndex = pass - 3;
1490 Local::destroyPagedStream(meta->auxData(), attributeIndex);
1492 BaseLeaf::writeBuffers(os, toHalf);
1494 else if (pass < (attributes*2 + 3)) {
1496 const Index attributeIndex = pass - attributes - 3;
1498 if (pass > attributes + 2) {
1499 Local::destroyPagedStream(meta->auxData(), attributeIndex-1);
1502 mAttributeSet->getConst(attributeIndex) :
nullptr;
1505 Local::getOrInsertPagedStream(meta->auxData(), attributeIndex);
1508 array->writePagedBuffers(pagedStream,
false);
1511 else if (pass < buffers()) {
1512 Local::clearMatchingDescriptor(meta->auxData());
1514 const Index attributeIndex = pass - attributes - 4;
1515 Local::destroyPagedStream(meta->auxData(), attributeIndex);
1519 template<
typename T, Index Log2Dim>
1526 #if OPENVDB_ABI_VERSION_NUMBER >= 10 1527 template<
typename T, Index Log2Dim>
1535 template<
typename T, Index Log2Dim>
1539 BaseLeaf::evalActiveBoundingBox(bbox, visitVoxels);
1542 template<
typename T, Index Log2Dim>
1546 return BaseLeaf::getNodeBoundingBox();
1549 template<
typename T, Index Log2Dim>
1555 this->assertNonModifiableUnlessZero(value);
1559 for (
Int32 x = bbox.min().x(); x <= bbox.max().x(); ++x) {
1560 const Index offsetX = (x & (DIM-1u)) << 2*Log2Dim;
1561 for (
Int32 y = bbox.min().y(); y <= bbox.max().y(); ++y) {
1562 const Index offsetXY = offsetX + ((y & (DIM-1u)) << Log2Dim);
1563 for (
Int32 z = bbox.min().z(); z <= bbox.max().z(); ++z) {
1564 const Index offset = offsetXY + (z & (DIM-1u));
1565 this->setValueMask(offset, active);
1571 template<
typename T, Index Log2Dim>
1575 this->assertNonModifiableUnlessZero(value);
1579 if (active) this->setValuesOn();
1580 else this->setValuesOff();
1587 template <
typename Po
intDataTreeT>
1588 inline AttributeSet::Descriptor::Ptr
1591 auto leafIter = tree.beginLeaf();
1592 if (!leafIter)
return nullptr;
1594 const AttributeSet::Descriptor& descriptor = leafIter->attributeSet().descriptor();
1595 auto newDescriptor = std::make_shared<AttributeSet::Descriptor>(descriptor);
1596 for (; leafIter; ++leafIter) {
1597 leafIter->resetDescriptor(newDescriptor);
1600 return newDescriptor;
1604 template <
typename Po
intDataTreeT>
1608 auto leafIter = tree.beginLeaf();
1609 for (; leafIter; ++leafIter) {
1610 for (
size_t i = 0; i < leafIter->attributeSet().size(); i++) {
1611 leafIter->attributeArray(i).setStreaming(on);
1617 template <
typename Po
intDataTreeT>
1619 prefetch(PointDataTreeT& tree,
bool position,
bool otherAttributes)
1624 auto leaf = tree.cbeginLeaf();
1627 const auto& attributeSet = leaf->attributeSet();
1631 for ( ; leaf; ++leaf) {
1632 leaf->buffer().data();
1637 size_t positionIndex = attributeSet.find(
"P");
1639 if (position && positionIndex != AttributeSet::INVALID_POS) {
1640 for (leaf = tree.cbeginLeaf(); leaf; ++leaf) {
1641 assert(leaf->hasAttribute(positionIndex));
1642 leaf->constAttributeArray(positionIndex).loadData();
1648 if (otherAttributes) {
1649 const size_t attributes = attributeSet.size();
1650 for (
size_t attributeIndex = 0; attributeIndex < attributes; attributeIndex++) {
1651 if (attributeIndex == positionIndex)
continue;
1652 for (leaf = tree.cbeginLeaf(); leaf; ++leaf) {
1653 assert(leaf->hasAttribute(attributeIndex));
1654 leaf->constAttributeArray(attributeIndex).loadData();
1661 namespace internal {
1678 template<
typename HeadT,
int HeadLevel>
1683 using Type =
typename SubtreeT::template Append<RootNodeT>;
1688 template <
typename ChildT, Index Log2Dim,
int HeadLevel>
1693 using Type =
typename SubtreeT::template Append<InternalNodeT>;
1698 template <
typename ChildT, Index Log2Dim>
1712 template <
typename TreeType>
1731 template<Index Dim1,
typename T2>
1732 struct SameLeafConfig<Dim1, points::PointDataLeafNode<T2, Dim1>> {
static const bool value =
true; };
1738 #endif // OPENVDB_POINTS_POINT_DATA_GRID_HAS_BEEN_INCLUDED void negate()
Definition: PointDataGrid.h:594
ChildOnIter endChildOn()
Definition: PointDataGrid.h:736
Definition: Exceptions.h:65
ValueAllIter endValueAll()
Definition: PointDataGrid.h:722
void setActiveState(const Coord &xyz, bool on)
Definition: PointDataGrid.h:532
ChildOnIter beginChildOn()
Definition: PointDataGrid.h:726
Definition: IndexIterator.h:42
static pnanovdb_uint32_t allocate(pnanovdb_uint32_t *poffset, pnanovdb_uint32_t size, pnanovdb_uint32_t alignment)
Definition: pnanovdb_validate_strides.h:20
Index64 pointCount(const PointDataTreeT &tree, const FilterT &filter=NullFilter(), const bool inCoreOnly=false, const bool threaded=true)
Count the total number of points in a PointDataTree.
Definition: PointCountImpl.h:18
void setInputStream(std::istream &is)
Definition: StreamCompression.h:221
Attribute Group access and filtering for iteration.
void assertNonModifiableUnlessZero(const ValueType &value)
Definition: PointDataGrid.h:528
PointDataLeafNode * touchLeaf(const Coord &)
Return a pointer to this node.
Definition: PointDataGrid.h:458
Leaf nodes that require multi-pass I/O must inherit from this struct.
Definition: io.h:124
PointDataLeafNode(const Coord &coords, const T &value=zeroVal< T >(), bool active=false)
Construct using supplied origin, value and active status.
Definition: PointDataGrid.h:280
void setValuesOff()
Definition: PointDataGrid.h:553
ChildAllCIter beginChildAll() const
Definition: PointDataGrid.h:731
Definition: NodeMasks.h:208
Definition: TreeIterator.h:59
#define OPENVDB_THROW(exception, message)
Definition: Exceptions.h:74
void setActiveStateAndCache(const Coord &xyz, bool on, AccessorT &parent)
Definition: PointDataGrid.h:583
void setValueOn(Index offset)
Definition: PointDataGrid.h:545
T ValueType
Definition: PointDataGrid.h:245
PointDataLeafNode()
Default constructor.
Definition: PointDataGrid.h:268
PointDataLeafNode(const tree::LeafNode< ValueType, Log2Dim > &other, const T &value, TopologyCopy)
Definition: PointDataGrid.h:303
constexpr T zeroVal()
Return the value of type T that corresponds to zero.
Definition: Math.h:70
ChildAllIter beginChildAll()
Definition: PointDataGrid.h:732
const NodeT * probeConstNodeAndCache(const Coord &, AccessorT &) const
Return a const pointer to this node.
Definition: PointDataGrid.h:484
void uninitialize()
Global deregistration of point data-related types.
const PointDataLeafNode * probeConstLeafAndCache(const Coord &, AccessorT &) const
Return a const pointer to this node.
Definition: PointDataGrid.h:479
typename BaseLeaf::ValueAll ValueAll
Definition: PointDataGrid.h:600
void setValuesOn()
Definition: PointDataGrid.h:552
typename BaseLeaf::template DenseIter< const PointDataLeafNode, const ValueType, ChildAll > ChildAllCIter
Definition: PointDataGrid.h:652
void setValueOnlyAndCache(const Coord &, const ValueType &, AccessorT &)
Definition: PointDataGrid.h:572
Space-partitioning acceleration structure for points. Partitions the points into voxels to accelerate...
Definition: InternalNode.h:33
virtual bool compact()=0
Compact the existing array to become uniform if all values are identical.
#define VMASK_
Definition: PointDataGrid.h:703
typename BaseLeaf::template ChildIter< MaskOnIterator, const PointDataLeafNode, ChildOn > ChildOnCIter
Definition: PointDataGrid.h:644
Base class for iterators over internal and leaf nodes.
Definition: Iterator.h:29
void fill(const CoordBBox &, const ValueType &, bool)
Definition: PointDataGrid.h:1551
static index::State state()
Definition: AttributeGroup.h:145
ChildAllCIter cbeginChildAll() const
Definition: PointDataGrid.h:730
std::pair< ValueType, ValueType > ValueTypePair
Definition: PointDataGrid.h:246
PointDataLeafNode(const tree::LeafNode< ValueType, Log2Dim > &other, const T &, const T &, TopologyCopy)
Definition: PointDataGrid.h:310
typename NodeMaskType::OnIterator MaskOnIterator
Definition: PointDataGrid.h:611
void clip(const CoordBBox &, const ValueType &value)
Definition: PointDataGrid.h:565
IndexOnIter beginIndexOn() const
Definition: PointDataGrid.h:665
void prefetch(PointDataTreeT &tree, bool position=true, bool otherAttributes=true)
Sequentially pre-fetch all delayed-load voxel and attribute data from disk in order to accelerate sub...
Definition: PointDataGrid.h:1619
ValueOffCIter endValueOff() const
Definition: PointDataGrid.h:718
Attribute Array storage templated on type and compression codec.
ValueAllCIter cendValueAll() const
Definition: PointDataGrid.h:720
PointDataLeafNode * touchLeafAndCache(const Coord &, AccessorT &)
Return a pointer to this node.
Definition: PointDataGrid.h:460
typename BaseLeaf::template ValueIter< MaskDenseIterator, PointDataLeafNode, const ValueType, ValueAll > ValueAllIter
Definition: PointDataGrid.h:638
PointDataLeafNode(const PointDataLeafNode &other, const Coord &coords, const T &value=zeroVal< T >(), bool active=false)
Definition: PointDataGrid.h:286
Definition: AttributeArray.h:118
A list of types (not necessarily unique)
Definition: TypeList.h:577
ValueAllCIter cbeginValueAll() const
Definition: PointDataGrid.h:710
Definition: RootNode.h:38
void setValueOff(Index offset)
Definition: PointDataGrid.h:539
Definition: NodeMasks.h:270
Definition: AttributeGroup.h:101
ChildOnCIter cendChildOn() const
Definition: PointDataGrid.h:734
void addLeafAndCache(PointDataLeafNode *, AccessorT &)
Definition: PointDataGrid.h:454
void reorderAttributes(const Descriptor::Ptr &replacement)
Reorder attribute set.
Definition: PointDataGrid.h:827
ChildAllCIter cendChildAll() const
Definition: PointDataGrid.h:740
std::shared_ptr< PointDataLeafNode > Ptr
Definition: PointDataGrid.h:243
bool operator!=(const PointDataLeafNode &other) const
Definition: PointDataGrid.h:450
typename BaseLeaf::template ChildIter< MaskOffIterator, const PointDataLeafNode, ChildOff > ChildOffCIter
Definition: PointDataGrid.h:648
typename BaseLeaf::ChildAll ChildAll
Definition: PointDataGrid.h:609
PointDataLeafNode(PartialCreate, const Coord &coords, const T &value=zeroVal< T >(), bool active=false)
Definition: PointDataGrid.h:314
const PointDataLeafNode * probeConstLeaf(const Coord &) const
Return a const pointer to this node.
Definition: PointDataGrid.h:477
void initialize()
Global registration of point data-related types.
ValueAllCIter endValueAll() const
Definition: PointDataGrid.h:721
void setValueOnly(Index, const ValueType &)
Definition: PointDataGrid.h:536
std::shared_ptr< AttributeArray > Ptr
Definition: AttributeArray.h:125
ValueOnCIter beginValueOn() const
Definition: PointDataGrid.h:705
typename NodeMaskType::OffIterator MaskOffIterator
Definition: PointDataGrid.h:612
virtual Index size() const =0
IndexIter< ValueOnCIter, FilterT > beginIndexOn(const FilterT &filter) const
Definition: PointDataGrid.h:686
Ordered collection of uniquely-named attribute arrays.
Definition: AttributeSet.h:38
A Paging wrapper to std::ostream that is responsible for writing from a given output stream at interv...
Definition: StreamCompression.h:243
Base class for storing attribute data.
Definition: AttributeArray.h:92
A forward iterator over array indices with filtering IteratorT can be either IndexIter or ValueIndexI...
Definition: IndexIterator.h:139
Definition: LeafNode.h:209
typename PointDataNodeChain< ChildT, HeadLevel-1 >::Type SubtreeT
Definition: PointDataGrid.h:1691
std::vector< ValueType > IndexArray
Definition: PointDataGrid.h:247
BBox< Coord > CoordBBox
Definition: NanoVDB.h:2535
typename BaseLeaf::ValueOn ValueOn
Definition: PointDataGrid.h:598
ValueOnIter beginValueOn()
Definition: PointDataGrid.h:706
uint64_t Index64
Definition: Types.h:53
virtual void readPagedBuffers(compression::PagedInputStream &)=0
Read attribute buffers from a paged stream.
typename BaseLeaf::ValueOff ValueOff
Definition: PointDataGrid.h:599
Convenience wrappers to using Blosc and reading and writing of Paged data.
Definition: LeafNode.h:213
typename SubtreeT::template Append< InternalNodeT > Type
Definition: PointDataGrid.h:1693
Tag dispatch class that distinguishes topology copy constructors from deep copy constructors.
Definition: Types.h:683
typename BaseLeaf::template ChildIter< MaskOffIterator, PointDataLeafNode, ChildOff > ChildOffIter
Definition: PointDataGrid.h:646
Templated block class to hold specific data types and a fixed number of values determined by Log2Dim...
Definition: LeafNode.h:37
typename BaseLeaf::ChildOff ChildOff
Definition: PointDataGrid.h:608
ChildOnCIter beginChildOn() const
Definition: PointDataGrid.h:725
IndexIter< ValueOffCIter, FilterT > beginIndexOff(const FilterT &filter) const
Definition: PointDataGrid.h:691
const AttributeSet & attributeSet() const
Retrieve the attribute set.
Definition: PointDataGrid.h:322
const PointDataLeafNode * probeLeaf(const Coord &) const
Return a const pointer to this node.
Definition: PointDataGrid.h:482
Recursive node chain which generates a openvdb::TypeList value converted types of nodes to PointDataG...
Definition: PointDataGrid.h:1679
PointIndex< Index32, 1 > PointDataIndex32
Definition: Types.h:181
Container class that associates a tree with a transform and metadata.
Definition: Grid.h:28
void setValueOn(const Coord &xyz)
Definition: PointDataGrid.h:544
void setValueOff(const Coord &, const ValueType &)
Definition: PointDataGrid.h:541
typename SubtreeT::template Append< RootNodeT > Type
Definition: PointDataGrid.h:1683
const char * typeNameAsString< Vec3f >()
Definition: Types.h:535
ValueOnCIter endValueOn() const
Definition: PointDataGrid.h:715
ValueOffCIter beginValueOff() const
Definition: PointDataGrid.h:708
PointDataLeafNode * probeLeafAndCache(const Coord &, AccessorT &)
Return a pointer to this node.
Definition: PointDataGrid.h:472
std::shared_ptr< PagedOutputStream > Ptr
Definition: StreamCompression.h:246
void renameAttributes(PointDataTreeT &tree, const std::vector< Name > &oldNames, const std::vector< Name > &newNames)
Rename attributes in a VDB tree.
Definition: PointAttributeImpl.h:326
Definition: Exceptions.h:13
void writeCompressedValuesSize(std::ostream &os, const T *srcBuf, Index srcCount)
Definition: PointDataGrid.h:139
IndexOffIter beginIndexOff() const
Definition: PointDataGrid.h:670
static Index size()
Return the total number of voxels represented by this LeafNode.
Definition: LeafNode.h:121
void resetBackground(const ValueType &, const ValueType &newBackground)
Definition: PointDataGrid.h:587
OPENVDB_API SharedPtr< StreamMetadata > getStreamMetadataPtr(std::ios_base &)
Return a shared pointer to an object that stores metadata (file format, compression scheme...
Similiar to ValueConverter, but allows for tree configuration conversion to a PointDataTree. ValueConverter<PointDataIndex32> cannot be used as a PointDataLeafNode is not a specialization of LeafNode.
Definition: PointDataGrid.h:1713
Definition: PointDataGrid.h:170
typename BaseLeaf::template DenseIter< PointDataLeafNode, ValueType, ChildAll > ChildAllIter
Definition: PointDataGrid.h:650
std::unique_ptr< AttributeSet > UniquePtr
Definition: AttributeSet.h:45
typename NodeMaskType::DenseIterator MaskDenseIterator
Definition: PointDataGrid.h:613
void modifyValueAndActiveStateAndCache(const Coord &, const ModifyOp &, AccessorT &)
Definition: PointDataGrid.h:575
Typed class for storing attribute data.
Definition: AttributeArray.h:544
ChildOffCIter cbeginChildOff() const
Definition: PointDataGrid.h:727
ValueOffIter endValueOff()
Definition: PointDataGrid.h:719
AttributeSet::Descriptor::Ptr makeDescriptorUnique(PointDataTreeT &tree)
Deep copy the descriptor across all leaf nodes.
Definition: PointDataGrid.h:1589
Definition: LeafNode.h:210
ValueAllIter beginValueAll()
Definition: PointDataGrid.h:712
void reset(Index32 begin, Index32 end)
Reset the begining and end of the iterator.
Definition: IndexIterator.h:252
std::string Name
Definition: Name.h:19
void setValueOnly(const Coord &, const ValueType &)
Definition: PointDataGrid.h:535
OPENVDB_API void bloscCompress(char *compressedBuffer, size_t &compressedBytes, const size_t bufferBytes, const char *uncompressedBuffer, const size_t uncompressedBytes)
Compress into the supplied buffer.
bool hasSameTopology(const PointDataLeafNode< OtherType, OtherLog2Dim > *other) const
Return true if the given node (which may have a different ValueType than this node) has the same acti...
Definition: PointDataGrid.h:439
AttributeSet::Descriptor Descriptor
Definition: PointDataGrid.h:249
typename TreeType::RootNodeType RootNodeT
Definition: PointDataGrid.h:1714
Index32 Index
Definition: Types.h:54
void setValueOn(const Coord &, const ValueType &)
Definition: PointDataGrid.h:547
Definition: Exceptions.h:57
std::shared_ptr< PagedInputStream > Ptr
Definition: StreamCompression.h:209
ChildOffIter endChildOff()
Definition: PointDataGrid.h:739
Definition: LeafNode.h:210
OPENVDB_API size_t bloscCompressedSize(const char *buffer, const size_t uncompressedBytes)
Convenience wrapper to retrieve the compressed size of buffer when compressed.
IndexIter< ValueAllCIter, FilterT > beginIndexAll(const FilterT &filter) const
Filtered leaf index iterator.
Definition: PointDataGrid.h:681
void compactAttributes(PointDataTreeT &tree)
Compact attributes in a VDB tree (if possible).
Definition: PointAttributeImpl.h:385
ChildOffCIter endChildOff() const
Definition: PointDataGrid.h:738
ChildOnCIter cbeginChildOn() const
Definition: PointDataGrid.h:724
PointDataLeafNode(const tools::PointIndexLeafNode< OtherValueType, Log2Dim > &other)
Definition: PointDataGrid.h:296
void modifyValue(const Coord &, const ModifyOp &)
Definition: PointDataGrid.h:559
bool isGroup(const AttributeArray &array)
Definition: AttributeGroup.h:63
void setValueOff(Index, const ValueType &)
Definition: PointDataGrid.h:542
Index filtering on group membership.
Definition: AttributeGroup.h:134
ValueOnCIter cbeginValueOn() const
Definition: PointDataGrid.h:704
NodeT * probeNodeAndCache(const Coord &, AccessorT &)
Return a pointer to this node.
Definition: PointDataGrid.h:463
void setSizeOnly(bool sizeOnly)
Size-only mode tags the stream as only reading size data.
Definition: StreamCompression.h:216
void writeCompressedValues(std::ostream &os, PointDataIndex32 *srcBuf, Index srcCount, const util::NodeMask< 3 > &, const util::NodeMask< 3 > &, bool)
openvdb::io::writeCompressedValues specialized on PointDataIndex32 arrays to ignore the value mask...
Definition: PointDataGrid.h:106
A forward iterator over array indices in a single voxel.
Definition: IndexIterator.h:64
typename BaseLeaf::template ChildIter< MaskOnIterator, PointDataLeafNode, ChildOn > ChildOnIter
Definition: PointDataGrid.h:642
void readCompressedValues(std::istream &is, PointDataIndex32 *destBuf, Index destCount, const util::NodeMask< 3 > &, bool)
openvdb::io::readCompressedValues specialized on PointDataIndex32 arrays to ignore the value mask...
Definition: PointDataGrid.h:46
PointDataLeafNode(const PointDataLeafNode &other)
Construct using deep copy of other PointDataLeafNode.
Definition: PointDataGrid.h:274
const PointDataLeafNode * probeLeafAndCache(const Coord &, AccessorT &) const
Return a const pointer to this node.
Definition: PointDataGrid.h:481
ValueOnIter endValueOn()
Definition: PointDataGrid.h:716
Bit mask for the internal and leaf nodes of VDB. This is a 64-bit implementation. ...
Definition: NodeMasks.h:307
ChildOffCIter beginChildOff() const
Definition: PointDataGrid.h:728
ChildOffIter beginChildOff()
Definition: PointDataGrid.h:729
void resetDescriptor(const Descriptor::Ptr &replacement)
Replace the descriptor with a new one The new Descriptor must exactly match the old one...
Definition: PointDataGrid.h:866
ValueOnCIter cendValueOn() const
Definition: PointDataGrid.h:714
void addLeaf(PointDataLeafNode *)
Definition: PointDataGrid.h:452
void setValue(const Coord &, const ValueType &)
Definition: PointDataGrid.h:550
void setValueOffAndCache(const Coord &, const ValueType &, AccessorT &)
Definition: PointDataGrid.h:580
void modifyValueAndActiveState(const Coord &, const ModifyOp &)
Definition: PointDataGrid.h:562
OPENVDB_API void bloscDecompress(char *uncompressedBuffer, const size_t expectedBytes, const size_t bufferBytes, const char *compressedBuffer)
Decompress into the supplied buffer. Will throw if decompression fails or uncompressed buffer has ins...
Definition: LeafNode.h:257
void setOutputStream(std::ostream &os)
Definition: StreamCompression.h:258
void dropAttributes(PointDataTreeT &tree, const std::vector< size_t > &indices)
Drops attributes from the VDB tree.
Definition: PointAttributeImpl.h:238
typename BaseLeaf::template ValueIter< MaskOnIterator, const PointDataLeafNode, const ValueType, ValueOn > ValueOnCIter
Definition: PointDataGrid.h:632
ChildAllCIter endChildAll() const
Definition: PointDataGrid.h:741
Definition: IndexIterator.h:43
bool operator==(const PointDataLeafNode &other) const
Definition: PointDataGrid.h:445
void appendAttribute(PointDataTreeT &tree, const Name &name, const NamePair &type, const Index strideOrTotalSize=1, const bool constantStride=true, const Metadata *defaultValue=nullptr, const bool hidden=false, const bool transient=false)
Appends a new attribute to the VDB tree (this method does not require a templated AttributeType) ...
Definition: PointAttributeImpl.h:103
void signedFloodFill(const ValueType &, const ValueType &)
Definition: PointDataGrid.h:592
Attribute array storage for string data using Descriptor Metadata.
typename BaseLeaf::template ValueIter< MaskOffIterator, PointDataLeafNode, const ValueType, ValueOff > ValueOffIter
Definition: PointDataGrid.h:634
typename BaseLeaf::template ValueIter< MaskDenseIterator, const PointDataLeafNode, const ValueType, ValueAll > ValueAllCIter
Definition: PointDataGrid.h:640
IndexAllIter beginIndexAll() const
Leaf index iterator.
Definition: PointDataGrid.h:660
A Paging wrapper to std::istream that is responsible for reading from a given input stream and creati...
Definition: StreamCompression.h:206
Definition: AttributeGroup.h:72
void setStreamingMode(PointDataTreeT &tree, bool on=true)
Toggle the streaming mode on all attributes in the tree to collapse the attributes after deconstructi...
Definition: PointDataGrid.h:1606
ChildAllIter endChildAll()
Definition: PointDataGrid.h:742
std::shared_ptr< Descriptor > DescriptorPtr
Definition: AttributeSet.h:49
Definition: Exceptions.h:58
ChildOffCIter cendChildOff() const
Definition: PointDataGrid.h:737
Definition: LeafNode.h:209
void modifyValue(Index, const ModifyOp &)
Definition: PointDataGrid.h:556
Leaf nodes have no children, so their child iterators have no get/set accessors.
Definition: LeafNode.h:248
void setSizeOnly(bool sizeOnly)
Size-only mode tags the stream as only writing size data.
Definition: StreamCompression.h:253
ValueOffCIter cendValueOff() const
Definition: PointDataGrid.h:717
ValueOffCIter cbeginValueOff() const
Definition: PointDataGrid.h:707
Definition: NodeMasks.h:239
Definition: PointDataGrid.h:181
ValueOffIter beginValueOff()
Definition: PointDataGrid.h:709
ValueAllCIter beginValueAll() const
Definition: PointDataGrid.h:711
#define OPENVDB_VERSION_NAME
The version namespace name for this library version.
Definition: version.h.in:121
typename internal::PointDataNodeChain< RootNodeT, RootNodeT::LEVEL >::Type NodeChainT
Definition: PointDataGrid.h:1715
A no-op filter that can be used when iterating over all indices.
Definition: IndexIterator.h:50
PointDataLeafNode * probeLeaf(const Coord &)
Return a pointer to this node.
Definition: PointDataGrid.h:470
void setActiveState(Index offset, bool on)
Definition: PointDataGrid.h:533
void signedFloodFill(const ValueType &)
Definition: PointDataGrid.h:591
Descriptor & descriptor()
Return a reference to this attribute set's descriptor, which might be shared with other sets...
Definition: AttributeSet.h:102
void setValueOn(Index, const ValueType &)
Definition: PointDataGrid.h:548
ChildOnCIter endChildOn() const
Definition: PointDataGrid.h:735
typename BaseLeaf::ChildOn ChildOn
Definition: PointDataGrid.h:607
Index64 iterCount(const IterT &iter)
Count up the number of times the iterator can iterate.
Definition: IndexIterator.h:314
typename BaseLeaf::template ValueIter< MaskOnIterator, PointDataLeafNode, const ValueType, ValueOn > ValueOnIter
Definition: PointDataGrid.h:630
int32_t Int32
Definition: Types.h:56
Set of Attribute Arrays which tracks metadata about each array.
Definition: LeafNode.h:209
void setValueOff(const Coord &xyz)
Definition: PointDataGrid.h:538
void flush()
Manually flushes the current page to disk if non-zero.
Definition: LeafNode.h:210
void fill(const ValueType &value)
Definition: PointDataGrid.h:568
typename PointDataNodeChain< typename HeadT::ChildNodeType, HeadLevel-1 >::Type SubtreeT
Definition: PointDataGrid.h:1681
typename BaseLeaf::template ValueIter< MaskOffIterator, const PointDataLeafNode, const ValueType, ValueOff > ValueOffCIter
Definition: PointDataGrid.h:636
#define OPENVDB_USE_VERSION_NAMESPACE
Definition: version.h.in:212
Integer wrapper, required to distinguish PointIndexGrid and PointDataGrid from Int32Grid and Int64Gri...
Definition: Types.h:156
void assertNonmodifiable()
Definition: PointDataGrid.h:521
Tag dispatch class that distinguishes constructors during file input.
Definition: Types.h:689
Definition: Exceptions.h:60