com.jme3.app.state
Class ScreenshotAppState

java.lang.Object
  extended by com.jme3.app.state.AbstractAppState
      extended by com.jme3.app.state.ScreenshotAppState
All Implemented Interfaces:
AppState, ActionListener, InputListener, SceneProcessor

public class ScreenshotAppState
extends AbstractAppState
implements ActionListener, SceneProcessor


Field Summary
 
Fields inherited from class com.jme3.app.state.AbstractAppState
initialized
 
Constructor Summary
ScreenshotAppState()
           
 
Method Summary
 void initialize(AppStateManager stateManager, Application app)
          Called to initialize the AppState.
 void initialize(RenderManager rm, ViewPort vp)
          Called in the render thread to initialize the scene processor.
 boolean isInitialized()
           
 void onAction(java.lang.String name, boolean value, float tpf)
          Called when an input to which this listener is registered to is invoked.
 void postFrame(FrameBuffer out)
          Called after a frame has been rendered and the queue flushed.
 void postQueue(RenderQueue rq)
          Called after the scene graph has been queued, but before it is flushed.
 void preFrame(float tpf)
          Called before a frame
 void reshape(ViewPort vp, int w, int h)
          Called when the resolution of the viewport has been changed.
 
Methods inherited from class com.jme3.app.state.AbstractAppState
cleanup, isEnabled, postRender, render, setEnabled, stateAttached, stateDetached, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.jme3.post.SceneProcessor
cleanup
 

Constructor Detail

ScreenshotAppState

public ScreenshotAppState()
Method Detail

initialize

public void initialize(AppStateManager stateManager,
                       Application app)
Description copied from interface: AppState
Called to initialize the AppState.

Specified by:
initialize in interface AppState
Overrides:
initialize in class AbstractAppState
Parameters:
stateManager - The state manager

onAction

public void onAction(java.lang.String name,
                     boolean value,
                     float tpf)
Description copied from interface: ActionListener
Called when an input to which this listener is registered to is invoked.

Specified by:
onAction in interface ActionListener
Parameters:
name - The name of the mapping that was invoked
value - True if the action is "pressed", false otherwise
tpf - The time per frame value.

initialize

public void initialize(RenderManager rm,
                       ViewPort vp)
Description copied from interface: SceneProcessor
Called in the render thread to initialize the scene processor.

Specified by:
initialize in interface SceneProcessor
Parameters:
rm - The render manager to which the SP was added to
vp - The viewport to which the SP is assigned

isInitialized

public boolean isInitialized()
Specified by:
isInitialized in interface AppState
Specified by:
isInitialized in interface SceneProcessor
Overrides:
isInitialized in class AbstractAppState
Returns:
True if initialize() was called on the state, false otherwise.

reshape

public void reshape(ViewPort vp,
                    int w,
                    int h)
Description copied from interface: SceneProcessor
Called when the resolution of the viewport has been changed.

Specified by:
reshape in interface SceneProcessor

preFrame

public void preFrame(float tpf)
Description copied from interface: SceneProcessor
Called before a frame

Specified by:
preFrame in interface SceneProcessor
Parameters:
tpf - Time per frame

postQueue

public void postQueue(RenderQueue rq)
Description copied from interface: SceneProcessor
Called after the scene graph has been queued, but before it is flushed.

Specified by:
postQueue in interface SceneProcessor
Parameters:
rq - The render queue

postFrame

public void postFrame(FrameBuffer out)
Description copied from interface: SceneProcessor
Called after a frame has been rendered and the queue flushed.

Specified by:
postFrame in interface SceneProcessor
Parameters:
out - The FB to which the scene was rendered.