11 #ifndef __GEO_AttributeIndexPairs__
12 #define __GEO_AttributeIndexPairs__
27 : myAttrib(nullptr), myIndexPair(nullptr)
47 bool isValid()
const {
return myAttrib && myIndexPair; }
48 int getNumPaths()
const;
53 return getPathImpl(i).c_str();
59 return getPathImpl(i);
62 int getIndex(
const char *
path)
const;
82 void setPath(
int i,
const char *
path)
const;
103 { bind(elem_off, attrib, aifindexpair); }
115 myAttribute = attrib;
116 myIndexPair = aifindexpair;
121 int32 getEntryIndex(
int n)
const;
122 fpreal32 getEntryValue(
int n,
int component=0)
const;
125 index = getEntryIndex(n);
126 value = getEntryValue(n);
133 setEntryIndex(n, index);
134 setEntryValue(n, value);
138 { setEntryValue(n, getEntryValue(n, component) + o, component); }
140 { setEntryValue(n, getEntryValue(n, component) * s, component); }
170 { bind(elem_off, attrib, aifindexpair); }
182 myAttribute = attrib;
183 myIndexPair = aifindexpair;
188 int32 getEntryIndex(
int n)
const;
189 fpreal32 getEntryValue(
int n,
int component=0)
const;
191 { index = getEntryIndex(n); value = getEntryValue(n); }
void getEntry(int n, int32 &index, fpreal32 &value) const
Definition of a geometry attribute.
Generic Attribute Interface class to get/set data as index pairs.
GEO_ConstAttributeIndexPairs(GA_Offset elem_off, const GA_Attribute *attrib, const GA_AIFIndexPair *aifindexpair)
GEO_RWAttributeCapturePath(GEO_Detail *gdp, GEO_Detail::CaptureType type=GEO_Detail::CAPTURE_BONE, const UT_StringRef &attrib_name=UT_StringHolder::theEmptyString)
GLsizei const GLfloat * value
GLsizei const GLchar *const * path
GEO_AttributeIndexPairs(GA_Offset elem_off, GA_Attribute *attrib, const GA_AIFIndexPair *aifindexpair)
void setEntry(int n, int32 index, fpreal32 value)
void getEntry(int n, int32 &index, fpreal32 &value) const
GEO_AttributeIndexPairs(GA_Offset elem_off, const GA_RWAttributeRef &ref)
void bind(GA_Offset elem_off, GA_Attribute *attrib, const GA_AIFIndexPair *aifindexpair)
This class provides a way to manage a reference to an attribute permitting Read-Write access...
GLint GLint GLsizei GLint GLenum GLenum type
CaptureType
Methods for manipulating capture weights (GEO_CaptureWeight.C)
UT_StringRef getPathRef(int i) const
This class provides a way to manage a reference to an attribute permitting Read-Only access...
static const UT_StringHolder theEmptyString
GEO_AttributeCapturePath()
const char * getPath(int i) const
GEO_AttributeCapturePath(const GEO_Detail *gdp, GEO_Detail::CaptureType type=GEO_Detail::CAPTURE_BONE, const UT_StringRef &attrib_name=UT_StringHolder::theEmptyString)
~GEO_AttributeIndexPairs()
Destructor.
GEO_ConstAttributeIndexPairs(GA_Offset elem_off, const GA_ROAttributeRef &ref)
This class provides a convenient abstraction of the contents of an index pair attribute for a single ...
void scaleEntryValue(int n, fpreal32 s, int component=0)
void offsetEntryValue(int n, fpreal32 o, int component=0)
const GA_AIFIndexPair * myIndexPair
LeafData & operator=(const LeafData &)=delete
This class provides a convenient abstraction of the contents of an index pair attribute for a single ...
void bind(GA_Offset elem_off, const GA_Attribute *attrib, const GA_AIFIndexPair *aifindexpair)
~GEO_ConstAttributeIndexPairs()
Destructor.
const GA_Attribute * myAttrib