Most visited

Recently visited

ViroViewScene

public class ViroViewScene
extends ViroView

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


ViroViewScene is a ViroView for rendering a Scene on a simple Android View.

Summary

Public constructors

ViroViewScene(Context context, RendererStartListener rendererStartListener)

Create a new ViroViewScene with the default RendererConfiguration.

ViroViewScene(Context context, RendererStartListener rendererStartListener, RendererConfiguration config)

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

Public methods

void dispose()

Release native resources associated with this ViroView.

ViroMediaRecorder getRecorder()

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

void setBackgroundColor(int color)

Set the background color of view.

void setScene(Scene scene)

Set the Scene this ViroView should render.

Public constructors

ViroViewScene

ViroViewScene (Context context, 
                RendererStartListener rendererStartListener)

Create a new ViroViewScene with the default RendererConfiguration.

Parameters
context Context: The activity context.

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

ViroViewScene

ViroViewScene (Context context, 
                RendererStartListener rendererStartListener, 
                RendererConfiguration config)

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

Parameters
context Context: The activity context.

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

config RendererConfiguration: The RendererConfiguration to use.

Public methods

dispose

void dispose ()

Release native resources associated with this ViroView.

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.

setBackgroundColor

void setBackgroundColor (int color)

Set the background color of view. This is the color that will be rendered behind the Viro scenegraph.

Parameters
color int: The Color's int value.

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!