Class SpaceMouseController
java.lang.Object
eu.svjatoslav.aukio.e3d.gui.spacemouse.SpaceMouseController
- All Implemented Interfaces:
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoublebooleanCalled before each frame render, allowing the listener to update state and indicate whether a repaint is needed.voidsetSensitivity(double sensitivity)
-
Constructor Details
-
Method Details
-
getSensitivity
public double getSensitivity() -
setSensitivity
public void setSensitivity(double sensitivity) -
onFrame
Description copied from interface:FrameListenerCalled 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:
onFramein interfaceFrameListener- Parameters:
viewPanel- the view panel being renderedmillisecondsSinceLastFrame- time elapsed since the previous frame, for frame-rate-independent updates- Returns:
trueif the view should be re-rendered this frame,falseif this listener has no visual changes
-