|
Momentum
A library for solving nonlinear optimization problems related to human body kinematics
|
Represents the complete state of a character at a specific point in time. More...
#include <character_state.h>
Public Member Functions | |
| CharacterStateT () | |
| CharacterStateT (const CharacterStateT &other) | |
| Creates a deep copy of another character state, including owned meshState and collisionState. | |
| CharacterStateT (CharacterStateT &&c) noexcept | |
| CharacterStateT & | operator= (const CharacterStateT &rhs)=delete |
| Copy assignment is deleted; use the explicit copy constructor instead. | |
| CharacterStateT & | operator= (CharacterStateT &&rhs) noexcept |
| ~CharacterStateT () | |
| CharacterStateT (const Character &referenceCharacter, bool updateMesh=true, bool updateCollision=true) | |
| Creates a character state in referenceCharacter's bind pose. | |
| CharacterStateT (const CharacterParameters ¶meters, const Character &referenceCharacter, bool updateMesh=true, bool updateCollision=true, bool applyLimits=true) | |
| Creates a character state by applying parameters to referenceCharacter. | |
| void | set (const CharacterParameters ¶meters, const Character &referenceCharacter, bool updateMesh=true, bool updateCollision=true, bool applyLimits=true) |
| Updates the character state by applying parameters to referenceCharacter. | |
| void | setBindPose (const Character &referenceCharacter, bool updateMesh=true, bool updateCollision=true) |
| Sets the character state to referenceCharacter's bind pose. | |
Public Attributes | |
| CharacterParameters | parameters |
| Model parameters (pose) and joint parameter offsets driving this state. | |
| SkeletonState | skeletonState |
| LocatorState | locatorState |
| Mesh_u | meshState |
| Skinned mesh; null when constructed/updated with updateMesh=false or when the reference character has no mesh or skin weights. | |
| CollisionGeometryState_u | collisionState |
| Collision geometry state; null when constructed/updated with updateCollision=false or when the reference character has no collision geometry. | |
Represents the complete state of a character at a specific point in time.
Stores the character's parameters, skeleton state, locator positions, skinned mesh, and collision geometry state. This class is used for character animation and rendering.
Definition at line 23 of file character_state.h.
|
default |
Referenced by CharacterStateT().
|
explicit |
Creates a deep copy of another character state, including owned meshState and collisionState.
Definition at line 24 of file character_state.cpp.
References CharacterStateT(), collisionState, locatorState, meshState, parameters, and skeletonState.
|
defaultnoexcept |
|
default |
|
explicit |
Creates a character state in referenceCharacter's bind pose.
| updateMesh | If true, allocate and populate meshState by skinning referenceCharacter.mesh (requires non-null mesh and skin weights). |
| updateCollision | If true, allocate and populate collisionState from referenceCharacter.collision (requires non-null collision). |
Definition at line 43 of file character_state.cpp.
References setBindPose().
| momentum::CharacterStateT< T >::CharacterStateT | ( | const CharacterParameters & | parameters, |
| const Character & | referenceCharacter, | ||
| bool | updateMesh = true, | ||
| bool | updateCollision = true, | ||
| bool | applyLimits = true ) |
Creates a character state by applying parameters to referenceCharacter.
| applyLimits | If true, clamp passive joint parameters to the character's parameterLimits after applying the parameter transform. |
Definition at line 51 of file character_state.cpp.
References parameters, and set().
|
defaultnoexcept |
|
delete |
Copy assignment is deleted; use the explicit copy constructor instead.
| void momentum::CharacterStateT< T >::set | ( | const CharacterParameters & | parameters, |
| const Character & | referenceCharacter, | ||
| bool | updateMesh = true, | ||
| bool | updateCollision = true, | ||
| bool | applyLimits = true ) |
Updates the character state by applying parameters to referenceCharacter.
| updateMesh | If true, allocate and populate meshState by skinning referenceCharacter.mesh (no-op if mesh or skin weights are null). When pose blend shapes or blend shapes are present on the character, they are applied before linear skinning. |
| updateCollision | If true, allocate and populate collisionState from referenceCharacter.collision (no-op if collision is null). |
| applyLimits | If true, clamp passive joint parameters to the character's parameterLimits after applying the parameter transform. |
Definition at line 69 of file character_state.cpp.
References momentum::ParameterTransformT< T >::apply(), momentum::applyPassiveJointParameterLimits(), momentum::applySSD(), momentum::Character::blendShape, momentum::Character::collision, collisionState, momentum::Character::inverseBindPose, momentum::Character::locators, locatorState, momentum::Character::mesh, meshState, MT_CHECK, momentum::ParameterTransformT< T >::numAllModelParameters(), momentum::ParameterTransformT< T >::numJointParameters(), momentum::Character::parameterLimits, parameters, momentum::Character::parameterTransform, momentum::Character::poseShapes, momentum::Character::skeleton, skeletonState, momentum::Character::skinWeights, and momentum::skinWithBlendShapes().
Referenced by CharacterStateT(), and setBindPose().
| void momentum::CharacterStateT< T >::setBindPose | ( | const Character & | referenceCharacter, |
| bool | updateMesh = true, | ||
| bool | updateCollision = true ) |
Sets the character state to referenceCharacter's bind pose.
Definition at line 61 of file character_state.cpp.
References momentum::Character::bindPose(), and set().
Referenced by CharacterStateT().
| CollisionGeometryState_u momentum::CharacterStateT< T >::collisionState |
Collision geometry state; null when constructed/updated with updateCollision=false or when the reference character has no collision geometry.
Definition at line 38 of file character_state.h.
Referenced by CharacterStateT(), and set().
| LocatorState momentum::CharacterStateT< T >::locatorState |
Definition at line 29 of file character_state.h.
Referenced by CharacterStateT(), momentum::logCharacter(), and set().
| Mesh_u momentum::CharacterStateT< T >::meshState |
Skinned mesh; null when constructed/updated with updateMesh=false or when the reference character has no mesh or skin weights.
Definition at line 33 of file character_state.h.
Referenced by CharacterStateT(), momentum::logCharacter(), and set().
| CharacterParameters momentum::CharacterStateT< T >::parameters |
Model parameters (pose) and joint parameter offsets driving this state.
Definition at line 25 of file character_state.h.
Referenced by CharacterStateT(), CharacterStateT(), and set().
| SkeletonState momentum::CharacterStateT< T >::skeletonState |
Definition at line 27 of file character_state.h.
Referenced by CharacterStateT(), momentum::logCharacter(), and set().