Momentum
A library for solving nonlinear optimization problems related to human body kinematics
Loading...
Searching...
No Matches
momentum::VertexVertexDistanceErrorFunctionT< T > Class Template Reference

Error function for vertex-to-vertex distance constraints. More...

#include <vertex_vertex_distance_error_function.h>

Inheritance diagram for momentum::VertexVertexDistanceErrorFunctionT< T >:

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 > &parameters, 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}

Detailed Description

template<typename T>
class momentum::VertexVertexDistanceErrorFunctionT< T >

Error function for vertex-to-vertex distance constraints.

Definition at line 40 of file vertex_vertex_distance_error_function.h.

Constructor & Destructor Documentation

◆ VertexVertexDistanceErrorFunctionT() [1/3]

◆ ~VertexVertexDistanceErrorFunctionT()

◆ VertexVertexDistanceErrorFunctionT() [2/3]

template<typename T>
momentum::VertexVertexDistanceErrorFunctionT< T >::VertexVertexDistanceErrorFunctionT ( const VertexVertexDistanceErrorFunctionT< T > & other)
delete

◆ VertexVertexDistanceErrorFunctionT() [3/3]

template<typename T>
momentum::VertexVertexDistanceErrorFunctionT< T >::VertexVertexDistanceErrorFunctionT ( VertexVertexDistanceErrorFunctionT< T > && other)
deletenoexcept

Member Function Documentation

◆ addConstraint()

template<typename T>
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.

◆ clearConstraints()

template<typename T>
void momentum::VertexVertexDistanceErrorFunctionT< T >::clearConstraints ( )

Clear all constraints.

Definition at line 47 of file vertex_vertex_distance_error_function.cpp.

◆ getCharacter()

template<typename T>
const Character * momentum::VertexVertexDistanceErrorFunctionT< T >::getCharacter ( ) const
inlinenodiscardoverridevirtual

Get the character.

Reimplemented from momentum::SkeletonErrorFunctionT< T >.

Definition at line 90 of file vertex_vertex_distance_error_function.h.

◆ getConstraints()

template<typename T>
const std::vector< VertexVertexDistanceConstraintT< T > > & momentum::VertexVertexDistanceErrorFunctionT< T >::getConstraints ( ) const
inlinenodiscard

Get all constraints.

Definition at line 80 of file vertex_vertex_distance_error_function.h.

◆ getError()

template<typename T>
double momentum::VertexVertexDistanceErrorFunctionT< T >::getError ( const ModelParametersT< T > & modelParameters,
const SkeletonStateT< T > & state,
const MeshStateT< T > & meshState )
nodiscardfinalvirtual

◆ getGradient()

template<typename T>
double momentum::VertexVertexDistanceErrorFunctionT< T >::getGradient ( const ModelParametersT< T > & modelParameters,
const SkeletonStateT< T > & state,
const MeshStateT< T > & meshState,
Eigen::Ref< Eigen::VectorX< T > > gradient )
finalvirtual

◆ getJacobian()

template<typename T>
double momentum::VertexVertexDistanceErrorFunctionT< T >::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 )
finalvirtual

◆ getJacobianSize()

template<typename T>
size_t momentum::VertexVertexDistanceErrorFunctionT< T >::getJacobianSize ( ) const
nodiscardfinalvirtual

◆ getNumConstraints()

template<typename T>
size_t momentum::VertexVertexDistanceErrorFunctionT< T >::getNumConstraints ( ) const
inlinenodiscard

Get the number of constraints.

Definition at line 85 of file vertex_vertex_distance_error_function.h.

◆ needsMesh()

template<typename T>
bool momentum::VertexVertexDistanceErrorFunctionT< T >::needsMesh ( ) const
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.

◆ operator=() [1/2]

◆ operator=() [2/2]


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