11 #ifndef __GU_LINEARSKINDEFORMER_H_INCLUDED__
12 #define __GU_LINEARSKINDEFORMER_H_INCLUDED__
86 myDQ.transform(src * myStretch, dst);
93 myDQ.transform(src, dst);
101 myDQ.getRotation().getRotationMatrix(dst);
110 dst *= myDQ.convertToXform();
117 myDQ.rotate(src, dst);
134 return myDQ.getRotation() *
src;
148 GU_LinearSkinDeformerSourceAttribs(
const GU_Detail *gdp);
150 int64 getMemoryUsage(
bool inclusive)
const;
180 int64 getMemoryUsage(
bool inclusive)
const;
194 bool use_opencl =
false,
195 int max_pt_weights = 0);
200 bool use_opencl =
false,
201 int max_pt_weights = 0);
205 {
return myCaptAttribName; }
215 bool setRegionXformsFromGeo(
226 {
return myRegionXforms.entries(); }
231 {
return myRegionNames[i]; }
236 {
return myRegionXforms[i]; }
240 {
return myHaveRegionXforms; }
245 {
return myUsedRegions.getBitFast(i); }
249 static bool getCaptureParms(
255 bool& have_region_xforms);
256 static bool getCaptureParms(
263 bool& have_region_xforms);
266 using CaptureElementRange =
274 template <
typename ELEMENT_TYPE>
278 void setupStaticBufferOCL();
310 bool myHaveRegionXforms;
319 myCaptureElements.
begin() + myPointStarts[ptidx + 1]);
358 Method method = DEFORM_LINEAR,
359 bool create_missing_attribs =
false,
360 const char *blend_attrib =
nullptr);
363 {
return mySrcWeights->myRegionXforms.entries(); }
366 {
return mySrcWeights->regionName(i); }
375 void setRegionTransform(
381 void setFullRegionTransform(
388 bool setRegionTransformsFromGeo(
406 void spawnDeformTasks(
408 void spawnInverseDeformTasks(
425 void inverseDeform();
437 static bool getGlobalAttribBlendAttrib(
const GU_Detail *igdp,
444 void deformInParallel();
446 template <
bool ALIGNED,
bool INVERT>
447 void spawnLinearTasks(
449 template <
bool ALIGNED,
bool INVERT>
450 void spawnDualQuatTasks(
452 template <
bool ALIGNED,
bool INVERT>
453 void spawnBlendedDualQuatTasks(
457 void initializeOpenCL();
462 template <Method METHOD>
463 void processDeformOCL();
465 template <Method METHOD, AttributeType ATTRIB_TYPE>
466 void deformAttribOCL(
474 template <Method METHOD>
475 void deformPrimCPU(
GA_Index dst_start);
477 void setupFrameSharedBufferOCL();
479 template <
typename BLEND_TYPE>
480 void setBlendKernelArgOCL(
GA_Size point_num);
481 template <
typename BLEND_TYPE>
482 void blendDeformOCL(
GA_Size point_num);
484 template < Method METHOD, GA_AttributeOwner ATTRIB_OWNER, AttributeType ATTRIB_TYPE>
485 void setApplyKernelArgOCL(
491 template <Method METHOD, GA_AttributeOwner ATTRIB_OWNER, AttributeType ATTRIB_TYPE>
498 void splitDualQuatArray();
501 template<Method METHOD>
504 template<AttributeType ATTRIB_TYPE>
507 template<GA_AttributeOwner ATTRIB_CLASS>
510 template<
typename BLEND_TYPE>
513 template <
typename BLEND_TYPE>
539 AttribPtrArray mySrcPromotedAttribs;
549 exint myNumTransformsSet;
551 exint mySrcBlendAttribId;
553 bool myCEInitialized;
579 #endif // __GU_LINEARSKINDEFORMER_H_INCLUDED__
UT_SharedPtr< GA_CEAttribute > GA_CEAttributePtr
Definition of a geometry attribute.
void leftMult(const UT_SymMatrix3T< S > &m)
Multiply given symmetric matrix on the left.
*get result *(waiting if necessary)*A common idiom is to fire a bunch of sub tasks at the and then *wait for them to all complete We provide a helper class
UT_IteratorRange< IterT > UTmakeRange(IterT &&b, IterT &&e)
exint GA_Size
Defines the bit width for index and offset types in GA.
GU_CaptureElement(int i, float w)
A range of elements in an index-map.
GLint GLint GLsizei GLint GLenum GLenum type
This class provides a way to manage a reference to an attribute permitting Read-Only access...
bool operator>(const GU_CaptureElement &elem) const
#define SYS_DECLARE_IS_POD(T)
Declare a type as POD.
GLuint const GLchar * name
GA_Size GA_Index
Define the strictness of GA_Offset/GA_Index.
GA_API const UT_StringHolder transform
LeafData & operator=(const LeafData &)=delete
GLubyte GLubyte GLubyte GLubyte w
Program interface that implements cl_program.