54 Eigen::Ref<Eigen::VectorX<T>> gradient)
final;
60 Eigen::Ref<Eigen::MatrixX<T>> jacobian,
61 Eigen::Ref<Eigen::VectorX<T>> residual,
81 void setWeights(const
float posWeight, const
float rotationWeight) {
83 rotWgt_ = rotationWeight;
87 return this->targetState_;
91 return targetPositionWeights_;
94 return targetRotationWeights_;
105 Eigen::VectorX<T> targetPositionWeights_;
106 Eigen::VectorX<T> targetRotationWeights_;
SkeletonErrorFunctionT(const Skeleton &skel, const ParameterTransform &pt)
void setTargetWeights(const Eigen::VectorX< float > &posWeight, const Eigen::VectorX< float > &rotWeight)
static constexpr float kPositionWeight
double getJacobian(const ModelParametersT< T > ¶ms, const SkeletonStateT< T > &state, const MeshStateT< T > &meshState, Eigen::Ref< Eigen::MatrixX< T > > jacobian, Eigen::Ref< Eigen::VectorX< T > > residual, int &usedRows) final
const T & getPositionWeight() const
const TransformListT< T > & getTargetState() const
void setTargetState(const SkeletonStateT< float > *target)
const T & getRotationWeight() const
void setWeights(const float posWeight, const float rotationWeight)
StateErrorFunctionT(const Skeleton &skel, const ParameterTransform &pt, RotationErrorType rotationErrorType=RotationErrorType::RotationMatrixDifference)
static constexpr float kOrientationWeight
size_t getJacobianSize() const final
const Eigen::VectorX< T > & getRotationWeights() const
void setTargetWeight(const Eigen::VectorX< float > &weights)
double getError(const ModelParametersT< T > ¶ms, const SkeletonStateT< T > &state, const MeshStateT< T > &meshState) final
double getGradient(const ModelParametersT< T > ¶ms, const SkeletonStateT< T > &state, const MeshStateT< T > &meshState, Eigen::Ref< Eigen::VectorX< T > > gradient) final
void setRotationTargetWeights(const Eigen::VectorX< float > &rotWeight)
StateErrorFunctionT(const Character &character, RotationErrorType rotationErrorType=RotationErrorType::RotationMatrixDifference)
const Eigen::VectorX< T > & getPositionWeights() const
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.
@ QuaternionLogMap
Logarithmic map of relative rotation: ||log(R1^{-1} * R2)||^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
Vector< T, Dynamic > VectorX
Dynamic-size column vector. Common return type for solver residuals and parameter vectors.
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.