Class VRApplication
- All Implemented Interfaces:
Application,SystemListener
This class is no more functional and is deprecated. Please use VRAppState instead.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumDeprecated.VR application configuration parameters. -
Field Summary
FieldsModifier and TypeFieldDescriptionbooleanDeprecated.Is the application is based on OSVR (default isfalse).floatDeprecated.The default aspect ratio.floatDeprecated.The default FOV.booleanDeprecated.Is the application has not to start within VR mode (default isfalse).protected NodeDeprecated.protected NodeDeprecated. -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.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 Summary
Modifier 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 system currently support VR.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.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.jme3.system.SystemListener
rescale
-
Field Details
-
DEFAULT_FOV
public float DEFAULT_FOVDeprecated.The default FOV. -
DEFAULT_ASPECT
public float DEFAULT_ASPECTDeprecated.The default aspect ratio. -
CONSTRUCT_WITH_OSVR
public boolean CONSTRUCT_WITH_OSVRDeprecated.Is the application is based on OSVR (default isfalse). -
DISABLE_VR
public boolean DISABLE_VRDeprecated.Is the application has not to start within VR mode (default isfalse). -
guiNode
Deprecated. -
rootNode
Deprecated.
-
-
Constructor Details
-
VRApplication
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.- Parameters:
initialStates- theapp statesto attach to the application.
-
VRApplication
public VRApplication()Deprecated.
-
-
Method Details
-
getVRHardware
Deprecated.Get the VR underlying hardware.- Returns:
- the VR underlying hardware.
-
getVRinput
Deprecated.Get the VR dedicated input.- Returns:
- the VR dedicated input.
-
getVRViewManager
Deprecated.Get the VR view manager.- Returns:
- the VR view manager.
-
getVRGUIManager
Deprecated.Get the GUI manager attached to this application.- Returns:
- the GUI manager attached to this application.
-
getVRMouseManager
Deprecated.Get the VR mouse manager attached to this application.- Returns:
- the VR mouse manager attached to this application.
-
setFrustrumNearFar
public 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.
-
setMirrorWindowSize
public 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.
-
setResolutionMultiplier
public void setResolutionMultiplier(float val) Deprecated.Set the resolution multiplier.- Parameters:
val- the resolution multiplier.
-
compositorAllowed
public boolean compositorAllowed()Deprecated.Is the SteamVR compositor is active.- Returns:
trueif the SteamVR compositor is active andfalseotherwise.
-
isOSVRSupported
public boolean isOSVRSupported()Deprecated.Get if the system currently support VR.- Returns:
trueif the system currently support VR andfalseotherwise.
-
simpleUpdate
public 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.
-
simpleRender
Deprecated.Rendering callback of the application. This method is called by theupdate()method and should not be called manually.- Parameters:
renderManager- therender manager.
-
getCamera
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 mode- Specified by:
getCamerain interfaceApplication- Returns:
- The main
camerafor the application
-
getBaseCamera
Deprecated.Get the application internal camera.- Returns:
- the application internal camera.
- See Also:
-
getContext
Deprecated.- Specified by:
getContextin interfaceApplication- Returns:
- The
display contextfor the application
-
getAssetManager
Deprecated.- Specified by:
getAssetManagerin interfaceApplication- Returns:
- The
asset managerfor this application.
-
getInputManager
Deprecated.- Specified by:
getInputManagerin interfaceApplication- Returns:
- the
input manager.
-
getStateManager
Deprecated.- Specified by:
getStateManagerin interfaceApplication- Returns:
- the
app state manager
-
getRenderManager
Deprecated.- Specified by:
getRenderManagerin interfaceApplication- Returns:
- the
render manager
-
getRenderer
Deprecated.- Specified by:
getRendererin interfaceApplication- Returns:
- The
rendererfor the application
-
getAudioRenderer
Deprecated.- Specified by:
getAudioRendererin interfaceApplication- Returns:
- The
audio rendererfor the application
-
getListener
Deprecated.- Specified by:
getListenerin interfaceApplication- Returns:
- The
listenerobject for audio
-
getTimer
Deprecated.- Specified by:
getTimerin interfaceApplication
-
handleError
Deprecated.Handle the error given in parameters by creating a log entry and a dialog window. Internal use only.- Specified by:
handleErrorin interfaceSystemListener- Parameters:
errMsg- The error message, if any, or null.t- Throwable object, or null.
-
gainFocus
public void gainFocus()Deprecated.Force the focus gain for the application. Internal use only.- Specified by:
gainFocusin interfaceSystemListener
-
loseFocus
public void loseFocus()Deprecated.Force the focus lost for the application. Internal use only.- Specified by:
loseFocusin interfaceSystemListener
-
reshape
public void reshape(int w, int h) Deprecated.Reshape the display window. Internal use only.- Specified by:
reshapein interfaceSystemListener- Parameters:
w- the new width of the display (in pixels, ≥0)h- the new height of the display (in pixels, ≥0)
-
requestClose
public void requestClose(boolean esc) Deprecated.Request the application to close. Internal use only.- Specified by:
requestClosein interfaceSystemListener- Parameters:
esc- If true, the user pressed ESC to close the application.
-
setSettings
Deprecated.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 interfaceApplication- Parameters:
settings- The settings to set.
-
setTimer
Deprecated.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 interfaceApplication- Parameters:
timer- the timer to use.
-
getLostFocusBehavior
Deprecated.Determine the application's behavior when unfocused.- Specified by:
getLostFocusBehaviorin interfaceApplication- Returns:
- The lost focus behavior of the application.
-
setLostFocusBehavior
Deprecated.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 interfaceApplication- Parameters:
lostFocusBehavior- The newlost focus behaviorto use.- See Also:
-
isPauseOnLostFocus
public boolean isPauseOnLostFocus()Deprecated.Get if the application has to pause then it lost the focus.- Specified by:
isPauseOnLostFocusin interfaceApplication- Returns:
trueif pause on lost focus is enabled,falseotherwise.- See Also:
-
setPauseOnLostFocus
public 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 interfaceApplication- Parameters:
pauseOnLostFocus-trueto enable pause on lost focus,falseotherwise.- See Also:
-
start
public 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.- Specified by:
startin interfaceApplication
-
start
public void start(boolean waitFor) Deprecated.Starts the application indisplaymode.- Specified by:
startin interfaceApplication- Parameters:
waitFor- iftrue, the method will wait until the application is started.- See Also:
-
start
Deprecated.Starts the application. Creating a rendering context and executing the main loop in a separate thread.- Parameters:
contextType- thetypeof the context to create.waitFor- iftrue, the method will wait until the application is started.- Throws:
IllegalArgumentException- if the context type is not supported.
-
moveScreenProcessingToVR
public void moveScreenProcessingToVR()Deprecated.Move filters from the main scene into the eye's. This removes filters from the main scene. -
preconfigureVRApp
Deprecated.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.
-
setSeatedExperience
public 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:
-
isSeatedExperience
public boolean isSeatedExperience()Deprecated.Check if the application is configured as a seated experience.- Returns:
trueif the application is configured as a seated experience andfalseotherwise.- See Also:
-
resetSeatedPose
public void resetSeatedPose()Deprecated.Reset headset pose if seating experience. -
isInstanceVRRendering
public boolean isInstanceVRRendering()Deprecated.Check if the rendering is instanced (see Geometry instancing).- Returns:
trueif the rendering is instanced andfalseotherwise.
-
isInVR
public boolean isInVR()Deprecated.Check if the VR mode is enabled.- Returns:
trueif the VR mode is enabled andfalseotherwise.
-
getGuiNode
Deprecated.Get the GUI node from the application.- Returns:
- the GUI node from the application.
- See Also:
-
setGuiNode
Deprecated.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:
-
getRootNode
Deprecated.Get the root node of the application.- Returns:
- the root node of the application.
-
hasTraditionalGUIOverlay
public boolean hasTraditionalGUIOverlay()Deprecated.Check if the application has a GUI overlay attached.- Returns:
trueif the application has a GUI overlay attached andfalseotherwise.
-
getObserver
Deprecated.Get the scene observer. If no observer has been set, this method return the applicationcamera.- Returns:
- the scene observer.
- See Also:
-
setObserver
Deprecated.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.
-
getFinalObserverRotation
Deprecated.Get the observer final rotation within the scene.- Returns:
- the observer final rotation within the scene.
- See Also:
-
getFinalObserverPosition
Deprecated.Get the observer final position within the scene.- Returns:
- the observer position.
- See Also:
-
setVRHeightAdjustment
public void setVRHeightAdjustment(float amount) Deprecated.Set the VR headset height from the ground.- Parameters:
amount- the VR headset height from the ground.- See Also:
-
getVRHeightAdjustment
public float getVRHeightAdjustment()Deprecated.Get the VR headset height from the ground.- Returns:
- the VR headset height from the ground.
- See Also:
-
getLeftViewPort
Deprecated.Get the VR headset left viewport.- Returns:
- the VR headset left viewport.
- See Also:
-
getRightViewPort
Deprecated.Get the VR headset right viewport.- Returns:
- the VR headset right viewport.
- See Also:
-
setBackgroundColors
Deprecated.Set the background color for both left and right view ports.- Parameters:
clr- the background color.
-
runQueuedTasks
protected void runQueuedTasks()Deprecated.Runs tasks enqueued viaenqueue(Callable) -
update
public void update()Deprecated.Description copied from interface:SystemListenerCallback to update the application state, and render the scene to the back buffer.- Specified by:
updatein interfaceSystemListener
-
initialize
public 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 interfaceSystemListener
-
simpleInitApp
public abstract void simpleInitApp()Deprecated.Initialize the application. This method has to be overridden by implementations. -
destroy
public void destroy()Deprecated.Destroy the application (release all resources).- Specified by:
destroyin interfaceSystemListener
-
destroyInput
protected void destroyInput()Deprecated. -
getGuiViewPort
Deprecated.- Specified by:
getGuiViewPortin interfaceApplication- Returns:
- The GUI viewport. Which is used for the on screen statistics and FPS.
-
getViewPort
Deprecated.- Specified by:
getViewPortin interfaceApplication
-
enqueue
Deprecated.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 interfaceApplication- 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
-
enqueue
Deprecated.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 interfaceApplication- Parameters:
runnable- The runnable to run in the main jME3 thread
-
stop
public 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 interfaceApplication- See Also:
-
stop
public 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 interfaceApplication- Parameters:
waitFor- true→wait for the context to be fully destroyed, true→don't wait
-
restart
public 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 interfaceApplication
-
setAppProfiler
Deprecated.Sets an AppProfiler hook that will be called back for specific steps within a single update frame. Value defaults to null.- Specified by:
setAppProfilerin interfaceApplication- Parameters:
prof- the profiler to use (alias created) or null for none (default=null)
-
getAppProfiler
Deprecated.Returns the current AppProfiler hook, or null if none is set.- Specified by:
getAppProfilerin interfaceApplication- Returns:
- the pre-existing instance, or null if none
-
VRAppStateinstead.