UNDER CONSTRUCTION
Reference
Home
Overview
Hardware
News
Download
License
Documentation
Reference
Help
FAQs
Contributing
Contact
Links

Haptik.hpp File Reference


Detailed Description

Haptik Library public API.

This is the main header for Haptik Library. It contains interfaces, structures and constants composing the public API.

Definition in file Haptik.hpp.

#include <RSLib\Types.hpp>
#include <RSLib\LowLevel.hpp>
#include <RSLib\Math\3D.hpp>

Go to the source code of this file.


Namespaces

namespace  RSLib

Classes

class  RSLib::HaptikLibraryInfo
 This struct contains information on the Library component. More...
class  RSLib::HaptikPluginInfo
 Information on a plugin. Reserved for Future Use. More...
class  RSLib::HaptikDeviceInfo
 Information about a device. More...
class  RSLib::HaptikData
 Data exchanged with an IHaptikDevice. More...
class  RSLib::HaptikUserData
 Contains user data and error status passed to the callback. More...
interface  RSLib::IHaptikLibrary
 Interface exposed by the library component. More...
interface  RSLib::IHaptikDevice
 Standard interface exposed by every device. More...
class  RSLib::Haptik
 C++ Wrapper Class around the IHaptikLibrary interface. More...

Interface Identifiers

Identifiers for interfaces exposed by components in the Haptik Library.

#define HAPTIK_IHAPTIKLIBRARY   0x80008001
 Interface identifier for the IHaptikLibrary interface.
#define HAPTIK_IHAPTIKDEVICE   0x80008011
 Interface identifier for the IHaptikDevice interface.
#define HAPTIK_IHAPTIKPLUGIN   0x80008031
 Interface identifier for the IHaptikPlugin interface.

Macros

Some useful macros

#define RELEASE_HAPTIK_INTERFACE(ptr)   if(ptr){ptr->Release();ptr=NULL;}
 Commodity macro to safely release interfaces.

Return Values

Values returned by functions and methods in the Haptik Library.

These values are HRESULT-like. You can use the SUCCEEDED() and FAILED() macros to check for severity.

#define HAPTIK_SUCCESS   0x00000000
 Operations successfully completed.
#define HAPTIK_WARNING   0x00000001
 Generic warning.
#define HAPTIK_ALREADY   0x00000001
 No need to perform the requested operation.
#define HAPTIK_CALIBRATED   0x00000010
 Device is calibrated.
#define HAPTIK_NOTCALIBRATED   0x00000020
 Device is not calibrated.
#define HAPTIK_ERROR   0x80000000
 Generic error.
#define HAPTIK_FAILURE   0x80000000
 Same as HAPTIK_ERROR.
#define HAPTIK_SDK_ERROR   0x80000001
 An error in the device native API has occurred.
#define HAPTIK_MEMORY_ERROR   0x80000002
 A failure to allocate memory has occurred.
#define HAPTIK_UNSUPPORTED   0x80000003
 User has performed an unsupported/unimplemented operation.
#define HAPTIK_OUT_OF_RANGE   0x80000004
 The device ordinal is out of range.
#define HAPTIK_NO_SUCH_DEVICE   0x80000005
 There is no device with such device identifier.
#define HAPTIK_NOT_INITIALIZED   0x80000006
 Methods have been invoked on a non-initialized component.

Device Identifiers

Generic identifiers for devices belonging to a particular class.

You can use this identifiers to refer to the first available device in a particular class.
For example:

DeviceInterface(HAPTIK_PHANTOM_DESKTOP);
request an interface to the first available PHANToM Desktop.

#define HAPTIK_DEFAULT_DEVICE   0x80FFFFFF
 The first available device.
#define HAPTIK_MOUSE_SPECTRE   0x80FF8001
 A Mouse Spectre virtual device.
#define HAPTIK_BETAMAX_PLAYER   0x80FF8002
 A Betamax Player virtual device.
#define HAPTIK_BETAMAX_RECORDER   0x80FF8003
 A Betamax Recorded extended device.
#define HAPTIK_PHANTOM_PREMIUM   0x80FF4001
 The first available SensAble PHANToM Premium device.
#define HAPTIK_PHANTOM_DESKTOP   0x80FF4002
 The first available SensAblePHANToM Desktop device.
#define HAPTIK_PHANTOM_OMNI   0x80FF4003
 The first available SensAble PHANToM Omni device.
#define HAPTIK_PHANTOM_PREMIUM6D   0x80FF4004
 The first available SensAble PHANToM Premium 6DOF device.
#define HAPTIK_DELTA   0x80FFC001
 The first available ForceDimension Delta device.
#define HAPTIK_OMEGA   0x80FFC002
 The first available ForceDimension Omega device.
#define HAPTIK_FREEDOM6S   0x80FF2001
 The first available MPB Technologies Freedom device.
#define HAPTIK_CUBIC   0x80FF2002
 The first available MPB Technologies Cubic device.

Hardware Capabilities

If corresponding bit is set in the capabilities mask then the device supports this feature in hardware.

#define HAPTIK_CAPABILITY_POSITION   0x00000001
 The hardware . This is false only for pure virtual devices.
#define HAPTIK_CAPABILITY_VELOCITY   0x00000002
 The native API for the hardware reports velocity. Otherwise reported velocity is emulated.
#define HAPTIK_CAPABILITY_ORIENTATION   0x00000004
 The device has a stylus/tooltip.
#define HAPTIK_CAPABILITY_FORCEFEEDBACK   0x00000010
 The device can apply 3DoFs force feedback.
#define HAPTIK_CAPABILITY_TORQUEFEEDBACK   0x00000020
 The device can apply 6DoFs torques feedback.
#define HAPTIK_CAPABILITY_VARIABLE_RATE   0x00000100
 The native API for the device supports variable rate haptic loop.

Callbacks

Prototypes for callbacks

typedef VOID(* RSLib::HaptikCallbackPtr )(HaptikData &)
 Old-style callback.
typedef VOID(* RSLib::HaptikCallbackExPtr )(HaptikData &, HaptikUserData &)
 New-style callback.

Defines

#define HAPTIK_DLL_IMPORT_EXPORT   __declspec(dllimport)

Functions

HAPTIK_DLL_IMPORT_EXPORT PVOID GetHaptikLibraryInterface (IN UINT32 interfaceId=HAPTIK_IHAPTIKLIBRARY)
 Entry-point to the library. Used to request an interface to the Library component.
Last Updated on 2006/02/01 09:53:39 UTC info@haptiklibrary.org