SOFA plugin: Sensable  master
Open source framework for multi-physics simuation
sofa::component::controller::EnslavementForceFeedback Class Reference

#include <EnslavementForceFeedback.h>

Inheritance diagram for sofa::component::controller::EnslavementForceFeedback:

Public Attributes

Data< double > d_relativeStiffness
 Relative Stiffness. More...
 
Data< double > d_attractionDistance
 Distance at which the Omni is attracted to the contact point. More...
 
Data< bool > d_normalsPointOut
 True if the normals of objects point outwards, false if they point inwards. More...
 
Data< double > d_contactScale
 Scales the maximum penetration depth. More...
 
Data< double > d_penOffset
 Distance at which there is no reaction force. More...
 

Protected Attributes

sofa::type::Vec3d m_contactForce
 

Public Member Functions

 SOFA_CLASS2 (EnslavementForceFeedback, core::collision::ContactListener, sofa::component::controller::ForceFeedback)
 
void init () override
 
void beginContact (const type::vector< const type::vector< core::collision::DetectionOutput > * > &) override
 
void endContact (void *) override
 
virtual void computeForce (SReal, SReal, SReal, SReal, SReal, SReal, SReal, SReal &fx, SReal &fy, SReal &fz) override
 
virtual void computeWrench (const sofa::defaulttype::SolidTypes< SReal >::Transform &world_H_tool, const sofa::defaulttype::SolidTypes< SReal >::SpatialVector &V_tool_world, sofa::defaulttype::SolidTypes< SReal >::SpatialVector &W_tool_world) override
 

Protected Member Functions

 EnslavementForceFeedback (core::CollisionModel *collModel1=nullptr, core::CollisionModel *collModel2=nullptr)
 
 ~EnslavementForceFeedback ()
 

Attribute details

◆ d_attractionDistance

Data<double> sofa::component::controller::EnslavementForceFeedback::d_attractionDistance

Distance at which the Omni is attracted to the contact point.

◆ d_contactScale

Data<double> sofa::component::controller::EnslavementForceFeedback::d_contactScale

Scales the maximum penetration depth.

◆ d_normalsPointOut

Data<bool> sofa::component::controller::EnslavementForceFeedback::d_normalsPointOut

True if the normals of objects point outwards, false if they point inwards.

◆ d_penOffset

Data<double> sofa::component::controller::EnslavementForceFeedback::d_penOffset

Distance at which there is no reaction force.

◆ d_relativeStiffness

Data<double> sofa::component::controller::EnslavementForceFeedback::d_relativeStiffness

Relative Stiffness.

◆ m_contactForce

sofa::type::Vec3d sofa::component::controller::EnslavementForceFeedback::m_contactForce
protected

Constructor details

◆ EnslavementForceFeedback()

sofa::component::controller::EnslavementForceFeedback::EnslavementForceFeedback ( core::CollisionModel collModel1 = nullptr,
core::CollisionModel collModel2 = nullptr 
)
protected

◆ ~EnslavementForceFeedback()

sofa::component::controller::EnslavementForceFeedback::~EnslavementForceFeedback ( )
inlineprotected

Function details

◆ beginContact()

void sofa::component::controller::EnslavementForceFeedback::beginContact ( const type::vector< const type::vector< core::collision::DetectionOutput > * > &  contacts)
override

◆ computeForce()

void sofa::component::controller::EnslavementForceFeedback::computeForce ( SReal  x,
SReal  y,
SReal  z,
SReal  u,
SReal  v,
SReal  w,
SReal  q,
SReal &  fx,
SReal &  fy,
SReal &  fz 
)
overridevirtual

◆ computeWrench()

void sofa::component::controller::EnslavementForceFeedback::computeWrench ( const sofa::defaulttype::SolidTypes< SReal >::Transform &  world_H_tool,
const sofa::defaulttype::SolidTypes< SReal >::SpatialVector &  V_tool_world,
sofa::defaulttype::SolidTypes< SReal >::SpatialVector &  W_tool_world 
)
overridevirtual

◆ endContact()

void sofa::component::controller::EnslavementForceFeedback::endContact ( void *  )
override

◆ init()

void sofa::component::controller::EnslavementForceFeedback::init ( )
override

◆ SOFA_CLASS2()

sofa::component::controller::EnslavementForceFeedback::SOFA_CLASS2 ( EnslavementForceFeedback  ,
core::collision::ContactListener  ,
sofa::component::controller::ForceFeedback   
)