Momentum
A library for solving nonlinear optimization problems related to human body kinematics
Loading...
Searching...
No Matches
momentum::Character Struct Reference

A character model with skeletal structure, mesh, and optional components. More...

#include <character.h>

Public Member Functions

 Character ()
 ~Character ()
 Character (const Skeleton &s, const ParameterTransform &pt, const ParameterLimits &pl=ParameterLimits(), const LocatorList &l=LocatorList(), const Mesh *m=nullptr, const SkinWeights *sw=nullptr, const CollisionGeometry *cg=nullptr, const PoseShape *bs=nullptr, BlendShape_const_p blendShapes={}, BlendShapeBase_const_p faceExpressionBlendShapes={}, const std::string &nameIn="", const momentum::TransformationList &inverseBindPose={}, const SkinnedLocatorList &skinnedLocators={}, std::string_view metadataIn="", const PhysicalProperties &physicalPropertiesIn=PhysicalProperties())
 Constructs a character with the specified components.
 Character (const Character &c)
 Character (Character &&c) noexcept
Character & operator= (const Character &rhs)
Character & operator= (Character &&rhs) noexcept
Character simplify (const ParameterSet &activeParams=ParameterSet().flip()) const
 Creates a simplified character with only joints affected by the specified parameters.
Character simplifySkeleton (const std::vector< bool > &activeJoints) const
 Creates a simplified character with only the specified joints.
Character simplifyParameterTransform (const ParameterSet &parameterSet) const
 Creates a simplified character with only the specified parameters.
SkinWeights remapSkinWeights (const SkinWeights &skinWeights, const Character &originalCharacter) const
 Remaps skin weights from original character to simplified version.
ParameterLimits remapParameterLimits (const ParameterLimits &limits, const Character &originalCharacter) const
 Remaps parameter limits from original character to simplified version.
LocatorList remapLocators (const LocatorList &locs, const Character &originalCharacter) const
 Remaps locators from original character to simplified version.
SkinnedLocatorList remapSkinnedLocators (const SkinnedLocatorList &locs, const Character &originalCharacter) const
std::vector< bool > parametersToActiveJoints (const ParameterSet &parameterSet) const
 Determines which joints are affected by the specified parameters.
ParameterSet activeJointsToParameters (const std::vector< bool > &activeJoints) const
 Determines which parameters affect the specified joints.
CharacterParameters bindPose () const
 Returns parameters representing the character's bind pose.
void initParameterTransform ()
 Initializes the parameter transform with the correct dimensions for this character.
void resetJointMap ()
 Resets the joint map to identity (each joint maps to itself).
void initInverseBindPose ()
 Initializes the inverse bind pose transformations.
Character withBlendShape (const BlendShape_const_p &blendShape_in, Eigen::Index maxBlendShapes) const
 Creates a new character with the specified blend shapes.
Character withFaceExpressionBlendShape (const BlendShapeBase_const_p &blendShape_in, Eigen::Index maxBlendShapes=-1) const
 Creates a new character with the specified face expression blend shapes.
void addBlendShape (const BlendShape_const_p &blendShape_in, Eigen::Index maxBlendShapes)
 Adds blend shapes to this character.
void addFaceExpressionBlendShape (const BlendShapeBase_const_p &blendShape_in, Eigen::Index maxBlendShapes=-1)
 Adds face expression blend shapes to this character.
Character bakeBlendShape (const ModelParameters &modelParams) const
 Creates a new character with blend shapes baked into the mesh.
Character bakeBlendShape (const BlendWeights &blendWeights) const
 Creates a new character with blend shapes baked into the mesh.
Character bake (const ModelParameters &modelParams, bool bakeBlendShapes=true, bool bakeScales=true) const
 Generic "bake-out" for turning a character into self-contained geometry.

Static Public Member Functions

static CharacterParameters splitParameters (const Character &character, const CharacterParameters &parameters, const ParameterSet &parameterSet)
 Splits character parameters into active and inactive components.

Public Attributes

Required components
Skeleton skeleton
 Skeletal structure defining the character's joints and hierarchy.
ParameterTransform parameterTransform
 Maps model parameters to joint parameters.
Optional components
ParameterLimits parameterLimits
 Constraints on model parameters.
LocatorList locators
 Points of interest attached to joints.
