Package com.jme3.input.vr
Interface VRViewManager
- All Known Implementing Classes:
AbstractVRViewManager
,LWJGLOpenVRViewManager
,OculusViewManager
,OpenVRViewManager
,OSVRViewManager
public interface VRViewManager
A VR view manager. This interface describes methods that enable to submit 3D views to the VR compositor.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionfloat
Get the height adjustment to apply to the cameras before rendering.Get thecamera
attached to the left eye.Get the depth texture attached to the left eye.Get thefilter post processor
attached to the left eye.Get the texture attached to the left eye.Get theviewport
attached to the left eye.Get theview port
attached to the mirror display.float
Get the resolution multiplier.Get thecamera
attached to the right eye.Get the depth texture attached to the right eye.Get thefilter post processor
attached to the right eye.Get the texture attached to the right eye.Get theviewport
attached to the right eye.Get theVR environment
to which the view manager is attached.void
Initialize the VR view manager.void
Handles moving filters from the main view to each eye.void
Send the rendering result as textures to the two eyes.void
render()
This method contains action to be done during the rendering phase.void
setHeightAdjustment
(float amount) Set the height adjustment to apply to the cameras before rendering.void
setResolutionMultiplier
(float resMult) Set the resolution multiplier.void
update
(float tpf) Update the VR view manager.
-
Field Details
-
LEFT_VIEW_NAME
The name of the left view.- See Also:
-
RIGHT_VIEW_NAME
The name of the right view.- See Also:
-
-
Method Details
-
getLeftCamera
Camera getLeftCamera()Get thecamera
attached to the left eye.- Returns:
- the
camera
attached to the left eye. - See Also:
-
getRightCamera
Camera getRightCamera()Get thecamera
attached to the right eye.- Returns:
- the
camera
attached to the right eye. - See Also:
-
getLeftViewPort
ViewPort getLeftViewPort()Get theviewport
attached to the left eye.- Returns:
- the
viewport
attached to the left eye. - See Also:
-
getRightViewPort
ViewPort getRightViewPort()Get theviewport
attached to the right eye.- Returns:
- the
viewport
attached to the right eye. - See Also:
-
getMirrorViewPort
ViewPort getMirrorViewPort()Get theview port
attached to the mirror display.- Returns:
- the view port attached to the mirror display.
- See Also:
-
getLeftTexture
Texture2D getLeftTexture()Get the texture attached to the left eye.- Returns:
- the texture attached to the left eye.
- See Also:
-
getRightTexture
Texture2D getRightTexture()Get the texture attached to the right eye.- Returns:
- the texture attached to the right eye.
- See Also:
-
getLeftDepth
Texture2D getLeftDepth()Get the depth texture attached to the left eye.- Returns:
- the texture attached to the left eye.
- See Also:
-
getRightDepth
Texture2D getRightDepth()Get the depth texture attached to the right eye.- Returns:
- the texture attached to the right eye.
- See Also:
-
getLeftPostProcessor
FilterPostProcessor getLeftPostProcessor()Get thefilter post processor
attached to the left eye.- Returns:
- the
filter post processor
attached to the left eye. - See Also:
-
getRightPostProcessor
FilterPostProcessor getRightPostProcessor()Get thefilter post processor
attached to the right eye.- Returns:
- the
filter post processor
attached to the right eye. - See Also:
-
getResolutionMuliplier
float getResolutionMuliplier()Get the resolution multiplier.- Returns:
- the resolution multiplier.
- See Also:
-
setResolutionMultiplier
void setResolutionMultiplier(float resMult) Set the resolution multiplier.- Parameters:
resMult
- the resolution multiplier.- See Also:
-
getHeightAdjustment
float getHeightAdjustment()Get the height adjustment to apply to the cameras before rendering.- Returns:
- the height adjustment to apply to the cameras before rendering.
- See Also:
-
setHeightAdjustment
void setHeightAdjustment(float amount) Set the height adjustment to apply to the cameras before rendering.- Parameters:
amount
- the height adjustment to apply to the cameras before rendering.- See Also:
-
getVREnvironment
VREnvironment getVREnvironment()Get theVR environment
to which the view manager is attached.- Returns:
- the
VR environment
to which the view manager is attached.
-
initialize
void initialize()Initialize the VR view manager. This method should be called after the attachment of aVR environment
to an application. -
update
void update(float tpf) Update the VR view manager. This method is called by the attachedapp state
and should not be called manually.- Parameters:
tpf
- the time per frame.
-
render
void render()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:
-
postRender
void postRender()Send the rendering result as textures to the two eyes. This method should be called after all the rendering operations (for example at the end of thepostRender()
method of the attached app state.)- See Also:
-
moveScreenProcessingToEyes
void moveScreenProcessingToEyes()Handles moving filters from the main view to each eye.
-