OgreHaptics::Device Class Reference

Device defines the interface all concrete haptic device subclasses must implement. More...

#include <OgreHapticsDevice.h>

List of all members.

Public Member Functions

virtual ~Device ()
 Virtual destructor.
virtual void _notifyCreator (RenderSystem *renderSystem)
 Notify the Device of it's creator (internal use only).
virtual RenderSystem_getCreator (void) const
 Get the creator of the Device (internal use only).
const String & getName (void) const
 Returns the name of the Device.
const String & _getInitName (void) const
 Returns the name of the Device used for initialisation.
int _getInitIndex (void) const
 Returns the index of the Device, as used by the rendering system which created the device.
const String & getModel (void) const
 Returns the name of the model of the Device.
int getSDKVersion (void) const
 Returns the version number of the SDK supporting the device.
int getDriverVersion (void) const
 Returns the version number of the driver supporting the device.
virtual void initialise (void)=0
 Initialises the device.
virtual void shutdown (void)=0
 Stops the rendering through the device and uninitialises it.
bool isInitialised (void) const
 Returns if the device is initialised.
DeviceCalibrationType getCalibrationType (void) const
 Returns the DeviceCalibrationType describing how the device can be calibrated.
bool needsCalibration (void) const
 Returns whether or not the device needs to be calibrated.
DeviceCalibrationState getCalibrationState (void) const
 Returns the current calibration state of the device.
virtual void calibrate (void)=0
 Calibrates a device which needs manual calibration.
virtual void enable (void)=0
 Enables the rendering of forces to the device.
void disable (void)
 Disables the rendering of forces to the device.
bool isEnabled (void) const
 Returns whether or not the device is enabled.
const RenderStatsgetStatistics (void)
 Retrieves details of the current rendering performance.
void resetStatistics (void)
 Resets saved render statistics.
const Real * getDeviceWorkspaceDimensions (void) const
 Returns the dimensions of the physical workspace of the device, measured in millimeters from the device origin, in which haptic rendering is optimal.
void setTouchspaceExtents (const Vector3 &leftLowerBack, const Vector3 &rightUpperFront)
 Defines the extents of the touch space in world coordinates, that will be used to map the workspace of the device.
void setTouchspaceExtents (Real left, Real bottom, Real back, Real right, Real top, Real front)
 Defines the extents of the touch space in world coordinates, that will be used to map the workspace of the device.
const Real * getTouchspaceExtents (void) const
 Returns the touch space extents as set.
void setWorldTouchMatrix (const Matrix4 &worldTouchMatrix)
 Sets the transformation that will be used to transform from world space coordinates to touch space coordinates.
const Matrix4 & getWorldTouchMatrix (void) const
 Returns the world space to touch space transformation matrix.
const Matrix4 & getTouchWorkspaceMatrix (void) const
 Returns the touch space to device workspace transformation matrix.
const Matrix4 & getWorldTouchWorkspaceMatrix (void) const
 Returns the world space to device workspace transformation matrix.
const Vector3 * getWorldWorkspaceCorners (void)
 Returns the corners of the device workspace in world coordinates.
void updateWorkspaceMapping (bool synchronise=true)
 Updates the matrices used in calculations to map the virtual workspace to the device workspace when needed.
void capture (void)
 Captures the current state of the haptic device.
void setDeviceListener (DeviceListener *listener)
 Sets the single DeviceListener as the listener for DeviceEvents.
bool isButtonDown (DeviceButton button)
 Returns whether or not a button on the device, including the stylus/grip buttons, is pressed.
const Vector3 & getPosition (void) const
 Returns the position of the device in device workspace coordinates.
const Quaternion & getOrientation (void) const
 Returns the orientation of the device in device workspace coordinates.
const Vector3 & getForce (void) const
 Returns the force applied to the device in device workspace coordinates.
const Vector3 & getTorque (void) const
 Returns the torque (eg.
const Vector3 & getLinearVelocity (void) const
 Returns the linear velocity of the device in device workspace coordinates.
const Vector3 & getAngularVelocity (void) const
 Returns the angular velocity of the device in device workspace coordinates.
const Vector3 & getWorldPosition (void) const
 Returns the position of the device in world space coordinates.
const Quaternion & getWorldOrientation (void) const
 Returns the orientation of the device in world space coordinates.
const Vector3 & getWorldForce (void) const
 Returns the force applied to the device in world space coordinates.
const Vector3 & getWorldTorque (void) const
 Returns the torque (eg.
const Vector3 & getWorldLinearVelocity (void) const
 Returns the linear velocity of the device in world space coordinates.
const Vector3 & getWorldAngularVelocity (void) const
 Returns the angular velocity of the device in world space coordinates.
void update (void)
 Updates the synchronisation of the matrices used for mapping between spaces (e.g.
const Vector3 & _getPosition (void) const
 Returns the position of the device in device workspace coordinates.
const Quaternion & _getOrientation (void) const
 Returns the orientation of the device in device workspace coordinates.
const Vector3 & _getForce (void) const
 Returns the force applied to the device in device workspace coordinates.
const Vector3 & _getTorque (void) const
 Returns the torque (eg.
const Vector3 & _getLinearVelocity (void) const
 Returns the linear velocity of the device in device workspace coordinates.
const Vector3 & _getAngularVelocity (void) const
 Returns the angular velocity of the device in device workspace coordinates.
const Vector3 & _getWorldPosition (void) const
 Returns the position of the device in world space coordinates.
const Quaternion & _getWorldOrientation (void) const
 Returns the orientation of the device in world space coordinates.
const Vector3 & _getWorldForce (void) const
 Returns the force applied to the device in world space coordinates.
const Vector3 & _getWorldTorque (void) const
 Returns the torque (eg.
const Vector3 & _getWorldLinearVelocity (void) const
 Returns the linear velocity of the device in world space coordinates.
const Vector3 & _getWorldAngularVelocity (void) const
 Returns the angular velocity of the device in world space coordinates.
const Vector3 & _getPreviousPosition (void) const
 Returns the previous position (in haptic frames) of the device in device workspace coordinates.
const Quaternion & _getPreviousOrientation (void) const
 Returns the previous orientation (in haptic frames) of the device in device workspace coordinates.
const Vector3 & _getPreviousForce (void) const
 Returns the previous force (in haptic frames) applied to the device in device workspace coordinates.
const Vector3 & _getPreviousTorque (void) const
 Returns the previous torque (eg.
const Vector3 & _getPreviousLinearVelocity (void) const
 Returns the previous linear velocity (in haptic frames) of the device in device workspace coordinates.
const Vector3 & _getPreviousAngularVelocity (void) const
 Returns the previous angular velocity (in haptic frames) of the device in device workspace coordinates.
const Vector3 & _getPreviousWorldPosition (void) const
 Returns the previous position (in haptic frames) of the device in world space coordinates.
const Quaternion & _getPreviousWorldOrientation (void) const
 Returns the previous orientation (in haptic frames) of the device in world space coordinates.
const Vector3 & _getPreviousWorldForce (void) const
 Returns the previous force (in haptic frames) applied to the device in world space coordinates.
const Vector3 & _getPreviousWorldTorque (void) const
 Returns the previous torque (eg.
const Vector3 & _getPreviousWorldLinearVelocity (void) const
 Returns the previous linear velocity (in haptic frames) of the device in world space coordinates.
const Vector3 & _getPreviousWorldAngularVelocity (void) const
 Returns the previous angular velocity (in haptic frames) of the device in world space coordinates.
bool _isButtonDown (DeviceButton button)
 Returns whether or not a button on the device, including the stylus/grip buttons, is pressed.
virtual bool _setOption (const String &key, const void *value)
 Sets a specific option of the device.
virtual bool _getOption (const String &key, void *value)
 Retrieves a the value of an option of the device.
void _setFrameListener (FrameListener *listener)
 Sets the single FrameListener as the listener for FrameEvents.
void _addEffect (ForceEffect *effect)
 Adds a ForceEffect to the list of force effects to be rendered through the device (internal use only).
void _removeEffect (ForceEffect *effect, bool immediate=false)
 Removes a ForceEffect from the list of force effects rendered throug the device (internal use only).
void _restartEffect (ForceEffect *effect)
 Restarts a ForceEffect which is already being rendered through the device (internal use only).
void _updateEffect (ForceEffect *effect)
 Marks the given ForceEffect to be updated in the haptic thread (internal use only).
virtual void _applyForces (const Vector3 &force, const Vector3 &torque)=0
 Sets the force and torque in device workspace coordinates to be applied to the device.
virtual void _makeCurrent (void)=0
 Sets the device as the current targer for haptic operations in a single RenderSystem.

Protected Types

enum  EventTypes { ET_BUTTON_DOWN, ET_BUTTON_UP, ET_CALIBRATION_STATE_CHANGED }
 Enumeration of types of events the Device will fire. More...
enum  FrameEventTimeType { FETT_ANY = 0, FETT_STARTED = 1, FETT_ENDED = 2, FETT_COUNT = 3 }
typedef std::set< ForceEffect * > ForceEffectList

Protected Member Functions

 Device (const String &name, const DeviceInitInfo &initInfo, int index=-1)
 Private constructor.
void _fireEvent (EventType type, const EventArgs &evt)
 Method for raising events.
void _fireFrameStarted (void)
void _fireFrameEnded (void)
virtual void clearEventTimes (void)
double calculateEventTime (double currentTime, FrameEventTimeType type)
void _fireFrameStarted (FrameEvent &evt)
void _fireFrameEnded (FrameEvent &evt)
void updateTouchWorkspaceMapping (void)
 Calculates the transformation from touch workspace to device workspace.
void updateWorldWorkspaceCorners (void)
 Calculates the transformed corners of the workspace.
virtual void disableImpl (void)=0
 Implements API specific operations to disable the device.
void renderCallbackImpl (void)
 Implements the actual rendering callback.
void updateStats (double currentTime)
 Updates render statistics used in haptic thread.
void updateStates (void)
 Updates the device state structs used in haptic thread.
virtual void obtainStateValues (double timeElapsed)=0
 Obtains the device state values.
void checkButtonState (int oldButtons, int newButtons, DeviceButton button)
void renderEffects (double currentTime)
 Updates the list of force effect to be rendered through the device.
void synchroniseMatricesCallbackImpl (void)
 Implements the actual synchronisation of workspace mapping matrices.
void synchroniseEffectsCallbackImpl (void)
 Implements the actual synchronisation of the force effect list.

Static Protected Member Functions

static SchedulerCallbackCode statisticsResetCallback (void *params)
 Resets the statistics in a thread safe manner.
static SchedulerCallbackCode synchroniseStatisticsCallback (void *params)
 Synchronises the statistics used in the client thread with those used in the haptic thread.
static SchedulerCallbackCode synchroniseStatesCallback (void *params)
 Synchronises the DeviceState properties used in the client thread with those used in the haptic thread.
static SchedulerCallbackCode synchroniseMatricesCallback (void *params)
 Synchronises the space transformation matrices used in the haptic thread with those used in the client thread.
static SchedulerCallbackCode updateCallback (void *params)
 Synchronises the transformation matrices and force effect lists used in the haptic thread with those used in the client thread.
static SchedulerCallbackCode removeEffectImmediateCallback (void *params)
 Removes a force effect from the appropiate list used in the haptic thread immediately.

Protected Attributes

String mName
 The name of the Device.
String mInitName
 The name used for initialisation of the Device.
String mModel
 The name of the model of the Device.
RenderSystemmCreator
 The RenderSystem that created the Device.
TimermTimer
 The Timer used for timings.
int mIndex
 The index of the Device, used for unnamed initialisation.
int mSDKVersion
 The version of SDK supporting the Device.
int mDriverVersion
 The version of the driver supporting the Device.
bool mIsInitialised
 Are we initialised yet?
bool mIsEnabled
 Are we enabled yet?
bool mDeviceWorkspaceDimensionsDirty
 Are the workspace dimensions updated?
bool mRecalcWorkspaceMapping
 Do we need to update the workspace mapping?
bool mSynchroniseWorkspaceMatrices
 Do we need to synchronise workspace matrices?
bool mRecalcWorldWorkspaceCorners
 Do we need to update the workspace corners?
DeviceCalibrationType mCalibrationType
 The type by which the device must be calibrated.
Real mDeviceWorkspaceDimensions [6]
 Array holding the device workspace, measured in millimeters from the device origin.
Real mTouchspaceExtents [6]
 Array holding the workspace, measured in world units from the origin.
Matrix4 mWorldTouchMatrix
 Matrix4 describing the transformation from the world to the touch space.
Matrix4 mhtWorldTouchMatrix
 Matrix4 describing the transformation from the world to the touch space used in haptic thread.
Matrix4 mTouchWorkspaceMatrix
 Matrix4 describing the transformation from touch space to device workspace.
Matrix4 mhtTouchWorkspaceMatrix
 Matrix4 describing the transformation from touch space to device workspace used in haptic thread.
Matrix4 mInverseTouchWorkspaceMatrix
 Inverse of the touch to device workspace transformation matrix.
Matrix4 mhtInverseTouchWorkspaceMatrix
 Inverse of the touch to device workspace transformation matrix used in haptic thread.
Matrix4 mWorldTouchWorkspaceMatrix
 Matrix4 describing the transformation from the world to the device workspace.
Matrix4 mhtWorldTouchWorkspaceMatrix
 Matrix4 describing the transformation from the world to the device workspace used in haptic thread.
Matrix4 mInverseWorldTouchWorkspaceMatrix
 Inverse of the world space to device workspace transformation matrix.
Matrix4 mhtInverseWorldTouchWorkspaceMatrix
 Inverse of the world space to device workspace transformation matrix used in haptic thread.
Vector3 mWorldWorkspaceCorners [8]
 Corners of the device workspace in world coordinates.
AtomicScalar
< DeviceCalibrationState
mCalibrationState
 The calibration state of the device.
RenderStats mStats
 RenderStats used in the client thread.
RenderStats mhtStats
 RenderStats used in haptic thread.
unsigned int mhtFrameCount
 Frame counter used for calculation of statistics in haptic thread.
double mhtFrameTime
 The duration of the last haptic frame.
double mhtLastTime
 The last time when a haptic frame occurred.
double mhtLastSecond
 We only update stats once per second.
DeviceState mDeviceState
 DeviceState of current haptic frame in device coordinates.
DeviceState mhtDeviceState
 DeviceState of current haptic frame in device coordinates used in haptic thread.
DeviceState mhtPreviousDeviceState
 DeviceState of previous haptic frame in device coordinates used in haptic thread.
DeviceState mWorldDeviceState
 DeviceState of current haptic frame in which coordinates are transformed by the workspace to touch and the given world to touch matrices.
DeviceState mhtWorldDeviceState
 DeviceState of current haptic frame in which coordinates are transformed by the workspace to touch and the given world to touch matrices used in haptic thread.
DeviceState mhtPreviousWorldDeviceState
 DeviceState of previous haptic frame in which coordinates are transformed by the workspace to touch and the given world to touch matrices used in haptic thread.
ConcurrentQueue< EventArgs * > mEventQueue
 Queue used to transfer events between haptic and client thread.
ConcurrentQueue< EventArgs * >
::HazardPtr * 
mEventQueueHazardPtr
 Hazard pointer of the event queue used by client thread.
ConcurrentQueue< EventArgs * >
::HazardPtr * 
mhtEventQueueHazardPtr
 Hazard pointer of the event queue used by haptic thread.
DeviceListenermListener
 Pointer to the listener of device events.
double mEventTimes [FETT_COUNT][2]
FrameListenermFrameListener
 Pointer to the listener of frame events.
AtomicScalar< int > mFrameListenerLock
 Used for locking list of frame listener.
ForceEffectList mEffectsToStart
 List of force effects which will be started at the next update.
ForceEffectList mEffectsToStop
 List of force effects which will be stopped at the next update.
ForceEffectList mEffectsToUpdate
 List of force effects of which parameters of the owned algorithms will be updated at the next update.
ForceEffectList mhtFadingInEffects
 List of force effects which are fading in. Used in haptic thread.
ForceEffectList mhtSustainingEffects
 List of force effects which are in sustaining state.
ForceEffectList mhtFadingOutEffects
 List of force effects which are fading out. Used in haptic thread.
ForceOutput mhtOutput
 Force output to be applied to device.

Friends

class RenderSystem

Classes

struct  RenderStats
 Structure holding data regarding rendering statistics. More...


Detailed Description

Device defines the interface all concrete haptic device subclasses must implement.

Through this class the application can control the input and output of a physical haptic device.

Remarks:
The Device class provides a base interface which abstracts the functionality of a haptics API, such as OpenHaptics or Falcon/HDAL (used for the Falcon). There is many to one relationship between a RenderSystem and instances of this class.
Multiple instances can be created, depending on the number of physical devices connected to the machine the application is running on. It is however possible that multiple devices might seem to be available on the system, though the same device is named differently in API specific configuration files.

Definition at line 280 of file OgreHapticsDevice.h.


Member Typedef Documentation

typedef std::set<ForceEffect*> OgreHaptics::Device::ForceEffectList [protected]

Definition at line 1240 of file OgreHapticsDevice.h.


Member Enumeration Documentation

Enumeration of types of events the Device will fire.

Enumerator:
ET_BUTTON_DOWN 
ET_BUTTON_UP 
ET_CALIBRATION_STATE_CHANGED 

Definition at line 1202 of file OgreHapticsDevice.h.

Enumerator:
FETT_ANY 
FETT_STARTED 
FETT_ENDED 
FETT_COUNT 

Definition at line 1223 of file OgreHapticsDevice.h.


Constructor & Destructor Documentation

virtual OgreHaptics::Device::~Device (  )  [virtual]

Virtual destructor.

OgreHaptics::Device::Device ( const String &  name,
const DeviceInitInfo initInfo,
int  index = -1 
) [protected]

Private constructor.


Member Function Documentation

virtual void OgreHaptics::Device::_notifyCreator ( RenderSystem renderSystem  )  [virtual]

Notify the Device of it's creator (internal use only).

virtual RenderSystem* OgreHaptics::Device::_getCreator ( void   )  const [virtual]

Get the creator of the Device (internal use only).

Definition at line 304 of file OgreHapticsDevice.h.

const String& OgreHaptics::Device::getName ( void   )  const

Returns the name of the Device.

Definition at line 307 of file OgreHapticsDevice.h.

const String& OgreHaptics::Device::_getInitName ( void   )  const

Returns the name of the Device used for initialisation.

Remarks:
This does not have to be unique amongst multiple rendering systems.

Definition at line 315 of file OgreHapticsDevice.h.

int OgreHaptics::Device::_getInitIndex ( void   )  const

Returns the index of the Device, as used by the rendering system which created the device.

Remarks:
This does not have to be unique amongst multiple rendering systems.

Definition at line 323 of file OgreHapticsDevice.h.

const String& OgreHaptics::Device::getModel ( void   )  const

Returns the name of the model of the Device.

Remarks:
If the Device has not yet been initialised, an empty String is returned.

Definition at line 331 of file OgreHapticsDevice.h.

int OgreHaptics::Device::getSDKVersion ( void   )  const

Returns the version number of the SDK supporting the device.

Remarks:
The version is defined as (major << 16) | (minor << 8) | build.
If the Device has not yet been initialised, 0 is returned.

Definition at line 339 of file OgreHapticsDevice.h.

int OgreHaptics::Device::getDriverVersion ( void   )  const

Returns the version number of the driver supporting the device.

Remarks:
The version is defined as (major << 16) | (minor << 8) | build.
If the Device has not yet been initialised, 0 is returned.

Definition at line 347 of file OgreHapticsDevice.h.

virtual void OgreHaptics::Device::initialise ( void   )  [pure virtual]

Initialises the device.

Remarks:
During the initialisation of a device the scheduler used by the specific underlying API is stopped. The scheduler is restarted automatically if initialisation is successful.
Exceptions:
An InvalidOperationException if the device has already been initialised.
An HapticsAPIException if initialisation fails.

virtual void OgreHaptics::Device::shutdown ( void   )  [pure virtual]

Stops the rendering through the device and uninitialises it.

Remarks:
During shutdown of a device the scheduler used by the specific underlying API is stopped. The scheduler is restarted automatically if shutdown succeeded.

bool OgreHaptics::Device::isInitialised ( void   )  const

Returns if the device is initialised.

Definition at line 374 of file OgreHapticsDevice.h.

DeviceCalibrationType OgreHaptics::Device::getCalibrationType ( void   )  const

Returns the DeviceCalibrationType describing how the device can be calibrated.

Definition at line 380 of file OgreHapticsDevice.h.

bool OgreHaptics::Device::needsCalibration ( void   )  const

Returns whether or not the device needs to be calibrated.

Remarks:
To operate correctly it might be needed a device needs to be calibrated after is has been initialised. The way of calibration depends on the hardware the device instance is interfacing.
Calibration of a device can and will only be done when valid calibration data is found. It may be required to place the stylus or grip into a certain position, such as the 'inkwell' on the PHANToM Omni or in the reset position for the PHANToM Desktop. Other devices, such as the Falcon, require the user to perform
A client application can be notified about the need to calibrate through subscribing a DeviceListener, which will receive events about the calibration status fo the device. Note subscription must be done before the device is initialised to catch all events.
Returns:
true if the device has been initialised and has not been calibrated, false otherwise.

DeviceCalibrationState OgreHaptics::Device::getCalibrationState ( void   )  const

Returns the current calibration state of the device.

See also:
Device::needsCalibration

virtual void OgreHaptics::Device::calibrate ( void   )  [pure virtual]

Calibrates a device which needs manual calibration.

Exceptions:
An InvalidOperationException if the device has already been initialised.

virtual void OgreHaptics::Device::enable ( void   )  [pure virtual]

Enables the rendering of forces to the device.

Remarks:
When the device is enabled, an asynchronous callback used for haptic rendering calculation is scheduled.
Exceptions:
InvalidOperationException if the device has not yet been initialised or if the RenderSystem which created the device has not been started or is stopped.

void OgreHaptics::Device::disable ( void   ) 

Disables the rendering of forces to the device.

Remarks:
The state of the device will not be updated if a device is disabled.

bool OgreHaptics::Device::isEnabled ( void   )  const

Returns whether or not the device is enabled.

See also:
Device::enable

Definition at line 434 of file OgreHapticsDevice.h.

const RenderStats& OgreHaptics::Device::getStatistics ( void   ) 

Retrieves details of the current rendering performance.

Remarks:
This operation synchronises the statistics used by the client thread with those used by the haptic thread. During the synchronisation the client thread must wait.

void OgreHaptics::Device::resetStatistics ( void   ) 

Resets saved render statistics.

Remarks:
This operation synchronises the statistics used by the client thread with those used by the haptic thread. During the synchronisation the client thread must wait.

const Real* OgreHaptics::Device::getDeviceWorkspaceDimensions ( void   )  const

Returns the dimensions of the physical workspace of the device, measured in millimeters from the device origin, in which haptic rendering is optimal.

These dimensions are used for mapping between the coordinate system used for visual rendering and the physical units of the device.

Remarks:
Not all devices have the same physical workspace in which the rendering of the forces is optimal. The application must take this into account when calculating transformations between the physical and virtual spaces.
The workspace dimensions are returned in the order, left, bottom, far, right, top, near.
Returns:
An array of Real with length 8
Exceptions:
An InvalidOperationException if the device has not been enabled yet.

void OgreHaptics::Device::setTouchspaceExtents ( const Vector3 &  leftLowerBack,
const Vector3 &  rightUpperFront 
)

Defines the extents of the touch space in world coordinates, that will be used to map the workspace of the device.

Remarks:
The touch space extents describe the space which will be used to transform the position of the proxy from device coordinates to the coordinate system used by the application. The actual box which is defined by these extents might be transformed, depending whether or not the world to touch workspace matrix has been set for mapping the spaces.
To retrieve the actual corners of the transformed bounding box to which the device workspace is mapped, use getWorldWorkspaceCorners.
Parameters:
leftLowerBack Ogre::Vector3 defining the coordinates of the point of the world workspace boundaries positioned at the bottom-left in the back.
rightUpperFront Ogre::Vector3 defining the coordinates of the point of the world workspace boundaries positioned at the top-right in the front.
Note:
The workspace coordinates are such that positive Z is towards the user (right-handed).
See also:
Device::setWorldTouchMatrix

void OgreHaptics::Device::setTouchspaceExtents ( Real  left,
Real  bottom,
Real  back,
Real  right,
Real  top,
Real  front 
)

Defines the extents of the touch space in world coordinates, that will be used to map the workspace of the device.

Parameters:
left The left of the touch space in world coordinates.
bottom The bottom of the touch space in world coordinates.
back The back of the touch space in world coordinates.
right The right of the touch space in world coordinates.
top The top of the touch space in world coordinates.
front The front of the touch space in world coordinates.
See also:
Device::setTouchspaceExtents(const Ogre::Vector3&, const Ogre::Vector3&)

const Real* OgreHaptics::Device::getTouchspaceExtents ( void   )  const

Returns the touch space extents as set.

Returns:
An array of Real with length 6.
See also:
Device::setTouchspaceExtents(const Ogre::Vector3&, const Ogre::Vector3&)

Definition at line 517 of file OgreHapticsDevice.h.

void OgreHaptics::Device::setWorldTouchMatrix ( const Matrix4 &  worldTouchMatrix  ) 

Sets the transformation that will be used to transform from world space coordinates to touch space coordinates.

Remarks:
A typical value would be the inverse unit scaled world transformation matrix of the main Camera.
Parameters:
worldTouchMatrix The new world space to touch space transformation matrix.

const Matrix4& OgreHaptics::Device::getWorldTouchMatrix ( void   )  const

Returns the world space to touch space transformation matrix.

Definition at line 530 of file OgreHapticsDevice.h.

const Matrix4& OgreHaptics::Device::getTouchWorkspaceMatrix ( void   )  const

Returns the touch space to device workspace transformation matrix.

Definition at line 532 of file OgreHapticsDevice.h.

const Matrix4& OgreHaptics::Device::getWorldTouchWorkspaceMatrix ( void   )  const

Returns the world space to device workspace transformation matrix.

Definition at line 534 of file OgreHapticsDevice.h.

const Vector3* OgreHaptics::Device::getWorldWorkspaceCorners ( void   ) 

Returns the corners of the device workspace in world coordinates.

Remarks:
The corners are ordered as follows: top-right near, top-left near, bottom-left near, bottom-right near, top-right far, top-left far, bottom-left far, bottom-right far.
				5----4
			   /|   /|
			  / |  / |
			 /  6-/--7
			1----0  /
			| /  | /
			|/   |/
			2----3
			
Returns:
An array of the corners of the device workspace transformed to world space coordinates using the world to touch to device workspace transformation matrix.

void OgreHaptics::Device::updateWorkspaceMapping ( bool  synchronise = true  ) 

Updates the matrices used in calculations to map the virtual workspace to the device workspace when needed.

Parameters:
synchronise If set to false, the workspace mapping matrices used in the haptic thread will not be synchronised with those used in the client thread.
Remarks:
Normally this is called via Device::update, but it might be possible a client application wants to update a the workspace mapping only. In these occasions this function provides the means.
This operation will synchronise the matrices used in the haptic thread with those used in the client thread if requested. During synchronisation the client thread must wait.
Note:
If the device has not been enabled no mapping will be performed.
Todo:
Is throwing an exception prefered in the case of disabled?

void OgreHaptics::Device::capture ( void   ) 

Captures the current state of the haptic device.

Remarks:
This operation is used to synchronise the state of the device used in the haptic thread with the state of the device as used in the client thread. Events collected from the haptic thread are fired when this is called.

void OgreHaptics::Device::setDeviceListener ( DeviceListener listener  ) 

Sets the single DeviceListener as the listener for DeviceEvents.

To remove the listener call this with NULL.

Remarks:
A single listener is implemented for simplicity. If event broadcasting is needed you need to do it from the listener callback handlers.
Parameters:
listener The single listener to listen to events from the device.

Definition at line 595 of file OgreHapticsDevice.h.

bool OgreHaptics::Device::isButtonDown ( DeviceButton  button  ) 

Returns whether or not a button on the device, including the stylus/grip buttons, is pressed.

Remarks:
Uses the last captured state of the device.
Note:
Tests showed that in all cases a query with DB_INKWELL, or DB_BUTTON3 for PHANToM Omni, returned false. At the moment of release of the library, it was still uncertain if this is a bug in OpenHaptics, or if it was a hardware issue. Till a solution is found this query will return false in most cases.
Parameters:
button The type of the DeviceButton to query.
Returns:
true if the button is pressed, false otherwise.

const Vector3& OgreHaptics::Device::getPosition ( void   )  const

Returns the position of the device in device workspace coordinates.

Remarks:
Uses the last captured state of the device to be used by the client thread. If you need to obtain the current position in the haptic thread, use Device::_getPosition instead.

const Quaternion& OgreHaptics::Device::getOrientation ( void   )  const

Returns the orientation of the device in device workspace coordinates.

Remarks:
Uses the last captured state of the device to be used by the client thread. If you need to obtain the current position in the haptic thread, use Device::_getOrientation instead.

const Vector3& OgreHaptics::Device::getForce ( void   )  const

Returns the force applied to the device in device workspace coordinates.

Remarks:
Uses the last captured state of the device to be used by the client thread. If you need to obtain the current position in the haptic thread, use Device::_getForce instead.

const Vector3& OgreHaptics::Device::getTorque ( void   )  const

Returns the torque (eg.

angular force) applied to the device in device workspace coordinates.

Remarks:
Uses the last captured state of the device to be used by the client thread. If you need to obtain the current position in the haptic thread, use Device::_getTorque instead.

const Vector3& OgreHaptics::Device::getLinearVelocity ( void   )  const

Returns the linear velocity of the device in device workspace coordinates.

Remarks:
Uses the last captured state of the device to be used by the client thread. If you need to obtain the current position in the haptic thread, use Device::_getLinearVelocity instead.

const Vector3& OgreHaptics::Device::getAngularVelocity ( void   )  const

Returns the angular velocity of the device in device workspace coordinates.

Remarks:
Uses the last captured state of the device to be used by the client thread. If you need to obtain the current position in the haptic thread, use Device::_getAngularVelocity instead.

const Vector3& OgreHaptics::Device::getWorldPosition ( void   )  const

Returns the position of the device in world space coordinates.

Remarks:
Uses the last captured state of the device to be used by the client thread. If you need to obtain the current position in the haptic thread, use Device::getWorldPosition instead.

const Quaternion& OgreHaptics::Device::getWorldOrientation ( void   )  const

Returns the orientation of the device in world space coordinates.

Remarks:
Uses the last captured state of the device to be used by the client thread. If you need to obtain the current position in the haptic thread, use Device::_getWorldOrientation instead.

const Vector3& OgreHaptics::Device::getWorldForce ( void   )  const

Returns the force applied to the device in world space coordinates.

Remarks:
Uses the last captured state of the device to be used by the client thread. If you need to obtain the current position in the haptic thread, use Device::_getWorldForce instead.

const Vector3& OgreHaptics::Device::getWorldTorque ( void   )  const

Returns the torque (eg.

angular force) applied to the device in world space coordinates.

Remarks:
Uses the last captured state of the device to be used by the client thread. If you need to obtain the current position in the haptic thread, use Device::_getWorldTorque instead.

const Vector3& OgreHaptics::Device::getWorldLinearVelocity ( void   )  const

Returns the linear velocity of the device in world space coordinates.

Remarks:
Uses the last captured state of the device to be used by the client thread. If you need to obtain the current position in the haptic thread, use Device::_getWorldLinearVelocity instead.

const Vector3& OgreHaptics::Device::getWorldAngularVelocity ( void   )  const

Returns the angular velocity of the device in world space coordinates.

Remarks:
Uses the last captured state of the device to be used by the client thread. If you need to obtain the current position in the haptic thread, use Device::_getWorldAngularVelocity instead.

void OgreHaptics::Device::update ( void   ) 

Updates the synchronisation of the matrices used for mapping between spaces (e.g.

world space, touch space and device workspace) as well as synchronises the lists of force effects to be rendered.

Remarks:
ForceEffects which need to be started, stopped or need to have parameters of algorithms used to be updated, are actually updated after this method has been called.
It is advised to call this every frame of the graphics rendering loop.

const Vector3& OgreHaptics::Device::_getPosition ( void   )  const

Returns the position of the device in device workspace coordinates.

Remarks:
To be used by haptic frame listeners.

const Quaternion& OgreHaptics::Device::_getOrientation ( void   )  const

Returns the orientation of the device in device workspace coordinates.

Remarks:
To be used by haptic frame listeners.

const Vector3& OgreHaptics::Device::_getForce ( void   )  const

Returns the force applied to the device in device workspace coordinates.

Remarks:
To be used by haptic frame listeners.

const Vector3& OgreHaptics::Device::_getTorque ( void   )  const

Returns the torque (eg.

angular force) applied to the device in device workspace coordinates.

Remarks:
To be used by haptic frame listeners.

const Vector3& OgreHaptics::Device::_getLinearVelocity ( void   )  const

Returns the linear velocity of the device in device workspace coordinates.

Remarks:
To be used by haptic frame listeners.

const Vector3& OgreHaptics::Device::_getAngularVelocity ( void   )  const

Returns the angular velocity of the device in device workspace coordinates.

Remarks:
To be used by haptic frame listeners.

const Vector3& OgreHaptics::Device::_getWorldPosition ( void   )  const

Returns the position of the device in world space coordinates.

Remarks:
To be used by haptic frame listeners.

const Quaternion& OgreHaptics::Device::_getWorldOrientation ( void   )  const

Returns the orientation of the device in world space coordinates.

Remarks:
To be used by haptic frame listeners.

const Vector3& OgreHaptics::Device::_getWorldForce ( void   )  const

Returns the force applied to the device in world space coordinates.

Remarks:
To be used by haptic frame listeners.

const Vector3& OgreHaptics::Device::_getWorldTorque ( void   )  const

Returns the torque (eg.

angular force) applied to the device in world space coordinates.

Remarks:
To be used by haptic frame listeners.

const Vector3& OgreHaptics::Device::_getWorldLinearVelocity ( void   )  const

Returns the linear velocity of the device in world space coordinates.

Remarks:
To be used by haptic frame listeners.

const Vector3& OgreHaptics::Device::_getWorldAngularVelocity ( void   )  const

Returns the angular velocity of the device in world space coordinates.

Remarks:
To be used by haptic frame listeners.

const Vector3& OgreHaptics::Device::_getPreviousPosition ( void   )  const

Returns the previous position (in haptic frames) of the device in device workspace coordinates.

Remarks:
To be used by haptic frame listeners.

const Quaternion& OgreHaptics::Device::_getPreviousOrientation ( void   )  const

Returns the previous orientation (in haptic frames) of the device in device workspace coordinates.

Remarks:
To be used by haptic frame listeners.

const Vector3& OgreHaptics::Device::_getPreviousForce ( void   )  const

Returns the previous force (in haptic frames) applied to the device in device workspace coordinates.

Remarks:
To be used by haptic frame listeners.

const Vector3& OgreHaptics::Device::_getPreviousTorque ( void   )  const

Returns the previous torque (eg.

angular force) (in haptic frames) applied to the device in device workspace coordinates.

Remarks:
To be used by haptic frame listeners.

const Vector3& OgreHaptics::Device::_getPreviousLinearVelocity ( void   )  const

Returns the previous linear velocity (in haptic frames) of the device in device workspace coordinates.

Remarks:
To be used by haptic frame listeners.

const Vector3& OgreHaptics::Device::_getPreviousAngularVelocity ( void   )  const

Returns the previous angular velocity (in haptic frames) of the device in device workspace coordinates.

Remarks:
To be used by haptic frame listeners.

const Vector3& OgreHaptics::Device::_getPreviousWorldPosition ( void   )  const

Returns the previous position (in haptic frames) of the device in world space coordinates.

Remarks:
To be used by haptic frame listeners.

const Quaternion& OgreHaptics::Device::_getPreviousWorldOrientation ( void   )  const

Returns the previous orientation (in haptic frames) of the device in world space coordinates.

Remarks:
To be used by haptic frame listeners.

const Vector3& OgreHaptics::Device::_getPreviousWorldForce ( void   )  const

Returns the previous force (in haptic frames) applied to the device in world space coordinates.

Remarks:
To be used by haptic frame listeners.

const Vector3& OgreHaptics::Device::_getPreviousWorldTorque ( void   )  const

Returns the previous torque (eg.

angular force) (in haptic frames) applied to the device in world space coordinates.

Remarks:
To be used by haptic frame listeners.

const Vector3& OgreHaptics::Device::_getPreviousWorldLinearVelocity ( void   )  const

Returns the previous linear velocity (in haptic frames) of the device in world space coordinates.

Remarks:
To be used by haptic frame listeners.

const Vector3& OgreHaptics::Device::_getPreviousWorldAngularVelocity ( void   )  const

Returns the previous angular velocity (in haptic frames) of the device in world space coordinates.

Remarks:
To be used by haptic frame listeners.

bool OgreHaptics::Device::_isButtonDown ( DeviceButton  button  ) 

Returns whether or not a button on the device, including the stylus/grip buttons, is pressed.

Remarks:
To be used by haptic frame listeners.
Parameters:
button The type of the DeviceButton to query.
Returns:
true if the button is pressed, false otherwise.
See also:
Device::isButtonDown

virtual bool OgreHaptics::Device::_setOption ( const String &  key,
const void *  value 
) [virtual]

Sets a specific option of the device.

These options are usually specific for certain implementations of the Device class, and may not exist across different implementations.

Remarks:
Some of these options should only be called from the haptic thread. Options can be set before the device is enabled through Device::setConfigOption.
Current options to be supported are:
  • "HDALVelocitySmoothingWindowSize" (int): [HDAL/Falcon specific]
  • "HDEnableSoftwareForceLimit" (bool): [OpenHaptics specific]
  • "HDEnableSoftwareForceImpulseLimit" (bool): [OpenHaptics specific]
  • "HDEnableSoftwareVelocityLimit" (bool): [OpenHaptics specific]
  • "HDEnableMaxForceClamping" (bool): [OpenHaptics specific]
  • "HDEnableForceRamping" (bool): [OpenHaptics specific]
  • "HDForceRampingRate" (double): [OpenHaptics specific](Should only be called from the haptic thread.)
  • "HDSoftwareForceImpulseLimit" (double): [OpenHaptics specific](Should only be called from the haptic thread.)
  • "HDSoftwareVelocityLimit" (double): [OpenHaptics specific](Should only be called from the haptic thread.)
Parameters:
key The name of the option to be set.
value Pointer to a variable of which the value is read.
Returns:
true if the option has been set successfully, false otherwise.
See also:
Device::setConfigOption

virtual bool OgreHaptics::Device::_getOption ( const String &  key,
void *  value 
) [virtual]

Retrieves a the value of an option of the device.

These options are usually specific for certain implementations of the Device class, and may not exist across different implementations.

Remarks:
This should only be called from the haptic thread.
Current options to be supported are:
  • "HDALVelocitySmoothingWindowSize" (int): [HDAL/Falcon specific]
  • "HDSoftwareForceLimitEnabled" (bool): [OpenHaptics specific]
  • "HDSoftwareForceImpulseLimitEnabled" (bool): [OpenHaptics specific]
  • "HDSoftwareVelocityLimitEnabled" (bool): [OpenHaptics specific]
  • "HDMaxForceClampingEnabled" (bool): [OpenHaptics specific]
  • "HDForceRampingEnabled" (bool): [OpenHaptics specific]
  • "HDForceRampingRate" (double): [OpenHaptics specific](Should only be called from the haptic thread.)
  • "HDSoftwareForceImpulseLimit" (double): [OpenHaptics specific](Should only be called from the haptic thread.)
  • "HDSoftwareVelocityLimit" (double): [OpenHaptics specific](Should only be called from the haptic thread.)
  • "HDNominalMaxDamping" (double): [OpenHaptics specific](Should only be called from the haptic thread.)
  • "HDNominalMaxStiffness" (double): [OpenHaptics specific](Should only be called from the haptic thread.)
  • "HDNominalMaxForce" (double): [OpenHaptics specific](Should only be called from the haptic thread.)
  • "HDTabletopOffset" (double): [OpenHaptics specific](Should only be called from the haptic thread.)
Parameters:
key The name of the option to retrieve.
value Pointer to a variable of which the value is set if the query is successful.
Returns:
true if the option has been retrieved successfully, false otherwise.
See also:
Device::_setOption

void OgreHaptics::Device::_setFrameListener ( FrameListener listener  ) 

Sets the single FrameListener as the listener for FrameEvents.

To remove the listener call this with NULL.

Remarks:
A single listener is implemented for simplicity. If event broadcasting is needed you need to do it from the listener callback handlers.
Parameters:
listener The single listener to listen to frame events from the device.

void OgreHaptics::Device::_addEffect ( ForceEffect effect  ) 

Adds a ForceEffect to the list of force effects to be rendered through the device (internal use only).

void OgreHaptics::Device::_removeEffect ( ForceEffect effect,
bool  immediate = false 
)

Removes a ForceEffect from the list of force effects rendered throug the device (internal use only).

void OgreHaptics::Device::_restartEffect ( ForceEffect effect  ) 

Restarts a ForceEffect which is already being rendered through the device (internal use only).

void OgreHaptics::Device::_updateEffect ( ForceEffect effect  ) 

Marks the given ForceEffect to be updated in the haptic thread (internal use only).

virtual void OgreHaptics::Device::_applyForces ( const Vector3 &  force,
const Vector3 &  torque 
) [pure virtual]

Sets the force and torque in device workspace coordinates to be applied to the device.

Remarks:
This operation must be called within the haptic thread. A typical application does not need to this itself, but it is made available to those who want to do the haptic rendering themselves.
Parameters:
force The force in N to be applied to the device.
torque The torque in Nm to be applied to the device (if supported).

virtual void OgreHaptics::Device::_makeCurrent ( void   )  [pure virtual]

Sets the device as the current targer for haptic operations in a single RenderSystem.

Remarks:
To render forces to a device, it must be set as the current rendering target for the rendering system that created the device. Usually this is already done for you for the device which calls FrameListener::frameStarted, but if you happen to need to change the current device, this is for you.

void OgreHaptics::Device::_fireEvent ( EventType  type,
const EventArgs evt 
) [protected]

Method for raising events.

Remarks:
This is called when the client calls Device::capture. It dispatches events pushed onto the event queue to the appropriate event handlers.

void OgreHaptics::Device::_fireFrameStarted ( void   )  [protected]

void OgreHaptics::Device::_fireFrameEnded ( void   )  [protected]

virtual void OgreHaptics::Device::clearEventTimes ( void   )  [protected, virtual]

Remarks:
Subclasses must call this from the Device::enable implementation.

double OgreHaptics::Device::calculateEventTime ( double  currentTime,
FrameEventTimeType  type 
) [protected]

void OgreHaptics::Device::_fireFrameStarted ( FrameEvent evt  )  [protected]

void OgreHaptics::Device::_fireFrameEnded ( FrameEvent evt  )  [protected]

void OgreHaptics::Device::updateTouchWorkspaceMapping ( void   )  [protected]

Calculates the transformation from touch workspace to device workspace.

This transformation only changes if the workspace extents, which represent the boundaries of touch workspace are changed.

void OgreHaptics::Device::updateWorldWorkspaceCorners ( void   )  [protected]

Calculates the transformed corners of the workspace.

virtual void OgreHaptics::Device::disableImpl ( void   )  [protected, pure virtual]

Implements API specific operations to disable the device.

void OgreHaptics::Device::renderCallbackImpl ( void   )  [protected]

Implements the actual rendering callback.

Remarks:
All concrete implementations of this class must call this from the scheduled asynchronous rendering callback. From this operation force effects are updated and forces are applied.

void OgreHaptics::Device::updateStats ( double  currentTime  )  [protected]

Updates render statistics used in haptic thread.

void OgreHaptics::Device::updateStates ( void   )  [protected]

Updates the device state structs used in haptic thread.

virtual void OgreHaptics::Device::obtainStateValues ( double  timeElapsed  )  [protected, pure virtual]

Obtains the device state values.

void OgreHaptics::Device::checkButtonState ( int  oldButtons,
int  newButtons,
DeviceButton  button 
) [protected]

void OgreHaptics::Device::renderEffects ( double  currentTime  )  [protected]

Updates the list of force effect to be rendered through the device.

Calculates both the forces to be added as well as updates the remaining time of the current state of the force effects.

Remarks:
Used in the haptic thread.

void OgreHaptics::Device::synchroniseMatricesCallbackImpl ( void   )  [protected]

Implements the actual synchronisation of workspace mapping matrices.

void OgreHaptics::Device::synchroniseEffectsCallbackImpl ( void   )  [protected]

Implements the actual synchronisation of the force effect list.

static SchedulerCallbackCode OgreHaptics::Device::statisticsResetCallback ( void *  params  )  [static, protected]

Resets the statistics in a thread safe manner.

static SchedulerCallbackCode OgreHaptics::Device::synchroniseStatisticsCallback ( void *  params  )  [static, protected]

Synchronises the statistics used in the client thread with those used in the haptic thread.

static SchedulerCallbackCode OgreHaptics::Device::synchroniseStatesCallback ( void *  params  )  [static, protected]

Synchronises the DeviceState properties used in the client thread with those used in the haptic thread.

static SchedulerCallbackCode OgreHaptics::Device::synchroniseMatricesCallback ( void *  params  )  [static, protected]

Synchronises the space transformation matrices used in the haptic thread with those used in the client thread.

static SchedulerCallbackCode OgreHaptics::Device::updateCallback ( void *  params  )  [static, protected]

Synchronises the transformation matrices and force effect lists used in the haptic thread with those used in the client thread.

static SchedulerCallbackCode OgreHaptics::Device::removeEffectImmediateCallback ( void *  params  )  [static, protected]

Removes a force effect from the appropiate list used in the haptic thread immediately.


Friends And Related Function Documentation

friend class RenderSystem [friend]

Definition at line 283 of file OgreHapticsDevice.h.


Member Data Documentation

String OgreHaptics::Device::mName [protected]

The name of the Device.

Definition at line 1098 of file OgreHapticsDevice.h.

String OgreHaptics::Device::mInitName [protected]

The name used for initialisation of the Device.

Definition at line 1100 of file OgreHapticsDevice.h.

String OgreHaptics::Device::mModel [protected]

The name of the model of the Device.

Definition at line 1102 of file OgreHapticsDevice.h.

The RenderSystem that created the Device.

Definition at line 1104 of file OgreHapticsDevice.h.

The Timer used for timings.

Definition at line 1106 of file OgreHapticsDevice.h.

int OgreHaptics::Device::mIndex [protected]

The index of the Device, used for unnamed initialisation.

Definition at line 1108 of file OgreHapticsDevice.h.

The version of SDK supporting the Device.

Definition at line 1110 of file OgreHapticsDevice.h.

The version of the driver supporting the Device.

Definition at line 1112 of file OgreHapticsDevice.h.

Are we initialised yet?

Definition at line 1114 of file OgreHapticsDevice.h.

Are we enabled yet?

Definition at line 1116 of file OgreHapticsDevice.h.

Are the workspace dimensions updated?

Definition at line 1118 of file OgreHapticsDevice.h.

Do we need to update the workspace mapping?

Definition at line 1120 of file OgreHapticsDevice.h.

Do we need to synchronise workspace matrices?

Definition at line 1122 of file OgreHapticsDevice.h.

Do we need to update the workspace corners?

Definition at line 1124 of file OgreHapticsDevice.h.

The type by which the device must be calibrated.

Definition at line 1126 of file OgreHapticsDevice.h.

Array holding the device workspace, measured in millimeters from the device origin.

Definition at line 1130 of file OgreHapticsDevice.h.

Array holding the workspace, measured in world units from the origin.

Definition at line 1132 of file OgreHapticsDevice.h.

Matrix4 describing the transformation from the world to the touch space.

Definition at line 1135 of file OgreHapticsDevice.h.

Matrix4 describing the transformation from the world to the touch space used in haptic thread.

Definition at line 1138 of file OgreHapticsDevice.h.

Matrix4 describing the transformation from touch space to device workspace.

Definition at line 1141 of file OgreHapticsDevice.h.

Matrix4 describing the transformation from touch space to device workspace used in haptic thread.

Definition at line 1144 of file OgreHapticsDevice.h.

Inverse of the touch to device workspace transformation matrix.

Definition at line 1146 of file OgreHapticsDevice.h.

Inverse of the touch to device workspace transformation matrix used in haptic thread.

Definition at line 1149 of file OgreHapticsDevice.h.

Matrix4 describing the transformation from the world to the device workspace.

Definition at line 1152 of file OgreHapticsDevice.h.

Matrix4 describing the transformation from the world to the device workspace used in haptic thread.

Definition at line 1155 of file OgreHapticsDevice.h.

Inverse of the world space to device workspace transformation matrix.

Definition at line 1158 of file OgreHapticsDevice.h.

Inverse of the world space to device workspace transformation matrix used in haptic thread.

Definition at line 1161 of file OgreHapticsDevice.h.

Corners of the device workspace in world coordinates.

Definition at line 1163 of file OgreHapticsDevice.h.

The calibration state of the device.

Definition at line 1166 of file OgreHapticsDevice.h.

RenderStats used in the client thread.

Definition at line 1168 of file OgreHapticsDevice.h.

RenderStats used in haptic thread.

Definition at line 1170 of file OgreHapticsDevice.h.

unsigned int OgreHaptics::Device::mhtFrameCount [protected]

Frame counter used for calculation of statistics in haptic thread.

Definition at line 1172 of file OgreHapticsDevice.h.

The duration of the last haptic frame.

Definition at line 1174 of file OgreHapticsDevice.h.

The last time when a haptic frame occurred.

Definition at line 1176 of file OgreHapticsDevice.h.

We only update stats once per second.

Definition at line 1178 of file OgreHapticsDevice.h.

DeviceState of current haptic frame in device coordinates.

Definition at line 1181 of file OgreHapticsDevice.h.

DeviceState of current haptic frame in device coordinates used in haptic thread.

Definition at line 1184 of file OgreHapticsDevice.h.

DeviceState of previous haptic frame in device coordinates used in haptic thread.

Definition at line 1187 of file OgreHapticsDevice.h.

DeviceState of current haptic frame in which coordinates are transformed by the workspace to touch and the given world to touch matrices.

Definition at line 1191 of file OgreHapticsDevice.h.

DeviceState of current haptic frame in which coordinates are transformed by the workspace to touch and the given world to touch matrices used in haptic thread.

Definition at line 1195 of file OgreHapticsDevice.h.

DeviceState of previous haptic frame in which coordinates are transformed by the workspace to touch and the given world to touch matrices used in haptic thread.

Definition at line 1199 of file OgreHapticsDevice.h.

Queue used to transfer events between haptic and client thread.

Pointers to event arguments are used to avoid copy construction of the event when moved around between threads.

Definition at line 1214 of file OgreHapticsDevice.h.

Hazard pointer of the event queue used by client thread.

Definition at line 1216 of file OgreHapticsDevice.h.

Hazard pointer of the event queue used by haptic thread.

Definition at line 1218 of file OgreHapticsDevice.h.

Pointer to the listener of device events.

Definition at line 1220 of file OgreHapticsDevice.h.

double OgreHaptics::Device::mEventTimes[FETT_COUNT][2] [protected]

Definition at line 1231 of file OgreHapticsDevice.h.

Pointer to the listener of frame events.

Definition at line 1234 of file OgreHapticsDevice.h.

Used for locking list of frame listener.

A spin lock is used to avoid the use of a more expensive mutex while it is assumed a listener will not be changed often.

Definition at line 1238 of file OgreHapticsDevice.h.

List of force effects which will be started at the next update.

Definition at line 1242 of file OgreHapticsDevice.h.

List of force effects which will be stopped at the next update.

Definition at line 1244 of file OgreHapticsDevice.h.

List of force effects of which parameters of the owned algorithms will be updated at the next update.

Definition at line 1247 of file OgreHapticsDevice.h.

List of force effects which are fading in. Used in haptic thread.

Definition at line 1249 of file OgreHapticsDevice.h.

List of force effects which are in sustaining state.

Used in haptic thread.

Definition at line 1252 of file OgreHapticsDevice.h.

List of force effects which are fading out. Used in haptic thread.

Definition at line 1254 of file OgreHapticsDevice.h.

Force output to be applied to device.

Definition at line 1256 of file OgreHapticsDevice.h.


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

Last modified Tue Jan 6 22:31:26 2009