SkinnedLocatorList skinnedLocators
 Points of interest attached to joints, with skinning weights.
Mesh_u mesh
 3D mesh representing the character's surface
SkinWeights_u skinWeights
 Defines how mesh vertices are influenced by joints.
PoseShape_u poseShapes
 Pose-dependent shape corrections.
CollisionGeometry_u collision
 Collision volumes for the character.
PhysicalProperties physicalProperties
 Joint-level physical mass and inertia data loaded from model assets.
BlendShape_const_p blendShape
 Shape variations that can be blended.
BlendShapeBase_const_p faceExpressionBlendShape
 Facial expression blend shapes.
TransformationList inverseBindPose
 Inverse of the bind pose transformations for each joint.
std::vector< size_t > jointMap
 Maps from original joint indices to simplified joint indices.
std::string name
 Character identifier.
std::string metadata
 Metadata (as a JSON-serialized string).

Detailed Description

A character model with skeletal structure, mesh, and optional components.

Character is intentionally not templated on a scalar type: every member (skeleton, parameter transform, mesh, inverse bind pose, etc.) is stored as float. Double-precision callers convert to/from float at API boundaries via cast<T>() on the inner types (e.g. MeshT<T>, SkeletonStateT<T>). This reflects the reality that the previous CharacterT<T> template parameter was never wired through to any member; see T270138855 for the audit.

Definition at line 32 of file character.h.

Constructor & Destructor Documentation

◆ Character() [1/4]

◆ ~Character()

momentum::Character::~Character ( )
default

◆ Character() [2/4]

momentum::Character::Character ( const Skeleton & s,
const ParameterTransform & pt,
const ParameterLimits & pl = ParameterLimits(),
const LocatorList & l = LocatorList(),
const Mesh * m = nullptr,
const SkinWeights * sw = nullptr,
const CollisionGeometry * cg = nullptr,
const PoseShape * bs = nullptr,
BlendShape_const_p blendShapes = {},
BlendShapeBase_const_p faceExpressionBlendShapes = {},
const std::string & nameIn = "",
const momentum::TransformationList & inverseBindPose = {},
const SkinnedLocatorList & skinnedLocators = {},
std::string_view metadataIn = "",
const PhysicalProperties & physicalPropertiesIn = PhysicalProperties() )

Constructs a character with the specified components.

Parameters
sSkeleton defining joint hierarchy
ptParameter transform mapping model parameters to joint parameters
plOptional parameter limits/constraints
lOptional locators attached to joints
mOptional mesh representing the character's surface
swOptional skin weights defining how mesh vertices are influenced by joints
cgOptional collision geometry
bsOptional pose-dependent shape corrections
blendShapesOptional shape variations that can be blended
faceExpressionBlendShapesOptional facial expression blend shapes
nameInOptional character identifier
inverseBindPoseOptional inverse bind pose transformations
skinnedLocatorsOptional points of interest attached to joints, with skinning weights
metadataInOptional metadata
physicalPropertiesInOptional physical mass properties attached to joints

Definition at line 248 of file character.cpp.

References blendShape, collision, faceExpressionBlendShape, inverseBindPose, locators, mesh, metadata, MT_CHECK, name, parameterLimits, parameterTransform, physicalProperties, poseShapes, resetJointMap(), skeleton, skinnedLocators, and skinWeights.

◆ Character() [3/4]

momentum::Character::Character ( const Character & c)

◆ Character() [4/4]

momentum::Character::Character ( Character && c)
defaultnoexcept

References Character().

Member Function Documentation

◆ activeJointsToParameters()

ParameterSet momentum::Character::activeJointsToParameters ( const std::vector< bool > & activeJoints) const
nodiscard

Determines which parameters affect the specified joints.

Parameters
activeJointsBoolean vector indicating which joints to check
Returns
Set of parameters that affect the specified joints

Definition at line 384 of file character.cpp.

References activeJointsToParameters(), momentum::kParametersPerJoint, MT_CHECK, parameterTransform, and skeleton.

Referenced by activeJointsToParameters().

◆ addBlendShape()

void momentum::Character::addBlendShape ( const BlendShape_const_p & blendShape_in,
Eigen::Index maxBlendShapes )

Adds blend shapes to this character.

Parameters
blendShape_inBlend shapes to add to the character
maxBlendShapesMaximum number of blend shape parameters to add (use all if <= 0)

