|
Momentum
A library for solving nonlinear optimization problems related to human body kinematics
|
Error function for vertex-to-vertex distance constraints. More...
#include <vertex_vertex_distance_error_function.h>
Public Member Functions | |
| VertexVertexDistanceErrorFunctionT (const Character &character) | |
| ~VertexVertexDistanceErrorFunctionT () override | |
| VertexVertexDistanceErrorFunctionT (const VertexVertexDistanceErrorFunctionT &other)=delete | |
| VertexVertexDistanceErrorFunctionT (VertexVertexDistanceErrorFunctionT &&other) noexcept=delete | |
| VertexVertexDistanceErrorFunctionT & | operator= (const VertexVertexDistanceErrorFunctionT &other)=delete |
| VertexVertexDistanceErrorFunctionT & | operator= (VertexVertexDistanceErrorFunctionT &&other)=delete |
| double | getError (const ModelParametersT< T > &modelParameters, const SkeletonStateT< T > &state, const MeshStateT< T > &meshState) final |
| double | getGradient (const ModelParametersT< T > &modelParameters, const SkeletonStateT< T > &state, const MeshStateT< T > &meshState, Eigen::Ref< Eigen::VectorX< T > > gradient) final |
| double | getJacobian (const ModelParametersT< T > &modelParameters, const SkeletonStateT< T > &state, const MeshStateT< T > &meshState, Eigen::Ref< Eigen::MatrixX< T > > jacobian, Eigen::Ref< Eigen::VectorX< T > > residual, int &usedRows) final |
| size_t | getJacobianSize () const final |
| void | addConstraint (int vertexIndex1, int vertexIndex2, T weight, T targetDistance) |
| Add a vertex-to-vertex distance constraint. | |
| void | clearConstraints () |
| Clear all constraints. | |
| const std::vector< VertexVertexDistanceConstraintT< T > > & | getConstraints () const |
| Get all constraints. | |
| size_t | getNumConstraints () const |
| Get the number of constraints. | |
| const Character * | getCharacter () const override |
| Get the character. | |
| bool | needsMesh () const override |
| Override to indicate this function requires mesh state. | |
| Public Member Functions inherited from momentum::SkeletonErrorFunctionT< T > | |
| SkeletonErrorFunctionT (const Skeleton &skel, const ParameterTransform &pt) | |
| virtual | ~SkeletonErrorFunctionT ()=default |
| const Skeleton & | getSkeleton () const |
| const ParameterTransform & | getParameterTransform () const |
| void | setWeight (T w) |
| T | getWeight () const |
| void | setActiveJoints (const VectorX< bool > &aj) |
| void | setEnabledParameters (const ParameterSet &ps) |
| virtual void | getHessian (const ModelParametersT< T > &, const SkeletonStateT< T > &, const MeshStateT< T > &, Eigen::Ref< Eigen::MatrixX< T > >) |
| virtual double | getSolverDerivatives (const ModelParametersT< T > ¶meters, const SkeletonStateT< T > &state, const MeshStateT< T > &meshState, const size_t actualParameters, Eigen::MatrixX< T > &hess, Eigen::VectorX< T > &grad) |
Additional Inherited Members | |
| Protected Attributes inherited from momentum::SkeletonErrorFunctionT< T > | |
| const Skeleton & | skeleton_ |
| const ParameterTransform & | parameterTransform_ |
| T | weight_ |
| VectorX< bool > | activeJointParams_ |
| ParameterSet | enabledParameters_ |
| bool | useHessian_ {false} |
Error function for vertex-to-vertex distance constraints.
Definition at line 40 of file vertex_vertex_distance_error_function.h.
|
explicit |
Definition at line 21 of file vertex_vertex_distance_error_function.cpp.
References momentum::Character::mesh, MT_CHECK, momentum::SkeletonErrorFunctionT< T >::SkeletonErrorFunctionT(), and momentum::Character::skinWeights.
|
overridedefault |
|
delete |
|
deletenoexcept |
| void momentum::VertexVertexDistanceErrorFunctionT< T >::addConstraint | ( | int | vertexIndex1, |
| int | vertexIndex2, | ||
| T | weight, | ||
| T | targetDistance ) |
Add a vertex-to-vertex distance constraint.
Definition at line 33 of file vertex_vertex_distance_error_function.cpp.
References MT_CHECK.
| void momentum::VertexVertexDistanceErrorFunctionT< T >::clearConstraints | ( | ) |
Clear all constraints.
Definition at line 47 of file vertex_vertex_distance_error_function.cpp.
|
inlinenodiscardoverridevirtual |
Get the character.
Reimplemented from momentum::SkeletonErrorFunctionT< T >.
Definition at line 90 of file vertex_vertex_distance_error_function.h.
|
inlinenodiscard |
Get all constraints.
Definition at line 80 of file vertex_vertex_distance_error_function.h.
|
nodiscardfinalvirtual |
Reimplemented from momentum::SkeletonErrorFunctionT< T >.
Definition at line 52 of file vertex_vertex_distance_error_function.cpp.
References MT_CHECK_NOTNULL, MT_PROFILE_FUNCTION, momentum::MeshStateT< T >::posedMesh_, and momentum::SkeletonErrorFunctionT< T >::weight_.
|
finalvirtual |
Reimplemented from momentum::SkeletonErrorFunctionT< T >.
Definition at line 76 of file vertex_vertex_distance_error_function.cpp.
References MT_CHECK, MT_PROFILE_FUNCTION, momentum::MeshStateT< T >::posedMesh_, and momentum::SkeletonErrorFunctionT< T >::weight_.
|
finalvirtual |
Reimplemented from momentum::SkeletonErrorFunctionT< T >.
Definition at line 96 of file vertex_vertex_distance_error_function.cpp.
References MT_CHECK, MT_CHECK_NOTNULL, MT_PROFILE_FUNCTION, momentum::MeshStateT< T >::posedMesh_, and momentum::EigenStrongType< Derived, EigenType >::size().
|
nodiscardfinalvirtual |
Reimplemented from momentum::SkeletonErrorFunctionT< T >.
Definition at line 131 of file vertex_vertex_distance_error_function.cpp.
|
inlinenodiscard |
Get the number of constraints.
Definition at line 85 of file vertex_vertex_distance_error_function.h.
|
inlinenodiscardoverridevirtual |
Override to indicate this function requires mesh state.
Reimplemented from momentum::SkeletonErrorFunctionT< T >.
Definition at line 95 of file vertex_vertex_distance_error_function.h.
|
delete |
|
delete |