12 #ifndef __GA_AttributeRefMapDestHandle__
13 #define __GA_AttributeRefMapDestHandle__
60 template <GA_AttributeOwner DOwner>
76 : myMap(src.myMap), myDestMap(src.myDestMap) {}
82 int entries()
const {
return myMap.entries(); }
88 {
return myMap.entriesWithSourceP(); }
101 { myDestMap.reset(DOwner, offset);
return true; }
106 {
return myMap.homogenize(myDestMap); }
109 {
return myMap.dehomogenize(myDestMap); }
114 {
return myMap.copyValue(myDestMap, SOwner, offset); }
121 { myMap.copyExplicitPosition(myDestMap, p); }
123 { myMap.copyExplicitPosition(myDestMap, p); }
125 { myMap.copyExplicitPosition(myDestMap, p); }
127 { myMap.copyExplicitPosition(myDestMap, p); }
129 { myMap.copyExplicitPosition(myDestMap, p); }
131 { myMap.copyExplicitPosition(myDestMap, p); }
138 myMap.addValue(myDestMap, SOwner, source_index,
146 myMap.subValue(myDestMap, SOwner, source_index);
153 myMap.mulValue(myDestMap, SOwner, source_index);
159 { myMap.lerpValue(myDestMap, SOwner, s0, s1, t); }
161 { myMap.lerpHValue(myDestMap, SOwner, s0, s1, t); }
181 { myMap.startSum(sum, myDestMap); }
183 { myMap.startHSum(sum, myDestMap); }
185 fpreal normalization=1)
const
186 { myMap.finishSum(sum, myDestMap, normalization); }
188 fpreal normalization=1)
const
189 { myMap.finishHSum(sum, myDestMap, normalization); }
198 myMap.addSumValue(sum, myDestMap, SOwner,
205 myMap.addHSumValue(sum, myDestMap, SOwner,
214 myMap.barycentricValue(myDestMap, SOwner,
231 myMap.bilinearValue(myDestMap, SOwner, u0v0, u1v0,
236 void zero()
const { myMap.zeroElement(myDestMap); }
240 { myMap.multiply(myDestMap, scale); }
249 { myMap.transform(m, im, myDestMap); }
251 { myMap.transform(m, im, myDestMap); }
257 {
return myMap.isEqual(myDestMap, SOwner, cmp); }
259 {
return myMap.isAlmostEqual(myDestMap, SOwner, cmp); }
268 { myMap.copyDestValue(myDestMap, SOwner, offset); }
271 { myMap.addDestValue(myDestMap, SOwner, offset); }
274 { myMap.subDestValue(myDestMap, SOwner, offset); }
278 myMap.lerpDestValue(myDestMap,
285 myMap.addSumDestValue(sum, myDestMap,
292 myMap.addHSumDestValue(sum, myDestMap,
298 void dump(
const char *msg, ...)
const;
void zero() const
Zero an attribute. This is equivalent to a weighted sum of 0 elements.
int entriesWithSourceP() const
void transform(const UT_DMatrix4 &m, const UT_DMatrix4 &im) const
void transform(const UT_Matrix4 &m, const UT_Matrix4 &im) const
void addH(GA_WeightedSum &sum, GA_Offset source_index, fpreal w) const
void lerp(GA_Offset s0, GA_Offset s1, fpreal t) const
void addHDest(GA_WeightedSum &sum, GA_Offset offset, fpreal w) const
void lerpDest(GA_Offset s0, GA_Offset s1, fpreal t) const
void copyExplicitPosition(const UT_Vector4D &p) const
void addDest(GA_Offset offset) const
Context to keep track of weighted sums.
void finishSum(const GA_WeightedSum &sum, fpreal normalization=1) const
GA_AttributeRefMapDestHandle< GA_ATTRIB_POINT > GA_AttributeRefMapDestHandlePoint
void startSum(const GA_WeightedSum &sum) const
void copyExplicitPosition(const UT_Vector4 &p) const
void copyDest(GA_Offset offset) const
GA_AttributeRefMapDestHandle< GA_ATTRIB_GLOBAL > GA_AttributeRefMapDestHandleGlobal
#define GA_INVALID_OFFSET
GA_AttributeRefMapDestHandle< GA_ATTRIB_VERTEX > GA_AttributeRefMapDestHandleVertex
IMATH_HOSTDEVICE constexpr int cmp(T a, T b) IMATH_NOEXCEPT
GA_API const UT_StringHolder scale
void homogenize() const
Homogenize any rational attributes of the current element.
void add(GA_Offset source_index, fpreal scale=1) const
bool setElement(GA_Offset offset)
void subDest(GA_Offset offset) const
void copyExplicitPosition(const UT_Vector3 &p) const
bool isAlmostEqual(GA_Offset cmp) const
GA_AttributeRefMapDestHandle(const GA_AttributeRefMap &map)
Minimal constructor.
void add(GA_WeightedSum &sum, GA_Offset source_index, fpreal w) const
GA_AttributeRefMapDestHandle(const GA_AttributeRefMapDestHandle &src)
Copy constructor.
A handle to simplify manipulation of multiple attributes.
void copyExplicitPosition(const UT_Vector2 &p) const
int entries() const
Return the number of attributes in the list.
void mul(GA_Offset source_index) const
void copyExplicitPosition(const UT_Vector2D &p) const
void addDest(GA_WeightedSum &sum, GA_Offset offset, fpreal w) const
void barycentric(GA_Offset p0, GA_Offset p1, GA_Offset p2, fpreal u, fpreal v) const
void dehomogenize() const
Dehomogenize any rational attributes of the current element.
void copy(GA_Offset offset) const
void copyExplicitPosition(const UT_Vector3D &p) const
A handle to simplify manipulation of multiple attributes.
bool isEqual(GA_Offset cmp) const
void startHSum(const GA_WeightedSum &sum) const
void finishHSum(const GA_WeightedSum &sum, fpreal normalization=1) const
GLubyte GLubyte GLubyte GLubyte w
void multiply(fpreal scale) const
Multiply operation:
void sub(GA_Offset source_index) const
GA_AttributeRefMapDestHandle< GA_ATTRIB_PRIMITIVE > GA_AttributeRefMapDestHandlePrimitive
void bilinear(GA_Offset u0v0, GA_Offset u1v0, GA_Offset u0v1, GA_Offset u1v1, fpreal u, fpreal v) const
~GA_AttributeRefMapDestHandle()
Destructor.
void lerpH(GA_Offset s0, GA_Offset s1, fpreal t) const