Definition at line 819 of file character.cpp.

References addBlendShape(), momentum::addBlendShapeParameters(), blendShape, mesh, MT_CHECK, parameterLimits, and parameterTransform.

Referenced by addBlendShape(), and withBlendShape().

◆ addFaceExpressionBlendShape()

void momentum::Character::addFaceExpressionBlendShape ( const BlendShapeBase_const_p & blendShape_in,
Eigen::Index maxBlendShapes = -1 )

Adds face expression blend shapes to this character.

Parameters
blendShape_inFace expression blend shapes to add to the character
maxBlendShapesMaximum number of blend shape parameters to add (use all if <= 0)

Definition at line 853 of file character.cpp.

References addFaceExpressionBlendShape(), momentum::addFaceExpressionParameters(), faceExpressionBlendShape, mesh, MT_CHECK, parameterLimits, and parameterTransform.

Referenced by addFaceExpressionBlendShape(), and withFaceExpressionBlendShape().

◆ bake()

Character momentum::Character::bake ( const ModelParameters & modelParams,
bool bakeBlendShapes = true,
bool bakeScales = true ) const
nodiscard

Generic "bake-out" for turning a character into self-contained geometry.

Parameters
[in]modelParamsCurrent pose/scale/blend-shape parameters.
[in]bakeBlendShapesSet true (default) to apply blend-shape deltas and remove their parameters from the character.
[in]bakeScalesSet true (default) to evaluate the posed skeleton, run Linear-Blend-Skinning once, and remove all scaling parameters from the character.

The returned character contains a static mesh with all requested deformations baked in, while still supporting any parameters you elected to keep.

Definition at line 903 of file character.cpp.

References momentum::ParameterTransformT< T >::apply(), momentum::applySSD(), bake(), blendShape, Character(), momentum::extractBlendWeights(), momentum::ParameterTransformT< T >::getBlendShapeParameters(), momentum::ParameterTransformT< T >::getScalingParameters(), inverseBindPose, mesh, MT_CHECK, parameterLimits, parameterTransform, skeleton, skinWeights, and momentum::subsetParameterTransform().

Referenced by bake().

◆ bakeBlendShape() [1/2]

Character momentum::Character::bakeBlendShape ( const BlendWeights & blendWeights) const
nodiscard

Creates a new character with blend shapes baked into the mesh.

Parameters
blendWeightsBlend shape weights to apply
Returns
A new character with blend shapes baked into the mesh

Definition at line 883 of file character.cpp.

References bakeBlendShape(), blendShape, Character(), mesh, MT_CHECK, parameterLimits, parameterTransform, and momentum::subsetParameterTransform().

◆ bakeBlendShape() [2/2]

Character momentum::Character::bakeBlendShape ( const ModelParameters & modelParams) const
nodiscard

Creates a new character with blend shapes baked into the mesh.

Parameters
modelParamsModel parameters containing blend shape weights
Returns
A new character with blend shapes baked into the mesh

Definition at line 899 of file character.cpp.

References bakeBlendShape(), Character(), and momentum::extractBlendWeights().

Referenced by bakeBlendShape(), and bakeBlendShape().

◆ bindPose()

CharacterParameters momentum::Character::bindPose ( ) const
nodiscard

Returns parameters representing the character's bind pose.

The bind pose is the rest pose when all model parameters and joint offsets are zero. When forward kinematics is applied to the bind pose, it results in the rest pose skeleton.

Definition at line 765 of file character.cpp.

References bindPose(), momentum::kParametersPerJoint, momentum::CharacterParametersT< T >::offsets, parameterTransform, momentum::CharacterParametersT< T >::pose, and skeleton.

Referenced by bindPose(), and momentum::CharacterStateT< T >::setBindPose().

◆ initInverseBindPose()

void momentum::Character::initInverseBindPose ( )

Initializes the inverse bind pose transformations.

The inverse bind pose is a set of affine transformations for each joint that map from world space to local joint space in the bind pose configuration.

Definition at line 783 of file character.cpp.

References initInverseBindPose(), inverseBindPose, momentum::SkeletonStateT< T >::jointState, parameterTransform, and skeleton.

Referenced by initInverseBindPose().

◆ initParameterTransform()

void momentum::Character::initParameterTransform ( )

Initializes the parameter transform with the correct dimensions for this character.

