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
static index::State state()
Definition: AttributeGroup.h:145
Definition: AttributeGroup.h:73
GroupHandle(const GroupAttributeArray &array, const GroupType &offset)
Set of Attribute Arrays which tracks metadata about each array.
static index::State state(const LeafT &)
Definition: AttributeGroup.h:147
Definition: AttributeGroup.h:102
bool getUnsafe(Index n) const
GroupFilter(const Name &name, const AttributeSet &attributeSet)
Definition: AttributeGroup.h:137
Index32 Index
Definition: Types.h:31
const GroupType mBitMask
Definition: AttributeGroup.h:94
void set(Index n, bool on)
Set on at the given index n.
std::string Name
Definition: Name.h:17
GroupWriteHandle(GroupAttributeArray &array, const GroupType &offset)
Attribute Array storage templated on type and compression codec.
const GroupAttributeArray & mArray
Definition: AttributeGroup.h:93
@ PARTIAL
Definition: IndexIterator.h:41
std::unique_ptr< GroupHandle > UniquePtr
Definition: AttributeGroup.h:76
bool collapse(bool on)
Set membership for the whole array and attempt to collapse.
State
Definition: IndexIterator.h:40
bool isGroup(const AttributeArray &array)
Definition: AttributeGroup.h:63
bool compact()
Compact the existing array to become uniform if all values are identical.
static const char * name()
Definition: AttributeGroup.h:36
GroupType StorageType
Definition: AttributeGroup.h:28
Index filtering on group membership.
Definition: AttributeGroup.h:135
void reset(const LeafT &leaf)
Definition: AttributeGroup.h:150
Typed class for storing attribute data.
Definition: AttributeArray.h:566
Index size() const
Definition: AttributeGroup.h:86
Definition: AttributeGroup.h:27
Definition: AttributeGroup.h:79
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:146
GroupType ValueType
Definition: AttributeGroup.h:29
Base class for storing attribute data.
Definition: AttributeArray.h:93
Ordered collection of uniquely-named attribute arrays.
Definition: AttributeSet.h:39
void setUnsafe(Index n, bool on)
Set on at the given index n (assumes in-core and non-uniform)
std::pair< Index, uint8_t > GroupIndex
Definition: AttributeGroup.h:81
bool isUniform() const
Definition: AttributeGroup.h:87
Definition: AttributeGroup.h:32
const Name & name
Definition: PointAttribute.h:544
#define OPENVDB_VERSION_NAME
The version namespace name for this library version.
Definition: version.h:94
GroupHandle(const GroupAttributeArray &array, const GroupType &bitMask, BitMask)
Definition: Exceptions.h:13
bool initialized() const
Definition: AttributeGroup.h:143
uint8_t GroupType
Definition: AttributeSet.h:31
GroupFilter(const AttributeSet::Descriptor::GroupIndex &index)
Definition: AttributeGroup.h:140
bool valid(const IterT &iter) const
Definition: AttributeGroup.h:155
StorageType Type
Definition: AttributeGroup.h:32
std::shared_ptr< GroupHandle > Ptr
Definition: AttributeGroup.h:75