com.jme.app
Class SimpleHeadlessApp

java.lang.Object
  extended by com.jme.app.AbstractGame
      extended by com.jme.app.BaseHeadlessApp
          extended by com.jme.app.SimpleHeadlessApp
Direct Known Subclasses:
ColladaToJme

public abstract class SimpleHeadlessApp
extends BaseHeadlessApp

Similar to BaseSimpleGame but without the FPS and stats rendering.

Version:
$Revision: 4131 $, $Date: 2009-03-19 20:15:28 +0000 (Thu, 19 Mar 2009) $
Author:
Joshua Slack

Nested Class Summary
 
Nested classes/interfaces inherited from class com.jme.app.AbstractGame
AbstractGame.ConfigShowMode
 
Field Summary
protected  Camera cam
          The camera that we see through.
(package private)  long fps
           
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.
(package private)  long startTime
           
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
display, finished, settings
 
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
getNewSettings, quit, start
 
Methods inherited from class com.jme.app.AbstractGame
assertDisplayCreated, finish, getAttributes, getVersion, setConfigShowMode, setConfigShowMode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cam

protected Camera cam
The camera that we see through.


rootNode

protected Node rootNode
The root of our normal scene graph.


input

protected InputHandler input
Handles our mouse/keyboard input.


timer

protected Timer timer
High resolution timer for jME.


tpf

protected float tpf
Simply an easy way to get at timer.getTimePerFrame(). Also saves time so you don't call it more than once per frame.


lightState

protected LightState lightState
A lightstate to turn on and off for the rootNode


startTime

long startTime

fps

long fps
Constructor Detail

SimpleHeadlessApp

public SimpleHeadlessApp()
Method Detail

update

protected final void update(float interpolation)
This is called every frame in BaseGame.start()

Specified by:
update in class BaseHeadlessApp
Parameters:
interpolation - unused in this implementation
See Also:
AbstractGame.update(float interpolation)

render

protected final void render(float interpolation)
This is called every frame in BaseGame.start(), after update()

Specified by:
render in class BaseHeadlessApp
Parameters:
interpolation - unused in this implementation
See Also:
AbstractGame.render(float interpolation)

initSystem

protected final void initSystem()
Creates display, sets up camera, and binds keys. Called in BaseGame.start() directly after the dialog box.

Specified by:
initSystem in class BaseHeadlessApp
See Also:
AbstractGame.initSystem()

initGame

protected final void initGame()
Creates rootNode, lighting, statistic text, and other basic render states. Called in BaseGame.start() after initSystem().

Specified by:
initGame in class BaseHeadlessApp
See Also:
AbstractGame.initGame()

simpleInitGame

protected abstract void simpleInitGame()
Called near end of initGame(). Must be defined by derived classes.


simpleUpdate

protected void simpleUpdate()
Can be defined in derived classes for custom updating. Called every frame in update.


simpleRender

protected void simpleRender()
Can be defined in derived classes for custom rendering. Called every frame in render.


reinit

protected void reinit()
unused

Specified by:
reinit in class BaseHeadlessApp
See Also:
AbstractGame.reinit()

cleanup

protected void cleanup()
Cleans up the keyboard.

Specified by:
cleanup in class BaseHeadlessApp
See Also:
AbstractGame.cleanup()