Class VRApplication
- All Implemented Interfaces:
- Application,- SystemListener
 This class is no more functional and is deprecated. Please use VRAppState instead.
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic enumDeprecated.VR application configuration parameters.
- 
Field SummaryFields
- 
Constructor SummaryConstructorsConstructorDescriptionDeprecated.VRApplication(AppState... initialStates) Deprecated.Create a new VR application and attach the givenapp states.
 The application scene is made of aroot nodethat holds the scene spatials and aGUI nodethat is the root of the Graphical user interface.
- 
Method SummaryModifier and TypeMethodDescriptionbooleanDeprecated.Is the SteamVR compositor is active.voiddestroy()Deprecated.Destroy the application (release all resources).protected voidDeprecated.voidDeprecated.Enqueues a runnable object to execute in the jME3 rendering thread.<V> Future<V> Deprecated.Enqueues a task/callable object to execute in the jME3 rendering thread.voidDeprecated.Force the focus gain for the application.Deprecated.Returns the current AppProfiler hook, or null if none is set.Deprecated.Deprecated.Deprecated.Get the application internal camera.Deprecated.we do NOT want to get and modify the distortion scene camera, so return the left viewport camera instead if we are in VR modeDeprecated.Deprecated.Get the observer final position within the scene.Deprecated.Get the observer final rotation within the scene.Deprecated.Get the GUI node from the application.Deprecated.Deprecated.Deprecated.Get the VR headset left viewport.Deprecated.Deprecated.Determine the application's behavior when unfocused.Deprecated.Get the scene observer.Deprecated.Deprecated.Deprecated.Get the VR headset right viewport.Deprecated.Get the root node of the application.Deprecated.getTimer()Deprecated.Deprecated.Deprecated.Get the GUI manager attached to this application.Deprecated.Get the VR underlying hardware.floatDeprecated.Get the VR headset height from the ground.Deprecated.Get the VR dedicated input.Deprecated.Get the VR mouse manager attached to this application.Deprecated.Get the VR view manager.voidhandleError(String errMsg, Throwable t) Deprecated.Handle the error given in parameters by creating a log entry and a dialog window.booleanDeprecated.Check if the application has a GUI overlay attached.voidDeprecated.Callback to indicate the application to initialize.booleanDeprecated.Check if the rendering is instanced (see Geometry instancing).booleanisInVR()Deprecated.Check if the VR mode is enabled.booleanDeprecated.Get if the application has to pause then it lost the focus.booleanDeprecated.Check if the application is configured as a seated experience.voidDeprecated.Force the focus lost for the application.voidDeprecated.Move filters from the main scene into the eye's.voidpreconfigureVRApp(VRApplication.PreconfigParameter parm, boolean value) Deprecated.Set VR applicationspecific parameter.voidrequestClose(boolean esc) Deprecated.Request the application to close.voidDeprecated.Reset headset pose if seating experience.voidreshape(int w, int h) Deprecated.Reshape the display window.voidrestart()Deprecated.Restarts the context, applying any changed settings.protected voidDeprecated.Runs tasks enqueued viaenqueue(Callable)voidsetAppProfiler(AppProfiler prof) Deprecated.Sets an AppProfiler hook that will be called back for specific steps within a single update frame.voidDeprecated.Set the background color for both left and right view ports.voidsetFrustrumNearFar(float near, float far) Deprecated.Set the frustum values for the application.voidsetGuiNode(Node node) Deprecated.Set the GUI node that is displayed within the GUI viewport.voidsetLostFocusBehavior(LostFocusBehavior lostFocusBehavior) Deprecated.Change the application's behavior when unfocused.voidsetMirrorWindowSize(int width, int height) Deprecated.Set the mirror window size in pixel.voidsetObserver(Spatial observer) Deprecated.Set the scene observer.voidsetPauseOnLostFocus(boolean pauseOnLostFocus) Deprecated.Enable or disable pause on lost focus.voidsetResolutionMultiplier(float val) Deprecated.Set the resolution multiplier.voidsetSeatedExperience(boolean isSeated) Deprecated.Can be used to change seated experience during runtime.voidsetSettings(AppSettings settings) Deprecated.Set thedisplay settingsto define the display created.voidDeprecated.Sets theTimerimplementation that will be used for calculating frame times.
 By default, Application will use the Timer as returned by the currentJmeContextimplementation.voidsetVRHeightAdjustment(float amount) Deprecated.Set the VR headset height from the ground.abstract voidDeprecated.Initialize the application.voidsimpleRender(RenderManager renderManager) Deprecated.Rendering callback of the application.voidsimpleUpdate(float tpf) Deprecated.Simple update of the application, this method should containroot nodeupdates.voidstart()Deprecated.Starts the application.voidstart(boolean waitFor) Deprecated.Starts the application indisplaymode.voidstart(JmeContext.Type contextType, boolean waitFor) Deprecated.Starts the application.voidstop()Deprecated.Requests the context to close, shutting down the main loop and making necessary cleanup operations.voidstop(boolean waitFor) Deprecated.Requests the context to close, shutting down the main loop and making necessary cleanup operations.voidupdate()Deprecated.Callback to update the application state, and render the scene to the back buffer.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.jme3.system.SystemListenerrescale
