Go to the documentation of this file.
10 #ifndef OPENVDB_POINTS_ATTRIBUTE_GROUP_HAS_BEEN_INCLUDED
11 #define OPENVDB_POINTS_ATTRIBUTE_GROUP_HAS_BEEN_INCLUDED
36 static const char*
name() {
return "grp"; }
75 using Ptr = std::shared_ptr<GroupHandle>;
87 bool isUniform()
const {
return mArray.isUniform(); }
104 using Ptr = std::shared_ptr<GroupWriteHandle>;
138 : mIndex(attributeSet.groupIndex(name)) { }
140 explicit GroupFilter(
const AttributeSet::Descriptor::GroupIndex& index)
146 template <
typename LeafT>
149 template <
typename LeafT>
151 mHandle.reset(
new GroupHandle(leaf.groupHandle(mIndex)));
154 template <
typename IterT>
155 bool valid(
const IterT& iter)
const {
157 return mHandle->getUnsafe(*iter);
161 const AttributeSet::Descriptor::GroupIndex mIndex;
175 #endif // OPENVDB_POINTS_ATTRIBUTE_GROUP_HAS_BEEN_INCLUDED
GroupWriteHandle(GroupAttributeArray &array, const GroupType &offset)
Definition: AttributeGroup.h:79
Set of Attribute Arrays which tracks metadata about each array.
Index filtering on group membership.
Definition: AttributeGroup.h:135
GroupType ValueType
Definition: AttributeGroup.h:29
std::shared_ptr< GroupHandle > Ptr
Definition: AttributeGroup.h:75
Definition: AttributeGroup.h:27
bool compact()
Compact the existing array to become uniform if all values are identical.
const GroupType mBitMask
Definition: AttributeGroup.h:94
GroupHandle(const GroupAttributeArray &array, const GroupType &bitMask, BitMask)
Index size() const
Definition: AttributeGroup.h:86
Attribute Array storage templated on type and compression codec.
Base class for storing attribute data.
Definition: AttributeArray.h:93
bool valid(const IterT &iter) const
Definition: AttributeGroup.h:155
std::string Name
Definition: Name.h:17
@ PARTIAL
Definition: IndexIterator.h:41
Definition: AttributeGroup.h:102
static index::State state()
Definition: AttributeGroup.h:145
bool getUnsafe(Index n) const
GroupFilter(const AttributeSet::Descriptor::GroupIndex &index)
Definition: AttributeGroup.h:140
State
Definition: IndexIterator.h:40
bool initialized() const
Definition: AttributeGroup.h:143
const GroupAttributeArray & mArray
Definition: AttributeGroup.h:93
std::unique_ptr< GroupHandle > UniquePtr
Definition: AttributeGroup.h:76
void setUnsafe(Index n, bool on)
Set on at the given index n (assumes in-core and non-uniform)
Typed class for storing attribute data.
Definition: AttributeArray.h:566
Definition: AttributeGroup.h:32
Definition: AttributeGroup.h:73
static index::State state(const LeafT &)
Definition: AttributeGroup.h:147
bool collapse(bool on)
Set membership for the whole array and attempt to collapse.
void set(Index n, bool on)
Set on at the given index n.
bool isType() const
Return true if this attribute is of the same type as the template parameter.
Definition: AttributeArray.h:225
#define OPENVDB_USE_VERSION_NAMESPACE
Definition: version.h:147
bool isGroup(const AttributeArray &array)
Definition: AttributeGroup.h:63
Ordered collection of uniquely-named attribute arrays.
Definition: AttributeSet.h:39
void reset(const LeafT &leaf)
Definition: AttributeGroup.h:150
GroupFilter(const Name &name, const AttributeSet &attributeSet)
Definition: AttributeGroup.h:137
#define OPENVDB_VERSION_NAME
The version namespace name for this library version.
Definition: version.h:95
StorageType Type
Definition: AttributeGroup.h:32
std::pair< Index, uint8_t > GroupIndex
Definition: AttributeGroup.h:81
uint8_t GroupType
Definition: AttributeSet.h:31
bool isUniform() const
Definition: AttributeGroup.h:87
Definition: openvdb/Exceptions.h:13
GroupHandle(const GroupAttributeArray &array, const GroupType &offset)
GroupType StorageType
Definition: AttributeGroup.h:28
Index32 Index
Definition: openvdb/Types.h:32
static const char * name()
Definition: AttributeGroup.h:36