24 static constexpr const char*
kParents =
"parents";
25 static constexpr const char*
kOffsets =
"offsets";
26 static constexpr const char*
kWeights =
"weights";
27 static constexpr const char*
kTargets =
"targets";
35 [[nodiscard]] std::vector<std::string>
inputs()
const override;
37 void getInputImp(
const std::string&
name, Eigen::Ref<Eigen::VectorX<T>> result)
const override;
38 void setInputImp(
const std::string&
name, Eigen::Ref<
const Eigen::VectorX<T>> value)
override;
39 [[nodiscard]]
const char*
name()
const override {
40 return "ProjectionErrorFunction";
44 const std::string& inputName,
47 Eigen::Ref<
const Eigen::VectorX<T>> inputVec)
override;
50 template <
typename JetType>
54 int parentJointIndex_cons,
55 const Eigen::Vector3<JetType>& offset_cons,
56 const JetType& weight_cons,
57 const Eigen::Matrix<JetType, 3, 4>& projection_cons,
58 const Eigen::Vector2<JetType>& target_cons,
59 Eigen::Ref<
const Eigen::VectorX<T>> inputVec)
const;
FullyDifferentiableProjectionErrorFunctionT(const momentum::Skeleton &skel, const momentum::ParameterTransform &pt, T nearClip=T(1))
JetType constraintGradient_dot(const momentum::ModelParametersT< T > &modelParams, const momentum::SkeletonStateT< T > &skelState, int parentJointIndex_cons, const Eigen::Vector3< JetType > &offset_cons, const JetType &weight_cons, const Eigen::Matrix< JetType, 3, 4 > &projection_cons, const Eigen::Vector2< JetType > &target_cons, Eigen::Ref< const Eigen::VectorX< T > > inputVec) const
static constexpr const char * kWeights
void getInputImp(const std::string &name, Eigen::Ref< Eigen::VectorX< T > > result) const override
static constexpr const char * kProjections
Eigen::Index getInputSize(const std::string &name) const override
static constexpr const char * kOffsets
const char * name() const override
void setInputImp(const std::string &name, Eigen::Ref< const Eigen::VectorX< T > > value) override
static constexpr const char * kParents
static constexpr const char * kTargets
std::vector< std::string > inputs() const override
Eigen::VectorX< T > d_gradient_d_input_dot(const std::string &inputName, const momentum::ModelParametersT< T > &modelParams, const momentum::SkeletonStateT< T > &state, Eigen::Ref< const Eigen::VectorX< T > > inputVec) override
static constexpr float kProjectionWeight
#define MOMENTUM_FWD_DECLARE_TEMPLATE_CLASS(x)
Forward-declare a single-template-parameter class x#T and define float/double instantiation aliases p...
SkeletonT< float > Skeleton
ParameterTransformT< float > ParameterTransform
FullyDifferentiableProjectionErrorFunctionT< float > FullyDifferentiableProjectionErrorFunction
A vector of size numModelParams holding the values of all model parameters for a character.
Represents the complete state of a skeleton.