Package jme3utilities.ui
Class CameraOrbitAppState
java.lang.Object
com.jme3.app.state.AbstractAppState
jme3utilities.NamedAppState
jme3utilities.SimpleAppState
jme3utilities.ui.AcorusAppState
jme3utilities.ui.CameraOrbitAppState
- All Implemented Interfaces:
com.jme3.app.state.AppState
An AppState to cause a camera to orbit a vertical axis.
-
Field Summary
FieldsFields inherited from class jme3utilities.SimpleAppState
assetManager, cam, flyCam, guiNode, guiViewPort, inputManager, renderManager, rootNode, simpleApplication, stateManager, viewPortFields inherited from class com.jme3.app.state.AbstractAppState
initialized -
Constructor Summary
ConstructorsConstructorDescriptionCameraOrbitAppState(com.jme3.renderer.Camera camera, String ccwSignalName, String cwSignalName) Instantiate an enabled AppState. -
Method Summary
Modifier and TypeMethodDescriptionDetermine the signal name for orbiting in the counter-clockwise (+Y) direction.jme3utilities.math.ReadXZcenter()Determine the center location.Determine the signal name for orbiting in the clockwise (-Y) direction.floatrate()Determine the rate of orbiting.voidsetCenter(jme3utilities.math.ReadXZ desiredCenter) Alter the center of the orbit.voidsetRate(float desiredRate) Alter the rate of orbiting.voidupdate(float tpf) Callback invoked once per frame while the state is attached and enabled.Methods inherited from class jme3utilities.ui.AcorusAppState
getActionApplication, getSignals, getSpeed, initializeMethods inherited from class jme3utilities.SimpleAppState
refreshCachedFields, render, stateDetachedMethods inherited from class jme3utilities.NamedAppState
cleanup, getInfluence, hasInfluenceOver, influence, isEnabled, isInitialized, postRender, setEnabled, stateAttached, stopInfluencing, toStringMethods inherited from class com.jme3.app.state.AbstractAppState
getId, setId
-
Field Details
-
logger
message logger for this class
-
-
Constructor Details
-
CameraOrbitAppState
public CameraOrbitAppState(com.jme3.renderer.Camera camera, String ccwSignalName, String cwSignalName) Instantiate an enabled AppState.- Parameters:
camera- which camera to control (not null)ccwSignalName- the signal name to orbit in the +Y direction (not null, not empty)cwSignalName- the signal name to orbit in the -Y direction (not null, not empty)
-
-
Method Details
-
ccwSignalName
Determine the signal name for orbiting in the counter-clockwise (+Y) direction.- Returns:
- the name (not null, not empty)
-
center
public jme3utilities.math.ReadXZ center()Determine the center location.- Returns:
- a location vector (not null)
-
cwSignalName
Determine the signal name for orbiting in the clockwise (-Y) direction.- Returns:
- the name (not null, not empty)
-
rate
public float rate()Determine the rate of orbiting.- Returns:
- the angular rate (in radians/second, ≥0, default=1)
-
setCenter
public void setCenter(jme3utilities.math.ReadXZ desiredCenter) Alter the center of the orbit.- Parameters:
desiredCenter- the desired center (in world coordinates, not null, default=0,0)
-
setRate
public void setRate(float desiredRate) Alter the rate of orbiting.- Parameters:
desiredRate- the desired angular rate (in radians/second, ≥0)
-
update
public void update(float tpf) Callback invoked once per frame while the state is attached and enabled.- Specified by:
updatein interfacecom.jme3.app.state.AppState- Overrides:
updatein classjme3utilities.NamedAppState- Parameters:
tpf- time interval between frames (in seconds, ≥0)
-