Definition at line 772 of file character.cpp.

References momentum::ParameterTransformT< float >::empty(), initParameterTransform(), momentum::kParametersPerJoint, parameterTransform, and skeleton.

Referenced by initParameterTransform(), and momentum::loadParameters().

◆ operator=() [1/2]

Character & momentum::Character::operator= ( Character && rhs)
defaultnoexcept

References Character(), and skinWeights.

◆ operator=() [2/2]

◆ parametersToActiveJoints()

std::vector< bool > momentum::Character::parametersToActiveJoints ( const ParameterSet & parameterSet) const
nodiscard

Determines which joints are affected by the specified parameters.

Parameters
parameterSetSet of parameters to check
Returns
Boolean vector indicating which joints are affected by the parameters

Definition at line 361 of file character.cpp.

References momentum::kParametersPerJoint, MT_CHECK, parametersToActiveJoints(), parameterTransform, and skeleton.

Referenced by parametersToActiveJoints(), and simplify().

◆ remapLocators()

LocatorList momentum::Character::remapLocators ( const LocatorList & locs,
const Character & originalCharacter ) const
nodiscard

Remaps locators from original character to simplified version.

Parameters
locsOriginal locators
originalCharacterOriginal character containing the full joint hierarchy
Returns
Remapped locators for the simplified character

Definition at line 731 of file character.cpp.

References momentum::ParameterTransformT< T >::bindPose(), Character(), jointMap, momentum::SkeletonT< T >::joints, momentum::SkeletonStateT< T >::jointState, MT_CHECK, momentum::ParameterTransformT< T >::numAllModelParameters(), parameterTransform, remapLocators(), and skeleton.

Referenced by remapLocators(), and simplifySkeleton().

◆ remapParameterLimits()

ParameterLimits momentum::Character::remapParameterLimits ( const ParameterLimits & limits,
const Character & originalCharacter ) const
nodiscard

Remaps parameter limits from original character to simplified version.

Parameters
limitsOriginal parameter limits
originalCharacterOriginal character containing the full joint hierarchy
Returns
Remapped parameter limits for the simplified character

Definition at line 616 of file character.cpp.

References momentum::ParameterTransformT< T >::bindPose(), Character(), momentum::Ellipsoid, jointMap, momentum::SkeletonT< T >::joints, momentum::SkeletonStateT< T >::jointState, momentum::MinMaxJoint, momentum::MinMaxJointPassive, MT_CHECK, momentum::ParameterTransformT< T >::numAllModelParameters(), parameterTransform, remapParameterLimits(), and skeleton.

Referenced by remapParameterLimits(), and simplifySkeleton().

◆ remapSkinnedLocators()

◆ remapSkinWeights()

SkinWeights momentum::Character::remapSkinWeights ( const SkinWeights & skinWeights,
const Character & originalCharacter ) const
nodiscard

Remaps skin weights from original character to simplified version.

Parameters
skinWeightsOriginal skin weights
originalCharacterOriginal character containing the full joint hierarchy
Returns
Remapped skin weights for the simplified character

Definition at line 566 of file character.cpp.

References Character(), momentum::SkinWeights::index, jointMap, momentum::SkeletonT< T >::joints, momentum::kMaxSkinJoints, MT_CHECK, momentum::ParameterTransformT< T >::numAllModelParameters(), parameterTransform, remapSkinWeights(), skeleton, and momentum::SkinWeights::weight.

Referenced by remapSkinWeights(), and simplifySkeleton().

◆ resetJointMap()

void momentum::Character::resetJointMap ( )

Resets the joint map to identity (each joint maps to itself).

Definition at line 777 of file character.cpp.

References jointMap, resetJointMap(), and skeleton.

Referenced by Character(), and resetJointMap().

◆ simplify()

Character momentum::Character::simplify ( const ParameterSet & activeParams = ParameterSet().flip()) const
nodiscard

Creates a simplified character with only joints affected by the specified parameters.

Parameters
activeParamsParameters to keep (defaults to all parameters)
Returns
A new character with simplified skeleton and parameter transform

Definition at line 553 of file character.cpp.

References Character(), parametersToActiveJoints(), simplify(), and simplifySkeleton().

Referenced by simplify().

◆ simplifyParameterTransform()

Character momentum::Character::simplifyParameterTransform ( const ParameterSet & parameterSet) const
nodiscard

