Class HapticDevice

  • java.lang.Object
    • uk.ac.qmul.eecs.depic.jhapticgui.HapticDevice
  • All Implemented Interfaces:
    Haptics


    public class HapticDevice
    extends java.lang.Object
    implements Haptics
    A placeholder for a haptic device that exposes a native API. It uses Java Native Interface to communicate with the device.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void dispose()
      Disposes the haptics: stops any form of interation based on haptics.
      HapticListener getListener()
      Returns a handle to the haptic listener associated to this object.
      void sendMessage(java.lang.String command, java.lang.String args, int ID)
      Sends a message to the haptic device.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • sendMessage

        public void sendMessage(java.lang.String command,
                                java.lang.String args,
                                int ID)
        Sends a message to the haptic device.
        Specified by:
        sendMessage in interface Haptics
        Parameters:
        command - the command to execute. Examples could be "display shape" or "render force"
        args - arguments of the command. Often position coordinates referring to haptic forces being put in place
        ID - an (optional) unique identifier for the haptic object this message refers to
      • getListener

        public HapticListener getListener()
        Returns a handle to the haptic listener associated to this object.
        Specified by:
        getListener in interface Haptics
        Returns:
        a reference to a HapticListener object
      • dispose

        public void dispose()
        Disposes the haptics: stops any form of interation based on haptics.
        Specified by:
        dispose in interface Haptics