49 Eigen::Vector3<T>
offset = Eigen::Vector3<T>::Zero();
52 Eigen::Vector2<T>
target = Eigen::Vector2<T>::Zero();
73 Eigen::Ref<Eigen::VectorX<T>> gradient)
final;
78 Eigen::Ref<Eigen::MatrixX<T>> jacobian,
79 Eigen::Ref<Eigen::VectorX<T>> residual,
88 [[nodiscard]]
bool empty()
const {
98 [[nodiscard]]
const std::vector<ProjectionConstraintDataT<T>>&
getConstraints()
const {
void setConstraints(std::vector< ProjectionConstraintDataT< T > > constraints)
size_t getNumConstraints() const
size_t getJacobianSize() const final
ProjectionErrorFunctionT(const momentum::Skeleton &skel, const momentum::ParameterTransform &pt, T nearClip=T(1))
std::vector< ProjectionConstraintDataT< float > > constraints_
double getError(const momentum::ModelParametersT< T > ¶ms, const momentum::SkeletonStateT< T > &state, const momentum::MeshStateT< T > &meshState) final
ProjectionConstraintDataT< T > & getConstraint(size_t index)
Returns a mutable reference to the constraint at the given index, for in-place target/weight updates.
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
static constexpr float kLegacyWeight
static constexpr float kProjectionWeight
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 ProjectionConstraintDataT< float > &data)
const std::vector< ProjectionConstraintDataT< T > > & getConstraints() const
SkeletonT< float > Skeleton
ParameterTransformT< float > ParameterTransform
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.
Eigen::Vector3< T > offset
static ProjectionConstraintDataT< T > createFromLocator(const momentum::Locator &locator)
Eigen::Matrix< T, 3, 4 > projection
Eigen::Vector2< T > target
Represents the complete state of a skeleton.