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
39 static const char*
name() {
return "grp"; }
78 using Ptr = std::shared_ptr<GroupHandle>;
89 bool isUniform()
const {
return mArray.isUniform(); }
91 bool get(
Index n)
const;
92 bool getUnsafe(
Index n)
const;
106 using Ptr = std::shared_ptr<GroupWriteHandle>;
110 void set(
Index n,
bool on);
120 bool collapse(
bool on);
136 : mIndex(attributeSet.groupIndex(name)) { }
138 explicit GroupFilter(
const AttributeSet::Descriptor::GroupIndex& index)
144 template <
typename LeafT>
147 template <
typename LeafT>
149 mHandle.reset(
new GroupHandle(leaf.groupHandle(mIndex)));
152 template <
typename IterT>
153 bool valid(
const IterT& iter)
const {
155 return mHandle->getUnsafe(*iter);
159 const AttributeSet::Descriptor::GroupIndex mIndex;
173 #endif // OPENVDB_POINTS_ATTRIBUTE_GROUP_HAS_BEEN_INCLUDED
StorageType Type
Definition: AttributeGroup.h:35
Set of Attribute Arrays which tracks metadata about each array.
static const char * name()
Definition: AttributeGroup.h:39
GroupType ValueType
Definition: AttributeGroup.h:32
const GroupType mBitMask
Definition: AttributeGroup.h:96
Base class for storing attribute data.
Definition: AttributeArray.h:92
Definition: AttributeGroup.h:81
Index size() const
Definition: AttributeGroup.h:88
bool valid(const IterT &iter) const
Definition: AttributeGroup.h:153
std::shared_ptr< GroupHandle > Ptr
Definition: AttributeGroup.h:78
static index::State state()
Definition: AttributeGroup.h:143
GroupFilter(const AttributeSet::Descriptor::GroupIndex &index)
Definition: AttributeGroup.h:138
Attribute Array storage templated on type and compression codec.
Definition: IndexIterator.h:41
bool isGroup(const AttributeArray &array)
Definition: AttributeGroup.h:66
Definition: AttributeGroup.h:29
Definition: AttributeGroup.h:35
static index::State state(const LeafT &)
Definition: AttributeGroup.h:145
bool initialized() const
Definition: AttributeGroup.h:141
const GroupAttributeArray & mArray
Definition: AttributeGroup.h:95
Typed class for storing attribute data.
Definition: AttributeArray.h:566
Definition: AttributeGroup.h:75
bool isType() const
Return true if this attribute is of the same type as the template parameter.
Definition: AttributeArray.h:224
#define OPENVDB_USE_VERSION_NAMESPACE
Definition: version.h:154
Ordered collection of uniquely-named attribute arrays.
Definition: AttributeSet.h:35
Index32 Index
Definition: Types.h:31
std::string Name
Definition: Name.h:17
std::pair< Index, uint8_t > GroupIndex
Definition: AttributeGroup.h:83
#define OPENVDB_VERSION_NAME
The version namespace name for this library version.
Definition: version.h:102
void reset(const LeafT &leaf)
Definition: AttributeGroup.h:148
Definition: Exceptions.h:13
GroupType StorageType
Definition: AttributeGroup.h:31
GroupFilter(const Name &name, const AttributeSet &attributeSet)
Definition: AttributeGroup.h:135
uint8_t GroupType
Definition: AttributeGroup.h:23
State
Definition: IndexIterator.h:39
Definition: AttributeGroup.h:103
Index filtering on group membership.
Definition: AttributeGroup.h:132
bool isUniform() const
Definition: AttributeGroup.h:89