HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GU_LinearSkinDeformer Class Reference

Performs linear blend skinning of geometry. More...

#include <GU_LinearSkinDeformer.h>

+ Inheritance diagram for GU_LinearSkinDeformer:

Public Types

typedef UT_Array< UT_UniquePtr
< GA_Attribute > > 
AttribPtrArray
 

Public Member Functions

 GU_LinearSkinDeformer ()
 
void reset ()
 Reset all state. More...
 
bool init (GU_Detail &dst, const GA_Range &pt_range, const GU_LinearSkinDeformerSource &src)
 
int numRegions () const
 
const char * regionName (int i) const
 
void setRegionTransform (int region_idx, const UT_Matrix4F &xform)
 
void appendDeformTasks (UT_TaskList &tasks)
 
void deform ()
 

Detailed Description

Performs linear blend skinning of geometry.

Definition at line 122 of file GU_LinearSkinDeformer.h.

Member Typedef Documentation

Constructor & Destructor Documentation

GU_LinearSkinDeformer::GU_LinearSkinDeformer ( )

Member Function Documentation

void GU_LinearSkinDeformer::appendDeformTasks ( UT_TaskList tasks)

Append UT_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:

  1. N = GU_LinearSkinDeformerSource::init() for the point geometry you want to deform
  2. GU_LinearSkinDeformerSource::appendAttrib() for each src attribute you want to deform
  3. GU_LinearSkinDeformer::init() to set up where to put the results
  4. Call setRegionTransform() N times for each of the cregions
  5. Call appendDeformTasks()
  6. When done with the task list, spawn them: tasks.spawnRootAndWait();
void GU_LinearSkinDeformer::deform ( )

Do the deform.

The necessary steps in this specific order:

  1. N = GU_LinearSkinDeformerSource::init() for the point geometry you want to deform
  2. GU_LinearSkinDeformerSource::appendAttrib() for each src attribute you want to deform
  3. GU_LinearSkinDeformer::init() to set up where to put the results
  4. Call setRegionTransform() N times for each of the cregions
  5. Call deform()
bool GU_LinearSkinDeformer::init ( GU_Detail dst,
const GA_Range pt_range,
const GU_LinearSkinDeformerSource src 
)

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.

int GU_LinearSkinDeformer::numRegions ( ) const
inline

Definition at line 138 of file GU_LinearSkinDeformer.h.

const char* GU_LinearSkinDeformer::regionName ( int  i) const
inline

Definition at line 141 of file GU_LinearSkinDeformer.h.

void GU_LinearSkinDeformer::reset ( )

Reset all state.

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. initSrc() must have been called first.


The documentation for this class was generated from the following file: