Interface VRMouseManager

All Known Implementing Classes:
AbstractVRMouseManager, LWJGLOpenVRMouseManager, OculusMouseManager, OpenVRMouseManager, OSVRMouseManager

public interface VRMouseManager
A class dedicated to the handling of the mouse within VR environment.
  • Method Details

    • initialize

      void initialize()
      Initialize the VR mouse manager.
    • getVREnvironment

      VREnvironment getVREnvironment()
      Get the VR Environment to which this manager is attached.
      Returns:
      the VR Environment to which this manager is attached.
    • setVRMouseEnabled

      void setVRMouseEnabled(boolean enabled)
      Set if the mouse cursor should be used in the VR view.
      Parameters:
      enabled - true if the mouse cursor should be displayed in VR and false otherwise.
    • setThumbstickMode

      void setThumbstickMode(boolean set)
      Set if the VR device controller is used within thumb stick mode.
      Parameters:
      set - true if the VR device controller is used within thumb stick mode and false otherwise.
    • isThumbstickMode

      boolean isThumbstickMode()
      Get if the VR device controller is used within thumb stick mode.
      Returns:
      true if the VR device controller is used within thumb stick mode and false otherwise.
    • setSpeed

      void setSpeed(float sensitivity, float acceleration)
      Set the speed of the mouse.
      Parameters:
      sensitivity - the sensitivity of the mouse.
      acceleration - the acceleration of the mouse.
      See Also:
    • getSpeedSensitivity

      float getSpeedSensitivity()
      Get the sensitivity of the mouse.
      Returns:
      the sensitivity of the mouse.
      See Also:
    • getSpeedAcceleration

      float getSpeedAcceleration()
      Get the acceleration of the mouse.
      Returns:
      the acceleration of the mouse.
      See Also:
    • getMouseMoveScale

      float getMouseMoveScale()
      Get the move scale. return the move scale.
      See Also:
    • setMouseMoveScale

      void setMouseMoveScale(float set)
      Set the mouse move scale.
      Parameters:
      set - the mouse move scale.
      See Also:
    • setImage

      void setImage(String texture)
      Set the image to use as mouse cursor. The given string describe an asset that the underlying application asset manager has to load.
      Parameters:
      texture - the image to use as mouse cursor.
    • updateAnalogAsMouse

      void updateAnalogAsMouse(int inputIndex, AnalogListener mouseListener, String mouseXName, String mouseYName, float tpf)
      Update analog controller as it was a mouse controller.
      Parameters:
      inputIndex - the index of the controller attached to the VR system.
      mouseListener - the JMonkey mouse listener to trigger.
      mouseXName - the mouseX identifier.
      mouseYName - the mouseY identifier
      tpf - the time per frame.
    • getCursorPosition

      Vector2f getCursorPosition()
      Get the actual cursor position.
      Returns:
      the actual cursor position.
    • centerMouse

      void centerMouse()
      Center the mouse on the display.
    • update

      void update(float tpf)
      Update the mouse manager. This method should not be called manually. The standard behavior for this method is to be called from the update method of the attached VR view manager.
      Parameters:
      tpf - the time per frame.