56 int& usedRows) const final;
72 void setWeights(const
float posWeight, const
float rotationWeight) {
74 rotWgt_ = rotationWeight;
80 return targetPositionWeights_;
83 return targetRotationWeights_;
101 Eigen::VectorX<T> targetPositionWeights_;
102 Eigen::VectorX<T> targetRotationWeights_;
SequenceErrorFunctionT(const Skeleton &skel, const ParameterTransform &pt)
void setWeights(const float posWeight, const float rotationWeight)
void setRotationTargetWeights(const Eigen::VectorX< float > &rotWeight)
static constexpr float kPositionWeight
double getError(std::span< const ModelParametersT< T > > modelParameters, std::span< const SkeletonStateT< T > > skelStates, std::span< const MeshStateT< T > >) const final
const Eigen::VectorX< T > & getRotationWeights() const
const Eigen::VectorX< T > & getPositionWeights() const
size_t numFrames() const final
double getGradient(std::span< const ModelParametersT< float > > modelParameters, std::span< const SkeletonStateT< float > > skelStates, std::span< const MeshStateT< float > >, Eigen::Ref< Eigen::VectorX< float > > gradient) const final
const T & getPositionWeight() const
void setTargetState(TransformListT< T > target)
Set the target state for the skeleton.
const T & getRotationWeight() const
double getJacobian(std::span< const ModelParametersT< float > > modelParameters, std::span< const SkeletonStateT< float > > skelStates, std::span< const MeshStateT< float > >, Eigen::Ref< Eigen::MatrixX< float > > jacobian, Eigen::Ref< Eigen::VectorX< float > > residual, int &usedRows) const final
size_t getJacobianSize() const final
void setTargetWeights(const Eigen::VectorX< float > &posWeight, const Eigen::VectorX< float > &rotWeight)
static constexpr float kOrientationWeight
StateSequenceErrorFunctionT(const Character &character, RotationErrorType rotationErrorType=RotationErrorType::RotationMatrixDifference)
StateSequenceErrorFunctionT(const Skeleton &skel, const ParameterTransform &pt, RotationErrorType rotationErrorType=RotationErrorType::RotationMatrixDifference)
void setPositionTargetWeights(const Eigen::VectorX< float > &posWeight)
RotationErrorType
Defines different methods for computing rotation error between two quaternions.
@ RotationMatrixDifference
Frobenius norm of rotation matrix difference: ||R1 - R2||_F^2.
SkeletonT< float > Skeleton
std::vector< TransformT< T > > TransformListT
Per-joint transform list describing the state of all joints in a skeleton (one entry per joint,...
ParameterTransformT< float > ParameterTransform
Eigen::Matrix< T, Dynamic, Dynamic > MatrixX
Dynamic-size, column-major dense matrix.
Vector< T, Dynamic > VectorX
Dynamic-size column vector. Common return type for solver residuals and parameter vectors.
gsl::span< T > span
Span type alias using gsl::span (C++17 fallback).
A character model with skeletal structure, mesh, and optional components.
Represents the complete state of a model's mesh.
A vector of size numModelParams holding the values of all model parameters for a character.
Represents the complete state of a skeleton.