public class RootNodeAppState extends AbstractAppState
| Modifier and Type | Field and Description | 
|---|---|
| protected Node | rootNode | 
| protected ViewPort | viewPort | 
initialized| Constructor and Description | 
|---|
| RootNodeAppState()Creates the AppState with a new, empty root Node, attaches it to the
 default Application ViewPort and updates it when attached to the
 AppStateManager. | 
| RootNodeAppState(Node rootNode)Creates the AppState with the given root Node, uses the default
 Application ViewPort and updates the root Node when attached to the
 AppStateManager. | 
| RootNodeAppState(java.lang.String id,
                ViewPort viewPort,
                Node rootNode)Creates the AppState with the given unique ID, ViewPort, and root Node, attaches
 the root Node to the ViewPort and updates it. | 
| RootNodeAppState(ViewPort viewPort)Creates the AppState with the given ViewPort and creates a RootNode
 that is attached to the given ViewPort and updates it when attached to the
 AppStateManager. | 
| RootNodeAppState(ViewPort viewPort,
                Node rootNode)Creates the AppState with the given ViewPort and root Node, attaches
 the root Node to the ViewPort and updates it. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | cleanup()Called by  AppStateManagerwhen transitioning thisAppStatefrom terminating to detached. | 
| Node | getRootNode()Returns the managed rootNode. | 
| ViewPort | getViewPort()Returns the used ViewPort | 
| void | initialize(AppStateManager stateManager,
          Application app)Called by  AppStateManagerwhen transitioning thisAppStatefrom initializing to running.This will happen on the next iteration through the update loop after AppStateManager.attach(com.jme3.app.state.AppState)was called. | 
| void | update(float tpf)Called to update the  AppState. | 
getId, isEnabled, isInitialized, postRender, render, setEnabled, setId, stateAttached, stateDetachedpublic RootNodeAppState()
public RootNodeAppState(ViewPort viewPort)
viewPort - An existing ViewPortpublic RootNodeAppState(Node rootNode)
rootNode - An existing root Nodepublic RootNodeAppState(ViewPort viewPort, Node rootNode)
viewPort - An existing ViewPortrootNode - An existing root Nodepublic void initialize(AppStateManager stateManager, Application app)
AppStateAppStateManager when transitioning this AppState
 from initializing to running.AppStateManager.attach(com.jme3.app.state.AppState) was called.
 
 AppStateManager will call this only from the update loop
 inside the rendering thread. This means is it safe to modify the scene 
 graph from this method.
initialize in interface AppStateinitialize in class AbstractAppStatestateManager - The state managerapp - The applicationpublic void update(float tpf)
AppStateAppState. This method will be called 
 every render pass if the AppState is both attached and enabled.update in interface AppStateupdate in class AbstractAppStatetpf - Time since the last call to update(), in seconds.public void cleanup()
AppStateAppStateManager when transitioning this
 AppState from terminating to detached. This
 method is called the following render pass after the AppState has 
 been detached and is always called once and only once for each time
 initialize() is called. Either when the AppState
 is detached or when the application terminates (if it terminates normally).cleanup in interface AppStatecleanup in class AbstractAppStatepublic Node getRootNode()
public ViewPort getViewPort()