37 #ifndef OPENVDB_POINTS_ATTRIBUTE_GROUP_HAS_BEEN_INCLUDED 38 #define OPENVDB_POINTS_ATTRIBUTE_GROUP_HAS_BEEN_INCLUDED 66 static const char*
name() {
return "grp"; }
105 using Ptr = std::shared_ptr<GroupHandle>;
118 bool get(
Index n)
const;
119 bool getUnsafe(
Index n)
const;
133 using Ptr = std::shared_ptr<GroupWriteHandle>;
137 void set(
Index n,
bool on);
147 bool collapse(
bool on);
163 : mIndex(attributeSet.groupIndex(name)) { }
165 explicit GroupFilter(
const AttributeSet::Descriptor::GroupIndex& index)
171 template <
typename LeafT>
174 template <
typename LeafT>
176 mHandle.reset(
new GroupHandle(leaf.groupHandle(mIndex)));
179 template <
typename IterT>
180 bool valid(
const IterT& iter)
const {
182 return mHandle->getUnsafe(*iter);
186 const AttributeSet::Descriptor::GroupIndex mIndex;
200 #endif // OPENVDB_POINTS_ATTRIBUTE_GROUP_HAS_BEEN_INCLUDED Definition: IndexIterator.h:68
GroupType StorageType
Definition: AttributeGroup.h:58
Index size() const
Definition: AttributeGroup.h:115
static const char * name()
Definition: AttributeGroup.h:66
Index32 Index
Definition: Types.h:61
static index::State state()
Definition: AttributeGroup.h:170
Typed class for storing attribute data.
Definition: AttributeArray.h:574
GroupFilter(const AttributeSet::Descriptor::GroupIndex &index)
Definition: AttributeGroup.h:165
StorageType Type
Definition: AttributeGroup.h:62
Definition: AttributeGroup.h:130
Attribute Array storage templated on type and compression codec.
bool valid(const IterT &iter) const
Definition: AttributeGroup.h:180
bool isGroup(const AttributeArray &array)
Definition: AttributeGroup.h:93
std::shared_ptr< GroupHandle > Ptr
Definition: AttributeGroup.h:105
GroupType ValueType
Definition: AttributeGroup.h:59
static index::State state(const LeafT &)
Definition: AttributeGroup.h:172
Index filtering on group membership.
Definition: AttributeGroup.h:159
bool initialized() const
Definition: AttributeGroup.h:168
Ordered collection of uniquely-named attribute arrays.
Definition: AttributeSet.h:62
State
Definition: IndexIterator.h:66
#define OPENVDB_VERSION_NAME
The version namespace name for this library version.
Definition: version.h:136
Definition: AttributeGroup.h:62
const GroupAttributeArray & mArray
Definition: AttributeGroup.h:122
Definition: AttributeGroup.h:108
Definition: Exceptions.h:40
Base class for storing attribute data.
Definition: AttributeArray.h:118
GroupFilter(const Name &name, const AttributeSet &attributeSet)
Definition: AttributeGroup.h:162
void reset(const LeafT &leaf)
Definition: AttributeGroup.h:175
uint8_t GroupType
Definition: AttributeGroup.h:50
Definition: AttributeGroup.h:102
bool isType() const
Return true if this attribute is of the same type as the template parameter.
Definition: AttributeArray.h:253
std::pair< Index, uint8_t > GroupIndex
Definition: AttributeGroup.h:110
#define OPENVDB_USE_VERSION_NAMESPACE
Definition: version.h:188
Definition: AttributeGroup.h:56
std::string Name
Definition: Name.h:44
Set of Attribute Arrays which tracks metadata about each array.
bool isUniform() const
Definition: AttributeGroup.h:116
const GroupType mBitMask
Definition: AttributeGroup.h:123