The Haptik library is an open source library with a component based architecture that acts as an Hardware Abstraction Layer to provide uniform access to haptic devices.
It does not contain graphic primitives, physics related algorithms or complex class hierarchies, but instead exposes a set of interfaces that hide differences between devices to the applications.
In this way any dependency for a particular hardware device, driver version, sdk related dlls is removed from both code and executables, thus ensuring that your application will always run on any systems no matter what drivers you have installed or not (and even if no real device is present).
Support for each class of devices is provided through dynamically loaded plugins so its easy to add support for new devices and features. At runtime, and only when needed, Haptik loads the plugins and query each one of them for the set of supported devices, and present these informations to the application.
Dynamic loading allows to remove compile-time dependency from a particular set of dlls. In this way, through Haptik, applications always use the highest available driver version for a particular device but can run even on older ones. For example Phantom devices support is provided by three plugins: Phantom42, Phantom40, Phantom31, each one tailored on a particular driver version. Haptik takes care for you of selecting the appropriate one at runtime.
Thanks to its component architecture both backward and future compatibility are guaranteed at binary level with absolutely no need for recompilation, i.e. your application executables will run unchanged on new devices, new drivers, new library and plugin versions.
Haptik has a very simple API. Three simple lines of code are enough to start using any device, and some useful features, like device enumeration, automatic default selection, device info querying, autorecalibration, are already built in.
The Haptik Library is easy to adopt even in already existing projects because it has an absolutely non-invasive API, and supports many different execution models (callback based or polled access) and callback schemes (procedures, object-method) to best fit requirements of different applications. It easily integrates with both OpenGL and DirectX based applications by supporting both coordinate systems and providing data in a format that can be directly used by both APIs.
When using Haptik many lines of code could be erased and only few must be added, so you do not have to re-design your application.
Moreover Haptik has no performance impact with respect to direct use of devices native APIs.
Currently bundled plugins contains support for devices from SensAble, Force Dimension and MPB Technologies, software only virtual devices to be used when no hardware is attached and some extended features such as recording/playback of device movements as well as network transparency through any TCP/IP based network.
Haptik is written in C++ but it can be used with many different languages/environments such as Matlab and Simulink, and from Java applications and applets.
For more info please refer to the Documentation Section or check out the FAQs.
This is a minimal sample of using Haptik from C++ (error handling omitted).
A procedure callback is used to implement an horizontal plane.