• Sceneform SDK for Android was open sourced and archived (github.com/google-ar/sceneform-android-sdk) with version 1.16.0.
  • This site (developers.google.com/sceneform) serves as the documentation archive for the previous version, Sceneform SDK for Android 1.15.0.
  • Do not use version 1.17.0 of the Sceneform Maven artifacts.
  • The 1.17.1 Maven artifacts can be used. Other than the version, however, the 1.17.1 artifacts are identical to the 1.15.0 artifacts.

ModelRenderable.Builder

Stay organized with collections Save and categorize content based on your preferences.
public static final class ModelRenderable.Builder

Factory class for ModelRenderable.

Public Constructors

Public Methods

CompletableFuture<T extends Renderable>
build()
Constructs a Renderable with the parameters of the builder.
B extends Builder<T extends Renderable, B>
setRegistryId(Object registryId)
B extends Builder<T extends Renderable, B>
B extends Builder<T extends Renderable, B>
setSource(Context context, Uri sourceUri)
B extends Builder<T extends Renderable, B>
setSource(Context context, Uri sourceUri, boolean enableCaching)
B extends Builder<T extends Renderable, B>
setSource(Context context, Callable<InputStream> inputStreamCreator)
B extends Builder<T extends Renderable, B>
setSource(Context context, int resource)

Protected Methods

void
abstract Class<T extends Renderable>
abstract ResourceRegistry<T extends Renderable>
abstract B extends Builder<T extends Renderable, B>
abstract T extends Renderable

Inherited Methods

Public Constructors

public ModelRenderable.Builder ()

Public Methods

public CompletableFuture<T extends Renderable> build ()

Constructs a Renderable with the parameters of the builder.

Returns

public B extends Builder<T extends Renderable, B> setRegistryId (Object registryId)

Parameters
registryId

public B extends Builder<T extends Renderable, B> setSource (RenderableDefinition definition)

Parameters
definition

public B extends Builder<T extends Renderable, B> setSource (Context context, Uri sourceUri)

Parameters
context
sourceUri

public B extends Builder<T extends Renderable, B> setSource (Context context, Uri sourceUri, boolean enableCaching)

Parameters
context
sourceUri
enableCaching

public B extends Builder<T extends Renderable, B> setSource (Context context, Callable<InputStream> inputStreamCreator)

Parameters
context
inputStreamCreator

public B extends Builder<T extends Renderable, B> setSource (Context context, int resource)

Parameters
context
resource

Protected Methods

protected void checkPreconditions ()

protected abstract Class<T extends Renderable> getRenderableClass ()

protected abstract ResourceRegistry<T extends Renderable> getRenderableRegistry ()

protected abstract B extends Builder<T extends Renderable, B> getSelf ()

protected abstract T extends Renderable makeRenderable ()