Creates a simplified character with only the specified parameters.

Parameters
parameterSetSet of parameters to keep
Returns
A new character with only the requested parameters

Definition at line 528 of file character.cpp.

References blendShape, Character(), collision, faceExpressionBlendShape, inverseBindPose, locators, mesh, metadata, MT_CHECK, name, parameterLimits, parameterTransform, physicalProperties, poseShapes, simplifyParameterTransform(), skeleton, skinnedLocators, skinWeights, and momentum::subsetParameterTransform().

Referenced by simplifyParameterTransform().

◆ simplifySkeleton()

Character momentum::Character::simplifySkeleton ( const std::vector< bool > & activeJoints) const
nodiscard

◆ splitParameters()

CharacterParameters momentum::Character::splitParameters ( const Character & character,
const CharacterParameters & parameters,
const ParameterSet & parameterSet )
staticnodiscard

Splits character parameters into active and inactive components.

Parameters
characterCharacter to use for the parameter transform
parametersInput parameters to split
parameterSetSet indicating which parameters are active
Returns
Parameters with active parameters zeroed in pose and applied to offsets

Definition at line 794 of file character.cpp.

References momentum::ParameterTransformT< T >::apply(), Character(), momentum::CharacterParametersT< T >::offsets, parameterTransform, and splitParameters().

Referenced by splitParameters().

◆ withBlendShape()

Character momentum::Character::withBlendShape ( const BlendShape_const_p & blendShape_in,
Eigen::Index maxBlendShapes ) const
nodiscard

Creates a new character with the specified blend shapes.

Parameters
blendShape_inBlend shapes to add to the character
maxBlendShapesMaximum number of blend shape parameters to add (use all if <= 0)
Returns
A new character with the specified blend shapes

Definition at line 811 of file character.cpp.

References addBlendShape(), Character(), and withBlendShape().

Referenced by withBlendShape().

◆ withFaceExpressionBlendShape()

Character momentum::Character::withFaceExpressionBlendShape ( const BlendShapeBase_const_p & blendShape_in,
Eigen::Index maxBlendShapes = -1 ) const
nodiscard

Creates a new character with the specified face expression blend shapes.

Parameters
blendShape_inFace expression blend shapes to add to the character
maxBlendShapesMaximum number of blend shape parameters to add (use all if <= 0)
Returns
A new character with the specified face expression blend shapes

Definition at line 845 of file character.cpp.

References addFaceExpressionBlendShape(), Character(), and withFaceExpressionBlendShape().

Referenced by withFaceExpressionBlendShape().

Member Data Documentation

◆ blendShape

BlendShape_const_p momentum::Character::blendShape

Shape variations that can be blended.

Definition at line 70 of file character.h.

Referenced by momentum::SkeletonDerivativeT< T >::accumulateVertexGradient(), momentum::SkeletonDerivativeT< T >::accumulateVertexGradientIdentityDfdv(), momentum::SkeletonDerivativeT< T >::accumulateVertexGradientWithNormalCorrection(), momentum::SkeletonDerivativeT< T >::accumulateVertexGradientWithNormalCorrectionDirect(), momentum::SkeletonDerivativeT< T >::accumulateVertexJacobian(), momentum::SkeletonDerivativeT< T >::accumulateVertexJacobianIdentityDfdv(), momentum::SkeletonDerivativeT< T >::accumulateVertexJacobianWithNormalCorrection(), momentum::SkeletonDerivativeT< T >::accumulateVertexJacobianWithNormalCorrectionDirect(), momentum::SkeletonDerivativeT< T >::accumulateVertexNormalBlendShapeGradient(), momentum::SkeletonDerivativeT< T >::accumulateVertexNormalBlendShapeGradient(), momentum::SkeletonDerivativeT< T >::accumulateVertexNormalBlendShapeJacobian(), momentum::SkeletonDerivativeT< T >::accumulateVertexNormalBlendShapeJacobian(), addBlendShape(), momentum::addRigidTransformNode(), bake(), bakeBlendShape(), momentum::calibrateModel(), Character(), Character(), momentum::fbx_internal::createMeshNode(), momentum::extractBlendShapeFromParams(), momentum::fbx_internal::extractBlendShapeWeights(), momentum::locatorsToSkinnedLocators(), operator=(), momentum::removeJoints(), momentum::replaceSkeletonHierarchy(), momentum::scaleCharacter(), momentum::CharacterStateT< T >::set(), simplifyParameterTransform(), momentum::skinnedLocatorsToLocators(), momentum::skinWithBlendShapes(), momentum::transformCharacter(), and momentum::MeshStateT< T >::update().

