Class ModelRenderable.Builder
- java.lang.Object
-
- com.google.ar.sceneform.rendering.ModelRenderable.Builder
-
- Enclosing class:
- ModelRenderable
public static final class ModelRenderable.Builder extends java.lang.Object
Factory class forModelRenderable
.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.concurrent.CompletableFuture<T>
build()
Constructs aRenderable
with the parameters of the builder.java.lang.Boolean
hasSource()
True if a source function will be called during buildB
setAnimationFrameRate(int frameRate)
Sets the number of frames per seconds defined in the asset.B
setAsyncLoadEnabled(boolean asyncLoadEnabled)
Enable textures async loading after first rendering.B
setIsFilamentGltf(boolean isFilamentGltf)
B
setRegistryId(java.lang.Object registryId)
B
setSource(android.content.Context context, int resource)
B
setSource(android.content.Context context, android.net.Uri sourceUri)
B
setSource(android.content.Context context, android.net.Uri sourceUri, boolean enableCaching)
B
setSource(android.content.Context context, java.util.concurrent.Callable<java.io.InputStream> inputStreamCreator)
B
setSource(RenderableDefinition definition)
Build aRenderable
from aRenderableDefinition
.
-
-
-
Method Detail
-
setSource
public B setSource(android.content.Context context, java.util.concurrent.Callable<java.io.InputStream> inputStreamCreator)
-
setSource
public B setSource(android.content.Context context, android.net.Uri sourceUri)
-
setSource
public B setSource(android.content.Context context, android.net.Uri sourceUri, boolean enableCaching)
-
setSource
public B setSource(android.content.Context context, int resource)
-
setSource
public B setSource(RenderableDefinition definition)
Build aRenderable
from aRenderableDefinition
.
-
setRegistryId
public B setRegistryId(@Nullable java.lang.Object registryId)
-
setIsFilamentGltf
public B setIsFilamentGltf(boolean isFilamentGltf)
-
setAsyncLoadEnabled
public B setAsyncLoadEnabled(boolean asyncLoadEnabled)
Enable textures async loading after first rendering. Default is false.
-
setAnimationFrameRate
public B setAnimationFrameRate(int frameRate)
Sets the number of frames per seconds defined in the asset.- Parameters:
frameRate
- The number of frames during one second
-
hasSource
public java.lang.Boolean hasSource()
True if a source function will be called during build
-
build
public java.util.concurrent.CompletableFuture<T> build()
Constructs aRenderable
with the parameters of the builder.- Returns:
- the constructed
Renderable
-
-