- 
Field Details- 
DEFAULT_FOVpublic float DEFAULT_FOVDeprecated.The default FOV.
- 
DEFAULT_ASPECTpublic float DEFAULT_ASPECTDeprecated.The default aspect ratio.
- 
DISABLE_VRpublic boolean DISABLE_VRDeprecated.Is the application has not to start within VR mode (default isfalse).
- 
guiNodeDeprecated.
- 
rootNodeDeprecated.
 
- 
- 
Constructor Details- 
VRApplicationDeprecated.Create a new VR application and attach the givenapp states.
 The application scene is made of aroot nodethat holds the scene spatials and aGUI nodethat is the root of the Graphical user interface.- Parameters:
- initialStates- the- app statesto attach to the application.
 
- 
VRApplicationpublic VRApplication()Deprecated.
 
- 
- 
Method Details- 
getVRHardwareDeprecated.Get the VR underlying hardware.- Returns:
- the VR underlying hardware.
 
- 
getVRinputDeprecated.Get the VR dedicated input.- Returns:
- the VR dedicated input.
 
- 
getVRViewManagerDeprecated.Get the VR view manager.- Returns:
- the VR view manager.
 
- 
getVRGUIManagerDeprecated.Get the GUI manager attached to this application.- Returns:
- the GUI manager attached to this application.
 
- 
getVRMouseManagerDeprecated.Get the VR mouse manager attached to this application.- Returns:
- the VR mouse manager attached to this application.
 
- 
setFrustrumNearFarpublic void setFrustrumNearFar(float near, float far) Deprecated.Set the frustum values for the application.- Parameters:
- near- the frustum near value.
- far- the frustum far value.
 
- 
setMirrorWindowSizepublic void setMirrorWindowSize(int width, int height) Deprecated.Set the mirror window size in pixel.- Parameters:
- width- the width of the mirror window in pixel.
- height- the height of the mirror window in pixel.
 
- 
setResolutionMultiplierpublic void setResolutionMultiplier(float val) Deprecated.Set the resolution multiplier.- Parameters:
- val- the resolution multiplier.
 
- 
compositorAllowedpublic boolean compositorAllowed()Deprecated.Is the SteamVR compositor is active.- Returns:
- trueif the SteamVR compositor is active and- falseotherwise.
 
- 
simpleUpdatepublic void simpleUpdate(float tpf) Deprecated.Simple update of the application, this method should containroot nodeupdates. This method is called by theupdate()method and should not be called manually.- Parameters:
- tpf- the application time.
 
- 
simpleRenderDeprecated.Rendering callback of the application. This method is called by theupdate()method and should not be called manually.- Parameters:
- renderManager- the- render manager.
 
