#include <CGenericTool.h>
Public Member Functions | |
cGenericTool () | |
Constructor of cGenericTool. | |
virtual | ~cGenericTool () |
Destructor of cGenericTool. | |
void | setHapticDevice (cGenericHapticDevice *a_device) |
Connect this tool to a haptic device. | |
cGenericHapticDevice * | getHapticDevice () |
Get the handle of haptic device to wich this tool is connected to. | |
virtual void | render (const int a_renderMode=0) |
Render the object in OpenGL. | |
virtual void | updatePose () |
Update Position, orientation, velocity and other degree of freedoms of tool. | |
virtual void | computeInteractionForces () |
Compute interaction forces with environment. | |
virtual void | applyForces () |
Apply latest forces to device. | |
virtual int | start () |
Start communication with the device connected to the tool (0 indicates success). | |
virtual int | stop () |
Stop communication with the device connected to the tool (0 indicates success). | |
virtual int | initialize (const bool a_resetEncoders=false) |
Initialize encoders on device connected to the tool (0 indicates success). | |
virtual int | setForcesON () |
Toggle forces ON. | |
virtual int | setForcesOFF () |
Toggle forces OFF. | |
virtual bool | getUserSwitch (int a_switchIndex) |
Read the status of one of the switches on this device. | |
virtual bool | isInContact (cGenericObject *a_object) |
Check if the tool is touching a particular object. | |
Protected Attributes | |
cGenericHapticDevice * | m_device |
Handle to the haptic device driver. | |
int | m_userSwitches |
Status of the user switches of the device attached to this tool. |
bool cGenericTool::getUserSwitch | ( | int | a_switchIndex | ) | [virtual] |
Read the status of one of the switches on this device.
Read the status of the user switches from the haptic device controlled by this tool.
a_switchIndex | Index number of the switch. |