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