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(); }
89 bool get(
Index n)
const;
90 bool getUnsafe(
Index n)
const;
104 using Ptr = std::shared_ptr<GroupWriteHandle>;
110 void set(
Index n,
bool on);
112 void setUnsafe(
Index n,
bool on);
122 bool collapse(
bool on);
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
bool isUniform() const
Definition: AttributeGroup.h:87
static const char * name()
Definition: AttributeGroup.h:36
Ordered collection of uniquely-named attribute arrays.
Definition: AttributeSet.h:38
StorageType Type
Definition: AttributeGroup.h:32
static index::State state()
Definition: AttributeGroup.h:145
GroupFilter(const AttributeSet::Descriptor::GroupIndex &index)
Definition: AttributeGroup.h:140
Definition: IndexIterator.h:41
Index filtering on group membership.
Definition: AttributeGroup.h:134
Attribute Array storage templated on type and compression codec.
Definition: AttributeGroup.h:101
Definition: AttributeGroup.h:26
Base class for storing attribute data.
Definition: AttributeArray.h:92
std::shared_ptr< GroupHandle > Ptr
Definition: AttributeGroup.h:75
static index::State state(const LeafT &)
Definition: AttributeGroup.h:147
State
Definition: IndexIterator.h:39
std::string Name
Definition: Name.h:17
Definition: AttributeGroup.h:32
const GroupAttributeArray & mArray
Definition: AttributeGroup.h:93
std::unique_ptr< GroupHandle > UniquePtr
Definition: AttributeGroup.h:76
uint8_t GroupType
Definition: AttributeSet.h:31
bool isType() const
Return true if this attribute is of the same type as the template parameter.
Definition: AttributeArray.h:214
Definition: Exceptions.h:13
Index size() const
Definition: AttributeGroup.h:86
Definition: AttributeGroup.h:72
bool initialized() const
Definition: AttributeGroup.h:143
Index32 Index
Definition: Types.h:54
GroupFilter(const Name &name, const AttributeSet &attributeSet)
Definition: AttributeGroup.h:137
bool isGroup(const AttributeArray &array)
Definition: AttributeGroup.h:63
void reset(const LeafT &leaf)
Definition: AttributeGroup.h:150
bool valid(const IterT &iter) const
Definition: AttributeGroup.h:155
std::pair< Index, uint8_t > GroupIndex
Definition: AttributeGroup.h:81
GroupType StorageType
Definition: AttributeGroup.h:28
GroupType ValueType
Definition: AttributeGroup.h:29
#define OPENVDB_VERSION_NAME
The version namespace name for this library version.
Definition: version.h.in:116
Typed class for storing attribute data.
Definition: AttributeArray.h:532
Set of Attribute Arrays which tracks metadata about each array.
const GroupType mBitMask
Definition: AttributeGroup.h:94
Definition: AttributeGroup.h:79
#define OPENVDB_USE_VERSION_NAMESPACE
Definition: version.h.in:202