ModelRenderable

Renders a 3D Model by attaching it to a com.google.ar.sceneform.Node with setRenderable.


future = ModelRenderable.builder().setSource(context, R.raw.renderable).build();
renderable = future.thenAccept(...);

Types

Link copied to clipboard
Factory class for ModelRenderable.

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
open fun createInstance(engine: Engine, assetLoader: AssetLoader, resourceLoader: ResourceLoader, transformProvider: TransformProvider): RenderableInstance
Link copied to clipboard
Get the CollisionShape used for collision detection with this Renderable.
Link copied to clipboard
open fun getFinalModelMatrix(originalMatrix: Matrix): Matrix
Gets the final model matrix to use for rendering this Renderable based on the matrix passed in.
Link copied to clipboard
open fun getId(): ChangeId
Link copied to clipboard
open fun getMaterial(): MaterialInstance
Returns the material bound to the first submesh.
open fun getMaterial(submeshIndex: Int): MaterialInstance
Returns the material bound to the specified submesh.
Link copied to clipboard
open fun getSubmeshCount(): Int
Returns the number of submeshes that this renderable has.
Link copied to clipboard
open fun getSubmeshName(submeshIndex: Int): String
Returns the name associated with the specified submesh.
Link copied to clipboard
Creates a new instance of this ModelRenderable.
Link copied to clipboard
open fun prepareForDraw(engine: Engine)
Optionally override in subclasses for work that must be done each frame for specific types of Renderables.
Link copied to clipboard
open fun setCollisionShape(@Nullable collisionShape: CollisionShape)
Set the CollisionShape used for collision detection with this Renderable.
Link copied to clipboard
open fun setMaterial(material: MaterialInstance)
Sets the material bound to the first submesh.
open fun setMaterial(submeshIndex: Int, material: MaterialInstance)
Sets the material bound to the specified submesh.
Link copied to clipboard