|
Momentum
A library for solving nonlinear optimization problems related to human body kinematics
|
Represents the complete state of a model's mesh. More...
#include <mesh_state.h>
Public Member Functions | |
| MeshStateT () noexcept=default | |
| Creates an empty mesh state. | |
| MeshStateT (const ModelParametersT< T > ¶meters, const SkeletonStateT< T > &state, const Character &character) noexcept | |
| ~MeshStateT () noexcept | |
| MeshStateT (const MeshStateT &other) | |
| MeshStateT & | operator= (const MeshStateT &other) |
| MeshStateT (MeshStateT &&other) noexcept=default | |
| MeshStateT & | operator= (MeshStateT &&other) noexcept=default |
| void | update (const ModelParametersT< T > ¶meters, const SkeletonStateT< T > &state, const Character &character) |
| Updates the mesh state based on model parameters and skeleton state. | |
Public Attributes | |
| std::unique_ptr< MeshT< T > > | neutralMesh_ |
| Rest mesh without the facial expression basis, used to restore the neutral shape after facial expressions are applied. | |
| std::unique_ptr< MeshT< T > > | restMesh_ |
| Rest positions of the mesh after the shape basis (and potentially facial expression basis) has been applied. | |
| std::unique_ptr< MeshT< T > > | posedMesh_ |
| Posed mesh after the skeleton transforms have been applied. | |
Represents the complete state of a model's mesh.
Stores the mesh in its various states throughout the deformation pipeline:
Definition at line 24 of file mesh_state.h.
|
defaultnoexcept |
Creates an empty mesh state.
Referenced by MeshStateT(), and operator=().
|
noexcept |
Definition at line 21 of file mesh_state.cpp.
References update().
|
defaultnoexcept |
| momentum::MeshStateT< T >::MeshStateT | ( | const MeshStateT< T > & | other | ) |
Definition at line 32 of file mesh_state.cpp.
References MeshStateT().
|
defaultnoexcept |
| MeshStateT< T > & momentum::MeshStateT< T >::operator= | ( | const MeshStateT< T > & | other | ) |
Definition at line 45 of file mesh_state.cpp.
References MeshStateT().
|
defaultnoexcept |
| void momentum::MeshStateT< T >::update | ( | const ModelParametersT< T > & | parameters, |
| const SkeletonStateT< T > & | state, | ||
| const Character & | character ) |
Updates the mesh state based on model parameters and skeleton state.
This applies the full deformation pipeline:
| parameters | Model parameters containing blend weights |
| state | Current skeleton state for skinning |
| character | Character containing mesh, blend shapes, and skinning data |
Definition at line 53 of file mesh_state.cpp.
References momentum::applySSD(), momentum::Character::blendShape, momentum::cast(), momentum::extractBlendWeights(), momentum::extractFaceExpressionBlendWeights(), momentum::Character::faceExpressionBlendShape, momentum::Character::inverseBindPose, momentum::Character::mesh, MT_PROFILE_FUNCTION, neutralMesh_, momentum::Character::parameterTransform, posedMesh_, restMesh_, and momentum::Character::skinWeights.
Referenced by momentum::SequenceSolverFunctionT< T >::computeJacobianBlock(), momentum::d_modelParams_d_inputs(), momentum::SequenceSolverFunctionT< T >::getGradient(), and MeshStateT().
| std::unique_ptr<MeshT<T> > momentum::MeshStateT< T >::neutralMesh_ |
Rest mesh without the facial expression basis, used to restore the neutral shape after facial expressions are applied.
Not used when there is a shape basis.
Definition at line 27 of file mesh_state.h.
Referenced by update().
| std::unique_ptr<MeshT<T> > momentum::MeshStateT< T >::posedMesh_ |
Posed mesh after the skeleton transforms have been applied.
Definition at line 32 of file mesh_state.h.
Referenced by momentum::SkeletonDerivativeT< T >::accumulateVertexNormalBlendShapeGradient(), momentum::SkeletonDerivativeT< T >::accumulateVertexNormalBlendShapeGradient(), momentum::SkeletonDerivativeT< T >::accumulateVertexNormalBlendShapeJacobian(), momentum::SkeletonDerivativeT< T >::accumulateVertexNormalBlendShapeJacobian(), momentum::VertexNormalErrorFunctionT< T >::evalFunction(), momentum::VertexPlaneErrorFunctionT< T >::evalFunction(), momentum::CameraVertexProjectionErrorFunctionT< T >::getError(), momentum::PointTriangleVertexErrorFunctionT< T >::getError(), momentum::SDFCollisionErrorFunctionT< T, SdfColliderType >::getError(), momentum::VertexErrorFunctionT< T, Data, FuncDim >::getError(), momentum::VertexSDFErrorFunctionT< T >::getError(), momentum::VertexVertexDistanceErrorFunctionT< T >::getError(), momentum::CameraVertexProjectionErrorFunctionT< T >::getGradient(), momentum::PointTriangleVertexErrorFunctionT< T >::getGradient(), momentum::SDFCollisionErrorFunctionT< T, SdfColliderType >::getGradient(), momentum::VertexErrorFunctionT< T, Data, FuncDim >::getGradient(), momentum::VertexNormalErrorFunctionT< T >::getGradient(), momentum::VertexPositionErrorFunctionT< T >::getGradient(), momentum::VertexSDFErrorFunctionT< T >::getGradient(), momentum::VertexVertexDistanceErrorFunctionT< T >::getGradient(), momentum::CameraVertexProjectionErrorFunctionT< T >::getJacobian(), momentum::PointTriangleVertexErrorFunctionT< T >::getJacobian(), momentum::SDFCollisionErrorFunctionT< T, SdfColliderType >::getJacobian(), momentum::VertexErrorFunctionT< T, Data, FuncDim >::getJacobian(), momentum::VertexNormalErrorFunctionT< T >::getJacobian(), momentum::VertexPositionErrorFunctionT< T >::getJacobian(), momentum::VertexSDFErrorFunctionT< T >::getJacobian(), momentum::VertexVertexDistanceErrorFunctionT< T >::getJacobian(), and update().
| std::unique_ptr<MeshT<T> > momentum::MeshStateT< T >::restMesh_ |
Rest positions of the mesh after the shape basis (and potentially facial expression basis) has been applied.
Definition at line 30 of file mesh_state.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::SkinnedLocatorTriangleErrorFunctionT< T >::getError(), momentum::SDFCollisionErrorFunctionT< T, SdfColliderType >::getGradient(), momentum::SkinnedLocatorTriangleErrorFunctionT< T >::getGradient(), momentum::VertexSDFErrorFunctionT< T >::getGradient(), momentum::SDFCollisionErrorFunctionT< T, SdfColliderType >::getJacobian(), momentum::SkinnedLocatorTriangleErrorFunctionT< T >::getJacobian(), momentum::VertexSDFErrorFunctionT< T >::getJacobian(), and update().