◆ collision

◆ faceExpressionBlendShape

BlendShapeBase_const_p momentum::Character::faceExpressionBlendShape

Facial expression blend shapes.

Definition at line 73 of file character.h.

Referenced by momentum::SkeletonDerivativeT< T >::accumulateVertexGradient(), momentum::SkeletonDerivativeT< T >::accumulateVertexGradientIdentityDfdv(), momentum::SkeletonDerivativeT< T >::accumulateVertexGradientWithNormalCorrection(), momentum::SkeletonDerivativeT< T >::accumulateVertexGradientWithNormalCorrectionDirect(), momentum::SkeletonDerivativeT< T >::accumulateVertexJacobian(), momentum::SkeletonDerivativeT< T >::accumulateVertexJacobianIdentityDfdv(), momentum::SkeletonDerivativeT< T >::accumulateVertexJacobianWithNormalCorrection(), momentum::SkeletonDerivativeT< T >::accumulateVertexJacobianWithNormalCorrectionDirect(), momentum::SkeletonDerivativeT< T >::accumulateVertexNormalBlendShapeGradient(), momentum::SkeletonDerivativeT< T >::accumulateVertexNormalBlendShapeGradient(), momentum::SkeletonDerivativeT< T >::accumulateVertexNormalBlendShapeJacobian(), momentum::SkeletonDerivativeT< T >::accumulateVertexNormalBlendShapeJacobian(), addFaceExpressionBlendShape(), momentum::addRigidTransformNode(), Character(), Character(), momentum::fbx_internal::createMeshNode(), momentum::fbx_internal::extractFaceExpressionWeights(), momentum::locatorsToSkinnedLocators(), operator=(), momentum::PointTriangleVertexErrorFunctionT< T >::PointTriangleVertexErrorFunctionT(), momentum::scaleCharacter(), simplifyParameterTransform(), momentum::skinnedLocatorsToLocators(), momentum::transformCharacter(), and momentum::MeshStateT< T >::update().

◆ inverseBindPose

TransformationList momentum::Character::inverseBindPose

Inverse of the bind pose transformations for each joint.

Definition at line 76 of file character.h.

Referenced by momentum::SkeletonDerivativeT< T >::accumulateVertexGradient(), momentum::SkeletonDerivativeT< T >::accumulateVertexGradientIdentityDfdv(), momentum::SkeletonDerivativeT< T >::accumulateVertexGradientWithNormalCorrection(), momentum::SkeletonDerivativeT< T >::accumulateVertexGradientWithNormalCorrectionDirect(), momentum::SkeletonDerivativeT< T >::accumulateVertexJacobian(), momentum::SkeletonDerivativeT< T >::accumulateVertexJacobianIdentityDfdv(), momentum::SkeletonDerivativeT< T >::accumulateVertexJacobianWithNormalCorrection(), momentum::SkeletonDerivativeT< T >::accumulateVertexJacobianWithNormalCorrectionDirect(), momentum::SkeletonDerivativeT< T >::accumulateVertexNormalBlendShapeGradient(), momentum::SkeletonDerivativeT< T >::accumulateVertexNormalBlendShapeJacobian(), momentum::SkeletonDerivativeT< T >::accumulateVertexNormalCorrectionGradient(), momentum::SkeletonDerivativeT< T >::accumulateVertexNormalCorrectionJacobian(), momentum::addGloveBones(), bake(), momentum::calculateDWorldPos(), Character(), Character(), momentum::createLocatorCharacter(), momentum::getLocatorError(), initInverseBindPose(), momentum::locatorsToSkinnedLocators(), operator=(), momentum::scaleCharacter(), momentum::CharacterStateT< T >::set(), simplifyParameterTransform(), momentum::skinnedLocatorsToLocators(), momentum::skinWithBlendShapes(), momentum::transformCharacter(), and momentum::MeshStateT< T >::update().

◆ jointMap

std::vector<size_t> momentum::Character::jointMap

Maps from original joint indices to simplified joint indices.

Definition at line 79 of file character.h.

