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
Fields -
Method Summary
Modifier and TypeMethodDescriptionfloatGet the height adjustment to apply to the cameras before rendering.Get thecameraattached to the left eye.Get the depth texture attached to the left eye.Get thefilter post processorattached to the left eye.Get the texture attached to the left eye.Get theviewportattached to the left eye.Get theview portattached to the mirror display.floatGet the resolution multiplier.Get thecameraattached to the right eye.Get the depth texture attached to the right eye.Get thefilter post processorattached to the right eye.Get the texture attached to the right eye.Get theviewportattached to the right eye.Get theVR environmentto which the view manager is attached.voidInitialize the VR view manager.voidHandles moving filters from the main view to each eye.voidSend the rendering result as textures to the two eyes.voidrender()This method contains action to be done during the rendering phase.voidsetHeightAdjustment(float amount) Set the height adjustment to apply to the cameras before rendering.voidsetResolutionMultiplier(float resMult) Set the resolution multiplier.voidupdate(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 thecameraattached to the left eye.- Returns:
- the
cameraattached to the left eye. - See Also:
-
getRightCamera
Camera getRightCamera()Get thecameraattached to the right eye.- Returns:
- the
cameraattached to the right eye. - See Also:
-
getLeftViewPort
ViewPort getLeftViewPort()Get theviewportattached to the left eye.- Returns:
- the
viewportattached to the left eye. - See Also:
-
getRightViewPort
ViewPort getRightViewPort()Get theviewportattached to the right eye.- Returns:
- the
viewportattached to the right eye. - See Also:
-
getMirrorViewPort
ViewPort getMirrorViewPort()Get theview portattached 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 processorattached to the left eye.- Returns:
- the
filter post processorattached to the left eye. - See Also:
-
getRightPostProcessor
FilterPostProcessor getRightPostProcessor()Get thefilter post processorattached to the right eye.- Returns:
- the
filter post processorattached 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 environmentto which the view manager is attached.- Returns:
- the
VR environmentto which the view manager is attached.
-
initialize
void initialize()Initialize the VR view manager. This method should be called after the attachment of aVR environmentto an application. -
update
void update(float tpf) Update the VR view manager. This method is called by the attachedapp stateand 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 therendermethod 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.
-