OgreHaptics Namespace Reference


Classes

class  AtomicScalar
 Structure which has built in atomic arithmetic operators which can be performed on 32-bit variables (e.g. More...
struct  DeviceInitInfo
 Structure to hold information about an available Device. More...
class  ConcurrentQueue
 ConcurrentQueue is an unbounded FIFO (First-In First-Out) data structure that permits producers and consumers on multiple threads of execution to concurrently push and pop elements. More...
class  DebugRenderer
 The DebugRenderer provides utilities to draw elements used in a haptic scene. More...
struct  DeviceState
 Structure holding data describing the state of a device, excluding calibration state. More...
class  DeviceEvent
 Class containing information about a device event. More...
class  DeviceListener
 DeviceListener is an interface class which can be implemented to receive event notifications from Device instances. More...
class  Device
 Device defines the interface all concrete haptic device subclasses must implement. More...
class  EventArgs
 Base class all event arguments must extend. More...
class  Exception
 Specialised Ogre::Exception which is used to signal errors inside the library. More...
class  DuplicateItemException
class  HapticsAPIException
class  InternalErrorException
class  InvalidArgumentsException
class  InvalidOperationException
class  ItemNotFoundException
class  ExceptionFactory
 Class implementing dispatch methods in order to construct by-value exceptions of a derived type based on an exception code. More...
class  ForceEffect
 A ForceEffect provides a way to render forces to a Device to simulate arbitrary sensations. More...
class  ForceEffectAlgorithm
 ForceEffectAlgorithm is used for the actual force calculations for the haptic rendering of a ForceEffect. More...
class  ForceEffectAlgorithmFactory
 Abstract class defining the interface to be implemented by creators of ForceEffectAlgorithm subclasses. More...
class  ForceEffectManager
 Manages force effects, force effect scripts (templates) and the available algorithm factories. More...
class  ForceOutput
 ForceOutput is a simple structure holding data that will be output by a Device. More...
struct  FrameEvent
class  FrameListener
class  NonCopyable
 NonCopyable provides the base implementation for all classes which should not be copyable through either copy constructors and assignment operators. More...
class  RenderSystem
 Abstract class defining the interface of a haptics rendering system, through which API wide settings and schedulers can be controlled. More...
class  System
 System is the root class of the OgreHaptics system. More...
class  Timer
 Abstract class defining the interface of a Timer to be implemented by rendering systems. More...
class  ConfigDialog

Typedefs

typedef std::vector
< DeviceInitInfo
DeviceInfoList
 A list of DeviceInfo entries.
typedef std::map< String,
Device * > 
DeviceMap
 A map of named Device instances.
typedef ConstMapIterator
< DeviceMap
ConstDeviceIterator
 A const iterator over a map of String/Device entries.
typedef SchedulerCallbackCode SchedulerCallback (void *params)
 Definition of the signature of a callback called from the haptic thread.
typedef unsigned int EventType
 Used to identify the type of event in i.e.
typedef std::vector
< ForceEffectAlgorithm * > 
ForceEffectAlgorithmList
 A list of ForceEffectAlgoritms.
typedef std::vector
< RenderSystem * > 
RenderSystemList
 A list of RenderSystem instances.

Enumerations

enum  SchedulerCallbackCode { SCC_DONE, SCC_CONTINUE }
 Enumeration of types of exit codes for callbacks scheduled from the haptic thread. More...
enum  DebugRenderMode { DRM_TOUCH_WORKSPACE = 0x01, DRM_STYLUS = 0x02 }
 Enumeration of possible elements to render using the DebugRenderer. More...
enum  DeviceButton {
  DB_NO_BUTTON = 0, DB_BUTTON1 = 0x01, DB_BUTTON2 = 0x02, DB_BUTTON3 = 0x04,
  DB_BUTTON4 = 0x08, DB_INKWELL = DB_BUTTON3, DB_SAFETY = DB_BUTTON4
}
 Enumeration of the buttons found on the device, if available. More...
enum  DeviceCalibrationState { DCS_NOT_INITIALISED, DCS_NEEDS_CALIBRATION, DCS_CALIBRATED }
 Enumeration of possible states of calibration of a Device. More...
enum  DeviceCalibrationType {
  DCT_UNKNOWN, DCT_AUTO, DCT_INKWELL, DCT_PULL_PUSH,
  DCT_RESET_POSITION
}
 Enumeration of possible ways devices are calibrated during run-time. More...
enum  ForceEffectState {
  FES_INACTIVE, FES_STARTING, FES_FADING_IN, FES_SUSTAINING,
  FES_FADING_OUT
}
 Enumeration of possible states a ForceEffect can be in. More...
enum  ForceEffectSustainMode { FESM_TEMPORAL, FESM_PERSISTANT }
 Enumeration of possible modes of the sustaining state of a ForceEffect. More...
enum  ForceEffectTimeType { FETT_TOTAL, FETT_CURRENT_STATE }
 Enumeration of possible types of remaining time of a ForceEffect to be rendered through a Device. More...

Functions

void memoryReadWriteBarrier (void)
 Issues a full memory barrier.
template<typename T>
atomicIncrement (volatile T *ptr)
 Atomically increments (increases by 1) the value of the 32-bit variable pointed to by the ptr parameter.
template<typename T>
atomicDecrement (volatile T *ptr)
 Atomically decrements (decreases by 1) the value of the 32-bit variable pointed to by the ptr parameter.
template<typename T>
atomicExchange (volatile T *ptr, T value)
 Sets the value of the 32-bit variable pointed to by the ptr parameter to the given value.
template<typename T>
T * atomicExchangePtr (T *volatile *ptr, T *value)
 Sets the address to which the given ptr parameter will point to the given value.
template<typename T>
atomicExchangeAndAdd (volatile T *ptr, T value)
 Adds the given 32-bit value to the 32-bit variable pointed to by the given ptr.
template<typename T>
atomicExchangeAndSubtract (volatile T *ptr, T value)
 Subtracts the given 32-bit value from the 32-bit variable pointed to by the given ptr.
template<typename T>
bool atomicCompareAndSwap (volatile T *ptr, T oldValue, T newValue)
 Sets the value of the 32-bit target variable to the given new value if the old value of the target variable equals the given old value.
template<typename T>
bool atomicCompareAndSwapPtr (T *volatile *ptr, T *oldValue, T *newValue)
 Sets the value of the target pointer to the new value if the old value of the target pointer equals the given old value.


Typedef Documentation

typedef ConstMapIterator<DeviceMap> OgreHaptics::ConstDeviceIterator

A const iterator over a map of String/Device entries.

Definition at line 47 of file OgreHapticsCommon.h.

A list of DeviceInfo entries.

Definition at line 43 of file OgreHapticsCommon.h.

typedef std::map<String, Device*> OgreHaptics::DeviceMap

A map of named Device instances.

Definition at line 45 of file OgreHapticsCommon.h.

typedef unsigned int OgreHaptics::EventType

Used to identify the type of event in i.e.

a event queue.

Definition at line 32 of file OgreHapticsEvent.h.

A list of ForceEffectAlgoritms.

Definition at line 100 of file OgreHapticsForceEffectAlgorithm.h.

A list of RenderSystem instances.

Definition at line 60 of file OgreHapticsSystem.h.

Definition of the signature of a callback called from the haptic thread.

Remarks:
Parameters:
params A pointer to parameters passed from the callback.

Definition at line 79 of file OgreHapticsCommon.h.


Enumeration Type Documentation

Enumeration of possible elements to render using the DebugRenderer.

Enumerator:
DRM_TOUCH_WORKSPACE  The touch workspace of any Device.

DRM_STYLUS  The stylus of any Device.

Definition at line 32 of file OgreHapticsDebugRenderer.h.

Enumeration of the buttons found on the device, if available.

This enumeration does include buttons found on the stylus/grip.

Enumerator:
DB_NO_BUTTON  No button.

DB_BUTTON1  The first stylus/grip button.

DB_BUTTON2  The second stylus/grip button.

DB_BUTTON3  The third stylus/grip button.

DB_BUTTON4  The fourth stylus/grip button.

DB_INKWELL  The button found in the 'inkwell', the placeholder for the stylus.

Equals to DB_BUTTON3.

Remarks:
Implemented for PHANToM Omni.
DB_SAFETY  The button used for turning on/off haptic rendering.

Equals to DB_BUTTON4.

Remarks:
Implemented for PHANToM Desktop.

Definition at line 66 of file OgreHapticsDevice.h.

Enumeration of possible states of calibration of a Device.

Enumerator:
DCS_NOT_INITIALISED  The Device has not yet been initialised.

DCS_NEEDS_CALIBRATION  The Device needs to be calibrated.

Remarks:
Depending on the DeviceCalibrationType the user needs to perform actions in order to calibrate the Device correctly.
DCS_CALIBRATED  The Device has been calibrated.

Definition at line 95 of file OgreHapticsDevice.h.

Enumeration of possible ways devices are calibrated during run-time.

Enumerator:
DCT_UNKNOWN  Unkown calibration type.

Remarks:
PHANToM devices must be initialised first before the type of calibration is known. This will be returned if this type of device has not yet been initialised.
DCT_AUTO  The device is capable of automatic calibration when the stylus/grip is moved along the workspace extents.
DCT_INKWELL  The device requires the stylus/grip to be placed in the (flashing) inkwell (PHANToM Omni).
DCT_PULL_PUSH  The device requires the stylus/grip to be extended as far as possible and to be pushed back (Falcon).
DCT_RESET_POSITION  The device requires the stylus/grip to be placed in a specific reset position.

Definition at line 111 of file OgreHapticsDevice.h.

Enumeration of possible states a ForceEffect can be in.

Enumerator:
FES_INACTIVE  Indicates the force effect is not rendering and has not been started or has been stopped after optional fading out.
FES_STARTING  Indicates the force effect will be started the next time the device for which the force effect was started is updated.
FES_FADING_IN  Indicates the force effect is fading in to its full force output.

FES_SUSTAINING  Indicates the force effect is rendering its full force output.

FES_FADING_OUT  Indicates the force effect is fading out from its full force output.

Definition at line 35 of file OgreHapticsForceEffect.h.

Enumeration of possible modes of the sustaining state of a ForceEffect.

Enumerator:
FESM_TEMPORAL  Specifies the sustaining state is temporal and will last for the set sustain duration.
FESM_PERSISTANT  Specifies the sustaining state is persistant and will last until the ForceEffect is stopped explicitly.

Definition at line 56 of file OgreHapticsForceEffect.h.

Enumeration of possible types of remaining time of a ForceEffect to be rendered through a Device.

Enumerator:
FETT_TOTAL  Use this to query the total remaining time of a ForceEffect.

FETT_CURRENT_STATE  Use this to query the remaining time of the current state a ForceEffect is in.

Definition at line 74 of file OgreHapticsForceEffect.h.

Enumeration of types of exit codes for callbacks scheduled from the haptic thread.

Enumerator:
SCC_DONE  Signals the callback is done executing.

Remarks:
This is typically returned in callbacks which need to be executed occasionaly, such as synchronisation of data between threads.
SCC_CONTINUE  Signals the callback will continue to be executed in succeeding haptic frames.

Remarks:
This is typically returned in callbacks which need to be executed every haptic frame, such as the force calculation methods.

Definition at line 53 of file OgreHapticsCommon.h.


Function Documentation

template<typename T>
bool OgreHaptics::atomicCompareAndSwap ( volatile T *  ptr,
oldValue,
newValue 
)

Sets the value of the 32-bit target variable to the given new value if the old value of the target variable equals the given old value.

Returns:
true if the compare-and-swap operation was successfull, false otherwise

Definition at line 165 of file OgreHapticsAtomic.h.

Referenced by OgreHaptics::ConcurrentQueue< OgreHaptics::EventArgs * >::allocateHazardPtr(), OgreHaptics::AtomicScalar< OgreHaptics::DeviceCalibrationState >::compareAndSwap(), and OgreHaptics::ConcurrentQueue< OgreHaptics::EventArgs * >::retireHazardPtr().

template<typename T>
bool OgreHaptics::atomicCompareAndSwapPtr ( T *volatile *  ptr,
T *  oldValue,
T *  newValue 
)

Sets the value of the target pointer to the new value if the old value of the target pointer equals the given old value.

Returns:
true if the compare-and-swap operation was successfull, false otherwise

Definition at line 182 of file OgreHapticsAtomic.h.

Referenced by OgreHaptics::ConcurrentQueue< OgreHaptics::EventArgs * >::allocateHazardPtr(), OgreHaptics::ConcurrentQueue< OgreHaptics::EventArgs * >::pop(), and OgreHaptics::ConcurrentQueue< OgreHaptics::EventArgs * >::push().

template<typename T>
T OgreHaptics::atomicDecrement ( volatile T *  ptr  ) 

Atomically decrements (decreases by 1) the value of the 32-bit variable pointed to by the ptr parameter.

Returns:
The new decremented value.

Definition at line 80 of file OgreHapticsAtomic.h.

Referenced by OgreHaptics::AtomicScalar< OgreHaptics::DeviceCalibrationState >::operator--().

template<typename T>
T OgreHaptics::atomicExchange ( volatile T *  ptr,
value 
)

Sets the value of the 32-bit variable pointed to by the ptr parameter to the given value.

Returns:
The initial value pointed to by the ptr parameter.

Definition at line 94 of file OgreHapticsAtomic.h.

Referenced by OgreHaptics::AtomicScalar< OgreHaptics::DeviceCalibrationState >::operator=(), and OgreHaptics::AtomicScalar< OgreHaptics::DeviceCalibrationState >::set().

template<typename T>
T OgreHaptics::atomicExchangeAndAdd ( volatile T *  ptr,
value 
)

Adds the given 32-bit value to the 32-bit variable pointed to by the given ptr.

Returns:
The initial value pointed to by the ptr parameter.

Definition at line 134 of file OgreHapticsAtomic.h.

Referenced by OgreHaptics::AtomicScalar< OgreHaptics::DeviceCalibrationState >::operator+=().

template<typename T>
T OgreHaptics::atomicExchangeAndSubtract ( volatile T *  ptr,
value 
)

Subtracts the given 32-bit value from the 32-bit variable pointed to by the given ptr.

Returns:
The initial value pointed to by the ptr parameter.

Definition at line 149 of file OgreHapticsAtomic.h.

Referenced by OgreHaptics::AtomicScalar< OgreHaptics::DeviceCalibrationState >::operator-=().

template<typename T>
T* OgreHaptics::atomicExchangePtr ( T *volatile *  ptr,
T *  value 
)

Sets the address to which the given ptr parameter will point to the given value.

Returns:
The initial address pointed to by the ptr parameter.

Definition at line 112 of file OgreHapticsAtomic.h.

template<typename T>
T OgreHaptics::atomicIncrement ( volatile T *  ptr  ) 

Atomically increments (increases by 1) the value of the 32-bit variable pointed to by the ptr parameter.

Returns:
The new incremented value.

Definition at line 66 of file OgreHapticsAtomic.h.

Referenced by OgreHaptics::AtomicScalar< OgreHaptics::DeviceCalibrationState >::operator++().

void OgreHaptics::memoryReadWriteBarrier ( void   ) 

Issues a full memory barrier.

Definition at line 52 of file OgreHapticsAtomic.h.


Last modified Tue Jan 6 22:31:25 2009