Package sc.iview.controls.behaviours
Class ControlsParameters
java.lang.Object
sc.iview.controls.behaviours.ControlsParameters
A container to hold movement step sizes and mouse sensitivity parameters,
these shall not be duplicated elsewhere in SciView. It serves three purposes:
1) hold and manage the said parameters
2) provide their current values (mostly to SciView's internal objects)
3) updates registered (scenery's) services immediately whenever any parameter changes
Inside-package controls, such as NodeTranslateControl, read out this whenever they are
invoked to get current state. Outside-package controls, currently only MovementCommand,
ArcballCameraControl, and FPSCameraControl, that have own memory of the same-purposed
attributes are synchronized here as long as they are registered here. This way, caller
needs to adjusts e.g. mouse movement sensitivity only here, and not explicitly at all
relevant controls.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final floatstatic final floatstatic final floatstatic final floatstatic final float -
Constructor Summary
ConstructorsConstructorDescriptionControlsParameters(graphics.scenery.controls.behaviours.ArcballCameraControl arcballCamCntrl, graphics.scenery.controls.behaviours.FPSCameraControl fpsCamCntrl) One can optionally register scenery's ArcballCameraControl and FPSCameraControl to be notified of changes. -
Method Summary
Modifier and TypeMethodDescriptionfloatfloatfloatfloatfloatvoidregisterArcballCameraControl(graphics.scenery.controls.behaviours.ArcballCameraControl arcballCamCntrl) Registers the scenery's ArcballCameraControl to be synchronized with this module.voidregisterFastStepMover(graphics.scenery.controls.behaviours.MovementCommand movementCommand) voidregisterFpsCameraControl(graphics.scenery.controls.behaviours.FPSCameraControl fpsCamCntrl) Registers the scenery's FPSCameraControl to be synchronized with this module.voidregisterSlowStepMover(graphics.scenery.controls.behaviours.MovementCommand movementCommand) voidregisterVeryFastStepMover(graphics.scenery.controls.behaviours.MovementCommand movementCommand) voidreset()voidsetFPSSpeedFast(float fpsSpeedFast) voidsetFPSSpeedSlow(float fpsSpeedSlow) voidsetFPSSpeedVeryFast(float fpsSpeedVeryFast) voidsetMouseScrollMult(float mouseScrollMult) voidsetMouseSpeedMult(float mouseSpeedMult) voidvoidunregisterFastStepMover(graphics.scenery.controls.behaviours.MovementCommand movementCommand) voidvoidunregisterSlowStepMover(graphics.scenery.controls.behaviours.MovementCommand movementCommand) voidunregisterVeryFastStepMover(graphics.scenery.controls.behaviours.MovementCommand movementCommand)
-
Field Details
-
DEFAULT_FPS_SPEED_SLOW
public static final float DEFAULT_FPS_SPEED_SLOW- See Also:
-
DEFAULT_FPS_SPEED_FAST
public static final float DEFAULT_FPS_SPEED_FAST- See Also:
-
DEFAULT_FPS_SPEED_VERY_FAST
public static final float DEFAULT_FPS_SPEED_VERY_FAST- See Also:
-
DEFAULT_MOUSE_SPEED_MULT
public static final float DEFAULT_MOUSE_SPEED_MULT- See Also:
-
DEFAULT_MOUSE_SCROLL_MULT
public static final float DEFAULT_MOUSE_SCROLL_MULT- See Also:
-
-
Constructor Details
-
ControlsParameters
public ControlsParameters() -
ControlsParameters
public ControlsParameters(graphics.scenery.controls.behaviours.ArcballCameraControl arcballCamCntrl, graphics.scenery.controls.behaviours.FPSCameraControl fpsCamCntrl) One can optionally register scenery's ArcballCameraControl and FPSCameraControl to be notified of changes. Any of the params may be null.
-
-
Method Details
-
registerArcballCameraControl
public void registerArcballCameraControl(graphics.scenery.controls.behaviours.ArcballCameraControl arcballCamCntrl) Registers the scenery's ArcballCameraControl to be synchronized with this module. Provide null to unregister, to disable the synchronization. -
unregisterArcballCameraControl
public void unregisterArcballCameraControl() -
registerFpsCameraControl
public void registerFpsCameraControl(graphics.scenery.controls.behaviours.FPSCameraControl fpsCamCntrl) Registers the scenery's FPSCameraControl to be synchronized with this module. Provide null to unregister, to disable the synchronization. -
unregisterFpsCameraControl
public void unregisterFpsCameraControl() -
registerSlowStepMover
public void registerSlowStepMover(graphics.scenery.controls.behaviours.MovementCommand movementCommand) -
registerFastStepMover
public void registerFastStepMover(graphics.scenery.controls.behaviours.MovementCommand movementCommand) -
registerVeryFastStepMover
public void registerVeryFastStepMover(graphics.scenery.controls.behaviours.MovementCommand movementCommand) -
unregisterSlowStepMover
public void unregisterSlowStepMover(graphics.scenery.controls.behaviours.MovementCommand movementCommand) -
unregisterFastStepMover
public void unregisterFastStepMover(graphics.scenery.controls.behaviours.MovementCommand movementCommand) -
unregisterVeryFastStepMover
public void unregisterVeryFastStepMover(graphics.scenery.controls.behaviours.MovementCommand movementCommand) -
setFPSSpeedSlow
public void setFPSSpeedSlow(float fpsSpeedSlow) -
setFPSSpeedFast
public void setFPSSpeedFast(float fpsSpeedFast) -
setFPSSpeedVeryFast
public void setFPSSpeedVeryFast(float fpsSpeedVeryFast) -
setMouseSpeedMult
public void setMouseSpeedMult(float mouseSpeedMult) -
setMouseScrollMult
public void setMouseScrollMult(float mouseScrollMult) -
reset
public void reset() -
getFPSSpeedSlow
public float getFPSSpeedSlow() -
getFPSSpeedFast
public float getFPSSpeedFast() -
getFPSSpeedVeryFast
public float getFPSSpeedVeryFast() -
getMouseSpeedMult
public float getMouseSpeedMult() -
getMouseScrollMult
public float getMouseScrollMult()
-