Package uk.ac.qmul.eecs.depic.jhapticgui
Interface HapticDeviceFactory
-
- All Known Implementing Classes:
- HapticDeviceWinFactory
public interface HapticDeviceFactory
An abstract factory interface, as per the Abstract Factory design pattern.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description HapticDevice
getHapticDevice(java.io.InputStream nativeLibrary, HapticListener hapticListener, java.awt.Dimension windowDimension)
Creates a new instance of aHapticDevice
.
-
-
-
Method Detail
-
getHapticDevice
HapticDevice getHapticDevice(java.io.InputStream nativeLibrary, HapticListener hapticListener, java.awt.Dimension windowDimension) throws HapticsException
Creates a new instance of aHapticDevice
. During the creation process the haptic device is initialized.- Parameters:
nativeLibrary
- an input stream to a valid native dinamic library that handles the haptic device. Such library should be compiled using the C++ framework code supplied together with this library.hapticListener
- a haptic listener for the haptic device that is going to be created. this will be returned byHapticDevice.getListener()
windowDimension
- the dimension of the window that displays the haptic scene.- Returns:
- an instance of a running haptic device
- Throws:
HapticsException
- if the haptic device initialization fails
-
-