Package demo

Class ViewPortDemoState

All Implemented Interfaces:
AppState

public class ViewPortDemoState extends BaseAppState
  • Constructor Details Link icon

    • ViewPortDemoState Link icon

      public ViewPortDemoState()
  • Method Details Link icon

    • initialize Link icon

      protected void initialize(Application app)
      Description copied from class: BaseAppState
      Called during initialization once the app state is attached and before onEnable() is called.
      Specified by:
      initialize in class BaseAppState
      Parameters:
      app - the application
    • cleanup Link icon

      protected void cleanup(Application app)
      Description copied from class: BaseAppState
      Called after the app state is detached or during application shutdown if the state is still attached. onDisable() is called before this cleanup() method if the state is enabled at the time of cleanup.
      Specified by:
      cleanup in class BaseAppState
      Parameters:
      app - the application
    • createGuiViewPort Link icon

      protected void createGuiViewPort(int x1, int y1, int x2, int y2, ColorRGBA bgColor)
      Creates an ortho viewport in the specified section of the screen. The viewport will be scaled such that adding things to its root scene will be in 1:1 pixel space.
    • disposeViewPort Link icon

      protected void disposeViewPort()
    • setupViewPortTest Link icon

      protected void setupViewPortTest()
    • onEnable Link icon

      protected void onEnable()
      Description copied from class: BaseAppState
      Called when the state is fully enabled, ie: is attached and isEnabled() is true or when the setEnabled() status changes after the state is attached.
      Specified by:
      onEnable in class BaseAppState
    • onDisable Link icon

      protected void onDisable()
      Description copied from class: BaseAppState
      Called when the state was previously enabled but is now disabled either because setEnabled(false) was called or the state is being cleaned up.
      Specified by:
      onDisable in class BaseAppState
    • update Link icon

      public void update(float tpf)
      Description copied from interface: AppState
      Called to update the AppState. This method will be called every render pass if the AppState is both attached and enabled.
      Specified by:
      update in interface AppState
      Overrides:
      update in class BaseAppState
      Parameters:
      tpf - Time since the last call to update(), in seconds.
    • render Link icon

      public void render(RenderManager rm)
      Description copied from interface: AppState
      Render the state. This method will be called every render pass if the AppState is both attached and enabled.
      Specified by:
      render in interface AppState
      Overrides:
      render in class BaseAppState
      Parameters:
      rm - RenderManager
    • stateDetached Link icon

      public void stateDetached(AppStateManager stateManager)
      Description copied from interface: AppState
      Called by AppStateManager.detach(com.jme3.app.state.AppState) when transitioning this AppState from running to terminating.

      There is no assumption about the thread from which this function is called, therefore it is unsafe to modify the scene graph from this method. Please use AppState.cleanup() instead.

      Specified by:
      stateDetached in interface AppState
      Overrides:
      stateDetached in class BaseAppState
      Parameters:
      stateManager - The state manager from which the state was detached from.