10 #ifndef OPENVDB_POINTS_POINT_CONVERSION_HAS_BEEN_INCLUDED
11 #define OPENVDB_POINTS_POINT_CONVERSION_HAS_BEEN_INCLUDED
26 #include <tbb/parallel_reduce.h>
28 #include <type_traits>
54 typename CompressionT,
55 typename PointDataGridT,
56 typename PositionArrayT,
57 typename PointIndexGridT>
58 inline typename PointDataGridT::Ptr
60 const PositionArrayT& positions,
61 const math::Transform& xform,
62 const Metadata* positionDefaultValue =
nullptr);
75 template <
typename CompressionT,
typename Po
intDataGr
idT,
typename ValueT>
76 inline typename PointDataGridT::Ptr
78 const math::Transform& xform,
79 const Metadata* positionDefaultValue =
nullptr);
93 template <
typename Po
intDataTreeT,
typename Po
intIndexTreeT,
typename Po
intArrayT>
96 const PointIndexTreeT& pointIndexTree,
98 const PointArrayT&
data,
100 const bool insertMetadata =
true);
112 template <
typename PositionAttribute,
typename Po
intDataGr
idT,
typename FilterT = NullFilter>
115 const PointDataGridT& grid,
118 const FilterT&
filter = NullFilter(),
119 const bool inCoreOnly =
false);
132 template <
typename TypedAttribute,
typename Po
intDataTreeT,
typename FilterT = NullFilter>
135 const PointDataTreeT& tree,
136 const std::vector<Index64>& pointOffsets,
138 const unsigned arrayIndex,
140 const FilterT&
filter = NullFilter(),
141 const bool inCoreOnly =
false);
155 template <
typename Group,
typename Po
intDataTreeT,
typename FilterT = NullFilter>
158 const PointDataTreeT& tree,
159 const std::vector<Index64>& pointOffsets,
161 const AttributeSet::Descriptor::GroupIndex
index,
162 const FilterT&
filter = NullFilter(),
163 const bool inCoreOnly =
false);
177 template<
typename PositionWrapper,
typename InterrupterT = openvdb::util::NullInterrupter>
180 const uint32_t pointsPerVoxel,
182 const Index decimalPlaces = 5,
183 InterrupterT*
const interrupter =
nullptr);
190 template<
typename ValueType>
201 size_t size()
const {
return mData.size(); }
202 void getPos(
size_t n, ValueType& xyz)
const { xyz = mData[
n]; }
207 const std::vector<value_type>& mData;
215 namespace point_conversion_internal {
223 static T zero() {
return zeroVal<T>(); }
224 template <
typename LeafT>
227 return Handle::create(array);
229 template <
typename LeafT>
232 return WriteHandle::create(array);
240 template <
typename LeafT>
244 return Handle::create(array, descriptor.getMetadata());
246 template <
typename LeafT>
250 return WriteHandle::create(array, descriptor.getMetadata());
254 template<
typename PointDataTreeType,
255 typename PointIndexTreeType,
256 typename AttributeListType>
267 const AttributeListType&
data,
277 for (
auto leaf = range.begin(); leaf; ++leaf) {
284 if (!pointIndexLeaf)
continue;
286 typename HandleT::Ptr attributeWriteHandle =
293 for (
const Index64 leafIndex: indices)
297 mData.get(value, leafIndex, i);
298 attributeWriteHandle->set(static_cast<Index>(index), i, value);
305 attributeWriteHandle->compact();
317 template<
typename Po
intDataTreeType,
typename Attribute,
typename FilterT>
320 using LeafNode =
typename PointDataTreeType::LeafNodeType;
328 const std::vector<Index64>& pointOffsets,
333 const bool inCoreOnly)
345 "ValueType is not Vec3f");
348 template <
typename IterT>
352 for (; iter; ++iter) {
353 const Vec3d xyz = iter.getCoord().asVec3d();
354 const Vec3d pos = sourceHandle.
get(*iter);
355 targetHandle.set(static_cast<Index>(offset++), 0,
364 for (
auto leaf = range.begin(); leaf; ++leaf) {
368 if (
mInCoreOnly && leaf->buffer().isOutOfCore())
continue;
374 auto handle = SourceHandleT::create(leaf->constAttributeArray(
mIndex));
377 auto iter = leaf->beginIndexOn();
378 convert(iter, pHandle, *handle, offset);
381 auto iter = leaf->beginIndexOn(
mFilter);
382 convert(iter, pHandle, *handle, offset);
399 template<
typename Po
intDataTreeType,
typename Attribute,
typename FilterT>
402 using LeafNode =
typename PointDataTreeType::LeafNodeType;
410 const std::vector<Index64>& pointOffsets,
415 const bool inCoreOnly)
424 template <
typename IterT>
428 if (sourceHandle.isUniform()) {
429 const ValueType uniformValue(sourceHandle.get(0));
430 for (; iter; ++iter) {
432 targetHandle.set(static_cast<Index>(offset), i, uniformValue);
438 for (; iter; ++iter) {
440 targetHandle.set(static_cast<Index>(offset), i,
441 sourceHandle.get(*iter, i));
452 for (
auto leaf = range.begin(); leaf; ++leaf) {
456 if (
mInCoreOnly && leaf->buffer().isOutOfCore())
continue;
463 *leaf, static_cast<Index>(
mIndex));
466 auto iter = leaf->beginIndexOn();
467 convert(iter, pHandle, *handle, offset);
469 auto iter = leaf->beginIndexOn(
mFilter);
470 convert(iter, pHandle, *handle, offset);
486 template<
typename Po
intDataTreeType,
typename Group,
typename FilterT>
489 using LeafNode =
typename PointDataTreeType::LeafNodeType;
495 const std::vector<Index64>& pointOffsets,
497 const AttributeSet::Descriptor::GroupIndex index,
499 const bool inCoreOnly)
507 template <
typename IterT>
513 if (groupArray.
get(0) & bitmask) {
514 for (; iter; ++iter) {
515 mGroup.setOffsetOn(static_cast<Index>(offset));
521 for (; iter; ++iter) {
522 if (groupArray.
get(*iter) & bitmask) {
523 mGroup.setOffsetOn(static_cast<Index>(offset));
532 for (
auto leaf = range.begin(); leaf; ++leaf) {
536 if (
mInCoreOnly && leaf->buffer().isOutOfCore())
continue;
547 auto iter = leaf->beginIndexOn();
548 convert(iter, groupArray, offset);
551 auto iter = leaf->beginIndexOn(
mFilter);
552 convert(iter, groupArray, offset);
567 template<
typename PositionArrayT>
572 : mPositions(positions)
573 , mInverseMat(inverse)
574 , mMin(std::numeric_limits<
Real>::
max())
575 , mMax(-std::numeric_limits<
Real>::
max()) {}
578 : mPositions(other.mPositions)
579 , mInverseMat(other.mInverseMat)
580 , mMin(std::numeric_limits<
Real>::
max())
581 , mMax(-std::numeric_limits<
Real>::
max()) {}
585 for (
size_t n = range.begin(),
N = range.
end();
n !=
N; ++
n) {
586 mPositions.getPos(
n, pos);
599 return BBoxd(mMin, mMax);
603 const PositionArrayT& mPositions;
614 template<
typename CompressionT,
typename Po
intDataGr
idT,
typename PositionArrayT,
typename Po
intIndexGr
idT>
615 inline typename PointDataGridT::Ptr
617 const PositionArrayT& positions,
619 const Metadata* positionDefaultValue)
621 using PointDataTreeT =
typename PointDataGridT::TreeType;
623 using PointIndexLeafT =
typename PointIndexGridT::TreeType::LeafNodeType;
624 using PointIndexT =
typename PointIndexLeafT::ValueType;
628 const NamePair positionType = PositionAttributeT::attributeType();
632 const auto& pointIndexTree = pointIndexGrid.tree();
633 typename PointDataTreeT::Ptr treePtr(
new PointDataTreeT(pointIndexTree));
637 auto descriptor = AttributeSet::Descriptor::create(positionType);
641 if (positionDefaultValue) descriptor->setDefaultValue(
"P", *positionDefaultValue);
645 const size_t positionIndex = descriptor->find(
"P");
654 LeafManagerT leafManager(*treePtr);
656 [&](LeafT& leaf,
size_t ) {
660 const auto* pointIndexLeaf = pointIndexTree.probeConstLeaf(leaf.origin());
661 assert(pointIndexLeaf);
665 Index pointCount(static_cast<Index>(pointIndexLeaf->indices().size()));
666 leaf.initializeAttributes(descriptor, pointCount, &lock);
671 leaf.attributeArray(positionIndex));
676 *
begin =
static_cast<PointIndexT*
>(
nullptr),
677 *
end = static_cast<PointIndexT*>(
nullptr);
681 for (
auto iter = pointIndexLeaf->cbeginValueOn(); iter; ++iter) {
685 const Coord& ijk = iter.getCoord();
686 const Vec3d& positionCellCenter(ijk.asVec3d());
690 pointIndexLeaf->getIndices(ijk, begin,
end);
692 while (begin <
end) {
695 positions.getPos(*begin, positionWorldSpace);
700 const Vec3f positionVoxelSpace(positionIndexSpace - positionCellCenter);
702 attributeWriteHandle->set(index++, positionVoxelSpace);
710 auto grid = PointDataGridT::create(treePtr);
711 grid->setTransform(xform.
copy());
719 template <
typename CompressionT,
typename Po
intDataGr
idT,
typename ValueT>
720 inline typename PointDataGridT::Ptr
723 const Metadata* positionDefaultValue)
728 tools::createPointIndexGrid<tools::PointIndexGrid>(pointList, xform);
729 return createPointDataGrid<CompressionT, PointDataGridT>(
730 *pointIndexGrid, pointList, xform, positionDefaultValue);
737 template <
typename Po
intDataTreeT,
typename Po
intIndexTreeT,
typename Po
intArrayT>
741 const bool insertMetadata)
746 auto iter = tree.cbeginLeaf();
750 const size_t index = iter->attributeSet().find(attributeName);
753 OPENVDB_THROW(KeyError,
"Attribute not found to populate - " << attributeName <<
".");
756 if (insertMetadata) {
764 PopulateAttributeOp<PointDataTreeT,
766 PointArrayT> populate(pointIndexTree, data, index, stride);
774 template <
typename PositionAttribute,
typename Po
intDataGr
idT,
typename FilterT>
777 const PointDataGridT& grid,
778 const std::vector<Index64>& pointOffsets,
781 const bool inCoreOnly)
783 using TreeType =
typename PointDataGridT::TreeType;
788 const TreeType& tree = grid.tree();
789 auto iter = tree.cbeginLeaf();
793 const size_t positionIndex = iter->attributeSet().find(
"P");
795 positionAttribute.expand();
796 LeafManagerT leafManager(tree);
797 ConvertPointDataGridPositionOp<TreeType, PositionAttribute, FilterT>
convert(
798 positionAttribute, pointOffsets, startOffset, grid.transform(), positionIndex,
801 positionAttribute.compact();
808 template <
typename TypedAttribute,
typename Po
intDataTreeT,
typename FilterT>
811 const PointDataTreeT& tree,
812 const std::vector<Index64>& pointOffsets,
814 const unsigned arrayIndex,
817 const bool inCoreOnly)
823 auto iter = tree.cbeginLeaf();
828 LeafManagerT leafManager(tree);
829 ConvertPointDataGridAttributeOp<PointDataTreeT, TypedAttribute, FilterT>
convert(
830 attribute, pointOffsets, startOffset, arrayIndex, stride,
840 template <
typename Group,
typename Po
intDataTreeT,
typename FilterT>
843 const PointDataTreeT& tree,
844 const std::vector<Index64>& pointOffsets,
846 const AttributeSet::Descriptor::GroupIndex index,
848 const bool inCoreOnly)
854 auto iter = tree.cbeginLeaf();
857 LeafManagerT leafManager(tree);
858 ConvertPointDataGridGroupOp<PointDataTree, Group, FilterT>
convert(
859 group, pointOffsets, startOffset, index,
868 template<
typename PositionWrapper,
typename InterrupterT>
871 const uint32_t pointsPerVoxel,
873 const Index decimalPlaces,
874 InterrupterT*
const interrupter)
876 using namespace point_conversion_internal;
880 static bool voxelSizeFromVolume(
const double volume,
881 const size_t estimatedVoxelCount,
885 static const double minimumVoxelVolume(3e-15);
888 double voxelVolume = volume /
static_cast<double>(estimatedVoxelCount);
891 if (voxelVolume < minimumVoxelVolume) {
892 voxelVolume = minimumVoxelVolume;
895 else if (voxelVolume > maximumVoxelVolume) {
896 voxelVolume = maximumVoxelVolume;
900 voxelSize =
static_cast<float>(
math::Pow(voxelVolume, 1.0/3.0));
904 static float truncate(
const float voxelSize,
Index decPlaces)
906 float truncatedVoxelSize = voxelSize;
909 for (
int i = decPlaces; i < 11; i++) {
910 truncatedVoxelSize =
static_cast<float>(
math::Truncate(
double(voxelSize), i));
911 if (truncatedVoxelSize != 0.0
f)
break;
914 return truncatedVoxelSize;
918 if (pointsPerVoxel == 0)
OPENVDB_THROW(ValueError,
"Points per voxel cannot be zero.");
922 float voxelSize(0.1
f);
924 const size_t numPoints = positions.size();
928 if (numPoints <= 1)
return voxelSize;
930 size_t targetVoxelCount(numPoints /
size_t(pointsPerVoxel));
931 if (targetVoxelCount == 0) targetVoxelCount++;
936 inverseTransform =
math::unit(inverseTransform);
938 tbb::blocked_range<size_t>
range(0, numPoints);
939 CalculatePositionBounds<PositionWrapper>
calculateBounds(positions, inverseTransform);
940 tbb::parallel_reduce(range, calculateBounds);
942 BBoxd bbox = calculateBounds.getBoundingBox();
946 if (bbox.min() == bbox.max())
return voxelSize;
948 double volume = bbox.
volume();
956 volume = extents[0]*extents[0]*extents[0];
960 volume = extents[0]*extents[1]*extents[1];
964 double previousVolume = volume;
966 if (!Local::voxelSizeFromVolume(volume, targetVoxelCount, voxelSize)) {
971 size_t previousVoxelCount(0);
972 size_t voxelCount(1);
974 if (interrupter) interrupter->start(
"Computing voxel size");
976 while (voxelCount > previousVoxelCount)
999 mask->setTransform(newTransform);
1005 previousVoxelCount = voxelCount;
1006 voxelCount = mask->activeVoxelCount();
1007 volume =
math::Pow3(voxelSize) *
static_cast<float>(voxelCount);
1011 if (volume >= previousVolume)
break;
1012 previousVolume = volume;
1014 const float previousVoxelSize = voxelSize;
1018 if (!Local::voxelSizeFromVolume(volume, targetVoxelCount, voxelSize)) {
1019 voxelSize = previousVoxelSize;
1026 if (voxelSize / previousVoxelSize > 0.9
f)
break;
1029 if (interrupter) interrupter->end();
1033 return Local::truncate(voxelSize, decimalPlaces);
1043 typename CompressionT,
1044 typename PointDataGridT,
1045 typename PositionArrayT,
1046 typename PointIndexGridT>
1048 inline typename PointDataGridT::Ptr
1050 const PositionArrayT& positions,
1054 return createPointDataGrid<CompressionT, PointDataGridT>(
1055 pointIndexGrid, positions, xform, positionDefaultValue.get());
1059 template <
typename CompressionT,
typename Po
intDataGr
idT,
typename ValueT>
1061 inline typename PointDataGridT::Ptr
1066 return createPointDataGrid<CompressionT, PointDataGridT>(
1067 positions, xform, positionDefaultValue.get());
1078 #endif // OPENVDB_POINTS_POINT_CONVERSION_HAS_BEEN_INCLUDED
bool isUniform() const override
Return true if this array is stored as a single uniform value.
Vec2< T > minComponent(const Vec2< T > &v1, const Vec2< T > &v2)
Return component-wise minimum of the two vectors.
vint4 max(const vint4 &a, const vint4 &b)
void parallel_for(int64_t start, int64_t end, std::function< void(int64_t index)> &&task, parallel_options opt=parallel_options(0, Split_Y, 1))
This tool produces a grid where every voxel that contains a point is active. It employes thread-local...
Type Truncate(Type x, unsigned int digits)
Return x truncated to the given number of decimal digits.
void operator()(const typename LeafManagerT::LeafRange &range) const
static WriteHandle::Ptr writeHandleFromLeaf(LeafT &leaf, Index index)
typename ConversionTraits< ValueType >::WriteHandle HandleT
Type Pow(Type x, int n)
Return xn.
LeafRange leafRange(size_t grainsize=1) const
Return a TBB-compatible LeafRange.
Write-able version of AttributeHandle.
FMT_CONSTEXPR auto begin(const C &c) -> decltype(c.begin())
const Index64 mStartOffset
GLuint GLenum GLenum transform
static openvdb::Name zero()
const std::vector< Index64 > & mPointOffsets
ValueType get(Index n) const
Return the value at index n.
static Handle::Ptr handleFromLeaf(LeafT &leaf, Index index)
bool isIdentity(const MatType &m)
Determine if a matrix is an identity matrix.
Point group manipulation in a VDB Point Grid.
#define OPENVDB_USE_VERSION_NAMESPACE
void convert(IterT &iter, HandleT &targetHandle, SourceHandleT &sourceHandle, Index64 &offset) const
typename LeafManagerT::LeafRange LeafRangeT
Index filters primarily designed to be used with a FilterIndexIter.
#define OPENVDB_LOG_DEBUG(mesg)
Tto convert(const Tfrom &source)
const std::vector< Index64 > & mPointOffsets
void join(const CalculatePositionBounds &other)
MatType unit(const MatType &mat, typename MatType::value_type eps=1.0e-8)
Return a copy of the given matrix with its upper 3×3 rows normalized.
const Index64 mStartOffset
std::shared_ptr< StringAttributeHandle > Ptr
static Ptr create(AttributeArray &array, const bool expand=true)
PointDataGridT::Ptr createPointDataGrid(const PointIndexGridT &pointIndexGrid, const PositionArrayT &positions, const math::Transform &xform, const Metadata *positionDefaultValue=nullptr)
Localises points with position into a PointDataGrid into two stages: allocation of the leaf attribute...
bool isGroup(const AttributeArray &array)
std::shared_ptr< StringAttributeWriteHandle > Ptr
CalculatePositionBounds(const PositionArrayT &positions, const math::Mat4d &inverse)
std::shared_ptr< Handle > Ptr
float computeVoxelSize(const PositionWrapper &positions, const uint32_t pointsPerVoxel, const math::Mat4d transform=math::Mat4d::identity(), const Index decimalPlaces=5, InterrupterT *const interrupter=nullptr)
const math::Transform & mTransform
SYS_FORCE_INLINE const_iterator end() const
void populateAttribute(PointDataTreeT &tree, const PointIndexTreeT &pointIndexTree, const openvdb::Name &attributeName, const PointArrayT &data, const Index stride=1, const bool insertMetadata=true)
Stores point attribute data in an existing PointDataGrid attribute.
typename PointIndexTreeType::LeafNodeType PointIndexLeafNode
ConvertPointDataGridPositionOp(Attribute &attribute, const std::vector< Index64 > &pointOffsets, const Index64 startOffset, const math::Transform &transform, const size_t index, const FilterT &filter, const bool inCoreOnly)
std::vector< Index > IndexArray
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
void OIIO_API split(string_view str, std::vector< string_view > &result, string_view sep=string_view(), int maxsplit=-1)
Base class for storing attribute data.
void operator()(const tbb::blocked_range< size_t > &range)
typename AttributeListType::value_type ValueType
Vec3< T > reversed() const
Return the vector (z, y, x)
ConvertPointDataGridAttributeOp(Attribute &attribute, const std::vector< Index64 > &pointOffsets, const Index64 startOffset, const size_t index, const Index stride, const FilterT &filter, const bool inCoreOnly)
const Index64 mStartOffset
void preScale(const Vec3< T0 > &v)
static WriteHandle::Ptr writeHandleFromLeaf(LeafT &leaf, Index index)
GLint GLenum GLsizei GLint GLsizei const void * data
void operator()(const LeafRangeT &range) const
GLuint GLuint GLsizei GLenum const void * indices
typename PointDataTreeType::LeafNodeType LeafNode
Attribute array storage for string data using Descriptor Metadata.
const AttributeListType & mData
OPENVDB_API void calculateBounds(const Transform &t, const Vec3d &minWS, const Vec3d &maxWS, Vec3d &minIS, Vec3d &maxIS)
Calculate an axis-aligned bounding box in index space from an axis-aligned bounding box in world spac...
This class manages a linear array of pointers to a given tree's leaf nodes, as well as optional auxil...
typename Attribute::ValueType ValueType
void operator()(const LeafRangeT &range) const
Type Pow3(Type x)
Return x3.
std::shared_ptr< Handle > Ptr
ConvertPointDataGridGroupOp(Group &group, const std::vector< Index64 > &pointOffsets, const Index64 startOffset, const AttributeSet::Descriptor::GroupIndex index, const FilterT &filter, const bool inCoreOnly)
Vec3< T > sorted() const
Return a vector with the components of this in ascending order.
typename PointDataTreeType::LeafNodeType LeafNode
void convert(IterT &iter, const GroupAttributeArray &groupArray, Index64 &offset) const
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.
std::pair< Name, Name > NamePair
typename LeafManagerT::LeafRange LeafRangeT
bool isApproxZero(const Type &x)
Return true if x is equal to zero to within the default floating-point comparison tolerance...
AttributeSet::Descriptor::GroupIndex GroupIndex
typename Attribute::ValueType ValueType
Point attribute manipulation in a VDB Point Grid.
BBoxd getBoundingBox() const
typename tree::LeafManager< const PointDataTreeType > LeafManagerT
const std::vector< Index64 > & mPointOffsets
typename RootNodeType::LeafNodeType LeafNodeType
typename PointIndexLeafNode::IndexArray IndexArray
Typed class for storing attribute data.
Set of Attribute Arrays which tracks metadata about each array.
ElementType volume() const
Return the volume enclosed by this bounding box.
Space-partitioning acceleration structure for points. Partitions the points into voxels to accelerate...
void convertPointDataGridAttribute(TypedAttribute &attribute, const PointDataTreeT &tree, const std::vector< Index64 > &pointOffsets, const Index64 startOffset, const unsigned arrayIndex, const Index stride=1, const FilterT &filter=NullFilter(), const bool inCoreOnly=false)
Convert the attribute from a PointDataGrid.
GLuint GLdouble GLdouble GLint GLint const GLdouble * points
Vec4< T0 > transform(const Vec4< T0 > &v) const
Transform a Vec4 by post-multiplication.
math::BBox< Vec3d > BBoxd
typename tree::LeafManager< const PointDataTreeType > LeafManagerT
Vec2< T > maxComponent(const Vec2< T > &v1, const Vec2< T > &v2)
Return component-wise maximum of the two vectors.
Vec3< typename MatType::value_type > getScale(const MatType &mat)
Return a Vec3 representing the lengths of the passed matrix's upper 3×3's rows.
static const Mat4< double > & identity()
Predefined constant for identity matrix.
Index64 pointOffsets(std::vector< Index64 > &pointOffsets, const PointDataTreeT &tree, const FilterT &filter=NullFilter(), const bool inCoreOnly=false, const bool threaded=true)
Populate an array of cumulative point offsets per leaf node.
typename tree::LeafManager< const PointDataTreeType > LeafManagerT
GA_API const UT_StringHolder N
typename ConversionTraits< ValueType >::Handle SourceHandleT
OIIO_API bool attribute(string_view name, TypeDesc type, const void *val)
Point-partitioner compatible STL vector attribute wrapper for convenience.
typename LeafManagerT::LeafRange LeafRangeT
typename LeafManagerT::LeafRange LeafRangeT
void convert(IterT &iter, HandleT &targetHandle, SourceHandleT &sourceHandle, Index64 &offset) const
void convertPointDataGridGroup(Group &group, const PointDataTreeT &tree, const std::vector< Index64 > &pointOffsets, const Index64 startOffset, const AttributeSet::Descriptor::GroupIndex index, const FilterT &filter=NullFilter(), const bool inCoreOnly=false)
Convert the group from a PointDataGrid.
typename PointDataTreeType::LeafNodeType LeafNode
CalculatePositionBounds(const CalculatePositionBounds &other, tbb::split)
const PointIndexTreeType & mPointIndexTree
typename Attribute::Handle HandleT
bool wasInterrupted(T *i, int percent=-1)
#define OPENVDB_VERSION_NAME
The version namespace name for this library version.
GLsizei const GLfloat * value
Attribute-owned data structure for points. Point attributes are stored in leaf nodes and ordered by v...
void getPos(size_t n, ValueType &xyz) const
ValueType get(Index n, Index m=0) const
void operator()(const LeafRangeT &range) const
typename tree::LeafManager< PointDataTreeType > LeafManagerT
static Handle::Ptr handleFromLeaf(LeafT &leaf, Index index)
Mat4 inverse(T tolerance=0) const
void convertPointDataGridPosition(PositionAttribute &positionAttribute, const PointDataGridT &grid, const std::vector< Index64 > &pointOffsets, const Index64 startOffset, const FilterT &filter=NullFilter(), const bool inCoreOnly=false)
Convert the position attribute from a Point Data Grid.
#define OPENVDB_THROW(exception, message)
PopulateAttributeOp(const PointIndexTreeType &pointIndexTree, const AttributeListType &data, const size_t index, const Index stride=1)
PointAttributeVector(const std::vector< value_type > &data, const Index stride=1)
typename Attribute::Handle HandleT