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(); }
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)) { }
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
std::unique_ptr< GroupHandle > UniquePtr
GLdouble GLdouble GLint GLint const GLdouble * points
static void encode(const ValueType &, StorageType &)
static index::State state(const LeafT &)
#define OPENVDB_USE_VERSION_NAMESPACE
std::pair< Index, uint8_t > GroupIndex
bool isGroup(const AttributeArray &array)
static index::State state()
Base class for storing attribute data.
GroupFilter(const AttributeSet::Descriptor::GroupIndex &index)
GLuint const GLchar * name
Index filtering on group membership.
Typed class for storing attribute data.
Set of Attribute Arrays which tracks metadata about each array.
void reset(const LeafT &leaf)
const GroupAttributeArray & mArray
Ordered collection of uniquely-named attribute arrays.
std::shared_ptr< GroupHandle > Ptr
Attribute Array storage templated on type and compression codec.
bool isType() const
Return true if this attribute is of the same type as the template parameter.
#define OPENVDB_VERSION_NAME
The version namespace name for this library version.
bool valid(const IterT &iter) const
static const char * name()
GroupFilter(const Name &name, const AttributeSet &attributeSet)
static void decode(const StorageType &, ValueType &)