|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jme3.app.Application
com.jme3.app.SimpleApplication
public abstract class SimpleApplication
SimpleApplication
extends the Application
class to provide default functionality like a first-person camera,
and an accessible root node that is updated and rendered regularly.
Additionally, SimpleApplication
will display a statistics view
using the StatsView
class. It will display
the current frames-per-second value on-screen in addition to the statistics.
Several keys have special functionality in SimpleApplication
:
Esc | - Close the application |
C | - Display the camera position and rotation in the console. |
M | - Display memory usage in the console. |
Field Summary | |
---|---|
protected FlyByCamera |
flyCam
|
protected BitmapText |
fpsText
|
protected BitmapFont |
guiFont
|
protected Node |
guiNode
|
static java.lang.String |
INPUT_MAPPING_CAMERA_POS
|
static java.lang.String |
INPUT_MAPPING_EXIT
|
static java.lang.String |
INPUT_MAPPING_HIDE_STATS
|
static java.lang.String |
INPUT_MAPPING_MEMORY
|
protected Node |
rootNode
|
protected boolean |
showSettings
|
Fields inherited from class com.jme3.app.Application |
---|
assetManager, audioRenderer, cam, context, guiViewPort, inputEnabled, inputManager, joyInput, keyInput, listener, mouseInput, paused, pauseOnFocus, renderer, renderManager, settings, speed, stateManager, timer, touchInput, viewPort |
Constructor Summary | |
---|---|
SimpleApplication()
|
|
SimpleApplication(AppState... initialStates)
|
Method Summary | |
---|---|
FlyByCamera |
getFlyByCamera()
Retrieves flyCam |
Node |
getGuiNode()
Retrieves guiNode |
Node |
getRootNode()
Retrieves rootNode |
void |
initialize()
Do not call manually. |
boolean |
isShowSettings()
|
protected BitmapFont |
loadGuiFont()
Creates the font that will be set to the guiFont field and subsequently set as the font for the stats text. |
void |
setDisplayFps(boolean show)
|
void |
setDisplayStatView(boolean show)
|
void |
setShowSettings(boolean showSettings)
Toggles settings window to display at start-up |
abstract void |
simpleInitApp()
|
void |
simpleRender(RenderManager rm)
|
void |
simpleUpdate(float tpf)
|
void |
start()
Starts the application in display mode. |
void |
update()
Do not call manually. |
Methods inherited from class com.jme3.app.Application |
---|
createCanvas, destroy, destroyInput, enqueue, gainFocus, getAssetManager, getAudioRenderer, getCamera, getContext, getGuiViewPort, getInputManager, getListener, getRenderer, getRenderManager, getStateManager, getTimer, getViewPort, handleError, isPauseOnLostFocus, loseFocus, requestClose, reshape, restart, runQueuedTasks, setAssetManager, setPauseOnLostFocus, setSettings, setTimer, start, startCanvas, startCanvas, stop, stop |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String INPUT_MAPPING_EXIT
public static final java.lang.String INPUT_MAPPING_CAMERA_POS
public static final java.lang.String INPUT_MAPPING_MEMORY
public static final java.lang.String INPUT_MAPPING_HIDE_STATS
protected Node rootNode
protected Node guiNode
protected BitmapText fpsText
protected BitmapFont guiFont
protected FlyByCamera flyCam
protected boolean showSettings
Constructor Detail |
---|
public SimpleApplication()
public SimpleApplication(AppState... initialStates)
Method Detail |
---|
public void start()
Application
display
mode.
start
in class Application
Application.start(com.jme3.system.JmeContext.Type)
public FlyByCamera getFlyByCamera()
public Node getGuiNode()
public Node getRootNode()
public boolean isShowSettings()
public void setShowSettings(boolean showSettings)
showSettings
- Sets true/falseprotected BitmapFont loadGuiFont()
public void initialize()
Application
Initializes the Application
, by creating a display and
default camera. If display settings are not specified, a default
640x480 display is created. Default values are used for the camera;
perspective projection with 45° field of view, with near
and far values 1 and 1000 units respectively.
initialize
in interface SystemListener
initialize
in class Application
public void update()
Application
update
in interface SystemListener
update
in class Application
public void setDisplayFps(boolean show)
public void setDisplayStatView(boolean show)
public abstract void simpleInitApp()
public void simpleUpdate(float tpf)
public void simpleRender(RenderManager rm)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |