29 const std::string& n =
"")
36 const std::string& prefix,
60 const bool above =
false,
62 const T& lossC = T(1))
74 const bool above =
false,
76 const T& lossC = T(1))
79 character.parameterTransform,
94 std::array<Eigen::Matrix<T, 1, 3>, 1>& dfdv)
const final;
98 bool halfPlane_ =
false;
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))
PlaneErrorFunctionT(const Character &character, const bool above=false, const T &lossAlpha=GeneralizedLossT< T >::kL2, const T &lossC=T(1))
A convenience api where character contains info of the skeleton and parameter transform.
void evalFunction(size_t constrIndex, const JointStateT< T > &state, Vector< T, 1 > &f, std::array< Vector3< T >, 1 > &v, std::array< Eigen::Matrix< T, 1, 3 >, 1 > &dfdv) const final
static constexpr float kLegacyWeight
PlaneErrorFunctionT(const Skeleton &skel, const ParameterTransform &pt, const bool above=false, const T &lossAlpha=GeneralizedLossT< T >::kL2, const T &lossC=T(1))
Constructor.
SkeletonT< float > Skeleton
ParameterTransformT< float > ParameterTransform
Eigen::Matrix< T, Dim, 1, Options > Vector
Column vector alias (an Nx1 Eigen matrix).
std::vector< PlaneDataT< T > > createFloorConstraints(const std::string &prefix, const LocatorList &locators, const Vector3< T > &floorNormal, const T &floorOffset, const float weight)
Create non-penetration half-plane constraints from locators with the input prefix.
std::vector< Locator > LocatorList
A collection of locators attached to a skeleton.
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.
Point-on-plane or Point-in-half-plane constraint data.
PlaneDataT(const Vector3< T > &inOffset, const Vector3< T > &inNormal, const T inD, size_t pIndex, float w, const std::string &n="")