Package com.jme3.input.vr.osvr
Class OSVRViewManager
java.lang.Object
com.jme3.input.vr.AbstractVRViewManager
com.jme3.input.vr.osvr.OSVRViewManager
- All Implemented Interfaces:
VRViewManager
-
Field Summary
Fields inherited from class com.jme3.input.vr.AbstractVRViewManager
environment, leftCamera, leftEyeDepth, leftEyeTexture, leftPostProcessor, leftViewPort, mirrorViewPort, rightCamera, rightEyeDepth, rightEyeTexture, rightPostProcessor, rightViewPort
Fields inherited from interface com.jme3.input.vr.VRViewManager
LEFT_VIEW_NAME, RIGHT_VIEW_NAME
-
Constructor Summary
ConstructorDescriptionOSVRViewManager
(VREnvironment environment) Create a new VR view manager attached to the givenVR environment
. -
Method Summary
Modifier and TypeMethodDescriptionprotected int
Get the identifier of the left eye texture.protected int
Get the identifier of the right eye texture.void
Initialize the VR view manager.void
Handles moving filters from the main view to each eyevoid
Send the textures to the two eyes.void
render()
This method contains action to be done during the rendering phase.static Mesh
setupDistortionMesh
(int eye, VRAPI api) Set up a distortion mesh for the stereo view.void
syncScreenProcessing
(ViewPort sourceViewport) Sets the two views to use the list ofprocessors
.void
update
(float tpf) Update the VR view manager.Methods inherited from class com.jme3.input.vr.AbstractVRViewManager
getHeightAdjustment, getLeftCamera, getLeftDepth, getLeftPostProcessor, getLeftTexture, getLeftViewPort, getMirrorViewPort, getResolutionMuliplier, getRightCamera, getRightDepth, getRightPostProcessor, getRightTexture, getRightViewPort, getVREnvironment, setHeightAdjustment, setResolutionMultiplier
-
Constructor Details
-
OSVRViewManager
Create a new VR view manager attached to the givenVR environment
.- Parameters:
environment
- theVR environment
to which this view manager is attached.
-
-
Method Details
-
getLeftTexId
protected int getLeftTexId()Get the identifier of the left eye texture.- Returns:
- the identifier of the left eye texture.
- See Also:
-
getRightTexId()
getFullTexId()
-
getRightTexId
protected int getRightTexId()Get the identifier of the right eye texture.- Returns:
- the identifier of the right eye texture.
- See Also:
-
getLeftTexId()
getFullTexId()
-
postRender
public void postRender()Send the textures to the two eyes.- See Also:
-
initialize
public void initialize()Initialize the VR view manager. -
update
public void update(float tpf) Update the VR view manager. This method is called by the attached VR application and should not be called manually.- Parameters:
tpf
- the time per frame.
-
moveScreenProcessingToEyes
public void moveScreenProcessingToEyes()Handles moving filters from the main view to each eye- Specified by:
moveScreenProcessingToEyes
in interfaceVRViewManager
- Overrides:
moveScreenProcessingToEyes
in classAbstractVRViewManager
-
syncScreenProcessing
Sets the two views to use the list ofprocessors
.- Overrides:
syncScreenProcessing
in classAbstractVRViewManager
- Parameters:
sourceViewport
- theviewport
that contains the processors to use.
-
setupDistortionMesh
Set up a distortion mesh for the stereo view.- Parameters:
eye
- the eye to apply.api
- the underlying VR api- Returns:
- the distorted mesh.
-
render
public void render()Description copied from interface:VRViewManager
This method contains action to be done during the rendering phase. This method should be called for example from therender
method of anapp state
.- See Also:
-