115 const Mesh* m =
nullptr,
121 const std::string& nameIn =
"",
124 std::string_view metadataIn =
"",
158 const Character& originalCharacter)
const;
167 const Character& originalCharacter)
const;
176 const Character& originalCharacter)
const;
180 const Character& originalCharacter)
const;
230 Eigen::Index maxBlendShapes)
const;
239 Eigen::Index maxBlendShapes = -1)
const;
253 Eigen::Index maxBlendShapes = -1);
279 bool bakeBlendShapes =
true,
280 bool bakeScales =
true)
const;
CollisionGeometryT< float > CollisionGeometry
SkeletonT< float > Skeleton
::std::shared_ptr< const BlendShapeBase > BlendShapeBase_const_p
::std::unique_ptr< Mesh > Mesh_u
std::vector< Affine3f > TransformationList
One affine transform per joint, indexed by joint id.
std::vector< ParameterLimit > ParameterLimits
BlendWeightsT< float > BlendWeights
::std::unique_ptr< SkinWeights > SkinWeights_u
ParameterTransformT< float > ParameterTransform
std::vector< JointPhysicalProperties > PhysicalProperties
Optional physical mass properties for a character.
std::vector< SkinnedLocator > SkinnedLocatorList
A collection of locators attached to a skeleton.
CharacterParametersT< float > CharacterParameters
ModelParametersT< float > ModelParameters
::std::unique_ptr< PoseShape > PoseShape_u
::std::shared_ptr< const BlendShape > BlendShape_const_p
std::bitset< kMaxModelParams > ParameterSet
Bitset for model parameter enablement.
std::vector< Locator > LocatorList
A collection of locators attached to a skeleton.
void addFaceExpressionBlendShape(const BlendShapeBase_const_p &blendShape_in, Eigen::Index maxBlendShapes=-1)
Adds face expression blend shapes to this character.
ParameterLimits remapParameterLimits(const ParameterLimits &limits, const Character &originalCharacter) const
Remaps parameter limits from original character to simplified version.
SkinWeights remapSkinWeights(const SkinWeights &skinWeights, const Character &originalCharacter) const
Remaps skin weights from original character to simplified version.
std::vector< bool > parametersToActiveJoints(const ParameterSet ¶meterSet) const
Determines which joints are affected by the specified parameters.
TransformationList inverseBindPose
Inverse of the bind pose transformations for each joint.
Character bake(const ModelParameters &modelParams, bool bakeBlendShapes=true, bool bakeScales=true) const
Generic "bake-out" for turning a character into self-contained geometry.
LocatorList locators
Points of interest attached to joints.
SkinWeights_u skinWeights
Defines how mesh vertices are influenced by joints.
CharacterParameters bindPose() const
Returns parameters representing the character's bind pose.
void initInverseBindPose()
Initializes the inverse bind pose transformations.
static CharacterParameters splitParameters(const Character &character, const CharacterParameters ¶meters, const ParameterSet ¶meterSet)
Splits character parameters into active and inactive components.
void resetJointMap()
Resets the joint map to identity (each joint maps to itself).
PhysicalProperties physicalProperties
Joint-level physical mass and inertia data loaded from model assets.
Character simplifyParameterTransform(const ParameterSet ¶meterSet) const
Creates a simplified character with only the specified parameters.
BlendShapeBase_const_p faceExpressionBlendShape
Facial expression blend shapes.
ParameterLimits parameterLimits
Constraints on model parameters.
Mesh_u mesh
3D mesh representing the character's surface
PoseShape_u poseShapes
Pose-dependent shape corrections.
Character simplifySkeleton(const std::vector< bool > &activeJoints) const
Creates a simplified character with only the specified joints.
Skeleton skeleton
Skeletal structure defining the character's joints and hierarchy.
void addBlendShape(const BlendShape_const_p &blendShape_in, Eigen::Index maxBlendShapes)
Adds blend shapes to this character.
SkinnedLocatorList remapSkinnedLocators(const SkinnedLocatorList &locs, const Character &originalCharacter) const
std::string name
Character identifier.
Character(Character &&c) noexcept
Character withFaceExpressionBlendShape(const BlendShapeBase_const_p &blendShape_in, Eigen::Index maxBlendShapes=-1) const
Creates a new character with the specified face expression blend shapes.
Character & operator=(const Character &rhs)
Character withBlendShape(const BlendShape_const_p &blendShape_in, Eigen::Index maxBlendShapes) const
Creates a new character with the specified blend shapes.
SkinnedLocatorList skinnedLocators
Points of interest attached to joints, with skinning weights.
Character simplify(const ParameterSet &activeParams=ParameterSet().flip()) const
Creates a simplified character with only joints affected by the specified parameters.
ParameterTransform parameterTransform
Maps model parameters to joint parameters.
ParameterSet activeJointsToParameters(const std::vector< bool > &activeJoints) const
Determines which parameters affect the specified joints.
Character & operator=(Character &&rhs) noexcept
BlendShape_const_p blendShape
Shape variations that can be blended.
Character bakeBlendShape(const ModelParameters &modelParams) const
Creates a new character with blend shapes baked into the mesh.
std::vector< size_t > jointMap
Maps from original joint indices to simplified joint indices.
void initParameterTransform()
Initializes the parameter transform with the correct dimensions for this character.
LocatorList remapLocators(const LocatorList &locs, const Character &originalCharacter) const
Remaps locators from original character to simplified version.
std::string metadata
Metadata (as a JSON-serialized string).
CollisionGeometry_u collision
Collision volumes for the character.
Computes shape deformations based on joint rotations.
Linear blend skinning weights for a character mesh: per-vertex joint indices and influence weights.