18 Eigen::Vector3<T>
origin = Eigen::Vector3<T>::Zero();
40 Eigen::Ref<Eigen::VectorX<T>> gradient)
final;
45 Eigen::Ref<Eigen::MatrixX<T>> jacobian,
46 Eigen::Ref<Eigen::VectorX<T>> residual,
59 [[nodiscard]]
bool empty()
const {
66 [[nodiscard]]
const std::vector<DistanceConstraintDataT<T>>&
getConstraints()
const {
double getJacobian(const momentum::ModelParametersT< T > ¶ms, const momentum::SkeletonStateT< T > &state, const momentum::MeshStateT< T > &meshState, Eigen::Ref< Eigen::MatrixX< T > > jacobian, Eigen::Ref< Eigen::VectorX< T > > residual, int &usedRows) final
double getError(const momentum::ModelParametersT< T > ¶ms, const momentum::SkeletonStateT< T > &state, const momentum::MeshStateT< T > &meshState) final
std::vector< DistanceConstraintDataT< float > > constraints_
size_t getNumConstraints() const
const float kDistanceWeight
void setConstraints(std::vector< DistanceConstraintDataT< T > > constr)
size_t getJacobianSize() const final
const std::vector< DistanceConstraintDataT< T > > & getConstraints() const
DistanceErrorFunctionT(const momentum::Skeleton &skel, const momentum::ParameterTransform &pt)
double getGradient(const momentum::ModelParametersT< T > ¶ms, const momentum::SkeletonStateT< T > &state, const momentum::MeshStateT< T > &meshState, Eigen::Ref< Eigen::VectorX< T > > gradient) final
void addConstraint(const DistanceConstraintDataT< float > &constr)
SkeletonT< float > Skeleton
ParameterTransformT< float > ParameterTransform
Eigen::Vector3< T > origin
static DistanceConstraintDataT< T > createFromLocator(const momentum::Locator &locator)
Eigen::Vector3< T > offset
Represents a point attached to a joint in a skeleton.
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.