Class SimpleApplication

All Implemented Interfaces:
Application, SystemListener

public abstract class SimpleApplication extends LegacyApplication
SimpleApplication is the base class for all jME3 Applications. SimpleApplication will display a statistics view using the StatsAppState AppState. It will display the current frames-per-second value on-screen in addition to the statistics. Several keys have special functionality in SimpleApplication:
Esc - Close the application.
C - Display the camera position and rotation in the console.
M - Display memory usage in the console.
A FlyCamAppState is by default attached as well and can be removed by calling stateManager.detach(stateManager.getState(FlyCamAppState.class));
  • Field Details

  • Constructor Details

    • SimpleApplication

      public SimpleApplication()
    • SimpleApplication

      public SimpleApplication(AppState... initialStates)
  • Method Details

    • start

      public void start()
      Description copied from class: LegacyApplication
      Starts the application in display mode.
      Specified by:
      start in interface Application
      start in class LegacyApplication
      See Also:
    • getSpeed

      public float getSpeed()
      Returns the application's speed.
      The speed of the application.
    • setSpeed

      public void setSpeed(float speed)
      Changes the application's speed. 0.0f prevents the application from updating.
      speed - The speed to set.
    • getFlyByCamera

      public FlyByCamera getFlyByCamera()
      Retrieves flyCam
      flyCam Camera object
    • getGuiNode

      public Node getGuiNode()
      Retrieves guiNode
      guiNode Node object
    • getRootNode

      public Node getRootNode()
      Retrieves rootNode
      rootNode Node object
    • isShowSettings

      public boolean isShowSettings()
    • setShowSettings

      public void setShowSettings(boolean showSettings)
      Toggles settings window to display at start-up
      showSettings - Sets true/false
    • loadGuiFont

      protected BitmapFont loadGuiFont()
      Creates the font that will be set to the guiFont field and subsequently set as the font for the stats text.
      the loaded BitmapFont
    • initialize

      public void initialize()
      Description copied from class: LegacyApplication
      Do not call manually. Callback from ContextListener.

      Initializes the Application, by creating a display and default camera. If display settings are not specified, a default 640x480 display is created. Default values are used for the camera; perspective projection with 45° field of view, with near and far values 1 and 1000 units respectively.

      Specified by:
      initialize in interface SystemListener
      initialize in class LegacyApplication
    • update

      public void update()
      Description copied from class: LegacyApplication
      Do not call manually. Callback from ContextListener.
      Specified by:
      update in interface SystemListener
      update in class LegacyApplication
    • setDisplayFps

      public void setDisplayFps(boolean show)
    • setDisplayStatView

      public void setDisplayStatView(boolean show)
    • simpleInitApp

      public abstract void simpleInitApp()
    • simpleUpdate

      public void simpleUpdate(float tpf)
    • simpleRender

      public void simpleRender(RenderManager rm)