Referenced by Character(), operator=(), remapLocators(), remapParameterLimits(), remapSkinnedLocators(), remapSkinWeights(), resetJointMap(), and simplifySkeleton().

◆ locators

◆ mesh

◆ metadata

std::string momentum::Character::metadata

◆ name

◆ parameterLimits

◆ parameterTransform

ParameterTransform momentum::Character::parameterTransform

Maps model parameters to joint parameters.

Definition at line 39 of file character.h.

Referenced by activeJointsToParameters(), addBlendShape(), momentum::addBlendShapeRegularizer(), addFaceExpressionBlendShape(), momentum::addGloveBones(), momentum::addGloveCalibrationParameters(), momentum::addKeypointProjectionConstraints(), momentum::addRigidTransformNode(), momentum::addSkinnedLocatorParametersToTransform(), bake(), bakeBlendShape(), bindPose(), momentum::calibrateLocators(), momentum::calibrateModel(), Character(), Character(), momentum::computeFloorContactConstraints(), momentum::fbx_internal::createAnimationCurves(), momentum::createLocatorCharacter(), momentum::extractBlendShapeFromParams(), momentum::fbx_internal::extractBlendShapeWeights(), momentum::fbx_internal::extractFaceExpressionWeights(), momentum::extractGloveOffsetsFromCharacter(), momentum::extractIdAndLocatorsFromParams(), momentum::extractLocatorsFromCharacter(), momentum::extractSkinnedLocatorsFromCharacter(), momentum::getLocatorError(), momentum::HeightErrorFunctionT< T >::HeightErrorFunctionT(), initInverseBindPose(), initParameterTransform(), momentum::jointIdentityToModelIdentity(), momentum::loadCharacterWithIdentity(), momentum::loadCharacterWithMotionModelParameterScales(), momentum::loadParameters(), momentum::locatorsToSkinnedLocators(), momentum::mapMotionToCharacter(), momentum::mapMotionToCharacter(), momentum::ModelParametersErrorFunctionT< T >::ModelParametersErrorFunctionT(), operator=(), momentum::parameterSetsFromJson(), momentum::parameterSetsToJson(), parametersToActiveJoints(), momentum::parameterTransformToJson(), momentum::PlaneCollisionQueryT< T >::PlaneCollisionQueryT(), momentum::poseConstraintsFromJson(), momentum::poseConstraintsToJson(), momentum::PoseTransformSolverT< T >::PoseTransformSolverT(), momentum::refineMotion(), remapLocators(), remapParameterLimits(), remapSkinnedLocators(), remapSkinWeights(), momentum::removeJoints(), momentum::replaceSkeletonHierarchy(), momentum::sampleFrames(), momentum::saveCharacter(), momentum::saveMmo(), momentum::saveMmo(), momentum::saveMotion(), momentum::saveUsdCharacterWithMotion(), momentum::scaleCharacter(), momentum::CharacterStateT< T >::set(), momentum::fbx_internal::setupJointAnimCurves(), simplifyParameterTransform(), simplifySkeleton(), momentum::skinnedLocatorsToLocators(), momentum::skinWithBlendShapes(), splitParameters(), momentum::trackPosesForFrames(), momentum::trackSequence(), momentum::transformCharacter(), and momentum::MeshStateT< T >::update().

◆ physicalProperties

◆ poseShapes

◆ skeleton

Skeleton momentum::Character::skeleton

Skeletal structure defining the character's joints and hierarchy.

Definition at line 36 of file character.h.

