20 Eigen::Vector2<T>
target = Eigen::Vector2<T>::Zero();
28 const Eigen::Vector2<T>& targetPos,
29 const Eigen::Matrix<T, 3, 4>& proj,
31 const std::string& nm =
"")
53 const T& lossC = T(1));
61 std::span<
const Eigen::Vector3<T>> worldVecs,
63 std::span<DfdvType> 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...
VertexErrorFunctionT(const Character &character, const ParameterTransform ¶meterTransform, const T &lossAlpha=GeneralizedLossT< T >::kL2, const T &lossC=T(1))
Eigen::Matrix< T, FuncDim, 1 > FuncType
Eigen::Matrix< T, FuncDim, 3 > DfdvType
void evalFunction(size_t constrIndex, const SkeletonStateT< T > &state, const MeshStateT< T > &meshState, std::span< const Eigen::Vector3< T > > worldVecs, FuncType &f, std::span< DfdvType > dfdv) const final
Computes the residual and derivatives.
VertexProjectionErrorFunctionT(const Character &character, const ParameterTransform ¶meterTransform, const T &lossAlpha=GeneralizedLossT< T >::kL2, const T &lossC=T(1))
~VertexProjectionErrorFunctionT() override=default
VertexErrorFunctionT< float, VertexProjectionDataT< float >, 2 > Base
ParameterTransformT< float > ParameterTransform
A character model with skeletal structure, mesh, and optional components.
Represents the complete state of a model's mesh.
Represents the complete state of a skeleton.
VertexConstraintData()=default
Eigen::Vector2< T > target
Target position in 2D screen space.
VertexProjectionDataT(size_t vIndex, const Eigen::Vector2< T > &targetPos, const Eigen::Matrix< T, 3, 4 > &proj, float w, const std::string &nm="")
VertexProjectionDataT()=default
Eigen::Matrix< T, 3, 4 > projectionMatrix
Camera projection matrix (3x4).