15#include <axel/BoundingBox.h>
56 int& usedRows)
override;
86 T scaleCorrection = T(0)) const;
99 T scaleCorrection = T(0)) const;
114 std::vector<axel::BoundingBox<T>>
aabbs_;
void updateCollisionPairs()
void computeBroadPhase(const SkeletonStateT< float > &state)
std::vector< CollisionPairInfo > validPairs_
std::vector< axel::BoundingBox< float > > aabbs_
CollisionErrorFunctionStatelessT(const Character &character)
std::vector< Vector2i > getCollisionPairs() const
size_t getJacobianSize() const final
double getGradient(const ModelParametersT< T > ¶ms, const SkeletonStateT< T > &state, const MeshStateT< T > &meshState, Ref< VectorX< T > > gradient) override
void accumulateGradientAlongChain(const SkeletonStateT< float > &state, const Vector3< float > &position, const Vector3< float > &direction, float weight, size_t startJoint, size_t stopJoint, Ref< VectorX< float > > gradient, float scaleCorrection=float(0)) const
double getError(const ModelParametersT< T > ¶ms, const SkeletonStateT< T > &state, const MeshStateT< T > &meshState) final
CollisionGeometryStateT< float > collisionState
static constexpr float kCollisionWeight
double getJacobian(const ModelParametersT< T > &, const SkeletonStateT< T > &state, const MeshStateT< T > &meshState, Ref< MatrixX< T > > jacobian, Ref< VectorX< T > > residual, int &usedRows) override
void accumulateJacobianAlongChain(const SkeletonStateT< float > &state, const Vector3< float > &position, const Vector3< float > &direction, float factor, size_t startJoint, size_t stopJoint, Ref< MatrixX< float > > jacobian, int row, float scaleCorrection=float(0)) const
bool checkCollision(const CollisionGeometryStateT< float > &colState, size_t indexA, size_t indexB, CollisionOverlapResultT< float > &result) const
CollisionErrorFunctionStatelessT(const Skeleton &skel, const ParameterTransform &pt, const CollisionGeometry &cg)
const CollisionGeometry collisionGeometry
SkeletonErrorFunctionT(const Skeleton &skel, const ParameterTransform &pt)
CollisionGeometryT< float > CollisionGeometry
SkeletonT< float > Skeleton
Vector2< std::int32_t > Vector2i
ParameterTransformT< float > ParameterTransform
Eigen::Matrix< T, Dynamic, Dynamic > MatrixX
Dynamic-size, column-major dense matrix.
Vector< T, Dynamic > VectorX
Dynamic-size column vector. Common return type for solver residuals and parameter vectors.
A character model with skeletal structure, mesh, and optional components.
Pre-computed valid collision pair with common ancestor.
Represents collision geometry states using a Structure of Arrays (SoA) format.
Narrow-phase collision information for a pair of primitives.
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.