10 #ifndef OPENVDB_POINTS_ATTRIBUTE_GROUP_HAS_BEEN_INCLUDED 11 #define OPENVDB_POINTS_ATTRIBUTE_GROUP_HAS_BEEN_INCLUDED 37 static const char*
name() {
return "grp"; }
76 using Ptr = std::shared_ptr<GroupHandle>;
88 bool isUniform()
const {
return mArray.isUniform(); }
90 bool get(
Index n)
const;
91 bool getUnsafe(
Index n)
const;
105 using Ptr = std::shared_ptr<GroupWriteHandle>;
111 void set(
Index n,
bool on);
113 void setUnsafe(
Index n,
bool on);
123 bool collapse(
bool on);
139 : mIndex(attributeSet.groupIndex(name)) { }
141 explicit GroupFilter(
const AttributeSet::Descriptor::GroupIndex& index)
147 template <
typename LeafT>
150 template <
typename LeafT>
152 mHandle.reset(
new GroupHandle(leaf.groupHandle(mIndex)));
155 template <
typename IterT>
156 bool valid(
const IterT& iter)
const {
158 return mHandle->getUnsafe(*iter);
162 const AttributeSet::Descriptor::GroupIndex mIndex;
176 #endif // OPENVDB_POINTS_ATTRIBUTE_GROUP_HAS_BEEN_INCLUDED
uint8_t GroupType
Definition: AttributeSet.h:32
bool isGroup(const AttributeArray &array)
Definition: AttributeGroup.h:64
GroupType StorageType
Definition: AttributeGroup.h:29
static index::State state()
Definition: AttributeGroup.h:146
Attribute Array storage templated on type and compression codec.
Definition: AttributeGroup.h:102
void reset(const LeafT &leaf)
Definition: AttributeGroup.h:151
bool isType() const
Return true if this attribute is of the same type as the template parameter.
Definition: AttributeArray.h:215
Index size() const
Definition: AttributeGroup.h:87
Index filtering on group membership.
Definition: AttributeGroup.h:135
Index32 Index
Definition: Types.h:54
StorageType Type
Definition: AttributeGroup.h:33
bool valid(const IterT &iter) const
Definition: AttributeGroup.h:156
Definition: AttributeGroup.h:80
const GroupAttributeArray & mArray
Definition: AttributeGroup.h:94
bool initialized() const
Definition: AttributeGroup.h:144
Definition: AttributeGroup.h:73
std::unique_ptr< GroupHandle > UniquePtr
Definition: AttributeGroup.h:77
#define OPENVDB_ASSERT(X)
Definition: Assert.h:41
Definition: Exceptions.h:13
GroupFilter(const Name &name, const AttributeSet &attributeSet)
Definition: AttributeGroup.h:138
static index::State state(const LeafT &)
Definition: AttributeGroup.h:148
static const char * name()
Definition: AttributeGroup.h:37
State
Definition: IndexIterator.h:40
bool isUniform() const
Definition: AttributeGroup.h:88
Definition: AttributeGroup.h:33
std::string Name
Definition: Name.h:19
Ordered collection of uniquely-named attribute arrays.
Definition: AttributeSet.h:39
const GroupType mBitMask
Definition: AttributeGroup.h:95
#define OPENVDB_VERSION_NAME
The version namespace name for this library version.
Definition: version.h.in:121
Definition: AttributeGroup.h:27
Definition: IndexIterator.h:42
std::pair< Index, uint8_t > GroupIndex
Definition: AttributeGroup.h:82
Set of Attribute Arrays which tracks metadata about each array.
GroupType ValueType
Definition: AttributeGroup.h:30
std::shared_ptr< GroupHandle > Ptr
Definition: AttributeGroup.h:76
Typed class for storing attribute data.
Definition: AttributeArray.h:511
GroupFilter(const AttributeSet::Descriptor::GroupIndex &index)
Definition: AttributeGroup.h:141
#define OPENVDB_USE_VERSION_NAMESPACE
Definition: version.h.in:218
Base class for storing attribute data.
Definition: AttributeArray.h:93