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

public class CameraOrbitAppState extends AcorusAppState
An AppState to cause a camera to orbit a vertical axis.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Logger
    message logger for this class

    Fields inherited from class jme3utilities.SimpleAppState

    assetManager, cam, flyCam, guiNode, guiViewPort, inputManager, renderManager, rootNode, simpleApplication, stateManager, viewPort

    Fields inherited from class com.jme3.app.state.AbstractAppState

    initialized
  • Constructor Summary

    Constructors
    Constructor
    Description
    CameraOrbitAppState(com.jme3.renderer.Camera camera, String ccwSignalName, String cwSignalName)
    Instantiate an enabled AppState.
  • Method Summary

    Modifier and Type
    Method
    Description
    Determine the signal name for orbiting in the counter-clockwise (+Y) direction.
    jme3utilities.math.ReadXZ
    Determine the center location.
    Determine the signal name for orbiting in the clockwise (-Y) direction.
    float
    Determine the rate of orbiting.
    void
    setCenter(jme3utilities.math.ReadXZ desiredCenter)
    Alter the center of the orbit.
    void
    setRate(float desiredRate)
    Alter the rate of orbiting.
    void
    update(float tpf)
    Callback invoked once per frame while the state is attached and enabled.

    Methods inherited from class jme3utilities.ui.AcorusAppState

    getActionApplication, getSignals, getSpeed, initialize

    Methods inherited from class jme3utilities.SimpleAppState

    refreshCachedFields, render, stateDetached

    Methods inherited from class jme3utilities.NamedAppState

    cleanup, getInfluence, hasInfluenceOver, influence, isEnabled, isInitialized, postRender, setEnabled, stateAttached, stopInfluencing, toString

    Methods inherited from class com.jme3.app.state.AbstractAppState

    getId, setId

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • logger

      public static final Logger 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

      public String 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

      public String 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:
      update in interface com.jme3.app.state.AppState
      Overrides:
      update in class jme3utilities.NamedAppState
      Parameters:
      tpf - time interval between frames (in seconds, ≥0)