Momentum
A library for solving nonlinear optimization problems related to human body kinematics
Loading...
Searching...
No Matches
sdf_collision_utility.h File Reference

Go to the source code of this file.

Namespaces

namespace  momentum
namespace  momentum::detail_sdf_collision

Functions

size_t momentum::detail_sdf_collision::findCommonAncestorForVertex (const SkinWeights &skinWeights, const Skeleton &skeleton, size_t vertexIndex, size_t sdfParent)
 Shared, stateless helpers for SDF-collision error functions.
template<typename T, typename SdfColliderType>
TransformT< T > momentum::detail_sdf_collision::computeWorldToColliderTransform (const SdfColliderType &collider, const SkeletonStateT< T > &state)
 Returns the world-to-collider transform for a collider given a skeleton state.
template<typename T, typename SdfColliderType>
axel::BoundingBox< T > momentum::detail_sdf_collision::computeColliderWorldBoundingBox (const SdfColliderType &collider, const SkeletonStateT< T > &state)
 Returns the world-space axis-aligned bounding box of a collider given a skeleton state.
template<typename T>
axel::BoundingBox< T > momentum::detail_sdf_collision::computeBoneBoundingBox (std::span< const size_t > vertexIndices, const MeshT< T > &posedMesh)
 Returns the world-space axis-aligned bounding box enclosing the given posed-mesh vertices.
template<typename T>
void momentum::detail_sdf_collision::accumulateJointGradient (const JointStateT< T > &jointState, size_t paramIndex, const Eigen::Vector3< T > &posd, const Eigen::Vector3< T > &direction, const VectorX< bool > &activeJointParams, const ParameterTransform &parameterTransform, Eigen::Ref< Eigen::VectorX< T > > gradient)
 Accumulates the gradient contribution of a single joint onto the model-parameter gradient.
template<typename T>
void momentum::detail_sdf_collision::accumulateJointJacobian (const JointStateT< T > &jointState, size_t paramIndex, const Eigen::Vector3< T > &posd, const Eigen::Vector3< T > &direction, const VectorX< bool > &activeJointParams, const ParameterTransform &parameterTransform, Eigen::Ref< Eigen::MatrixX< T > > jacobianRow)
 Accumulates the Jacobian contribution of a single joint onto one residual row.
template<typename T>
void momentum::detail_sdf_collision::accumulateColliderHierarchyGradient (const SkeletonStateT< T > &state, size_t colliderParent, size_t commonAncestor, const Eigen::Vector3< T > &sdfSurfacePoint, const Eigen::Vector3< T > &direction, const Skeleton &skeleton, const VectorX< bool > &activeJointParams, const ParameterTransform &parameterTransform, Eigen::Ref< Eigen::VectorX< T > > gradient)
 Accumulates the gradient contribution of a collider's joint hierarchy onto the gradient.
template<typename T>
void momentum::detail_sdf_collision::accumulateColliderHierarchyJacobian (const SkeletonStateT< T > &state, size_t colliderParent, size_t commonAncestor, const Eigen::Vector3< T > &sdfSurfacePoint, const Eigen::Vector3< T > &direction, const Skeleton &skeleton, const VectorX< bool > &activeJointParams, const ParameterTransform &parameterTransform, Eigen::Ref< Eigen::MatrixX< T > > jacobianRow)
 Accumulates the Jacobian contribution of a collider's joint hierarchy onto one residual row.