|
|
@@ -62,28 +62,36 @@ Internally, com.jme3.app.SimpleApplication extends com.jme3.app.Application. The
|
|
|
a|Application class fields
|
|
|
a|Purpose
|
|
|
|
|
|
-a|viewPort +getViewPort()
|
|
|
+a|viewPort +
|
|
|
+getViewPort()
|
|
|
a|The view object for the default camera. You can register advanced <<jme3/advanced/effects_overview#,post-processor filters>> here.
|
|
|
|
|
|
-a|settings +setSettings()
|
|
|
+a|settings +
|
|
|
+setSettings()
|
|
|
a|Use this <<jme3/intermediate/appsettings#,AppSettings>> object to specify the display width and height (by default 640x480), color bit depth, z-buffer bits, anti-aliasing samples, and update frequency, video and audio renderer, asset manager. See: <<jme3/intermediate/appsettings#,AppSettings>>.
|
|
|
|
|
|
-a|cam +getCamera()
|
|
|
+a|cam +
|
|
|
+getCamera()
|
|
|
a|The default <<jme3/advanced/camera#,camera>> provides perspective projection, 45° field of view, near plane = 1 wu, far plane = 1000 wu.
|
|
|
|
|
|
-a|assetManager +getAssetManager()
|
|
|
+a|assetManager +
|
|
|
+getAssetManager()
|
|
|
a|An object that manages paths for loading models, textures, materials, sounds, etc. By default the <<jme3/advanced/asset_manager#,Asset Manager>> paths are relative to your project's root directory.
|
|
|
|
|
|
-a|audioRenderer +getAudioRenderer()
|
|
|
+a|audioRenderer +
|
|
|
+getAudioRenderer()
|
|
|
a|This object gives you access to the jME3 <<jme3/advanced/audio#,audio>> system.
|
|
|
|
|
|
-a|listener +getListener()
|
|
|
+a|listener +
|
|
|
+getListener()
|
|
|
a|This object represents the user's ear for the jME3 <<jme3/advanced/audio#,audio>> system.
|
|
|
|
|
|
-a|inputManager +getInputManager()
|
|
|
+a|inputManager +
|
|
|
+getInputManager()
|
|
|
a|Use the <<jme3/advanced/input_handling#,inputManager>> to configure your custom inputs (mouse movement, clicks, key presses, etc) and set mouse pointer visibility.
|
|
|
|
|
|
-a|stateManager +getStateManager()
|
|
|
+a|stateManager +
|
|
|
+getStateManager()
|
|
|
a|You use the Application's state manager to activate <<jme3/advanced/application_states#,AppStates>>, such as <<jme3/advanced/physics#,Physics>>.
|
|
|
|
|
|
|===
|
|
|
@@ -106,7 +114,11 @@ a|stop()
|
|
|
a|Stops the running jME3 game and closes the jME3 window.
|
|
|
|
|
|
a|start(Type.Headless) etc
|
|
|
-a|Switch Context com.jme3.system.JmeContext.Type when starting the application: +Type.Display – jME application runs in a window of its own. (This is the default.)+Type.Canvas – jME application is embedded in a <<jme3/advanced/swing_canvas#,Swing Canvas>>. +Type.Headless – jME application runs its event loop without calculating any view and without opening any window. Can be used for a <<jme3/advanced/headless_server#,Headless Server>> application.+Type.OffscreenSurface – jME application view is not shown and no window opens, but everything calculated and cached as bitmap (back buffer) for use by other applications.
|
|
|
+a|Switch Context com.jme3.system.JmeContext.Type when starting the application: +
|
|
|
+Type.Display – jME application runs in a window of its own. (This is the default.)+
|
|
|
+Type.Canvas – jME application is embedded in a <<jme3/advanced/swing_canvas#,Swing Canvas>>. +
|
|
|
+Type.Headless – jME application runs its event loop without calculating any view and without opening any window. Can be used for a <<jme3/advanced/headless_server#,Headless Server>> application. +
|
|
|
+Type.OffscreenSurface – jME application view is not shown and no window opens, but everything calculated and cached as bitmap (back buffer) for use by other applications.
|
|
|
|
|
|
|===
|
|
|
[cols="2", options="header"]
|
|
|
@@ -115,16 +127,20 @@ a|Switch Context com.jme3.system.JmeContext.Type when starting the appl
|
|
|
a|Internal class field/method
|
|
|
a|Purpose
|
|
|
|
|
|
-a|context +getContext()
|
|
|
+a|context +
|
|
|
+getContext()
|
|
|
a|The application context contains the renderer, <<jme3/intermediate/appsettings#,AppSettings>>, timer, etc. Typically, you do not directly access the context object.
|
|
|
|
|
|
a|inputEnabled
|
|
|
a|this internal boolean is true if you want the system to listen for user inputs, and false if you just want to play a non-interactive scene. You change the boolean using <<jme3/intermediate/appsettings#,AppSettings>>.
|
|
|
|
|
|
-a|keyInput, mouseInput +joyInput, touchInput
|
|
|
+a|keyInput, mouseInput, joyInput, touchInput
|
|
|
a|Default input contexts for keyboard, mouse, and joystick. Internally used to enable handling of joysticks or touch devices. The base classes contain key and mouse button enums.
|
|
|
|
|
|
-a|renderManager +getRenderManager() +renderer +getRenderer();
|
|
|
+a|renderManager +
|
|
|
+getRenderManager() +
|
|
|
+renderer +
|
|
|
+getRenderer();
|
|
|
a|Low-level and high-level rendering interface. Mostly used internally.
|
|
|
|
|
|
a|guiViewPort +getGuiViewPort()
|
|
|
@@ -154,13 +170,16 @@ Additional to the functionality that Application brings, SimpleApplication offer
|
|
|
a|SimpleApplication Class Field
|
|
|
a|Purpose
|
|
|
|
|
|
-a|rootNode +getRootNode()
|
|
|
+a|rootNode +
|
|
|
+getRootNode()
|
|
|
a|The root node of the scene graph. Attach a <<jme3/advanced/spatial#,Spatial>> to the rootNode and it appears in the 3D scene.
|
|
|
|
|
|
-a|guiNode +getGuiNode()
|
|
|
+a|guiNode +
|
|
|
+getGuiNode()
|
|
|
a|Attach flat +++<abbr title="Graphical User Interface">GUI</abbr>+++ elements (such as <<jme3/advanced/hud#,HUD>> images and text) to this orthogonal +++<abbr title="Graphical User Interface">GUI</abbr>+++ node to make them appear on the screen.
|
|
|
|
|
|
-a|flyCam +getFlyByCamera()
|
|
|
+a|flyCam +
|
|
|
+getFlyByCamera()
|
|
|
a|The default first-person fly-by camera control. This default camera control lets you navigate the 3D scene using the preconfigured WASD and arrow keys and the mouse.
|
|
|
|
|
|
|===
|
|
|
@@ -193,7 +212,8 @@ a|public void simpleInitApp()
|
|
|
a|Override this method to initialize the game scene. Here you load and create objects, attach Spatials to the rootNode, and bring everything in its starts position. See also <<jme3/advanced/application_states#,Application States>> for best practices.
|
|
|
|
|
|
a|public void simpleUpdate(float tpf)
|
|
|
-a|Override this method to hook into the <<jme3/advanced/update_loop#,update loop>>, all code you put here is repeated in a loop. Use this loop to poll the current game state and respond to changes, or to let the game mechanics generate encounters and initiate state changes. Use the float `tpf` as a factor to time actions relative to the _time per frame_ in seconds: `tpf` is large on slow PCs, and small on fast PCs. +For more info on how to hook into the <<jme3/advanced/update_loop#,update loop>>, see <<jme3/advanced/application_states#,Application States>> and <<jme3/advanced/custom_controls#,Custom Controls>>.
|
|
|
+a|Override this method to hook into the <<jme3/advanced/update_loop#,update loop>>, all code you put here is repeated in a loop. Use this loop to poll the current game state and respond to changes, or to let the game mechanics generate encounters and initiate state changes. Use the float `tpf` as a factor to time actions relative to the _time per frame_ in seconds: `tpf` is large on slow PCs, and small on fast PCs. +
|
|
|
+For more info on how to hook into the <<jme3/advanced/update_loop#,update loop>>, see <<jme3/advanced/application_states#,Application States>> and <<jme3/advanced/custom_controls#,Custom Controls>>.
|
|
|
|
|
|
a|public void simpleRender(RenderManager rm)
|
|
|
a|*Optional:* Advanced developers can override this method if the need to modify the frameBuffer and scene graph directly.
|