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

Nested classes

enum ViroViewOVR.StartupError

Errors returned by the ViroViewOVR.StartupListener, in response to Viro failing to initialize. 

interface ViroViewOVR.StartupListener

Callback interface for responding to ViroViewOVR startup success or failure. 

Public constructors

ViroViewOVR(Activity activity, ViroViewOVR.StartupListener startupListener)

Create a new ViroViewOVR with the default RendererConfiguration.

ViroViewOVR(Activity activity, ViroViewOVR.StartupListener startupListener, 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, 
                ViroViewOVR.StartupListener startupListener)

Create a new ViroViewOVR with the default RendererConfiguration.

Parameters
activity Activity: The activity containing the view.

startupListener ViroViewOVR.StartupListener: Listener to respond to startup success or failure. Will be notified of any errors encountered while initializing Viro. Optional, may be null.

ViroViewOVR

ViroViewOVR (Activity activity, 
                ViroViewOVR.StartupListener startupListener, 
                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.

startupListener ViroViewOVR.StartupListener: Listener to respond to startup success or failure. Will be notified of any errors encountered while initializing Viro. 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!