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

#include <GU_AgentMLSkinDeformer.h>

Public Member Functions

 GU_AgentMLSkinDeformerShapeCache ()
 
 ~GU_AgentMLSkinDeformerShapeCache ()
 
 UT_NON_COPYABLE (GU_AgentMLSkinDeformerShapeCache)
 
bool init (const GU_AgentShapeLib::Shape &agent_shape, const GU_AgentDefinition &agent_defn, UT_StringHolder &error_msg)
 
bool evaluate (const UT_Array< UT_Span< const GU_Agent::Matrix4Type >> &agent_world_poses, UT_Array< GU_Agent::FloatType > &agent_blend_shape_weights, UT_StringHolder &error_msg) const
 
void setRigChannelValues (UT_Span< GU_Agent::FloatType > rig_channel_values, const UT_Span< const GU_Agent::FloatType > &blend_shape_weights) const
 
exint numBlendShapes () const
 Returns the number of blendshape inputs for the shape. More...
 

Detailed Description

Caches data from the agent's rig, etc which is required for evaluating the ML skin deformer for a specific agent shape, and provides methods for evaluating the blend shape weights for a batch of agents.

Definition at line 47 of file GU_AgentMLSkinDeformer.h.

Constructor & Destructor Documentation

GU_AgentMLSkinDeformerShapeCache::GU_AgentMLSkinDeformerShapeCache ( )
GU_AgentMLSkinDeformerShapeCache::~GU_AgentMLSkinDeformerShapeCache ( )

Member Function Documentation

bool GU_AgentMLSkinDeformerShapeCache::evaluate ( const UT_Array< UT_Span< const GU_Agent::Matrix4Type >> &  agent_world_poses,
UT_Array< GU_Agent::FloatType > &  agent_blend_shape_weights,
UT_StringHolder error_msg 
) const

Run the model for a batch of agents given their world space transforms. Outputs a flat list of the blend shape weights for each agent, in the order of the blendshape inputs for this agent shape (e.g. length is num_agent * numBlendShapes()).

bool GU_AgentMLSkinDeformerShapeCache::init ( const GU_AgentShapeLib::Shape agent_shape,
const GU_AgentDefinition agent_defn,
UT_StringHolder error_msg 
)

Pre-compute the required info for running the ML skin deformer on the given shape.

exint GU_AgentMLSkinDeformerShapeCache::numBlendShapes ( ) const

Returns the number of blendshape inputs for the shape.

void GU_AgentMLSkinDeformerShapeCache::setRigChannelValues ( UT_Span< GU_Agent::FloatType rig_channel_values,
const UT_Span< const GU_Agent::FloatType > &  blend_shape_weights 
) const

Marshal the blendshape weights into the rig's channel order, for a single agent.

GU_AgentMLSkinDeformerShapeCache::UT_NON_COPYABLE ( GU_AgentMLSkinDeformerShapeCache  )

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