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

Box collision geometry for character collision detection. More...

#include <collision_geometry.h>

Public Types

using Scalar = S

Public Member Functions

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

Public Attributes

TransformT< S > transformation
 Transformation defining the box center and orientation relative to the parent.
Vector3< S > halfExtents
 Half extents along the local x, y, and z axes.
size_t parent
 Parent joint to which the geometry is attached.

Detailed Description

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

Box collision geometry for character collision detection.

Defined by a transformation and three local-space half extents along the primitive's axes.

Definition at line 120 of file collision_geometry.h.

Member Typedef Documentation

◆ Scalar

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

Definition at line 121 of file collision_geometry.h.

Constructor & Destructor Documentation

◆ CollisionBoxT()

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

Definition at line 132 of file collision_geometry.h.

Member Function Documentation

◆ isApprox()

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

Checks if the current box is approximately equal to another.

Definition at line 138 of file collision_geometry.h.

Member Data Documentation

◆ halfExtents

◆ parent

template<typename S>
size_t momentum::CollisionBoxT< S >::parent

◆ transformation

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

Transformation defining the box center and orientation relative to the parent.

Definition at line 124 of file collision_geometry.h.

Referenced by momentum::createCollisionBox(), momentum::CollisionBoxT< float >::isApprox(), momentum::CollisionPrimitiveT< float >::operator=(), and momentum::CollisionPrimitiveT< float >::toBox().


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