|
Momentum
A library for solving nonlinear optimization problems related to human body kinematics
|
SDF collision geometry for character collision detection. More...
#include <sdf_collision_geometry.h>
Public Types | |
| using | Scalar = S |
| using | SDFType = axel::SignedDistanceField<S> |
Public Member Functions | |
| SDFColliderT () | |
| SDFColliderT (const TransformT< S > &transform, size_t parentJoint, std::shared_ptr< const SDFType > sdfPtr) | |
| bool | isApprox (const SDFColliderT &other, const S &tol=Eps< S >(1e-4f, 1e-10)) const |
| Checks if the current SDF collider is approximately equal to another. | |
| bool | isValid () const |
| Returns true when the collider holds a non-null SDF and is therefore usable for collision queries. | |
Duck-typed collider interface | |
These methods adapt SDFColliderT to the generic collider interface used by SDFCollisionErrorFunctionT, enabling it to be used interchangeably with other collider types (e.g., learned SDF runtimes). | |
| template<typename T> | |
| T | evaluate (const Eigen::Vector3< T > &localPos) const |
| Evaluate the SDF distance at a local-frame position. | |
| template<typename T> | |
| std::pair< T, Eigen::Vector3< T > > | evaluateWithGradient (const Eigen::Vector3< T > &localPos) const |
| Evaluate the SDF distance and gradient at a local-frame position. | |
| axel::BoundingBox< S > | bounds () const |
| Bounding box of the SDF in local frame. | |
| size_t | parentJoint () const |
| Parent joint index in the skeleton. | |
| TransformT< S > | localToParentTransform () const |
| Transform from SDF local frame to parent joint frame. | |
| template<typename T> | |
| void | update (const Eigen::VectorX< T > &) |
| Per-iteration update (no-op for voxel SDFs). | |
Public Attributes | |
| TransformT< S > | transformation |
| Transformation defining the orientation and position relative to the parent coordinate system. | |
| size_t | parent = kInvalidIndex |
| Parent joint to which the geometry is attached. | |
| std::shared_ptr< const SDFType > | sdf |
| Shared pointer to the SignedDistanceField data. | |
SDF collision geometry for character collision detection.
Defined by a transformation, parent joint, and a shared pointer to a SignedDistanceField.
Definition at line 28 of file sdf_collision_geometry.h.
| using momentum::SDFColliderT< S >::Scalar = S |
Definition at line 29 of file sdf_collision_geometry.h.
| using momentum::SDFColliderT< S >::SDFType = axel::SignedDistanceField<S> |
Definition at line 30 of file sdf_collision_geometry.h.
|
inline |
Definition at line 44 of file sdf_collision_geometry.h.
|
inline |
Definition at line 46 of file sdf_collision_geometry.h.
|
inlinenodiscard |
Bounding box of the SDF in local frame.
Definition at line 102 of file sdf_collision_geometry.h.
|
inlinenodiscard |
Evaluate the SDF distance at a local-frame position.
Definition at line 89 of file sdf_collision_geometry.h.
|
inlinenodiscard |
Evaluate the SDF distance and gradient at a local-frame position.
Definition at line 95 of file sdf_collision_geometry.h.
|
inlinenodiscard |
Checks if the current SDF collider is approximately equal to another.
SDF data is compared by pointer identity, not by value: two colliders sharing the same SignedDistanceField instance are considered equal, but two colliders pointing to distinct instances with identical contents are not.
Definition at line 57 of file sdf_collision_geometry.h.
|
inlinenodiscard |
Returns true when the collider holds a non-null SDF and is therefore usable for collision queries.
Definition at line 76 of file sdf_collision_geometry.h.
|
inlinenodiscard |
Transform from SDF local frame to parent joint frame.
Definition at line 112 of file sdf_collision_geometry.h.
|
inlinenodiscard |
Parent joint index in the skeleton.
Definition at line 107 of file sdf_collision_geometry.h.
|
inline |
Per-iteration update (no-op for voxel SDFs).
Definition at line 118 of file sdf_collision_geometry.h.
| size_t momentum::SDFColliderT< S >::parent = kInvalidIndex |
Parent joint to which the geometry is attached.
Use kInvalidIndex to indicate it is fixed in world space.
Definition at line 38 of file sdf_collision_geometry.h.
Referenced by momentum::SDFColliderT< float >::isApprox().
| std::shared_ptr<const SDFType> momentum::SDFColliderT< S >::sdf |
Shared pointer to the SignedDistanceField data.
Uses shared_ptr to avoid expensive copies of potentially large SDF volumes.
Definition at line 42 of file sdf_collision_geometry.h.
Referenced by momentum::SDFColliderT< float >::isApprox().
| TransformT<S> momentum::SDFColliderT< S >::transformation |
Transformation defining the orientation and position relative to the parent coordinate system.
Definition at line 34 of file sdf_collision_geometry.h.
Referenced by momentum::SDFColliderT< float >::isApprox().