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);
123 return src * myDQ.getRotation();
137 GU_LinearSkinDeformerSourceAttribs(
const GU_Detail *gdp);
139 int64 getMemoryUsage(
bool inclusive)
const;
169 int64 getMemoryUsage(
bool inclusive)
const;
182 bool use_opencl =
false,
183 int max_pt_weights = 0);
193 bool setRegionXformsFromGeo(
204 {
return myRegionXforms.entries(); }
209 {
return myRegionNames[i]; }
214 {
return myRegionXforms[i]; }
219 {
return myUsedRegions.getBitFast(i); }
222 static bool getCaptureParms(
227 int& max_pt_regions);
229 using CaptureElementRange =
237 template <
typename ELEMENT_TYPE>
241 void setupStaticBufferOCL();
280 myCaptureElements.
begin() + myPointStarts[ptidx + 1]);
319 Method method = DEFORM_LINEAR,
320 bool create_missing_attribs =
false,
321 const char *blend_attrib =
nullptr);
324 {
return mySrcWeights->myRegionXforms.entries(); }
327 {
return mySrcWeights->regionName(i); }
336 void setRegionTransform(
342 void setFullRegionTransform(
349 bool setRegionTransformsFromGeo(
367 void spawnDeformTasks(
369 void spawnInverseDeformTasks(
386 void inverseDeform();
398 static bool getGlobalAttribBlendAttrib(
const GU_Detail *igdp,
405 void deformInParallel();
407 template <
bool ALIGNED,
bool INVERT>
408 void spawnLinearTasks(
410 template <
bool ALIGNED,
bool INVERT>
411 void spawnDualQuatTasks(
413 template <
bool ALIGNED,
bool INVERT>
414 void spawnBlendedDualQuatTasks(
418 void initializeOpenCL();
423 template <Method METHOD>
424 void processDeformOCL();
426 template <Method METHOD, AttributeType ATTRIB_TYPE>
427 void deformAttribOCL(
435 template <Method METHOD>
436 void deformPrimCPU(
GA_Index dst_start);
438 void setupFrameSharedBufferOCL();
440 template <
typename BLEND_TYPE>
441 void setBlendKernelArgOCL(
GA_Size point_num);
442 template <
typename BLEND_TYPE>
443 void blendDeformOCL(
GA_Size point_num);
445 template < Method METHOD, GA_AttributeOwner ATTRIB_OWNER, AttributeType ATTRIB_TYPE>
446 void setApplyKernelArgOCL(
452 template <Method METHOD, GA_AttributeOwner ATTRIB_OWNER, AttributeType ATTRIB_TYPE>
459 void splitDualQuatArray();
462 template<Method METHOD>
465 template<AttributeType ATTRIB_TYPE>
468 template<GA_AttributeOwner ATTRIB_CLASS>
471 template<
typename BLEND_TYPE>
474 template <
typename BLEND_TYPE>
500 AttribPtrArray mySrcPromotedAttribs;
510 exint myNumTransformsSet;
512 exint mySrcBlendAttribId;
514 bool myCEInitialized;
540 #endif // __GU_LINEARSKINDEFORMER_H_INCLUDED__
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.
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
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.