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

#include <GU_AgentBlendShapeUtils.h>

Public Member Functions

bool reset (const GU_Detail &base_shape, const GU_AgentShapeLib &shapelib, const GU_AgentRig *rig, UT_StringHolder *warnings=nullptr)
 
exint numInputs () const
 Returns the number of blendshape inputs (primary shapes). More...
 
exint inputChannelIndex (exint i) const
 Returns the GU_AgentRig channel index for the specified input. More...
 
const UT_StringHolderprimaryShapeName (exint i) const
 Returns the name of the primary target shape for the specified input. More...
 
void getInBetweenShapes (exint i, UT_StringArray &shape_names, FloatArray &shape_weights) const
 
void getShapes (exint i, FloatType w, UT_Array< const GU_Detail * > &shapes, FloatArray &weights) const
 
exint numTargetShapes () const
 The total number of primary and in-between shapes. More...
 
UT_Array< GU_ConstDetailHandletargetShapes () const
 Returns a list of the geometry for the target shapes. More...
 
int fillTargetShapeWeights (const FloatType *channel_values, std::pair< int32, fpreal32 > *target_weights) const
 

Detailed Description

Definition at line 63 of file GU_AgentBlendShapeUtils.h.

Member Function Documentation

int GU_AgentBlendShapeUtils::InputCache::fillTargetShapeWeights ( const FloatType channel_values,
std::pair< int32, fpreal32 > *  target_weights 
) const

Fill a buffer (of max length numTargetShapes()) with the index and weight for each active target shape based on the provided rig channel values. Returns the number of active target shapes.

void GU_AgentBlendShapeUtils::InputCache::getInBetweenShapes ( exint  i,
UT_StringArray shape_names,
FloatArray shape_weights 
) const

Returns the names and weights of the in-between target shapes for the specified input (i.e. shapes with weight 0 or 1 are skipped).

void GU_AgentBlendShapeUtils::InputCache::getShapes ( exint  i,
FloatType  w,
UT_Array< const GU_Detail * > &  shapes,
FloatArray weights 
) const

Appends to the provided list of shapes and weights, given an input index and weight value. When there are in-between shapes this selects the appropriate pair of shapes to blend between based on the provided weight.

exint GU_AgentBlendShapeUtils::InputCache::inputChannelIndex ( exint  i) const
inline

Returns the GU_AgentRig channel index for the specified input.

Definition at line 78 of file GU_AgentBlendShapeUtils.h.

exint GU_AgentBlendShapeUtils::InputCache::numInputs ( ) const
inline

Returns the number of blendshape inputs (primary shapes).

Definition at line 75 of file GU_AgentBlendShapeUtils.h.

exint GU_AgentBlendShapeUtils::InputCache::numTargetShapes ( ) const
inline

The total number of primary and in-between shapes.

Definition at line 99 of file GU_AgentBlendShapeUtils.h.

const UT_StringHolder& GU_AgentBlendShapeUtils::InputCache::primaryShapeName ( exint  i) const

Returns the name of the primary target shape for the specified input.

bool GU_AgentBlendShapeUtils::InputCache::reset ( const GU_Detail base_shape,
const GU_AgentShapeLib shapelib,
const GU_AgentRig rig,
UT_StringHolder warnings = nullptr 
)

Populates the cache. If the optional rig is not provided, inputChannelIndex() will be invalid.

UT_Array<GU_ConstDetailHandle> GU_AgentBlendShapeUtils::InputCache::targetShapes ( ) const

Returns a list of the geometry for the target shapes.


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