20 Eigen::Vector3<T>
normal = Eigen::Vector3<T>::UnitY();
23 Eigen::Vector3<T>
point = Eigen::Vector3<T>::Zero();
31 const Eigen::Vector3<T>& n,
32 const Eigen::Vector3<T>& p,
35 const std::string& nm =
"")
59 const T& lossC = T(1));
67 std::span<
const Eigen::Vector3<T>> worldVecs,
69 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
VertexErrorFunctionT< float, VertexPlaneDataT< float >, 1 > Base
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.
~VertexPlaneErrorFunctionT() override=default
VertexPlaneErrorFunctionT(const Character &character, const ParameterTransform ¶meterTransform, const T &lossAlpha=GeneralizedLossT< T >::kL2, const T &lossC=T(1))
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::Vector3< T > point
A point on the plane.
VertexPlaneDataT(size_t vIndex, const Eigen::Vector3< T > &n, const Eigen::Vector3< T > &p, bool abv, float w, const std::string &nm="")
Eigen::Vector3< T > normal
Plane normal (must be normalized).
bool above
If true, constrain vertex to be above the plane (half-space).
VertexPlaneDataT()=default