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