SOFA API  99934cbc
Open source framework for multi-physics simuation
sofa::component::collision::IntrConfigManager< Real > Struct Template Reference

#include <IntrUtility3.h>

Detailed Description

template<typename Real>
struct sofa::component::collision::IntrConfigManager< Real >

IntrConfigManager is used to project the primitives on an axis and to find the axis which maximizes the distance of the projected primitives. Each time you run IntrConfigManager<Real>::Find with a new axis, config_modified is true if the last passed axis maximizes the distance between the projection (described by IntrConfiguration) of the both primitives.

Static Public Member Functions

static void init (const defaulttype::Vec< 3, Real > &axis, const defaulttype::Vec< 3, Real > segment[2], Real radius, CapIntrConfiguration< Real > &cfg)
 
static void init (const defaulttype::Vec< 3, Real > &axis, const defaulttype::Vec< 3, Real > segment[2], IntrConfiguration< Real > &cfg)
 
template<class Config0 , class Config1 >
static bool Find (const Config0 &cfg0Start, const Config1 &cfg1Start, int &side, Config0 &cfg0Final, Config1 &cfg1Final, Real dmax, Real &dfirst, bool &config_modified)
 

Function details

template<typename Real >
template<class Config0 , class Config1 >
bool sofa::component::collision::IntrConfigManager< Real >::Find ( const Config0 &  cfg0Start,
const Config1 &  cfg1Start,
int side,
Config0 &  cfg0Final,
Config1 &  cfg1Final,
Real  dmax,
Real dfirst,
bool config_modified 
)
static
template<typename Real >
void sofa::component::collision::IntrConfigManager< Real >::init ( const defaulttype::Vec< 3, Real > &  axis,
const defaulttype::Vec< 3, Real segment[2],
Real  radius,
CapIntrConfiguration< Real > &  cfg 
)
static

The axis must be normalized when testing a capsule !.

template<typename Real >
void sofa::component::collision::IntrConfigManager< Real >::init ( const defaulttype::Vec< 3, Real > &  axis,
const defaulttype::Vec< 3, Real segment[2],
IntrConfiguration< Real > &  cfg 
)
static