- 
getCameraDeprecated.we do NOT want to get and modify the distortion scene camera, so return the left viewport camera instead if we are in VR mode- Specified by:
- getCamerain interface- Application
- Returns:
- The main camerafor the application
 
- 
getBaseCameraDeprecated.Get the application internal camera.- Returns:
- the application internal camera.
- See Also:
 
- 
getContextDeprecated.- Specified by:
- getContextin interface- Application
- Returns:
- The display contextfor the application
 
- 
getAssetManagerDeprecated.- Specified by:
- getAssetManagerin interface- Application
- Returns:
- The asset managerfor this application.
 
- 
getInputManagerDeprecated.- Specified by:
- getInputManagerin interface- Application
- Returns:
- the input manager.
 
- 
getStateManagerDeprecated.- Specified by:
- getStateManagerin interface- Application
- Returns:
- the app state manager
 
- 
getRenderManagerDeprecated.- Specified by:
- getRenderManagerin interface- Application
- Returns:
- the render manager
 
- 
getRendererDeprecated.- Specified by:
- getRendererin interface- Application
- Returns:
- The rendererfor the application
 
- 
getAudioRendererDeprecated.- Specified by:
- getAudioRendererin interface- Application
- Returns:
- The audio rendererfor the application
 
- 
getListenerDeprecated.- Specified by:
- getListenerin interface- Application
- Returns:
- The listenerobject for audio
 
- 
getTimerDeprecated.- Specified by:
- getTimerin interface- Application
 
- 
handleErrorDeprecated.Handle the error given in parameters by creating a log entry and a dialog window. Internal use only.- Specified by:
- handleErrorin interface- SystemListener
- Parameters:
- errMsg- The error message, if any, or null.
- t- Throwable object, or null.
 
- 
gainFocuspublic void gainFocus()Deprecated.Force the focus gain for the application. Internal use only.- Specified by:
- gainFocusin interface- SystemListener
 
- 
loseFocuspublic void loseFocus()Deprecated.Force the focus lost for the application. Internal use only.- Specified by:
- loseFocusin interface- SystemListener
 
- 
reshapepublic void reshape(int w, int h) Deprecated.Reshape the display window. Internal use only.- Specified by:
- reshapein interface- SystemListener
- Parameters:
- w- the new width of the display (in pixels, ≥0)
- h- the new height of the display (in pixels, ≥0)
 
- 
requestClosepublic void requestClose(boolean esc) Deprecated.Request the application to close. Internal use only.- Specified by:
- requestClosein interface- SystemListener
- Parameters:
- esc- If true, the user pressed ESC to close the application.
 
- 
setSettingsDeprecated.Set thedisplay settingsto define the display created.Examples of display parameters include display frame widthandheight, pixelcolor bit depth,z-buffer bits,anti-aliasing samples,update frequency, ...
 If this method is called while the application is already running, thenrestart()must be called to apply the settings to the display.- Specified by:
- setSettingsin interface- Application
- Parameters:
- settings- The settings to set.
 
- 
setTimerDeprecated.Sets theTimerimplementation that will be used for calculating frame times.
 By default, Application will use the Timer as returned by the currentJmeContextimplementation.- Specified by:
- setTimerin interface- Application
- Parameters:
- timer- the timer to use.
 
- 
getLostFocusBehaviorDeprecated.Determine the application's behavior when unfocused.- Specified by:
- getLostFocusBehaviorin interface- Application
- Returns:
- The lost focus behavior of the application.
 
- 
setLostFocusBehaviorDeprecated.Change the application's behavior when unfocused. By default, the application willthrottle the update loopso as to not take 100% CPU usage when it is not in focus, e.g. alt-tabbed, minimized, or obstructed by another window.- Specified by:
- setLostFocusBehaviorin interface- Application
- Parameters:
- lostFocusBehavior- The new- lost focus behaviorto use.
- See Also:
 