Referenced by activeJointsToParameters(), momentum::addGloveBones(), momentum::addGloveCalibrationParameters(), momentum::addKeypointProjectionConstraints(), momentum::fbx_internal::addPhysicalProperties(), momentum::addRigidTransformNode(), momentum::averageTriangleSkinWeights(), bake(), momentum::bakeGloveOffsetsFromParams(), bindPose(), momentum::calibrateModel(), Character(), Character(), momentum::characterToLegacyJson(), momentum::computeFloorContactConstraints(), momentum::computeSkinnedLocatorMeshDistances(), momentum::fbx_internal::createAnimationCurves(), momentum::createGloveOrientationConstraintData(), momentum::createGlovePositionConstraintData(), momentum::createLocatorCharacter(), momentum::fbx_internal::createSkeletonNodes(), momentum::createSkinnedLocatorMeshConstraints(), momentum::extractGloveOffsetsFromCharacter(), momentum::extractLocatorsFromCharacter(), momentum::extractMarkersFromMotion(), momentum::extractSkinnedLocatorsFromCharacter(), momentum::getLocatorError(), initInverseBindPose(), initParameterTransform(), momentum::loadCharacterWithIdentity(), momentum::loadCharacterWithSkeletonStatesCommon(), momentum::loadParameters(), momentum::loadPoseShape(), momentum::locatorsToSkinnedLocators(), momentum::logCharacter(), momentum::makeCharacterDocument(), momentum::mapIdentityToCharacter(), momentum::mapMotionToCharacter(), operator=(), parametersToActiveJoints(), momentum::parameterTransformFromJson(), momentum::parameterTransformToJson(), momentum::PlaneCollisionQueryT< T >::PlaneCollisionQueryT(), remapLocators(), remapParameterLimits(), remapSkinnedLocators(), remapSkinWeights(), momentum::removeJoints(), momentum::replaceSkeletonHierarchy(), resetJointMap(), momentum::sampleFrames(), momentum::saveBvhCharacter(), momentum::saveMmo(), momentum::saveMotion(), momentum::saveUsdCharacter(), momentum::saveUsdCharacterWithMotion(), momentum::scaleCharacter(), momentum::CharacterStateT< T >::set(), momentum::setupGloveErrorFunctions(), momentum::fbx_internal::setupJointAnimCurves(), simplifyParameterTransform(), simplifySkeleton(), momentum::skinnedLocatorsToLocators(), and momentum::transformCharacter().

◆ skinnedLocators

◆ skinWeights

SkinWeights_u momentum::Character::skinWeights

Defines how mesh vertices are influenced by joints.

Definition at line 58 of file character.h.

Referenced by momentum::SkeletonDerivativeT< T >::accumulateVertexGradient(), momentum::SkeletonDerivativeT< T >::accumulateVertexGradientIdentityDfdv(), momentum::SkeletonDerivativeT< T >::accumulateVertexGradientWithNormalCorrection(), momentum::SkeletonDerivativeT< T >::accumulateVertexGradientWithNormalCorrectionDirect(), momentum::SkeletonDerivativeT< T >::accumulateVertexJacobian(), momentum::SkeletonDerivativeT< T >::accumulateVertexJacobianIdentityDfdv(), momentum::SkeletonDerivativeT< T >::accumulateVertexJacobianWithNormalCorrection(), momentum::SkeletonDerivativeT< T >::accumulateVertexJacobianWithNormalCorrectionDirect(), momentum::SkeletonDerivativeT< T >::accumulateVertexNormalBlendShapeGradient(), momentum::SkeletonDerivativeT< T >::accumulateVertexNormalBlendShapeGradient(), momentum::SkeletonDerivativeT< T >::accumulateVertexNormalBlendShapeJacobian(), momentum::SkeletonDerivativeT< T >::accumulateVertexNormalBlendShapeJacobian(), momentum::SkeletonDerivativeT< T >::accumulateVertexNormalCorrectionGradient(), momentum::SkeletonDerivativeT< T >::accumulateVertexNormalCorrectionJacobian(), momentum::addRigidTransformNode(), momentum::averageTriangleSkinWeights(), bake(), momentum::calculateDWorldPos(), Character(), momentum::characterToLegacyJson(), momentum::computeSkinnedLocatorMeshDistances(), momentum::fbx_internal::createMeshNode(), momentum::createSkinnedLocatorMeshConstraints(), momentum::locatorsToSkinnedLocators(), operator=(), operator=(), momentum::PointTriangleVertexErrorFunctionT< T >::PointTriangleVertexErrorFunctionT(), momentum::removeJoints(), momentum::replaceSkeletonHierarchy(), momentum::fbx_internal::saveSkinWeightsToFbx(), momentum::scaleCharacter(), momentum::CharacterStateT< T >::set(), simplifyParameterTransform(), simplifySkeleton(), momentum::skinnedLocatorsToLocators(), momentum::skinWithBlendShapes(), momentum::transformCharacter(), momentum::MeshStateT< T >::update(), and momentum::VertexVertexDistanceErrorFunctionT< T >::VertexVertexDistanceErrorFunctionT().


The documentation for this struct was generated from the following files: