Class SpaceMouseController

java.lang.Object
eu.svjatoslav.aukio.e3d.gui.spacemouse.SpaceMouseController
All Implemented Interfaces:
FrameListener

public final class SpaceMouseController extends Object implements FrameListener
Applies 3Dconnexion 6DOF input to the camera, every frame (any model supported by SpaceNavigatorHid — they share raw axis conventions):
  • push/pull/slide the cap → camera moves DIRECTLY, proportional to deflection (the cap senses pressure, unlike a keyboard): velocity = deflection × top speed, applied to the camera position every frame. Release the cap and movement stops instantly — no acceleration ramp, no coasting
  • tilt/twist the cap → camera yaw/pitch. Applied as an incremental delta on top of the current orientation, so it composes with head tracking (HeadLookController folds the delta into its base pose, same as mouse drags) and with mouse drag look
  • left button → brake (zero the keyboard/wheel movement vector)

Cap roll is measured but deliberately not applied — consistent with head tracking, the world horizon stays level.

  • Constructor Details

  • Method Details

    • getSensitivity

      public double getSensitivity()
    • setSensitivity

      public void setSensitivity(double sensitivity)
    • onFrame

      public boolean onFrame(ViewPanel viewPanel, int millisecondsSinceLastFrame)
      Description copied from interface: FrameListener
      Called before each frame render, allowing the listener to update state and indicate whether a repaint is needed.

      Each registered listener is called exactly once per frame tick. The frame is only rendered if at least one listener returns true (or if the view was explicitly marked for repaint).

      Specified by:
      onFrame in interface FrameListener
      Parameters:
      viewPanel - the view panel being rendered
      millisecondsSinceLastFrame - time elapsed since the previous frame, for frame-rate-independent updates
      Returns:
      true if the view should be re-rendered this frame, false if this listener has no visual changes