SOFA API  014b24ea
Open source framework for multi-physics simuation
sofa::component::collision::TIntrSphereOBB< TDataTypes, TDataTypes2 > Class Template Reference

#include <IntrSphereOBB.h>

Inheritance diagram for sofa::component::collision::TIntrSphereOBB< TDataTypes, TDataTypes2 >:

Detailed Description

template<typename TDataTypes, typename TDataTypes2>
class sofa::component::collision::TIntrSphereOBB< TDataTypes, TDataTypes2 >

TDataTypes is the sphere type and TDataTypes2 the OBB type.

Public Member Functions

 TIntrSphereOBB (const IntrSph &sphere, const Box &box)
 
bool Find ()
 
Real distance () const
 
- Public Member Functions inherited from sofa::component::collision::Intersector< TDataTypes::Real >
const Vec3separatingAxis () const
 
const Vec3pointOnFirst () const
 
const Vec3pointOnSecond () const
 
bool colliding () const
 

Additional Inherited Members

- Protected Attributes inherited from sofa::component::collision::Intersector< TDataTypes::Real >
Vec3 _sep_axis
 
Vec3 _pt_on_first
 
Vec3 _pt_on_second
 
TDataTypes::Real mContactTime
 
bool _is_colliding
 

Constructor details

template<class TDataTypes , class TDataTypes2 >
sofa::component::collision::TIntrSphereOBB< TDataTypes, TDataTypes2 >::TIntrSphereOBB ( const IntrSph sphere,
const Box box 
)

Function details

template<typename TDataTypes , typename TDataTypes2 >
TIntrSphereOBB< TDataTypes, TDataTypes2 >::Real sofa::component::collision::TIntrSphereOBB< TDataTypes, TDataTypes2 >::distance ( ) const
template<class TDataTypes , class TDataTypes2 >
bool sofa::component::collision::TIntrSphereOBB< TDataTypes, TDataTypes2 >::Find ( )

The idea of finding contact points is simple : project the sphere center on the OBB and find the intersection point on the OBB. Once we have this point we project it on the sphere.