|
HDK
|
#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_StringHolder & | primaryShapeName (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_ConstDetailHandle > | targetShapes () const |
| Returns a list of the geometry for the target shapes. More... | |
| int | fillTargetShapeWeightsFromChannels (const UT_Span< const FloatType > &rig_channel_values, std::pair< int32, fpreal32 > *target_weights) const |
| int | fillTargetShapeWeightsFromInputWeights (const UT_Span< const FloatType > &input_weights, std::pair< int32, fpreal32 > *target_weights) const |
Definition at line 64 of file GU_AgentBlendShapeUtils.h.
| int GU_AgentBlendShapeUtils::InputCache::fillTargetShapeWeightsFromChannels | ( | const UT_Span< const FloatType > & | rig_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.
| int GU_AgentBlendShapeUtils::InputCache::fillTargetShapeWeightsFromInputWeights | ( | const UT_Span< const FloatType > & | input_weights, |
| std::pair< int32, fpreal32 > * | target_weights | ||
| ) | const |
Variant of fillTargetShapeWeightsFromRig() which instead expects the weight value for each blendshape input, rather than the rig's channel values (i.e. the span's length should be numInputs(), and contain the values for inputChannelIndex(i))
| 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.
Returns the GU_AgentRig channel index for the specified input.
Definition at line 79 of file GU_AgentBlendShapeUtils.h.
|
inline |
Returns the number of blendshape inputs (primary shapes).
Definition at line 76 of file GU_AgentBlendShapeUtils.h.
|
inline |
The total number of primary and in-between shapes.
Definition at line 100 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.