- 
isPauseOnLostFocuspublic boolean isPauseOnLostFocus()Deprecated.Get if the application has to pause then it lost the focus.- Specified by:
- isPauseOnLostFocusin interface- Application
- Returns:
- trueif pause on lost focus is enabled,- falseotherwise.
- See Also:
 
- 
setPauseOnLostFocuspublic void setPauseOnLostFocus(boolean pauseOnLostFocus) Deprecated.Enable or disable pause on lost focus.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. - Specified by:
- setPauseOnLostFocusin interface- Application
- Parameters:
- pauseOnLostFocus-- trueto enable pause on lost focus,- falseotherwise.
- See Also:
 
- 
startpublic void start()Deprecated.Description copied from interface:ApplicationStarts the application. A bug occurring when using LWJGL3 prevents this method from returning until after the application is stopped on macOS.- Specified by:
- startin interface- Application
 
- 
startpublic void start(boolean waitFor) Deprecated.Starts the application indisplaymode.- Specified by:
- startin interface- Application
- Parameters:
- waitFor- if- true, the method will wait until the application is started.
- See Also:
 
- 
startDeprecated.Starts the application. Creating a rendering context and executing the main loop in a separate thread.- Parameters:
- contextType- the- typeof the context to create.
- waitFor- if- true, the method will wait until the application is started.
- Throws:
- IllegalArgumentException- if the context type is not supported.
 
- 
moveScreenProcessingToVRpublic void moveScreenProcessingToVR()Deprecated.Move filters from the main scene into the eye's. This removes filters from the main scene.
- 
preconfigureVRAppDeprecated.Set VR applicationspecific parameter. If making changes to default values, this must be called before the VRApplication starts- Parameters:
- parm- the parameter to set.
- value- the value of the parameter.
 
- 
setSeatedExperiencepublic void setSeatedExperience(boolean isSeated) Deprecated.Can be used to change seated experience during runtime.- Parameters:
- isSeated-- trueif designed for sitting,- falsefor standing/roomscale
- See Also:
 
- 
isSeatedExperiencepublic boolean isSeatedExperience()Deprecated.Check if the application is configured as a seated experience.- Returns:
- trueif the application is configured as a seated experience and- falseotherwise.
- See Also:
 
- 
resetSeatedPosepublic void resetSeatedPose()Deprecated.Reset headset pose if seating experience.
- 
isInstanceVRRenderingpublic boolean isInstanceVRRendering()Deprecated.Check if the rendering is instanced (see Geometry instancing).- Returns:
- trueif the rendering is instanced and- falseotherwise.
 
- 
isInVRpublic boolean isInVR()Deprecated.Check if the VR mode is enabled.- Returns:
- trueif the VR mode is enabled and- falseotherwise.
 
- 
getGuiNodeDeprecated.Get the GUI node from the application.- Returns:
- the GUI node from the application.
- See Also:
 
- 
setGuiNodeDeprecated.Set the GUI node that is displayed within the GUI viewport. Calling this method involve clearing all the scenes previously attached to the gui viewport.- Parameters:
- node- the GUI node to attach.
- See Also:
 
- 
getRootNodeDeprecated.Get the root node of the application.- Returns:
- the root node of the application.
 
- 
hasTraditionalGUIOverlaypublic boolean hasTraditionalGUIOverlay()Deprecated.Check if the application has a GUI overlay attached.- Returns:
- trueif the application has a GUI overlay attached and- falseotherwise.
 
- 
getObserverDeprecated.Get the scene observer. If no observer has been set, this method return the applicationcamera.- Returns:
- the scene observer.
- See Also:
 
- 
setObserverDeprecated.Set the scene observer. The VR headset will be linked to it. If no observer is set, the VR headset is linked to the applicationcamera.- Parameters:
- observer- the scene observer.
 
- 
getFinalObserverRotationDeprecated.Get the observer final rotation within the scene.- Returns:
- the observer final rotation within the scene.
- See Also:
 
- 
getFinalObserverPositionDeprecated.Get the observer final position within the scene.- Returns:
- the observer position.
- See Also:
 
