public class PHATScreenshotAppState
extends com.jme3.app.state.AbstractAppState
implements com.jme3.input.controls.ActionListener, com.jme3.post.SceneProcessor
| Constructor and Description |
|---|
PHATScreenshotAppState()
Using this constructor, the screenshot files will be written sequentially
to the system default storage folder.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getFileName() |
String |
getFilePath() |
com.jme3.texture.Image |
getImage() |
void |
initialize(com.jme3.app.state.AppStateManager stateManager,
com.jme3.app.Application app) |
void |
initialize(com.jme3.renderer.RenderManager rm,
com.jme3.renderer.ViewPort vp) |
boolean |
isImageReady() |
boolean |
isInitialized() |
void |
onAction(String name,
boolean value,
float tpf) |
void |
postFrame(com.jme3.texture.FrameBuffer out) |
void |
postQueue(com.jme3.renderer.queue.RenderQueue rq) |
void |
preFrame(float tpf) |
void |
reshape(com.jme3.renderer.ViewPort vp,
int w,
int h) |
void |
saveScreenshot() |
void |
setFileName(String fileName) |
void |
setFilePath(String filePath)
Set the file path to store the screenshot.
|
void |
takeScreenshot() |
cleanup, isEnabled, postRender, render, setEnabled, stateAttached, stateDetached, updatepublic PHATScreenshotAppState()
public void initialize(com.jme3.app.state.AppStateManager stateManager,
com.jme3.app.Application app)
initialize in interface com.jme3.app.state.AppStateinitialize in class com.jme3.app.state.AbstractAppStatepublic void onAction(String name, boolean value, float tpf)
onAction in interface com.jme3.input.controls.ActionListenerpublic void takeScreenshot()
public void initialize(com.jme3.renderer.RenderManager rm,
com.jme3.renderer.ViewPort vp)
initialize in interface com.jme3.post.SceneProcessorpublic boolean isInitialized()
isInitialized in interface com.jme3.app.state.AppStateisInitialized in interface com.jme3.post.SceneProcessorisInitialized in class com.jme3.app.state.AbstractAppStatepublic void reshape(com.jme3.renderer.ViewPort vp,
int w,
int h)
reshape in interface com.jme3.post.SceneProcessorpublic void preFrame(float tpf)
preFrame in interface com.jme3.post.SceneProcessorpublic void postQueue(com.jme3.renderer.queue.RenderQueue rq)
postQueue in interface com.jme3.post.SceneProcessorpublic void postFrame(com.jme3.texture.FrameBuffer out)
postFrame in interface com.jme3.post.SceneProcessorpublic boolean isImageReady()
public com.jme3.texture.Image getImage()
public void saveScreenshot()
public void setFilePath(String filePath)
file - File path to use to store the screenshot. Include the
seperator at the end of the path.public String getFilePath()
public void setFileName(String fileName)
public String getFileName()
Copyright © 2015. All Rights Reserved.