Momentum
A library for solving nonlinear optimization problems related to human body kinematics
Loading...
Searching...
No Matches
momentum::TaperedCapsuleT< S > Struct Template Reference

Tapered capsule collision geometry for character collision detection. More...

#include <collision_geometry.h>

Public Types

using Scalar = S

Public Member Functions

 TaperedCapsuleT ()
bool isApprox (const TaperedCapsuleT &other, const S &tol=Eps< S >(1e-4f, 1e-10)) const
 Checks if the current capsule is approximately equal to another.

Public Attributes

TransformT< S > transformation
 Transformation defining the orientation and starting point relative to the parent coordinate system.
Vector2< S > radius
 Radii at the two endpoints of the capsule.
size_t parent
 Parent joint to which the geometry is attached.
S length
 Length of the collision geometry along the x-axis.

Detailed Description

template<typename S>
struct momentum::TaperedCapsuleT< S >

Tapered capsule collision geometry for character collision detection.

Defined by a transformation, length, and two radii at the endpoints, creating a capsule with potentially different radii at each end.

Definition at line 33 of file collision_geometry.h.

Member Typedef Documentation

◆ Scalar

template<typename S>
using momentum::TaperedCapsuleT< S >::Scalar = S

Definition at line 34 of file collision_geometry.h.

Constructor & Destructor Documentation

◆ TaperedCapsuleT()

template<typename S>
momentum::TaperedCapsuleT< S >::TaperedCapsuleT ( )
inline

Definition at line 49 of file collision_geometry.h.

Member Function Documentation

◆ isApprox()

template<typename S>
bool momentum::TaperedCapsuleT< S >::isApprox ( const TaperedCapsuleT< S > & other,
const S & tol = Eps<S>(1e-4f, 1e-10) ) const
inlinenodiscard

Checks if the current capsule is approximately equal to another.

Definition at line 58 of file collision_geometry.h.

Member Data Documentation

◆ length

◆ parent

◆ radius

◆ transformation

template<typename S>
TransformT<S> momentum::TaperedCapsuleT< S >::transformation

Transformation defining the orientation and starting point relative to the parent coordinate system.

Definition at line 38 of file collision_geometry.h.

Referenced by momentum::createCollisionCapsule(), momentum::TaperedCapsuleT< float >::isApprox(), momentum::CollisionPrimitiveT< float >::operator=(), and momentum::CollisionPrimitiveT< float >::toTaperedCapsule().


The documentation for this struct was generated from the following file: