28 const Eigen::Quaternion<T>& inOffset,
29 const Eigen::Quaternion<T>& inTarget,
32 const std::string& n =
"")
34 offset(inOffset.normalized()),
35 target(inTarget.normalized()) {}
48 const T& lossC = T(1))
54 const T& lossC = T(1))
57 character.parameterTransform,
71 std::array<Eigen::Matrix<T, 9, 3>, 3>& dfdv)
const final;
88 const T& lossC = T(1))
94 const T& lossC = T(1))
97 character.parameterTransform,
107 std::array<Eigen::Matrix<T, 9, 3>, 3>& dfdv)
const final;
static constexpr T kL2
Special-case alpha values that are either at a singularity in the general formula or simplify to a cl...
JointErrorFunctionT(const Skeleton &skel, const ParameterTransform &pt, const T &lossAlpha=GeneralizedLossT< T >::kL2, const T &lossC=T(1))
OrientationErrorFunctionT(const Character &character, const T &lossAlpha=GeneralizedLossT< T >::kL2, const T &lossC=T(1))
OrientationErrorFunctionT(const Skeleton &skel, const ParameterTransform &pt, const T &lossAlpha=GeneralizedLossT< T >::kL2, const T &lossC=T(1))
static constexpr float kLegacyWeight
void evalFunction(size_t constrIndex, const JointStateT< T > &state, Vector< T, 9 > &f, std::array< Vector3< T >, 3 > &v, std::array< Eigen::Matrix< T, 9, 3 >, 3 > &dfdv) const final
OrientationRotDiffErrorFunctionT(const Skeleton &skel, const ParameterTransform &pt, const T &lossAlpha=GeneralizedLossT< T >::kL2, const T &lossC=T(1))
OrientationRotDiffErrorFunctionT(const Character &character, const T &lossAlpha=GeneralizedLossT< T >::kL2, const T &lossC=T(1))
void evalFunction(size_t constrIndex, const JointStateT< T > &state, Vector< T, 9 > &f, std::array< Vector3< T >, 3 > &v, std::array< Eigen::Matrix< T, 9, 3 >, 3 > &dfdv) const final
SkeletonT< float > Skeleton
ParameterTransformT< float > ParameterTransform
Eigen::Matrix< T, Dim, 1, Options > Vector
Column vector alias (an Nx1 Eigen matrix).
A character model with skeletal structure, mesh, and optional components.
ConstraintData(size_t pIndex, float w, const std::string &n="")
Represents the state of a joint with local and global transformations.
Constraint data on 3x3 rotation represented in quaternions.
Eigen::Quaternion< float > target
OrientationDataT(const Eigen::Quaternion< T > &inOffset, const Eigen::Quaternion< T > &inTarget, size_t pIndex, float w, const std::string &n="")
param[in] inOffset: input rotation offset in the parent space param[in] inTarget: input target rotati...
Eigen::Quaternion< float > offset