class GltfModel : Model


GltfModel represents a glTF resource in SceneCore. These can be used as part of the Environment or to display 3D models with GltfModelEntity. These are created by the Session.

Summary

Public companion functions

ListenableFuture<GltfModel>
@MainThread
create(session: Session, name: String)

Public factory function for a GltfModel, where the glTF is asynchronously loaded.

Public functions

open operator Boolean
equals(other: Any?)
open Int

Public companion functions

create

Added in 1.0.0-alpha02
@MainThread
fun create(session: Session, name: String): ListenableFuture<GltfModel>

Public factory function for a GltfModel, where the glTF is asynchronously loaded.

This method must be called from the main thread. https://developer.android.com/guide/components/processes-and-threads

Currently, only URLs and relative paths from the android_assets/ directory are supported. Currently, only binary glTF (.glb) files are supported.

Parameters
session: Session

The Session to use for loading the model.

name: String

The URL or asset-relative path of a binary glTF (.glb) model to be loaded

Returns
ListenableFuture<GltfModel>

a ListenableFuture. Listeners will be called on the main thread if Runnable::run is supplied.

Public functions

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

Public properties