Most visited

Recently visited

ViroViewOVR

public class ViroViewOVR
extends ViroView implements SurfaceHolder.Callback

java.lang.Object
   ↳ android.view.View
     ↳ android.view.ViewGroup
       ↳ android.widget.FrameLayout
         ↳ com.viro.core.ViroView
           ↳ com.viro.core.ViroViewOVR


ViroViewOVR is a ViroView for rendering content in stereo for VR headsets using the Oculus Mobile SDK.

Summary

Public constructors

ViroViewOVR(Activity activity, RendererStartListener rendererStartListener)

Create a new ViroViewOVR with the default RendererConfiguration.

ViroViewOVR(Activity activity, RendererStartListener rendererStartListener, RendererConfiguration config)

Create a new ViroViewOVR with the given RendererConfiguration, which determines the rendering techniques and rendering fidelity to use for this View.

Public methods

ViroMediaRecorder getRecorder()

Returns a ViroMediaRecorder, which can be used to take screenshots of the Scene or record video.

void recenterTracking()

For VR applications, re-centers the head orientation.

void setScene(Scene scene)

Set the Scene this ViroView should render.

Public constructors

ViroViewOVR

ViroViewOVR (Activity activity, 
                RendererStartListener rendererStartListener)

Create a new ViroViewOVR with the default RendererConfiguration.

Parameters
activity Activity: The activity containing the view.

rendererStartListener RendererStartListener: Runnable to invoke when the renderer has finished initializing. Optional, may be null.

ViroViewOVR

ViroViewOVR (Activity activity, 
                RendererStartListener rendererStartListener, 
                RendererConfiguration config)

Create a new ViroViewOVR with the given RendererConfiguration, which determines the rendering techniques and rendering fidelity to use for this View.

Parameters
activity Activity: The activity containing the view.

rendererStartListener RendererStartListener: Runnable to invoke when the renderer has finished initializing. Optional, may be null.

config RendererConfiguration: The RendererConfiguration to use.

Public methods

getRecorder

ViroMediaRecorder getRecorder ()

Returns a ViroMediaRecorder, which can be used to take screenshots of the Scene or record video. Currently only the ViroViewARCore supports the media recorder.

Returns
ViroMediaRecorder The ViroMediaRecorder, or null if not supported by the platform.

recenterTracking

void recenterTracking ()

For VR applications, re-centers the head orientation. This resets the yaw to zero, but leaves pitch and roll unmodified.

setScene

void setScene (Scene scene)

Set the Scene this ViroView should render. ARScene should be used for augmented reality applications.

Parameters
scene Scene: The Scene to render in this ViroView.

Hooray!