Class VRApplication
- All Implemented Interfaces:
Application
,SystemListener
This class is no more functional and is deprecated. Please use VRAppState
instead.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Deprecated.VR application configuration parameters. -
Field Summary
Modifier and TypeFieldDescriptionboolean
Deprecated.Is the application is based on OSVR (default isfalse
).float
Deprecated.The default aspect ratio.float
Deprecated.The default FOV.boolean
Deprecated.Is the application has not to start within VR mode (default isfalse
).protected Node
Deprecated.protected Node
Deprecated. -
Constructor Summary
ConstructorDescriptionDeprecated.VRApplication
(AppState... initialStates) Deprecated.Create a new VR application and attach the givenapp states
.
The application scene is made of aroot node
that holds the scene spatials and aGUI node
that is the root of the Graphical user interface. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Deprecated.Is the SteamVR compositor is active.void
destroy()
Deprecated.Destroy the application (release all resources).protected void
Deprecated.void
Deprecated.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.void
Deprecated.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.float
Deprecated.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.void
handleError
(String errMsg, Throwable t) Deprecated.Handle the error given in parameters by creating a log entry and a dialog window.boolean
Deprecated.Check if the application has a GUI overlay attached.void
Deprecated.Callback to indicate the application to initialize.boolean
Deprecated.Check if the rendering is instanced (see Geometry instancing).boolean
isInVR()
Deprecated.Check if the VR mode is enabled.boolean
Deprecated.Get if the system currently support VR.boolean
Deprecated.Get if the application has to pause then it lost the focus.boolean
Deprecated.Check if the application is configured as a seated experience.void
Deprecated.Force the focus lost for the application.void
Deprecated.Move filters from the main scene into the eye's.void
preconfigureVRApp
(VRApplication.PreconfigParameter parm, boolean value) Deprecated.Set VR applicationspecific parameter
.void
requestClose
(boolean esc) Deprecated.Request the application to close.void
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
Deprecated.Runs tasks enqueued viaenqueue(Callable)
void
setAppProfiler
(AppProfiler prof) Deprecated.Sets an AppProfiler hook that will be called back for specific steps within a single update frame.void
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 thedisplay settings
to define the display created.void
Deprecated.Sets theTimer
implementation that will be used for calculating frame times.
By default, Application will use the Timer as returned by the currentJmeContext
implementation.void
setVRHeightAdjustment
(float amount) Deprecated.Set the VR headset height from the ground.abstract void
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 containroot node
updates.void
start()
Deprecated.Starts the application.void
start
(boolean waitFor) Deprecated.Starts the application indisplay
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.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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 node
that holds the scene spatials and aGUI node
that is the root of the Graphical user interface.- Parameters:
initialStates
- theapp states
to 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:
true
if the SteamVR compositor is active andfalse
otherwise.
-
isOSVRSupported
public boolean isOSVRSupported()Deprecated.Get if the system currently support VR.- Returns:
true
if the system currently support VR andfalse
otherwise.
-
simpleUpdate
public void simpleUpdate(float tpf) Deprecated.Simple update of the application, this method should containroot node
updates. 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:
getCamera
in interfaceApplication
- Returns:
- The main
camera
for the application
-
getBaseCamera
Deprecated.Get the application internal camera.- Returns:
- the application internal camera.
- See Also:
-
getContext
Deprecated.- Specified by:
getContext
in interfaceApplication
- Returns:
- The
display context
for the application
-
getAssetManager
Deprecated.- Specified by:
getAssetManager
in interfaceApplication
- Returns:
- The
asset manager
for this application.
-
getInputManager
Deprecated.- Specified by:
getInputManager
in interfaceApplication
- Returns:
- the
input manager
.
-
getStateManager
Deprecated.- Specified by:
getStateManager
in interfaceApplication
- Returns:
- the
app state manager
-
getRenderManager
Deprecated.- Specified by:
getRenderManager
in interfaceApplication
- Returns:
- the
render manager
-
getRenderer
Deprecated.- Specified by:
getRenderer
in interfaceApplication
- Returns:
- The
renderer
for the application
-
getAudioRenderer
Deprecated.- Specified by:
getAudioRenderer
in interfaceApplication
- Returns:
- The
audio renderer
for the application
-
getListener
Deprecated.- Specified by:
getListener
in interfaceApplication
- Returns:
- The
listener
object for audio
-
getTimer
Deprecated.- Specified by:
getTimer
in interfaceApplication
-
handleError
Deprecated.Handle the error given in parameters by creating a log entry and a dialog window. Internal use only.- Specified by:
handleError
in 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:
gainFocus
in interfaceSystemListener
-
loseFocus
public void loseFocus()Deprecated.Force the focus lost for the application. Internal use only.- Specified by:
loseFocus
in interfaceSystemListener
-
reshape
public void reshape(int w, int h) Deprecated.Reshape the display window. Internal use only.- Specified by:
reshape
in 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:
requestClose
in interfaceSystemListener
- Parameters:
esc
- If true, the user pressed ESC to close the application.
-
setSettings
Deprecated.Set thedisplay settings
to define the display created.Examples of display parameters include display frame
width
andheight
, 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:
setSettings
in interfaceApplication
- Parameters:
settings
- The settings to set.
-
setTimer
Deprecated.Sets theTimer
implementation that will be used for calculating frame times.
By default, Application will use the Timer as returned by the currentJmeContext
implementation.- Specified by:
setTimer
in interfaceApplication
- Parameters:
timer
- the timer to use.
-
getLostFocusBehavior
Deprecated.Determine the application's behavior when unfocused.- Specified by:
getLostFocusBehavior
in 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 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.- Specified by:
setLostFocusBehavior
in interfaceApplication
- Parameters:
lostFocusBehavior
- The newlost focus behavior
to use.- See Also:
-
isPauseOnLostFocus
public boolean isPauseOnLostFocus()Deprecated.Get if the application has to pause then it lost the focus.- Specified by:
isPauseOnLostFocus
in interfaceApplication
- Returns:
true
if pause on lost focus is enabled,false
otherwise.- 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:
setPauseOnLostFocus
in interfaceApplication
- Parameters:
pauseOnLostFocus
-true
to enable pause on lost focus,false
otherwise.- See Also:
-
start
public void start()Deprecated.Description copied from interface:Application
Starts the application. A bug occurring when using LWJGL3 prevents this method from returning until after the application is stopped on macOS.- Specified by:
start
in interfaceApplication
-
start
public void start(boolean waitFor) Deprecated.Starts the application indisplay
mode.- Specified by:
start
in 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
- thetype
of 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
-true
if designed for sitting,false
for standing/roomscale- See Also:
-
isSeatedExperience
public boolean isSeatedExperience()Deprecated.Check if the application is configured as a seated experience.- Returns:
true
if the application is configured as a seated experience andfalse
otherwise.- 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:
true
if the rendering is instanced andfalse
otherwise.
-
isInVR
public boolean isInVR()Deprecated.Check if the VR mode is enabled.- Returns:
true
if the VR mode is enabled andfalse
otherwise.
-
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:
true
if the application has a GUI overlay attached andfalse
otherwise.
-
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:SystemListener
Callback to update the application state, and render the scene to the back buffer.- Specified by:
update
in interfaceSystemListener
-
initialize
public void initialize()Deprecated.Description copied from interface:SystemListener
Callback 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:
initialize
in 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:
destroy
in interfaceSystemListener
-
destroyInput
protected void destroyInput()Deprecated. -
getGuiViewPort
Deprecated.- Specified by:
getGuiViewPort
in interfaceApplication
- Returns:
- The GUI viewport. Which is used for the on screen statistics and FPS.
-
getViewPort
Deprecated.- Specified by:
getViewPort
in interfaceApplication
-
enqueue
Deprecated.Description copied from interface:Application
Enqueues 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:
enqueue
in 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:
enqueue
in 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:
stop
in 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:
stop
in 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
AppSettings
of this Application are not applied immediately; calling this method forces the context to restart, applying the new settings.- Specified by:
restart
in 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:
setAppProfiler
in 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:
getAppProfiler
in interfaceApplication
- Returns:
- the pre-existing instance, or null if none
-
VRAppState
instead.