Go to the documentation of this file.
12 #ifndef OPENVDB_POINTS_POINT_DATA_GRID_HAS_BEEN_INCLUDED
13 #define OPENVDB_POINTS_POINT_DATA_GRID_HAS_BEEN_INCLUDED
29 #include <type_traits>
33 #include <boost/mpl/vector.hpp>
34 #include <boost/mpl/push_back.hpp>
35 #include <boost/mpl/back.hpp>
37 class TestPointDataLeaf;
55 const bool seek = destBuf ==
nullptr;
59 if (destBytes >= maximumBytes) {
61 maximumBytes <<
" bytes in voxel values.")
71 bytes16 =
static_cast<uint16_t
>(meta->pass());
73 is.seekg(
sizeof(uint16_t), std::ios_base::cur);
77 is.read(
reinterpret_cast<char*
>(&bytes16),
sizeof(uint16_t));
83 is.seekg(destBytes, std::ios_base::cur);
86 is.read(
reinterpret_cast<char*
>(destBuf), destBytes);
92 is.seekg(
int(bytes16), std::ios_base::cur);
96 std::unique_ptr<char[]> bloscBuffer(
new char[
int(bytes16)]);
97 is.read(bloscBuffer.get(), bytes16);
101 std::memcpy(destBuf, buffer.get(), destBytes);
118 if (srcBytes >= maximumBytes) {
120 maximumBytes <<
" bytes in voxel values.")
123 const char* charBuffer =
reinterpret_cast<const char*
>(srcBuf);
125 size_t compressedBytes;
126 std::unique_ptr<char[]> buffer =
bloscCompress( charBuffer, srcBytes,
127 compressedBytes,
false);
129 if (compressedBytes > 0) {
130 auto bytes16 =
static_cast<uint16_t
>(compressedBytes);
131 os.write(
reinterpret_cast<const char*
>(&bytes16),
sizeof(uint16_t));
132 os.write(
reinterpret_cast<const char*
>(buffer.get()), compressedBytes);
135 auto bytes16 =
static_cast<uint16_t
>(maximumBytes);
136 os.write(
reinterpret_cast<const char*
>(&bytes16),
sizeof(uint16_t));
137 os.write(
reinterpret_cast<const char*
>(srcBuf), srcBytes);
141 template <
typename T>
147 const size_t srcBytes = srcCount*
sizeof(T);
149 if (srcBytes >= maximumBytes) {
151 maximumBytes <<
" bytes in voxel values.")
154 const char* charBuffer =
reinterpret_cast<const char*
>(srcBuf);
159 if (compressedBytes > 0) {
160 auto bytes16 =
static_cast<uint16_t
>(compressedBytes);
161 os.write(
reinterpret_cast<const char*
>(&bytes16),
sizeof(uint16_t));
164 auto bytes16 =
static_cast<uint16_t
>(maximumBytes);
165 os.write(
reinterpret_cast<const char*
>(&bytes16),
sizeof(uint16_t));
203 template <
typename Po
intDataTreeT>
204 inline AttributeSet::Descriptor::Ptr
217 template <
typename Po
intDataTreeT>
228 template <
typename Po
intDataTreeT>
230 prefetch(PointDataTreeT& tree,
bool position =
true,
bool otherAttributes =
true);
236 template <
typename T, Index Log2Dim>
241 using Ptr = std::shared_ptr<PointDataLeafNode>;
257 using BaseLeaf::LOG2DIM;
258 using BaseLeaf::TOTAL;
260 using BaseLeaf::NUM_VALUES;
261 using BaseLeaf::NUM_VOXELS;
262 using BaseLeaf::SIZE;
263 using BaseLeaf::LEVEL;
274 , mAttributeSet(new
AttributeSet(*other.mAttributeSet)) { }
280 , mAttributeSet(new
AttributeSet) { assertNonModifiableUnlessZero(value); }
285 const T& value = zeroVal<T>(),
bool active =
false)
289 assertNonModifiableUnlessZero(value);
293 template<
typename OtherValueType>
300 template <
typename ValueType>
303 , mAttributeSet(new
AttributeSet) { assertNonModifiableUnlessZero(value); }
307 template <
typename ValueType>
313 const T& value = zeroVal<T>(),
bool active =
false)
315 , mAttributeSet(new
AttributeSet) { assertNonModifiableUnlessZero(value); }
323 void initializeAttributes(
const Descriptor::Ptr& descriptor,
const Index arrayLength,
326 void clearAttributes(
const bool updateValueMask =
true,
331 bool hasAttribute(
const size_t pos)
const;
334 bool hasAttribute(
const Name& attributeName)
const;
344 const size_t pos,
const Index strideOrTotalSize = 1,
345 const bool constantStride =
true,
353 const Descriptor& expected, Descriptor::Ptr& replacement);
356 void reorderAttributes(
const Descriptor::Ptr& replacement);
360 void renameAttributes(
const Descriptor& expected, Descriptor::Ptr& replacement);
369 void replaceAttributeSet(
AttributeSet* attributeSet,
bool allowMismatchingDescriptors =
false);
373 void resetDescriptor(
const Descriptor::Ptr& replacement);
378 void setOffsets(
const std::vector<ValueType>& offsets,
const bool updateValueMask =
true);
382 void validateOffsets()
const;
391 const AttributeArray& constAttributeArray(
const size_t pos)
const;
404 GroupHandle groupHandle(
const AttributeSet::Descriptor::GroupIndex& index)
const;
408 GroupWriteHandle groupWriteHandle(
const AttributeSet::Descriptor::GroupIndex& index);
422 void updateValueMask();
426 void setOffsetOn(
Index offset,
const ValueType& val);
427 void setOffsetOnly(
Index offset,
const ValueType& val);
431 template<
typename OtherType, Index OtherLog2Dim>
433 return BaseLeaf::hasSameTopology(other);
439 if(BaseLeaf::operator==(other) !=
true)
return false;
440 return (*this->mAttributeSet == *other.mAttributeSet);
446 template<
typename AccessorT>
452 template<
typename AccessorT>
455 template<
typename NodeT,
typename AccessorT>
459 if (!(std::is_same<NodeT,PointDataLeafNode>::value))
return nullptr;
460 return reinterpret_cast<NodeT*
>(
this);
464 template<
typename AccessorT>
471 template<
typename AccessorT>
473 template<
typename AccessorT>
476 template<
typename NodeT,
typename AccessorT>
480 if (!(std::is_same<NodeT,PointDataLeafNode>::value))
return nullptr;
481 return reinterpret_cast<const NodeT*
>(
this);
488 void readTopology(std::istream& is,
bool fromHalf =
false);
489 void writeTopology(std::ostream& os,
bool toHalf =
false)
const;
491 Index buffers()
const;
493 void readBuffers(std::istream& is,
bool fromHalf =
false);
494 void readBuffers(std::istream& is,
const CoordBBox&,
bool fromHalf =
false);
495 void writeBuffers(std::ostream& os,
bool toHalf =
false)
const;
500 void evalActiveBoundingBox(
CoordBBox& bbox,
bool visitVoxels =
true)
const;
512 assert(
false &&
"Cannot modify voxel values in a PointDataTree.");
519 if (value != zeroVal<T>()) this->assertNonmodifiable();
545 template<
typename ModifyOp>
548 template<
typename ModifyOp>
551 template<
typename ModifyOp>
557 void fill(
const CoordBBox&,
const ValueType&,
bool);
559 void fill(
const ValueType&,
bool);
561 template<
typename AccessorT>
564 template<
typename ModifyOp,
typename AccessorT>
566 assertNonmodifiable();
569 template<
typename AccessorT>
572 template<
typename AccessorT>
574 BaseLeaf::setActiveStateAndCache(xyz, on, parent);
578 assertNonModifiableUnlessZero(newBackground);
586 friend class ::TestPointDataLeaf;
593 std::unique_ptr<AttributeSet> mAttributeSet;
594 uint16_t mVoxelBufferSize = 0;
619 #if defined(_MSC_VER) && (_MSC_VER < 1914)
645 using ValueOnIter =
typename BaseLeaf::template ValueIter<
647 using ValueOnCIter =
typename BaseLeaf::template ValueIter<
649 using ValueOffIter =
typename BaseLeaf::template ValueIter<
653 using ValueAllIter =
typename BaseLeaf::template ValueIter<
657 using ChildOnIter =
typename BaseLeaf::template ChildIter<
659 using ChildOnCIter =
typename BaseLeaf::template ChildIter<
661 using ChildOffIter =
typename BaseLeaf::template ChildIter<
665 using ChildAllIter =
typename BaseLeaf::template DenseIter<
680 return this->beginIndex<ValueAllCIter, NullFilter>(filter);
685 return this->beginIndex<ValueOnCIter, NullFilter>(filter);
690 return this->beginIndex<ValueOffCIter, NullFilter>(filter);
693 template<
typename IterT,
typename FilterT>
697 template<
typename FilterT>
700 return this->beginIndex<ValueAllCIter, FilterT>(filter);
702 template<
typename FilterT>
705 return this->beginIndex<ValueOnCIter, FilterT>(filter);
707 template<
typename FilterT>
710 return this->beginIndex<ValueOffCIter, FilterT>(filter);
714 IndexVoxelIter beginIndexVoxel(
const Coord& ijk)
const;
717 template<
typename FilterT>
720 #define VMASK_ this->getValueMask()
767 template<
typename T, Index Log2Dim>
772 if (descriptor->size() != 1 ||
773 descriptor->find(
"P") == AttributeSet::INVALID_POS ||
779 mAttributeSet.reset(
new AttributeSet(descriptor, arrayLength, lock));
782 template<
typename T, Index Log2Dim>
787 mAttributeSet.reset(
new AttributeSet(*mAttributeSet, 0, lock));
795 if (updateValueMask) this->setValuesOff();
798 template<
typename T, Index Log2Dim>
802 return pos < mAttributeSet->size();
805 template<
typename T, Index Log2Dim>
809 const size_t pos = mAttributeSet->find(attributeName);
810 return pos != AttributeSet::INVALID_POS;
813 template<
typename T, Index Log2Dim>
816 const size_t pos,
const Index strideOrTotalSize,
817 const bool constantStride,
820 return mAttributeSet->appendAttribute(
821 expected, replacement, pos, strideOrTotalSize, constantStride, lock);
824 template<
typename T, Index Log2Dim>
827 const Descriptor& expected, Descriptor::Ptr& replacement)
829 mAttributeSet->dropAttributes(pos, expected, replacement);
832 template<
typename T, Index Log2Dim>
839 template<
typename T, Index Log2Dim>
843 mAttributeSet->renameAttributes(expected, replacement);
846 template<
typename T, Index Log2Dim>
850 for (
size_t i = 0; i < mAttributeSet->size(); i++) {
856 template<
typename T, Index Log2Dim>
864 if (!allowMismatchingDescriptors && mAttributeSet->descriptor() != attributeSet->
descriptor()) {
868 mAttributeSet.reset(attributeSet);
871 template<
typename T, Index Log2Dim>
878 template<
typename T, Index Log2Dim>
882 if (offsets.size() != LeafNodeType::NUM_VALUES) {
886 for (
Index index = 0; index < offsets.size(); ++index) {
887 setOffsetOnly(index, offsets[index]);
890 if (updateValueMask) this->updateValueMask();
893 template<
typename T, Index Log2Dim>
898 for (
Index index = 1; index < BaseLeaf::SIZE; ++index) {
899 if (this->getValue(index-1) > this->getValue(index)) {
905 for (
size_t attributeIndex = 1; attributeIndex < mAttributeSet->size(); ++attributeIndex ) {
906 if (mAttributeSet->getConst(attributeIndex-1)->size() != mAttributeSet->getConst(attributeIndex)->size()) {
912 if (mAttributeSet->size() > 0 && this->getValue(BaseLeaf::SIZE-1) != mAttributeSet->getConst(0)->size()) {
917 template<
typename T, Index Log2Dim>
922 return *mAttributeSet->get(pos);
925 template<
typename T, Index Log2Dim>
930 return *mAttributeSet->getConst(pos);
933 template<
typename T, Index Log2Dim>
937 return this->attributeArray(pos);
940 template<
typename T, Index Log2Dim>
944 const size_t pos = mAttributeSet->find(attributeName);
946 return *mAttributeSet->get(pos);
949 template<
typename T, Index Log2Dim>
953 const size_t pos = mAttributeSet->find(attributeName);
955 return *mAttributeSet->getConst(pos);
958 template<
typename T, Index Log2Dim>
962 return this->attributeArray(attributeName);
965 template<
typename T, Index Log2Dim>
977 template<
typename T, Index Log2Dim>
981 const AttributeSet::Descriptor::GroupIndex index = this->attributeSet().groupIndex(name);
982 return this->groupHandle(index);
985 template<
typename T, Index Log2Dim>
997 template<
typename T, Index Log2Dim>
1001 const AttributeSet::Descriptor::GroupIndex index = this->attributeSet().groupIndex(name);
1002 return this->groupWriteHandle(index);
1005 template<
typename T, Index Log2Dim>
1006 template<
typename ValueIterT,
typename FilterT>
1018 FilterT newFilter(filter);
1019 newFilter.reset(*
this);
1025 ValueIterT valueIter = IterTraitsT::begin(*
this);
1030 template<
typename T, Index Log2Dim>
1034 const Index index = LeafNodeType::coordToOffset(ijk);
1035 assert(index < BaseLeaf::SIZE);
1036 const ValueType end = this->getValue(index);
1041 template<
typename T, Index Log2Dim>
1049 template<
typename T, Index Log2Dim>
1050 template<
typename FilterT>
1055 FilterT newFilter(filter);
1056 newFilter.reset(*
this);
1060 template<
typename T, Index Log2Dim>
1064 return this->getLastValue();
1067 template<
typename T, Index Log2Dim>
1071 if (this->isEmpty())
return 0;
1072 else if (this->isDense())
return this->
pointCount();
1076 template<
typename T, Index Log2Dim>
1080 if (this->isEmpty())
return this->
pointCount();
1081 else if (this->isDense())
return 0;
1082 return iterCount(this->beginIndexOff());
1085 template<
typename T, Index Log2Dim>
1089 if (!this->attributeSet().descriptor().hasGroup(groupName)) {
1092 GroupFilter filter(groupName, this->attributeSet());
1096 return iterCount(this->beginIndexAll(filter));
1100 template<
typename T, Index Log2Dim>
1105 for (
Index n = 0; n < LeafNodeType::NUM_VALUES; n++) {
1106 end = this->getValue(n);
1107 this->setValueMask(n, (end - start) > 0);
1112 template<
typename T, Index Log2Dim>
1116 this->buffer().
setValue(offset, val);
1117 this->setValueMaskOn(offset);
1120 template<
typename T, Index Log2Dim>
1124 this->buffer().
setValue(offset, val);
1127 template<
typename T, Index Log2Dim>
1131 BaseLeaf::readTopology(is, fromHalf);
1134 template<
typename T, Index Log2Dim>
1138 BaseLeaf::writeTopology(os, toHalf);
1141 template<
typename T, Index Log2Dim>
1148 mAttributeSet->size() +
1149 mAttributeSet->size() +
1153 template<
typename T, Index Log2Dim>
1157 this->readBuffers(is, CoordBBox::inf(), fromHalf);
1160 template<
typename T, Index Log2Dim>
1169 std::string key(
"paged:" + std::to_string(index));
1170 auto it = auxData.find(key);
1171 if (it != auxData.end()) {
1179 std::string key(
"paged:" + std::to_string(index));
1180 auto it = auxData.find(key);
1181 if (it != auxData.end()) {
1182 return *(boost::any_cast<compression::PagedInputStream::Ptr>(it->second));
1187 return *pagedStream;
1193 std::string matchingKey(
"hasMatchingDescriptor");
1194 auto itMatching = auxData.find(matchingKey);
1195 return itMatching != auxData.end();
1200 std::string matchingKey(
"hasMatchingDescriptor");
1201 std::string descriptorKey(
"descriptorPtr");
1202 auto itMatching = auxData.find(matchingKey);
1203 auto itDescriptor = auxData.find(descriptorKey);
1209 const Descriptor::Ptr descriptor)
1211 std::string descriptorKey(
"descriptorPtr");
1212 std::string matchingKey(
"hasMatchingDescriptor");
1213 auto itMatching = auxData.find(matchingKey);
1214 if (itMatching == auxData.end()) {
1223 std::string descriptorKey(
"descriptorPtr");
1224 auto itDescriptor = auxData.find(descriptorKey);
1225 assert(itDescriptor != auxData.end());
1226 const Descriptor::Ptr descriptor = boost::any_cast<AttributeSet::Descriptor::Ptr>(itDescriptor->second);
1237 const Index pass(
static_cast<uint16_t
>(meta->pass()));
1238 const Index maximumPass(
static_cast<uint16_t
>(meta->pass() >> 16));
1240 const Index attributes = (maximumPass - 4) / 2;
1244 is.read(
reinterpret_cast<char*
>(&mVoxelBufferSize),
sizeof(uint16_t));
1245 Local::clearMatchingDescriptor(meta->auxData());
1247 else if (pass == 1) {
1249 if (Local::hasMatchingDescriptor(meta->auxData())) {
1250 AttributeSet::Descriptor::Ptr descriptor = Local::retrieveMatchingDescriptor(meta->auxData());
1251 mAttributeSet->resetDescriptor(descriptor,
true);
1255 is.read(
reinterpret_cast<char*
>(&header),
sizeof(uint8_t));
1256 mAttributeSet->readDescriptor(is);
1257 if (header & uint8_t(1)) {
1259 Local::insertDescriptor(meta->auxData(), descriptor);
1263 if (header & uint8_t(2)) {
1264 uint64_t bytesToSkip;
1265 is.read(
reinterpret_cast<char*
>(&bytesToSkip),
sizeof(uint64_t));
1266 if (bytesToSkip > uint64_t(0)) {
1268 if (metadata && metadata->seekable()) {
1269 is.seekg(bytesToSkip, std::ios_base::cur);
1272 std::vector<uint8_t> tempData(bytesToSkip);
1273 is.read(
reinterpret_cast<char*
>(&tempData[0]), bytesToSkip);
1278 if (header > uint8_t(3)) {
1282 mAttributeSet->readMetadata(is);
1284 else if (pass < (attributes + 2)) {
1286 const size_t attributeIndex = pass - 2;
1288 mAttributeSet->get(attributeIndex) :
nullptr;
1291 Local::getOrInsertPagedStream(meta->auxData(),
static_cast<Index>(attributeIndex));
1297 else if (pass == attributes + 2) {
1300 const Index passValue(meta->pass());
1304 nonConstMeta.
setPass(mVoxelBufferSize);
1307 BaseLeaf::readBuffers(is, fromHalf);
1310 nonConstMeta.
setPass(passValue);
1312 else if (pass < (attributes*2 + 3)) {
1314 const Index attributeIndex = pass - attributes - 3;
1316 mAttributeSet->get(attributeIndex) :
nullptr;
1319 Local::getOrInsertPagedStream(meta->auxData(), attributeIndex);
1325 if (pass > attributes + 3) {
1326 Local::destroyPagedStream(meta->auxData(), attributeIndex-1);
1329 else if (pass < buffers()) {
1331 const Index attributeIndex = pass - attributes - 4;
1332 Local::destroyPagedStream(meta->auxData(), attributeIndex);
1336 template<
typename T, Index Log2Dim>
1345 std::string key(
"paged:" + std::to_string(index));
1346 auto it = auxData.find(key);
1347 if (it != auxData.end()) {
1357 std::string key(
"paged:" + std::to_string(index));
1358 auto it = auxData.find(key);
1359 if (it != auxData.end()) {
1360 return *(boost::any_cast<compression::PagedOutputStream::Ptr>(it->second));
1365 return *pagedStream;
1370 const Descriptor::Ptr descriptor)
1372 std::string descriptorKey(
"descriptorPtr");
1373 std::string matchingKey(
"hasMatchingDescriptor");
1374 auto itMatching = auxData.find(matchingKey);
1375 auto itDescriptor = auxData.find(descriptorKey);
1376 if (itMatching == auxData.end()) {
1379 assert(itDescriptor == auxData.end());
1384 bool matching = boost::any_cast<bool>(itMatching->second);
1385 if (!matching)
return;
1386 assert(itDescriptor != auxData.end());
1389 const Descriptor::Ptr existingDescriptor = boost::any_cast<AttributeSet::Descriptor::Ptr>(itDescriptor->second);
1390 if (*existingDescriptor != *descriptor) {
1398 std::string matchingKey(
"hasMatchingDescriptor");
1399 auto itMatching = auxData.find(matchingKey);
1401 if (itMatching == auxData.end())
return false;
1403 if (!boost::any_cast<bool>(itMatching->second))
return false;
1409 std::string descriptorKey(
"descriptorPtr");
1410 auto itDescriptor = auxData.find(descriptorKey);
1412 if (itDescriptor == auxData.end())
return nullptr;
1414 const Descriptor::Ptr descriptor = boost::any_cast<AttributeSet::Descriptor::Ptr>(itDescriptor->second);
1421 std::string matchingKey(
"hasMatchingDescriptor");
1422 std::string descriptorKey(
"descriptorPtr");
1423 auto itMatching = auxData.find(matchingKey);
1424 auto itDescriptor = auxData.find(descriptorKey);
1436 const Index pass(
static_cast<uint16_t
>(meta->pass()));
1441 if (meta->countingPasses()) {
1442 const Index requiredPasses = this->buffers();
1443 if (requiredPasses > pass) {
1444 meta->setPass(requiredPasses);
1449 const Index maximumPass(
static_cast<uint16_t
>(meta->pass() >> 16));
1450 const Index attributes = (maximumPass - 4) / 2;
1456 Local::insertDescriptor(meta->auxData(), mAttributeSet->descriptorPtr());
1458 else if (pass == 1) {
1460 bool matchingDescriptor = Local::hasMatchingDescriptor(meta->auxData());
1461 if (matchingDescriptor) {
1462 AttributeSet::Descriptor::Ptr descriptor = Local::retrieveMatchingDescriptor(meta->auxData());
1466 os.write(
reinterpret_cast<const char*
>(&header),
sizeof(uint8_t));
1467 mAttributeSet->writeDescriptor(os,
false);
1473 os.write(
reinterpret_cast<const char*
>(&header),
sizeof(uint8_t));
1474 mAttributeSet->writeDescriptor(os,
false);
1476 mAttributeSet->writeMetadata(os,
false,
true);
1478 else if (pass < attributes + 2) {
1480 const Index attributeIndex = pass - 2;
1483 Local::destroyPagedStream(meta->auxData(), attributeIndex-1);
1486 mAttributeSet->getConst(attributeIndex) :
nullptr;
1489 Local::getOrInsertPagedStream(meta->auxData(), attributeIndex);
1495 else if (pass == attributes + 2) {
1496 const Index attributeIndex = pass - 3;
1497 Local::destroyPagedStream(meta->auxData(), attributeIndex);
1499 BaseLeaf::writeBuffers(os, toHalf);
1501 else if (pass < (attributes*2 + 3)) {
1503 const Index attributeIndex = pass - attributes - 3;
1505 if (pass > attributes + 2) {
1506 Local::destroyPagedStream(meta->auxData(), attributeIndex-1);
1509 mAttributeSet->getConst(attributeIndex) :
nullptr;
1512 Local::getOrInsertPagedStream(meta->auxData(), attributeIndex);
1518 else if (pass < buffers()) {
1519 Local::clearMatchingDescriptor(meta->auxData());
1521 const Index attributeIndex = pass - attributes - 4;
1522 Local::destroyPagedStream(meta->auxData(), attributeIndex);
1526 template<
typename T, Index Log2Dim>
1530 return BaseLeaf::memUsage() + mAttributeSet->
memUsage();
1533 template<
typename T, Index Log2Dim>
1537 BaseLeaf::evalActiveBoundingBox(bbox, visitVoxels);
1540 template<
typename T, Index Log2Dim>
1544 return BaseLeaf::getNodeBoundingBox();
1547 template<
typename T, Index Log2Dim>
1551 if (!this->allocate())
return;
1553 this->assertNonModifiableUnlessZero(value);
1558 const Index offsetX = (x & (DIM-1u)) << 2*Log2Dim;
1560 const Index offsetXY = offsetX + ((y & (DIM-1u)) << Log2Dim);
1562 const Index offset = offsetXY + (z & (DIM-1u));
1563 this->setValueMask(offset, active);
1569 template<
typename T, Index Log2Dim>
1573 this->assertNonModifiableUnlessZero(value);
1577 if (active) this->setValuesOn();
1578 else this->setValuesOff();
1585 template <
typename Po
intDataTreeT>
1586 inline AttributeSet::Descriptor::Ptr
1589 auto leafIter = tree.beginLeaf();
1590 if (!leafIter)
return nullptr;
1592 const AttributeSet::Descriptor& descriptor = leafIter->attributeSet().descriptor();
1593 auto newDescriptor = std::make_shared<AttributeSet::Descriptor>(descriptor);
1594 for (; leafIter; ++leafIter) {
1595 leafIter->resetDescriptor(newDescriptor);
1598 return newDescriptor;
1602 template <
typename Po
intDataTreeT>
1606 auto leafIter = tree.beginLeaf();
1607 for (; leafIter; ++leafIter) {
1608 for (
size_t i = 0; i < leafIter->attributeSet().size(); i++) {
1609 leafIter->attributeArray(i).setStreaming(on);
1615 template <
typename Po
intDataTreeT>
1617 prefetch(PointDataTreeT& tree,
bool position,
bool otherAttributes)
1622 auto leaf = tree.cbeginLeaf();
1625 const auto& attributeSet = leaf->attributeSet();
1629 for ( ; leaf; ++leaf) {
1630 leaf->buffer().data();
1635 size_t positionIndex = attributeSet.find(
"P");
1637 if (position && positionIndex != AttributeSet::INVALID_POS) {
1638 for (leaf = tree.cbeginLeaf(); leaf; ++leaf) {
1639 assert(leaf->hasAttribute(positionIndex));
1640 leaf->constAttributeArray(positionIndex).loadData();
1646 if (otherAttributes) {
1647 const size_t attributes = attributeSet.size();
1648 for (
size_t attributeIndex = 0; attributeIndex < attributes; attributeIndex++) {
1649 if (attributeIndex == positionIndex)
continue;
1650 for (leaf = tree.cbeginLeaf(); leaf; ++leaf) {
1651 assert(leaf->hasAttribute(attributeIndex));
1652 leaf->constAttributeArray(attributeIndex).loadData();
1659 namespace internal {
1676 template<
typename HeadT,
int HeadLevel>
1681 using Type =
typename boost::mpl::push_back<SubtreeT, RootNodeT>::type;
1686 template <
typename ChildT, Index Log2Dim,
int HeadLevel>
1691 using Type =
typename boost::mpl::push_back<SubtreeT, InternalNodeT>::type;
1696 template <
typename ChildT, Index Log2Dim>
1701 using Type =
typename boost::mpl::vector<LeafNodeT, InternalNodeT>::type;
1710 template <
typename TreeType>
1729 template<Index Dim1,
typename T2>
1730 struct SameLeafConfig<Dim1, points::PointDataLeafNode<T2, Dim1>> {
static const bool value =
true; };
1736 #endif // OPENVDB_POINTS_POINT_DATA_GRID_HAS_BEEN_INCLUDED
PointDataLeafNode(PartialCreate, const Coord &coords, const T &value=zeroVal< T >(), bool active=false)
Definition: PointDataGrid.h:312
typename internal::PointDataNodeChain< RootNodeT, RootNodeT::LEVEL >::Type NodeChainT
Definition: PointDataGrid.h:1713
PointDataLeafNode(const PointDataLeafNode &other)
Construct using deep copy of other PointDataLeafNode.
Definition: PointDataGrid.h:272
typename BaseLeaf::template DenseIter< const PointDataLeafNode, const ValueType, ChildAll > ChildAllCIter
Definition: PointDataGrid.h:668
Definition: LeafNode.h:205
IndexAllIter beginIndexAll() const
Leaf index iterator.
Definition: PointDataGrid.h:677
const AttributeSet & attributeSet() const
Retrieve the attribute set.
Definition: PointDataGrid.h:320
typename NodeMaskType::DenseIterator MaskDenseIterator
Definition: PointDataGrid.h:603
Recursive node chain which generates a boost::mpl::vector listing value converted types of nodes to P...
Definition: PointDataGrid.h:1677
Set of Attribute Arrays which tracks metadata about each array.
Convenience wrappers to using Blosc and reading and writing of Paged data.
virtual void readPagedBuffers(compression::PagedInputStream &)=0
Read attribute buffers from a paged stream.
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: PointCount.h:88
void assertNonmodifiable()
Definition: PointDataGrid.h:511
typename BaseLeaf::ValueOff ValueOff
Definition: PointDataGrid.h:589
PointDataLeafNode(const PointDataLeafNode &other, const Coord &coords, const T &value=zeroVal< T >(), bool active=false)
Definition: PointDataGrid.h:284
typename BaseLeaf::template ValueIter< MaskOffIterator, const PointDataLeafNode, const ValueType, ValueOff > ValueOffCIter
Definition: PointDataGrid.h:652
typename BaseLeaf::template ChildIter< MaskOnIterator, const PointDataLeafNode, ChildOn > ChildOnCIter
Definition: PointDataGrid.h:660
void setOutputStream(std::ostream &os)
Definition: StreamCompression.h:260
ChildOffCIter endChildOff() const
Definition: PointDataGrid.h:755
ValueAllIter beginValueAll()
Definition: PointDataGrid.h:729
typename PointDataNodeChain< typename HeadT::ChildNodeType, HeadLevel-1 >::Type SubtreeT
Definition: PointDataGrid.h:1679
ChildAllCIter cbeginChildAll() const
Definition: PointDataGrid.h:747
void setValueOff(const Coord &xyz)
Definition: PointDataGrid.h:528
void setValueOn(Index offset)
Definition: PointDataGrid.h:535
typename BaseLeaf::template ValueIter< MaskDenseIterator, PointDataLeafNode, const ValueType, ValueAll > ValueAllIter
Definition: PointDataGrid.h:654
Base class for storing attribute data.
Definition: AttributeArray.h:92
PointDataLeafNode(const tree::LeafNode< ValueType, Log2Dim > &other, const T &, const T &, TopologyCopy)
Definition: PointDataGrid.h:308
PointDataLeafNode(const Coord &coords, const T &value=zeroVal< T >(), bool active=false)
Construct using supplied origin, value and active status.
Definition: PointDataGrid.h:278
void addLeaf(PointDataLeafNode *)
Definition: PointDataGrid.h:445
ValueAllIter endValueAll()
Definition: PointDataGrid.h:739
Definition: Exceptions.h:60
typename boost::mpl::vector< LeafNodeT, InternalNodeT >::type Type
Definition: PointDataGrid.h:1701
Signed (x, y, z) 32-bit integer coordinates.
Definition: Coord.h:25
IndexOffIter beginIndexOff() const
Definition: PointDataGrid.h:687
AttributeSet::Descriptor Descriptor
Definition: PointDataGrid.h:247
void setValueOnly(Index, const ValueType &)
Definition: PointDataGrid.h:526
PointDataLeafNode * touchLeafAndCache(const Coord &, AccessorT &)
Definition: PointDataGrid.h:453
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.
void renameAttributes(PointDataTreeT &tree, const std::vector< Name > &oldNames, const std::vector< Name > &newNames)
Rename attributes in a VDB tree.
Definition: PointAttribute.h:458
ChildAllCIter cendChildAll() const
Definition: PointDataGrid.h:757
void assertNonModifiableUnlessZero(const ValueType &value)
Definition: PointDataGrid.h:518
Definition: PointDataGrid.h:174
PointDataLeafNode(const tools::PointIndexLeafNode< OtherValueType, Log2Dim > &other)
Definition: PointDataGrid.h:294
IndexIter< ValueAllCIter, FilterT > beginIndexAll(const FilterT &filter) const
Filtered leaf index iterator.
Definition: PointDataGrid.h:698
@ NONE
Definition: IndexIterator.h:42
#define VMASK_
Definition: PointDataGrid.h:720
ValueAllCIter cendValueAll() const
Definition: PointDataGrid.h:737
Definition: LeafNode.h:202
Index64 memUsage() const
Definition: PointDataGrid.h:1528
void setValueOn(const Coord &, const ValueType &)
Definition: PointDataGrid.h:537
PointIndex< Index32, 1 > PointDataIndex32
Definition: Types.h:158
void modifyValueAndActiveStateAndCache(const Coord &, const ModifyOp &, AccessorT &)
Definition: PointDataGrid.h:565
void setValue(const Coord &, const ValueType &)
Definition: PointDataGrid.h:540
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...
A Paging wrapper to std::istream that is responsible for reading from a given input stream and creati...
Definition: StreamCompression.h:208
Space-partitioning acceleration structure for points. Partitions the points into voxels to accelerate...
Int32 y() const
Definition: Coord.h:132
void setActiveStateAndCache(const Coord &xyz, bool on, AccessorT &parent)
Definition: PointDataGrid.h:573
typename boost::mpl::push_back< SubtreeT, InternalNodeT >::type Type
Definition: PointDataGrid.h:1691
static index::State state()
Definition: AttributeGroup.h:143
IndexOnIter beginIndexOn() const
Definition: PointDataGrid.h:682
void compactAttributes(PointDataTreeT &tree)
Compact attributes in a VDB tree (if possible).
Definition: PointAttribute.h:517
typename NodeMaskType::OnIterator MaskOnIterator
Definition: PointDataGrid.h:601
std::pair< ValueType, ValueType > ValueTypePair
Definition: PointDataGrid.h:244
std::shared_ptr< AttributeArray > Ptr
Definition: AttributeArray.h:126
void addLeafAndCache(PointDataLeafNode *, AccessorT &)
Definition: PointDataGrid.h:447
void setValueOn(const Coord &xyz)
Definition: PointDataGrid.h:534
ValueOnIter beginValueOn()
Definition: PointDataGrid.h:723
Library and file format version numbers.
Definition: NodeMasks.h:189
IndexIter< ValueOnCIter, FilterT > beginIndexOn(const FilterT &filter) const
Definition: PointDataGrid.h:703
Attribute Array storage templated on type and compression codec.
Int32 x() const
Definition: Coord.h:131
std::shared_ptr< PagedInputStream > Ptr
Definition: StreamCompression.h:211
Base class for iterators over internal and leaf nodes.
Definition: Iterator.h:29
OPENVDB_API size_t bloscCompressedSize(const char *buffer, const size_t uncompressedBytes)
Convenience wrapper to retrieve the compressed size of buffer when compressed.
void negate()
Definition: PointDataGrid.h:584
bool isGroup(const AttributeArray &array)
Definition: AttributeGroup.h:66
std::shared_ptr< PagedOutputStream > Ptr
Definition: StreamCompression.h:248
void modifyValue(Index, const ModifyOp &)
Definition: PointDataGrid.h:546
void modifyValueAndActiveState(const Coord &, const ModifyOp &)
Definition: PointDataGrid.h:552
std::shared_ptr< Descriptor > DescriptorPtr
Definition: AttributeSet.h:45
typename NodeMaskType::OffIterator MaskOffIterator
Definition: PointDataGrid.h:602
void resetBackground(const ValueType &, const ValueType &newBackground)
Definition: PointDataGrid.h:577
Definition: RootNode.h:43
ValueAllCIter endValueAll() const
Definition: PointDataGrid.h:738
T ValueType
Definition: PointDataGrid.h:243
PointDataLeafNode * probeLeaf(const Coord &)
Definition: PointDataGrid.h:463
std::vector< ValueType > IndexArray
Definition: PointDataGrid.h:245
Axis-aligned bounding box of signed integer coordinates.
Definition: Coord.h:248
typename BaseLeaf::ValueAll ValueAll
Definition: PointDataGrid.h:590
ValueOnCIter endValueOn() const
Definition: PointDataGrid.h:732
ChildAllIter beginChildAll()
Definition: PointDataGrid.h:749
Container class that associates a tree with a transform and metadata.
Definition: Grid.h:28
Definition: NodeMasks.h:251
Definition: NodeMasks.h:220
Attribute Group access and filtering for iteration.
void setSizeOnly(bool sizeOnly)
Size-only mode tags the stream as only reading size data.
Definition: StreamCompression.h:218
Definition: LeafNode.h:249
typename BaseLeaf::ChildOff ChildOff
Definition: PointDataGrid.h:598
ValueOffCIter beginValueOff() const
Definition: PointDataGrid.h:725
const char * typeNameAsString< Vec3f >()
Definition: Types.h:534
void setValueOff(const Coord &, const ValueType &)
Definition: PointDataGrid.h:531
void appendAttribute(PointDataTreeT &tree, const Name &name, const NamePair &type, const Index strideOrTotalSize=1, const bool constantStride=true, Metadata::Ptr metaDefaultValue=Metadata::Ptr(), 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: PointAttribute.h:242
void setValueOn(Index, const ValueType &)
Definition: PointDataGrid.h:538
OPENVDB_API SharedPtr< StreamMetadata > getStreamMetadataPtr(std::ios_base &)
Return a shared pointer to an object that stores metadata (file format, compression scheme,...
typename BaseLeaf::template DenseIter< PointDataLeafNode, ValueType, ChildAll > ChildAllIter
Definition: PointDataGrid.h:666
void setInputStream(std::istream &is)
Definition: StreamCompression.h:223
void setActiveState(const Coord &xyz, bool on)
Definition: PointDataGrid.h:522
ValueAllCIter beginValueAll() const
Definition: PointDataGrid.h:728
typename BaseLeaf::template ValueIter< MaskOnIterator, const PointDataLeafNode, const ValueType, ValueOn > ValueOnCIter
Definition: PointDataGrid.h:648
ValueOnIter endValueOn()
Definition: PointDataGrid.h:733
PointDataLeafNode(const tree::LeafNode< ValueType, Log2Dim > &other, const T &value, TopologyCopy)
Definition: PointDataGrid.h:301
ValueOffIter endValueOff()
Definition: PointDataGrid.h:736
void reorderAttributes(const Descriptor::Ptr &replacement)
Reorder attribute set.
Definition: PointDataGrid.h:834
PointDataLeafNode()
Default constructor.
Definition: PointDataGrid.h:266
Index64 iterCount(const IterT &iter)
Count up the number of times the iterator can iterate.
Definition: IndexIterator.h:314
typename BaseLeaf::ChildAll ChildAll
Definition: PointDataGrid.h:599
Similiar to ValueConverter, but allows for tree configuration conversion to a PointDataTree....
Definition: PointDataGrid.h:1711
virtual bool compact()=0
Compact the existing array to become uniform if all values are identical.
void clip(const CoordBBox &, const ValueType &value)
Definition: PointDataGrid.h:555
Bit mask for the internal and leaf nodes of VDB. This is a 64-bit implementation.
Definition: NodeMasks.h:288
Typed class for storing attribute data.
Definition: AttributeArray.h:566
IndexIter< ValueOffCIter, FilterT > beginIndexOff(const FilterT &filter) const
Definition: PointDataGrid.h:708
Definition: InternalNode.h:33
ChildAllIter endChildAll()
Definition: PointDataGrid.h:759
void modifyValue(const Coord &, const ModifyOp &)
Definition: PointDataGrid.h:549
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:50
AttributeSet::Descriptor::Ptr makeDescriptorUnique(PointDataTreeT &tree)
Deep copy the descriptor across all leaf nodes.
Definition: PointDataGrid.h:1587
Tag dispatch class that distinguishes topology copy constructors from deep copy constructors.
Definition: Types.h:681
ChildOffCIter beginChildOff() const
Definition: PointDataGrid.h:745
const Coord & max() const
Definition: Coord.h:322
void signedFloodFill(const ValueType &, const ValueType &)
Definition: PointDataGrid.h:582
ChildOffIter beginChildOff()
Definition: PointDataGrid.h:746
const PointDataLeafNode * probeConstLeafAndCache(const Coord &, AccessorT &) const
Definition: PointDataGrid.h:472
Leaf nodes that require multi-pass I/O must inherit from this struct.
Definition: io.h:124
virtual Index size() const =0
const Coord & min() const
Definition: Coord.h:321
void setValueOnlyAndCache(const Coord &, const ValueType &, AccessorT &)
Definition: PointDataGrid.h:562
ChildOnCIter endChildOn() const
Definition: PointDataGrid.h:752
void setValuesOn()
Definition: PointDataGrid.h:542
typename BaseLeaf::template ChildIter< MaskOffIterator, const PointDataLeafNode, ChildOff > ChildOffCIter
Definition: PointDataGrid.h:664
Templated block class to hold specific data types and a fixed number of values determined by Log2Dim....
Definition: LeafNode.h:37
Int32 z() const
Definition: Coord.h:133
void setValuesOff()
Definition: PointDataGrid.h:543
Definition: TreeIterator.h:64
void dropAttributes(PointDataTreeT &tree, const std::vector< size_t > &indices)
Drops attributes from the VDB tree.
Definition: PointAttribute.h:370
NodeT * probeNodeAndCache(const Coord &, AccessorT &)
Definition: PointDataGrid.h:456
ChildOnCIter cendChildOn() const
Definition: PointDataGrid.h:751
A forward iterator over array indices with filtering IteratorT can be either IndexIter or ValueIndexI...
Definition: IndexIterator.h:139
Definition: LeafNode.h:201
Attribute array storage for string data using Descriptor Metadata.
void setValueOffAndCache(const Coord &, const ValueType &, AccessorT &)
Definition: PointDataGrid.h:570
Definition: AttributeGroup.h:75
ValueOnCIter cbeginValueOn() const
Definition: PointDataGrid.h:721
#define OPENVDB_USE_VERSION_NAMESPACE
Definition: version.h:154
const PointDataLeafNode * probeLeaf(const Coord &) const
Definition: PointDataGrid.h:475
typename boost::mpl::push_back< SubtreeT, RootNodeT >::type Type
Definition: PointDataGrid.h:1681
Definition: LeafNode.h:201
typename BaseLeaf::ValueOn ValueOn
Definition: PointDataGrid.h:588
Definition: AttributeArray.h:119
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:432
Definition: LeafNode.h:201
void uninitialize()
Global deregistration of point data-related types.
ChildOnIter beginChildOn()
Definition: PointDataGrid.h:743
OPENVDB_DEPRECATED Index64 groupPointCount(const PointDataTreeT &tree, const Name &name, const bool inCoreOnly=true)
Definition: PointCount.h:235
void initialize()
Global registration of point data-related types.
A no-op filter that can be used when iterating over all indices.
Definition: IndexIterator.h:50
typename PointDataNodeChain< ChildT, HeadLevel-1 >::Type SubtreeT
Definition: PointDataGrid.h:1689
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:110
Ordered collection of uniquely-named attribute arrays.
Definition: AttributeSet.h:35
ValueAllCIter cbeginValueAll() const
Definition: PointDataGrid.h:727
bool operator==(const PointDataLeafNode &other) const
Definition: PointDataGrid.h:438
A Paging wrapper to std::ostream that is responsible for writing from a given output stream at interv...
Definition: StreamCompression.h:245
ValueOffIter beginValueOff()
Definition: PointDataGrid.h:726
void fill(const CoordBBox &, const ValueType &, bool)
Definition: PointDataGrid.h:1549
typename BaseLeaf::template ChildIter< MaskOffIterator, PointDataLeafNode, ChildOff > ChildOffIter
Definition: PointDataGrid.h:662
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:1617
Definition: PointDataGrid.h:185
const NodeT * probeConstNodeAndCache(const Coord &, AccessorT &) const
Definition: PointDataGrid.h:477
typename BaseLeaf::template ChildIter< MaskOnIterator, PointDataLeafNode, ChildOn > ChildOnIter
Definition: PointDataGrid.h:658
Index32 Index
Definition: Types.h:31
Integer wrapper, required to distinguish PointIndexGrid and PointDataGrid from Int32Grid and Int64Gri...
Definition: Types.h:133
ChildOffCIter cbeginChildOff() const
Definition: PointDataGrid.h:744
ChildAllCIter endChildAll() const
Definition: PointDataGrid.h:758
typename BaseLeaf::template ValueIter< MaskOffIterator, PointDataLeafNode, const ValueType, ValueOff > ValueOffIter
Definition: PointDataGrid.h:650
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:873
Definition: Exceptions.h:57
std::string Name
Definition: Name.h:17
ChildOffIter endChildOff()
Definition: PointDataGrid.h:756
ValueOnCIter cendValueOn() const
Definition: PointDataGrid.h:731
ChildOnIter endChildOn()
Definition: PointDataGrid.h:753
const PointDataLeafNode * probeLeafAndCache(const Coord &, AccessorT &) const
Definition: PointDataGrid.h:474
typename BaseLeaf::template ValueIter< MaskDenseIterator, const PointDataLeafNode, const ValueType, ValueAll > ValueAllCIter
Definition: PointDataGrid.h:656
#define OPENVDB_VERSION_NAME
Definition: version.h:108
Leaf nodes have no children, so their child iterators have no get/set accessors.
Definition: LeafNode.h:240
ChildOffCIter cendChildOff() const
Definition: PointDataGrid.h:754
@ ALL
Definition: IndexIterator.h:43
void setActiveState(Index offset, bool on)
Definition: PointDataGrid.h:523
void setSizeOnly(bool sizeOnly)
Size-only mode tags the stream as only writing size data.
Definition: StreamCompression.h:255
bool operator!=(const PointDataLeafNode &other) const
Definition: PointDataGrid.h:443
void signedFloodFill(const ValueType &)
Definition: PointDataGrid.h:581
A forward iterator over array indices in a single voxel.
Definition: IndexIterator.h:64
ValueOffCIter endValueOff() const
Definition: PointDataGrid.h:735
ChildOnCIter cbeginChildOn() const
Definition: PointDataGrid.h:741
typename BaseLeaf::template ValueIter< MaskOnIterator, PointDataLeafNode, const ValueType, ValueOn > ValueOnIter
Definition: PointDataGrid.h:646
Definition: Exceptions.h:65
Tag dispatch class that distinguishes constructors during file input.
Definition: Types.h:683
Definition: LeafNode.h:202
Descriptor & descriptor()
Return a reference to this attribute set's descriptor, which might be shared with other sets.
Definition: AttributeSet.h:98
typename BaseLeaf::ChildOn ChildOn
Definition: PointDataGrid.h:597
void flush()
Manually flushes the current page to disk if non-zero.
ValueOffCIter cbeginValueOff() const
Definition: PointDataGrid.h:724
ChildAllCIter beginChildAll() const
Definition: PointDataGrid.h:748
ValueOnCIter beginValueOn() const
Definition: PointDataGrid.h:722
T zeroVal()
Return the value of type T that corresponds to zero.
Definition: Math.h:59
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:1604
Definition: LeafNode.h:202
Definition: Exceptions.h:13
int32_t Int32
Definition: Types.h:33
Definition: Exceptions.h:58
typename TreeType::RootNodeType RootNodeT
Definition: PointDataGrid.h:1712
uint64_t Index64
Definition: Types.h:30
ValueOffCIter cendValueOff() const
Definition: PointDataGrid.h:734
virtual void writePagedBuffers(compression::PagedOutputStream &, bool outputTransient) const =0
Definition: AttributeGroup.h:103
ChildOnCIter beginChildOn() const
Definition: PointDataGrid.h:742
Index filtering on group membership.
Definition: AttributeGroup.h:132
void setValueOff(Index, const ValueType &)
Definition: PointDataGrid.h:532
#define OPENVDB_THROW(exception, message)
Definition: Exceptions.h:82
void writeCompressedValuesSize(std::ostream &os, const T *srcBuf, Index srcCount)
Definition: PointDataGrid.h:143
void setValueOnly(const Coord &, const ValueType &)
Definition: PointDataGrid.h:525
PointDataLeafNode * probeLeafAndCache(const Coord &, AccessorT &)
Definition: PointDataGrid.h:465
std::shared_ptr< PointDataLeafNode > Ptr
Definition: PointDataGrid.h:241
void fill(const ValueType &value)
Definition: PointDataGrid.h:558
void setValueOff(Index offset)
Definition: PointDataGrid.h:529