|
sdr 0.21 | |||||||||
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.FixedFramerateGame
net.cscott.sdr.anim.SdrBaseGame
public abstract class SdrBaseGame
SdrBaseGame
is a fixed-framerate base game class. It sets up
the BaseGame
in a manner similar to SimpleGame
,
but defers the really application-specific stuff to subclasses.
Field Summary | |
---|---|
protected Camera |
cam
Our camera. |
protected InputHandler |
input
Handles mouse/keyboard. |
protected LightState |
lightState
A lightstate to turn on and off for the rootNode. |
protected Node |
rootNode
Root node of our scene graph. |
protected boolean |
showBounds
True if the renderer should display bounds. |
protected boolean |
showDepth
True if the renderer should display the depth buffer. |
protected boolean |
showNormals
True if the rnederer should display normals. |
protected Timer |
timer
High resolution timer for tempo-independent animation. |
protected WireframeState |
wireState
A wirestate to turn on and off for the rootNode. |
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 | |
---|---|
SdrBaseGame()
|
Method Summary | |
---|---|
protected void |
cleanup()
Cleans up the keyboard. |
protected void |
doDebug(Renderer r)
|
protected void |
initGame()
Creates rootNode, lighting, and other basic render states. |
protected void |
initSystem()
Creates display, sets up camera, and binds keys. |
void |
onCamera()
This method is called whenever the camera is moved. |
protected void |
quit()
Calls the quit of BaseGame to clean up the display and then closes the JVM. |
protected void |
reinit()
Unused. |
protected void |
render(float interpolation)
This is called for every frame in BaseGame.start(), after update(). |
protected abstract void |
sdrInitGame()
Called near end of initGame(). |
protected void |
sdrRender()
Defined in subclasses for custom rendering. |
protected void |
sdrUpdate()
Defined in subclasses for custom updating. |
protected void |
update(float interpolation)
Updates the timer, input, and update queue. |
Methods inherited from class com.jme.app.FixedFramerateGame |
---|
getFramesPerSecond, setFrameRate, 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 boolean showDepth
protected boolean showBounds
protected boolean showNormals
protected WireframeState wireState
protected LightState lightState
Constructor Detail |
---|
public SdrBaseGame()
Method Detail |
---|
protected final void update(float interpolation)
update
in class FixedFramerateGame
interpolation
- unusedprotected void sdrUpdate()
protected final void render(float interpolation)
render
in class FixedFramerateGame
interpolation
- unused in this implementation.protected void sdrRender()
protected void doDebug(Renderer r)
protected void initSystem()
initSystem
in class FixedFramerateGame
public void onCamera()
protected void initGame()
initGame
in class FixedFramerateGame
protected abstract void sdrInitGame()
protected void reinit()
reinit
in class FixedFramerateGame
protected void cleanup()
cleanup
in class FixedFramerateGame
protected void quit()
quit
in class FixedFramerateGame
|
sdr 0.21 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |