chai3d::cEffectMagnet Class Reference

This class implements a haptic magnetic effect. More...

#include <CEffectMagnet.h>

Inheritance diagram for chai3d::cEffectMagnet:

Public Member Functions

 cEffectMagnet (cGenericObject *a_parent)
 Constructor of cEffectMagnet. More...
 
virtual ~cEffectMagnet ()
 Destructor of cEffectMagnet. More...
 
bool computeForce (const cVector3d &a_toolPos, const cVector3d &a_toolVel, const unsigned int &a_toolID, cVector3d &a_reactionForce)
 This method computes the resulting force effect. More...
 
void setEnabledInside (const bool a_enabled)
 This method enables or disables the magnetic effect when the tool is located inside the object. More...
 
bool getEnabledInside ()
 This method returns true if the magnetic effect is active when inside the object, false otherwise. More...
 
- Public Member Functions inherited from chai3d::cGenericEffect
 cGenericEffect (cGenericObject *a_parent)
 Constructor of CGenericEffect. More...
 
virtual ~cGenericEffect ()
 Destructor of CGenericEffect. More...
 
void setEnabled (bool a_enabled)
 This method enables or disables this effect. More...
 
bool getEnabled () const
 This method returns true if this effect is enables, false otherwise. More...
 

Protected Attributes

bool m_enabledInside
 If true then the magnet effect is active when the tool is located inside the object. More...
 
- Protected Attributes inherited from chai3d::cGenericEffect
bool m_enabled
 Is this effect currently enabled? More...
 

Additional Inherited Members

- Public Attributes inherited from chai3d::cGenericEffect
cGenericObjectm_parent
 Object to which the force effects applies. More...
 
- Protected Member Functions inherited from chai3d::cGenericEffect
virtual void initialize ()
 This method initializes the haptic effect model. More...
 

Detailed Description

This class implements a haptic magnetic effect when the tool approaches the object.

Constructor & Destructor Documentation

chai3d::cEffectMagnet::cEffectMagnet ( cGenericObject a_parent)

Constructor of cEffectMagnet.

Parameters
a_parentParent object.
virtual chai3d::cEffectMagnet::~cEffectMagnet ( )
inlinevirtual

Member Function Documentation

bool chai3d::cEffectMagnet::computeForce ( const cVector3d a_toolPos,
const cVector3d a_toolVel,
const unsigned int &  a_toolID,
cVector3d a_reactionForce 
)
virtual

This method computes the resulting force effect.

Parameters
a_toolPosPosition of tool.
a_toolVelVelocity of tool.
a_toolIDIdentification number of the force algorithm stored in the tool.
a_reactionForceReturn value for the computed force.
Returns
false if no interaction force occurs, true otherwise.

Reimplemented from chai3d::cGenericEffect.

void chai3d::cEffectMagnet::setEnabledInside ( const bool  a_enabled)
inline
bool chai3d::cEffectMagnet::getEnabledInside ( )
inline

Member Data Documentation

bool chai3d::cEffectMagnet::m_enabledInside
protected

The documentation for this class was generated from the following files: