|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.jme.app.AbstractGame
com.jme.app.BaseHeadlessApp
com.jme.app.SimpleHeadlessApp
SimpleHeadlessApp provides the simplest possible implementation
of a main game loop. Interpolation is used between frames for varying framerates.
| Field Summary | |
protected Camera |
cam
The camera that we see through. |
protected InputHandler |
input
Handles our mouse/keyboard input. |
protected LightState |
lightState
A lightstate to turn on and off for the rootNode |
protected Node |
rootNode
The root of our normal scene graph. |
protected Timer |
timer
High resolution timer for jME. |
protected float |
tpf
Simply an easy way to get at timer.getTimePerFrame(). |
| Fields inherited from class com.jme.app.AbstractGame |
ALWAYS_SHOW_PROPS_DIALOG, display, finished, FIRSTRUN_OR_NOCONFIGFILE_SHOW_PROPS_DIALOG, NEVER_SHOW_PROPS_DIALOG, properties |
| Constructor Summary | |
SimpleHeadlessApp()
|
|
| Method Summary | |
protected void |
cleanup()
Cleans up the keyboard. |
protected void |
initGame()
Creates rootNode, lighting, statistic text, and other basic render states. |
protected void |
initSystem()
Creates display, sets up camera, and binds keys. |
protected void |
reinit()
unused |
protected void |
render(float interpolation)
This is called every frame in BaseGame.start(), after update() |
protected abstract void |
simpleInitGame()
Called near end of initGame(). |
protected void |
simpleRender()
Can be defined in derived classes for custom rendering. |
protected void |
simpleUpdate()
Can be defined in derived classes for custom updating. |
protected void |
update(float interpolation)
This is called every frame in BaseGame.start() |
| Methods inherited from class com.jme.app.BaseHeadlessApp |
quit, start |
| Methods inherited from class com.jme.app.AbstractGame |
assertDisplayCreated, finish, getAttributes, getVersion, setDialogBehaviour, setDialogBehaviour, setDialogBehaviour |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected Camera cam
protected Node rootNode
protected InputHandler input
protected Timer timer
protected float tpf
protected LightState lightState
| Constructor Detail |
public SimpleHeadlessApp()
| Method Detail |
protected final void update(float interpolation)
update in class BaseHeadlessAppinterpolation - unused in this implementationAbstractGame.update(float interpolation)protected final void render(float interpolation)
render in class BaseHeadlessAppinterpolation - unused in this implementationAbstractGame.render(float interpolation)protected final void initSystem()
initSystem in class BaseHeadlessAppAbstractGame.initSystem()protected final void initGame()
initGame in class BaseHeadlessAppAbstractGame.initGame()protected abstract void simpleInitGame()
protected void simpleUpdate()
protected void simpleRender()
protected void reinit()
reinit in class BaseHeadlessAppAbstractGame.reinit()protected void cleanup()
cleanup in class BaseHeadlessAppAbstractGame.cleanup()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||