11 #ifndef __GEO_AttributeIndexPairs__
12 #define __GEO_AttributeIndexPairs__
24 : myAttrib(0), myIndexPair(0)
37 bool isValid()
const {
return myAttrib && myIndexPair; }
38 int getNumPaths()
const;
43 return getPathImpl(i).c_str();
49 return getPathImpl(i);
52 int getIndex(
const char *
path)
const;
71 void setPath(
int i,
const char *
path)
const;
92 { bind(elem_off, attrib, aifindexpair); }
104 myAttribute = attrib;
105 myIndexPair = aifindexpair;
110 int32 getEntryIndex(
int n)
const;
111 fpreal32 getEntryValue(
int n,
int component=0)
const;
114 index = getEntryIndex(n);
115 value = getEntryValue(n);
122 setEntryIndex(n, index);
123 setEntryValue(n, value);
127 { setEntryValue(n, getEntryValue(n, component) + o, component); }
129 { setEntryValue(n, getEntryValue(n, component) * s, component); }
159 { bind(elem_off, attrib, aifindexpair); }
171 myAttribute = attrib;
172 myIndexPair = aifindexpair;
177 int32 getEntryIndex(
int n)
const;
178 fpreal32 getEntryValue(
int n,
int component=0)
const;
180 { 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)
GLsizei const GLchar *const * path
GEO_AttributeIndexPairs(GA_Offset elem_off, GA_Attribute *attrib, const GA_AIFIndexPair *aifindexpair)
GEO_RWAttributeCapturePath(GEO_Detail *gdp, GEO_Detail::CaptureType type=GEO_Detail::CAPTURE_BONE)
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...
CaptureType
Methods for manipulating capture weights (GEO_CaptureWeight.C)
UT_StringRef getPathRef(int i) const
GEO_AttributeCapturePath(const GEO_Detail *gdp, GEO_Detail::CaptureType type=GEO_Detail::CAPTURE_BONE)
This class provides a way to manage a reference to an attribute permitting Read-Only access...
GEO_AttributeCapturePath()
const char * getPath(int i) const
~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