VRAppState instead.public abstract class VRApplication extends java.lang.Object implements Application, SystemListener
This class is no more functional and is deprecated. Please use VRAppState instead.
| Modifier and Type | Class and Description |
|---|---|
static class |
VRApplication.PreconfigParameter
Deprecated.
VR application configuration parameters.
|
| Modifier and Type | Field and Description |
|---|---|
boolean |
CONSTRUCT_WITH_OSVR
Deprecated.
Is the application is based on OSVR (default is
false). |
float |
DEFAULT_ASPECT
Deprecated.
The default aspect ratio.
|
float |
DEFAULT_FOV
Deprecated.
The default FOV.
|
boolean |
DISABLE_VR
Deprecated.
Is the application has not to start within VR mode (default is
false). |
protected Node |
guiNode
Deprecated.
|
protected Node |
rootNode
Deprecated.
|
| Constructor and Description |
|---|
VRApplication()
Deprecated.
|
VRApplication(AppState... initialStates)
Deprecated.
Create a new VR application and attach the given
app states.The application scene is made of a root node that holds the scene spatials
and a GUI node that is the root of the Graphical user interface. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
compositorAllowed()
Deprecated.
Is the SteamVR compositor is active.
|
void |
destroy()
Deprecated.
Destroy the application (release all resources).
|
protected void |
destroyInput()
Deprecated.
|
<V> java.util.concurrent.Future<V> |
enqueue(java.util.concurrent.Callable<V> callable)
Deprecated.
Enqueues a task/callable object to execute in the jME3
rendering thread.
|
void |
enqueue(java.lang.Runnable runnable)
Deprecated.
Enqueues a runnable object to execute in the jME3
rendering thread.
|
void |
gainFocus()
Deprecated.
Force the focus gain for the application.
|
AppProfiler |
getAppProfiler()
Deprecated.
Returns the current AppProfiler hook, or null if none is set.
|
AssetManager |
getAssetManager()
Deprecated.
|
AudioRenderer |
getAudioRenderer()
Deprecated.
|
Camera |
getBaseCamera()
Deprecated.
Get the application internal camera.
|
Camera |
getCamera()
Deprecated.
|
JmeContext |
getContext()
Deprecated.
|
Vector3f |
getFinalObserverPosition()
Deprecated.
Get the observer final position within the scene.
|
Quaternion |
getFinalObserverRotation()
Deprecated.
Get the observer final rotation within the scene.
|
Node |
getGuiNode()
Deprecated.
Get the GUI node from the application.
|
ViewPort |
getGuiViewPort()
Deprecated.
|
InputManager |
getInputManager()
Deprecated.
|
ViewPort |
getLeftViewPort()
Deprecated.
Get the VR headset left viewport.
|
Listener |
getListener()
Deprecated.
|
LostFocusBehavior |
getLostFocusBehavior()
Deprecated.
Determine the application's behavior when unfocused.
|
java.lang.Object |
getObserver()
Deprecated.
Get the scene observer.
|
Renderer |
getRenderer()
Deprecated.
|
RenderManager |
getRenderManager()
Deprecated.
|
ViewPort |
getRightViewPort()
Deprecated.
Get the VR headset right viewport.
|
Node |
getRootNode()
Deprecated.
Get the root node of the application.
|
AppStateManager |
getStateManager()
Deprecated.
|
Timer |
getTimer()
Deprecated.
|
ViewPort |
getViewPort()
Deprecated.
|
VRGuiManager |
getVRGUIManager()
Deprecated.
Get the GUI manager attached to this application.
|
VRAPI |
getVRHardware()
Deprecated.
Get the VR underlying hardware.
|
float |
getVRHeightAdjustment()
Deprecated.
Get the VR headset height from the ground.
|
VRInputAPI |
getVRinput()
Deprecated.
Get the VR dedicated input.
|
OpenVRMouseManager |
getVRMouseManager()
Deprecated.
Get the VR mouse manager attached to this application.
|
OpenVRViewManager |
getVRViewManager()
Deprecated.
Get the VR view manager.
|
void |
handleError(java.lang.String errMsg,
java.lang.Throwable t)
Deprecated.
Handle the error given in parameters by creating a log entry and a dialog window.
|
boolean |
hasTraditionalGUIOverlay()
Deprecated.
Check if the application has a GUI overlay attached.
|
void |
initialize()
Deprecated.
Callback to indicate the application to initialize.
|
boolean |
isInstanceVRRendering()
Deprecated.
Check if the rendering is instanced (see Geometry instancing).
|
boolean |
isInVR()
Deprecated.
Check if the VR mode is enabled.
|
boolean |
isOSVRSupported()
Deprecated.
Get if the system currently support VR.
|
boolean |
isPauseOnLostFocus()
Deprecated.
Get if the application has to pause then it lost the focus.
|
boolean |
isSeatedExperience()
Deprecated.
Check if the application is configured as a seated experience.
|
void |
loseFocus()
Deprecated.
Force the focus lost for the application.
|
void |
moveScreenProcessingToVR()
Deprecated.
Move filters from the main scene into the eye's.
|
void |
preconfigureVRApp(VRApplication.PreconfigParameter parm,
boolean value)
Deprecated.
Set VR application
specific parameter. |
void |
requestClose(boolean esc)
Deprecated.
Request the application to close.
|
void |
resetSeatedPose()
Deprecated.
Reset headset pose if seating experience.
|
void |
reshape(int w,
int h)
Deprecated.
Reshape the display window.
|
void |
restart()
Deprecated.
Restarts the context, applying any changed settings.
|
protected void |
runQueuedTasks()
Deprecated.
Runs tasks enqueued via
enqueue(Callable) |
void |
setAppProfiler(AppProfiler prof)
Deprecated.
Sets an AppProfiler hook that will be called back for
specific steps within a single update frame.
|
void |
setBackgroundColors(ColorRGBA clr)
Deprecated.
Set the background color for both left and right view ports.
|
void |
setFrustrumNearFar(float near,
float far)
Deprecated.
Set the frustum values for the application.
|
void |
setGuiNode(Node node)
Deprecated.
Set the GUI node that is displayed within the GUI viewport.
|
void |
setLostFocusBehavior(LostFocusBehavior lostFocusBehavior)
Deprecated.
Change the application's behavior when unfocused.
|
void |
setMirrorWindowSize(int width,
int height)
Deprecated.
Set the mirror window size in pixel.
|
void |
setObserver(Spatial observer)
Deprecated.
Set the scene observer.
|
void |
setPauseOnLostFocus(boolean pauseOnLostFocus)
Deprecated.
Enable or disable pause on lost focus.
|
void |
setResolutionMultiplier(float val)
Deprecated.
Set the resolution multiplier.
|
void |
setSeatedExperience(boolean isSeated)
Deprecated.
Can be used to change seated experience during runtime.
|
void |
setSettings(AppSettings settings)
Deprecated.
Set the
display settings to define the display created. |
void |
setTimer(Timer timer)
Deprecated.
Sets the
Timer implementation that will be used for calculating
frame times.By default, Application will use the Timer as returned by the current JmeContext implementation. |
void |
setVRHeightAdjustment(float amount)
Deprecated.
Set the VR headset height from the ground.
|
abstract void |
simpleInitApp()
Deprecated.
Initialize the application.
|
void |
simpleRender(RenderManager renderManager)
Deprecated.
Rendering callback of the application.
|
void |
simpleUpdate(float tpf)
Deprecated.
Simple update of the application, this method should contains
root node updates. |
void |
start()
Deprecated.
Starts the application.
|
void |
start(boolean waitFor)
Deprecated.
Starts the application in
display mode. |
void |
start(JmeContext.Type contextType,
boolean waitFor)
Deprecated.
Starts the application.
|
void |
stop()
Deprecated.
Requests the context to close, shutting down the main loop
and making necessary cleanup operations.
|
void |
stop(boolean waitFor)
Deprecated.
Requests the context to close, shutting down the main loop
and making necessary cleanup operations.
|
void |
update()
Deprecated.
Callback to update the application state, and render the scene
to the back buffer.
|
public float DEFAULT_FOV
public float DEFAULT_ASPECT
public boolean CONSTRUCT_WITH_OSVR
false).public boolean DISABLE_VR
false).protected Node guiNode
protected Node rootNode
public VRApplication(AppState... initialStates)
app states.root node that holds the scene spatials
and a GUI node that is the root of the Graphical user interface.initialStates - the app states to attach to the application.public VRApplication()
public VRAPI getVRHardware()
public VRInputAPI getVRinput()
public OpenVRViewManager getVRViewManager()
public VRGuiManager getVRGUIManager()
public OpenVRMouseManager getVRMouseManager()
public void setFrustrumNearFar(float near,
float far)
near - the frustum near value.far - the frustum far value.public void setMirrorWindowSize(int width,
int height)
width - the width of the mirror window in pixel.height - the height of the mirror window in pixel.public void setResolutionMultiplier(float val)
val - the resolution multiplier.public boolean compositorAllowed()
true if the SteamVR compositor is active and false otherwise.public boolean isOSVRSupported()
true if the system currently support VR and false otherwise.public void simpleUpdate(float tpf)
root node updates.
This method is called by the update() method and should not be called manually.tpf - the application time.public void simpleRender(RenderManager renderManager)
update() method and should not be called manually.renderManager - the render manager.public Camera getCamera()
getCamera in interface Applicationcamera for the applicationpublic Camera getBaseCamera()
getCamera()public JmeContext getContext()
getContext in interface Applicationdisplay context for the applicationpublic AssetManager getAssetManager()
getAssetManager in interface Applicationasset manager for this application.public InputManager getInputManager()
getInputManager in interface Applicationinput manager.public AppStateManager getStateManager()
getStateManager in interface Applicationapp state managerpublic RenderManager getRenderManager()
getRenderManager in interface Applicationrender managerpublic Renderer getRenderer()
getRenderer in interface Applicationrenderer for the applicationpublic AudioRenderer getAudioRenderer()
getAudioRenderer in interface Applicationaudio renderer for the applicationpublic Listener getListener()
getListener in interface Applicationlistener object for audiopublic Timer getTimer()
getTimer in interface Applicationpublic void handleError(java.lang.String errMsg,
java.lang.Throwable t)
handleError in interface SystemListenererrMsg - The error message, if any, or null.t - Throwable object, or null.public void gainFocus()
gainFocus in interface SystemListenerpublic void loseFocus()
loseFocus in interface SystemListenerpublic void reshape(int w,
int h)
reshape in interface SystemListenerpublic void requestClose(boolean esc)
requestClose in interface SystemListeneresc - If true, the user pressed ESC to close the application.public void setSettings(AppSettings settings)
display settings to define the display created.
Examples of display parameters include display frame width and height,
pixel color bit depth, z-buffer bits, anti-aliasing samples, update frequency, ...
If this method is called while the application is already running, then
restart() must be called to apply the settings to the display.
setSettings in interface Applicationsettings - The settings to set.public void setTimer(Timer timer)
Timer implementation that will be used for calculating
frame times.JmeContext implementation.setTimer in interface Applicationtimer - the timer to use.public LostFocusBehavior getLostFocusBehavior()
getLostFocusBehavior in interface Applicationpublic void setLostFocusBehavior(LostFocusBehavior lostFocusBehavior)
throttle the update loop
so as to not take 100% CPU usage when it is not in focus, e.g.
alt-tabbed, minimized, or obstructed by another window.setLostFocusBehavior in interface ApplicationlostFocusBehavior - The new lost focus behavior to use.LostFocusBehaviorpublic boolean isPauseOnLostFocus()
isPauseOnLostFocus in interface Applicationtrue if pause on lost focus is enabled, false otherwise.getLostFocusBehavior()public void setPauseOnLostFocus(boolean pauseOnLostFocus)
By default, pause on lost focus is enabled. If enabled, the application will stop updating when it loses focus or becomes inactive (e.g. alt-tab). For online or real-time applications, this might not be preferable, so this feature should be set to disabled. For other applications, it is best to keep it on so that CPU usage is not used when not necessary.
setPauseOnLostFocus in interface ApplicationpauseOnLostFocus - true to enable pause on lost focus, false
otherwise.setLostFocusBehavior(com.jme3.app.LostFocusBehavior)public void start()
Applicationstart in interface Applicationpublic void start(boolean waitFor)
display mode.start in interface ApplicationwaitFor - if true, the method will wait until the application is started.start(com.jme3.system.JmeContext.Type, boolean)public void start(JmeContext.Type contextType, boolean waitFor)
contextType - the type of the context to create.waitFor - if true, the method will wait until the application is started.java.lang.IllegalArgumentException - if the context type is not supported.public void moveScreenProcessingToVR()
public void preconfigureVRApp(VRApplication.PreconfigParameter parm, boolean value)
specific parameter.
If making changes to default values, this must be called before the VRApplication startsparm - the parameter to set.value - the value of the parameter.public void setSeatedExperience(boolean isSeated)
isSeated - true if designed for sitting, false for standing/roomscaleisSeatedExperience()public boolean isSeatedExperience()
true if the application is configured as a seated experience and false otherwise.setSeatedExperience(boolean)public void resetSeatedPose()
public boolean isInstanceVRRendering()
true if the rendering is instanced and false otherwise.public boolean isInVR()
true if the VR mode is enabled and false otherwise.public Node getGuiNode()
setGuiNode(Node)public void setGuiNode(Node node)
node - the GUI node to attach.getGuiNode()public Node getRootNode()
public boolean hasTraditionalGUIOverlay()
true if the application has a GUI overlay attached and false otherwise.public java.lang.Object getObserver()
camera.setObserver(Spatial)public void setObserver(Spatial observer)
camera.observer - the scene observer.public Quaternion getFinalObserverRotation()
getFinalObserverPosition()public Vector3f getFinalObserverPosition()
getFinalObserverRotation()public void setVRHeightAdjustment(float amount)
amount - the VR headset height from the ground.getVRHeightAdjustment()public float getVRHeightAdjustment()
setVRHeightAdjustment(float)public ViewPort getLeftViewPort()
getRightViewPort()public ViewPort getRightViewPort()
getLeftViewPort()public void setBackgroundColors(ColorRGBA clr)
clr - the background color.protected void runQueuedTasks()
enqueue(Callable)public void update()
SystemListenerupdate in interface SystemListenerpublic void initialize()
SystemListenerinitialize in interface SystemListenerpublic abstract void simpleInitApp()
public void destroy()
destroy in interface SystemListenerprotected void destroyInput()
public ViewPort getGuiViewPort()
getGuiViewPort in interface Applicationpublic ViewPort getViewPort()
getViewPort in interface Applicationpublic <V> java.util.concurrent.Future<V> enqueue(java.util.concurrent.Callable<V> callable)
ApplicationCallables are executed right at the beginning of the main loop. They are executed even if the application is currently paused or out of focus.
enqueue in interface Applicationcallable - The callable to run in the main jME3 threadpublic void enqueue(java.lang.Runnable runnable)
Runnables are executed right at the beginning of the main loop. They are executed even if the application is currently paused or out of focus.
enqueue in interface Applicationrunnable - The runnable to run in the main jME3 threadpublic void stop()
stop in interface Applicationstop(boolean)public void stop(boolean waitFor)
stop in interface Applicationpublic void restart()
Changes to the AppSettings of this Application are not
applied immediately; calling this method forces the context
to restart, applying the new settings.
restart in interface Applicationpublic void setAppProfiler(AppProfiler prof)
setAppProfiler in interface Applicationpublic AppProfiler getAppProfiler()
getAppProfiler in interface Application