HDK
|
Performs linear blend skinning of geometry. More...
#include <GU_LinearSkinDeformer.h>
Public Types | |
enum | Method { DEFORM_LINEAR, DEFORM_DUALQUAT, DEFORM_DUALQUAT_BLEND } |
enum | AttributeType { POS, NML, VEC, QUAT, MAT3, MAT4, MAT4D } |
typedef UT_Array < GA_AttributeUPtr > | AttribPtrArray |
typedef GU_DualQuatXformT< float > | DualQuatXformF |
Public Member Functions | |
GU_LinearSkinDeformer () | |
void | reset () |
Reset all state. More... | |
bool | init (GU_Detail &dst, const GA_Range &pt_range, const GU_LinearSkinDeformerSourceWeights &src_weights, const GU_LinearSkinDeformerSourceAttribs &src_attribs, Method method=DEFORM_LINEAR, bool create_missing_attribs=false, const char *blend_attrib=nullptr) |
int | numRegions () const |
const UT_StringHolder & | regionName (int i) const |
void | clearNumTransformsSet () |
void | setRegionTransform (int region_idx, const UT_Matrix4F &xform) |
void | setFullRegionTransform (int region_idx, const UT_Matrix4F &xform) |
bool | setRegionTransformsFromGeo (const GU_Detail &anim_skel) |
void | spawnDeformTasks (UT_TaskGroup &tasks) |
void | spawnInverseDeformTasks (UT_TaskGroup &tasks) |
void | deform () |
void | inverseDeform () |
Static Public Member Functions | |
static bool | getGlobalAttribMethod (const GU_Detail *igdp, Method &type) |
static bool | getGlobalAttribBlendAttrib (const GU_Detail *igdp, UT_StringHolder &blend_attrib) |
Static Public Attributes | |
static const char * | SKIN_LINEAR |
static const char * | SKIN_DUAL_QUATERNION |
static const char * | SKIN_BLEND_DUAL_QUATERNION_AND_LINEAR |
Performs linear blend skinning of geometry.
Definition at line 284 of file GU_LinearSkinDeformer.h.
Definition at line 390 of file GU_LinearSkinDeformer.h.
Definition at line 391 of file GU_LinearSkinDeformer.h.
Enumerator | |
---|---|
POS | |
NML | |
VEC | |
QUAT | |
MAT3 | |
MAT4 | |
MAT4D |
Definition at line 300 of file GU_LinearSkinDeformer.h.
Enumerator | |
---|---|
DEFORM_LINEAR | |
DEFORM_DUALQUAT | |
DEFORM_DUALQUAT_BLEND |
Definition at line 292 of file GU_LinearSkinDeformer.h.
GU_LinearSkinDeformer::GU_LinearSkinDeformer | ( | ) |
|
inline |
For debugging purposes, call this before making your setRegionTransform() calls to avoid asserts about missing transforms.
Definition at line 331 of file GU_LinearSkinDeformer.h.
void GU_LinearSkinDeformer::deform | ( | ) |
Do the deform.
The necessary steps in this specific order:
|
static |
|
static |
bool GU_LinearSkinDeformer::init | ( | GU_Detail & | dst, |
const GA_Range & | pt_range, | ||
const GU_LinearSkinDeformerSourceWeights & | src_weights, | ||
const GU_LinearSkinDeformerSourceAttribs & | src_attribs, | ||
Method | method = DEFORM_LINEAR , |
||
bool | create_missing_attribs = false , |
||
const char * | blend_attrib = nullptr |
||
) |
Setup the destination geometry. Fails if the destination is missing attributes that were appended to deform. A reference to the src is maintained until reset() is called.
void GU_LinearSkinDeformer::inverseDeform | ( | ) |
Do the deform.
The necessary steps in this specific order:
|
inline |
Definition at line 323 of file GU_LinearSkinDeformer.h.
|
inline |
Definition at line 326 of file GU_LinearSkinDeformer.h.
void GU_LinearSkinDeformer::reset | ( | ) |
Reset all state.
void GU_LinearSkinDeformer::setFullRegionTransform | ( | int | region_idx, |
const UT_Matrix4F & | xform | ||
) |
Set deforming transform for region_idx. To apply the capture region's transform use setRegionTransform(). init() must have been called first.
void GU_LinearSkinDeformer::setRegionTransform | ( | int | region_idx, |
const UT_Matrix4F & | xform | ||
) |
Set deforming transform for region_idx, which matches indices found in the capture weight attribute. init() must have been called first.
bool GU_LinearSkinDeformer::setRegionTransformsFromGeo | ( | const GU_Detail & | anim_skel | ) |
Set transforms relative to capture region transforms from P,name,transform attributes. This matches with GU_LinearSkinDeformerSourceWeights::setRegionXformsFromGeo()
void GU_LinearSkinDeformer::spawnDeformTasks | ( | UT_TaskGroup & | tasks | ) |
Spawn tasks that will perform the deformation. The tasks will have references to this object, so they must be executed before this object is destroyed.
The necessary steps in this specific order:
void GU_LinearSkinDeformer::spawnInverseDeformTasks | ( | UT_TaskGroup & | tasks | ) |
Spawn tasks that will perform the deformation. The tasks will have references to this object, so they must be executed before this object is destroyed.
The necessary steps in this specific order:
|
static |
Definition at line 395 of file GU_LinearSkinDeformer.h.
|
static |
Definition at line 394 of file GU_LinearSkinDeformer.h.
|
static |
Definition at line 393 of file GU_LinearSkinDeformer.h.