- 
setVRHeightAdjustmentpublic void setVRHeightAdjustment(float amount) Deprecated.Set the VR headset height from the ground.- Parameters:
- amount- the VR headset height from the ground.
- See Also:
 
- 
getVRHeightAdjustmentpublic float getVRHeightAdjustment()Deprecated.Get the VR headset height from the ground.- Returns:
- the VR headset height from the ground.
- See Also:
 
- 
getLeftViewPortDeprecated.Get the VR headset left viewport.- Returns:
- the VR headset left viewport.
- See Also:
 
- 
getRightViewPortDeprecated.Get the VR headset right viewport.- Returns:
- the VR headset right viewport.
- See Also:
 
- 
setBackgroundColorsDeprecated.Set the background color for both left and right view ports.- Parameters:
- clr- the background color.
 
- 
runQueuedTasksprotected void runQueuedTasks()Deprecated.Runs tasks enqueued viaenqueue(Callable)
- 
updatepublic void update()Deprecated.Description copied from interface:SystemListenerCallback to update the application state, and render the scene to the back buffer.- Specified by:
- updatein interface- SystemListener
 
- 
initializepublic void initialize()Deprecated.Description copied from interface:SystemListenerCallback to indicate the application to initialize. This method is called in the GL/Rendering thread so any GL-dependent resources can be initialized.- Specified by:
- initializein interface- SystemListener
 
- 
simpleInitApppublic abstract void simpleInitApp()Deprecated.Initialize the application. This method has to be overridden by implementations.
- 
destroypublic void destroy()Deprecated.Destroy the application (release all resources).- Specified by:
- destroyin interface- SystemListener
 
- 
destroyInputprotected void destroyInput()Deprecated.
- 
getGuiViewPortDeprecated.- Specified by:
- getGuiViewPortin interface- Application
- Returns:
- The GUI viewport. Which is used for the on screen statistics and FPS.
 
- 
getViewPortDeprecated.- Specified by:
- getViewPortin interface- Application
 
- 
enqueueDeprecated.Description copied from interface:ApplicationEnqueues a task/callable object to execute in the jME3 rendering thread.Callables are executed right at the beginning of the main loop. They are executed even if the application is currently paused or out of focus. - Specified by:
- enqueuein interface- Application
- Type Parameters:
- V- type of result returned by the Callable
- Parameters:
- callable- The callable to run in the main jME3 thread
- Returns:
- a new instance
 
- 
enqueueDeprecated.Enqueues a runnable object to execute in the jME3 rendering thread.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. - Specified by:
- enqueuein interface- Application
- Parameters:
- runnable- The runnable to run in the main jME3 thread
 
- 
stoppublic void stop()Deprecated.Requests the context to close, shutting down the main loop and making necessary cleanup operations. Same as calling stop(false)- Specified by:
- stopin interface- Application
- See Also:
 
- 
stoppublic void stop(boolean waitFor) Deprecated.Requests the context to close, shutting down the main loop and making necessary cleanup operations. After the application has stopped, it cannot be used anymore.- Specified by:
- stopin interface- Application
- Parameters:
- waitFor- true→wait for the context to be fully destroyed, false→don't wait
 
- 
restartpublic void restart()Deprecated.Restarts the context, applying any changed settings.Changes to the AppSettingsof this Application are not applied immediately; calling this method forces the context to restart, applying the new settings.- Specified by:
- restartin interface- Application
 
- 
setAppProfilerDeprecated.Sets an AppProfiler hook that will be called back for specific steps within a single update frame. Value defaults to null.- Specified by:
- setAppProfilerin interface- Application
- Parameters:
- prof- the profiler to use (alias created) or null for none (default=null)
 
- 
getAppProfilerDeprecated.Returns the current AppProfiler hook, or null if none is set.- Specified by:
- getAppProfilerin interface- Application
- Returns:
- the pre-existing instance, or null if none
 
 
- 
VRAppStateinstead.