10#ifndef OPENVDB_POINTS_POINT_ATTRIBUTE_HAS_BEEN_INCLUDED
11#define OPENVDB_POINTS_POINT_ATTRIBUTE_HAS_BEEN_INCLUDED
29namespace point_attribute_internal {
31template <
typename ValueType>
34 static inline ValueType value() {
return zeroVal<ValueType>(); }
52template <
typename Po
intDataTreeT>
56 const Index strideOrTotalSize = 1,
57 const bool constantStride =
true,
58 const Metadata* defaultValue =
nullptr,
59 const bool hidden =
false,
60 const bool transient =
false);
72template <
typename ValueType,
74 typename PointDataTreeT>
76 const std::string& name,
77 const ValueType& uniformValue =
78 point_attribute_internal::Default<ValueType>::value(),
79 const Index strideOrTotalSize = 1,
80 const bool constantStride =
true,
82 const bool hidden =
false,
83 const bool transient =
false);
90template <
typename ValueType,
typename Po
intDataTreeT>
93 const ValueType& uniformValue =
94 point_attribute_internal::Default<ValueType>::value());
100template <
typename Po
intDataTreeT>
102 const std::vector<size_t>& indices);
108template <
typename Po
intDataTreeT>
110 const std::vector<Name>& names);
116template <
typename Po
intDataTreeT>
118 const size_t&
index);
124template <
typename Po
intDataTreeT>
137template <
typename Po
intDataTreeT>
139 const std::vector<Name>& oldNames,
140 const std::vector<Name>& newNames);
149template <
typename Po
intDataTreeT>
152 const Name& newName);
157template <
typename Po
intDataTreeT>
165#include "impl/PointAttributeImpl.h"
Attribute array storage for string data using Descriptor Metadata.
Attribute Group access and filtering for iteration.
Set of Attribute Arrays which tracks metadata about each array.
Attribute-owned data structure for points. Point attributes are stored in leaf nodes and ordered by v...
@ Default
Definition NanoVDB.h:397
Definition IndexIterator.h:35
void compactAttributes(PointDataTreeT &tree)
Compact attributes in a VDB tree (if possible).
void dropAttribute(PointDataTreeT &tree, const size_t &index)
Drop one attribute from the VDB tree (convenience method).
void collapseAttribute(PointDataTreeT &tree, const Name &name, const ValueType &uniformValue=point_attribute_internal::Default< ValueType >::value())
Collapse the attribute into a uniform value.
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)
void dropAttributes(PointDataTreeT &tree, const std::vector< size_t > &indices)
Drops attributes from the VDB tree.
void renameAttributes(PointDataTreeT &tree, const std::vector< Name > &oldNames, const std::vector< Name > &newNames)
Rename attributes in a VDB tree.
void renameAttribute(PointDataTreeT &tree, const Name &oldName, const Name &newName)
Rename an attribute in a VDB tree.
Definition PointDataGrid.h:170
std::string Name
Definition Name.h:19
Index32 Index
Definition Types.h:34
std::pair< Name, Name > NamePair
Definition AttributeArray.h:40
Definition Exceptions.h:13
Definition AttributeArray.h:437
#define OPENVDB_VERSION_NAME
The version namespace name for this library version.
Definition version.h.in:121
#define OPENVDB_USE_VERSION_NAMESPACE
Definition version.h.in:218