public final class GltfModel


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

Summary

Public methods

static final @NonNull GltfModel

Public factory for a GltfModel, where the glTF is asynchronously loaded from a Path relative to the application's assets/ folder.

static final @NonNull GltfModel

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

boolean
equals(Object other)
int

Public methods

create

@MainThread
public static final @NonNull GltfModel create(@NonNull Session session, @NonNull Path path)

Public factory for a GltfModel, where the glTF is asynchronously loaded from a Path relative to the application's assets/ folder.

Currently, only binary glTF (.glb) files are supported.

Parameters
@NonNull Session session

The Session to use for loading the model.

@NonNull Path path

The Path of the binary glTF (.glb) model to be loaded, relative to the application's assets/ folder.

Returns
@NonNull GltfModel

a GltfModel upon completion.

Throws
kotlin.IllegalArgumentException

if path.isAbsolute is true, as this method requires a relative path.

create

@MainThread
public static final @NonNull GltfModel create(@NonNull Session session, @NonNull Uri uri)

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

Currently, only binary glTF (.glb) files are supported.

Parameters
@NonNull Session session

The Session to use for loading the model.

@NonNull Uri uri

The Uri for a binary glTF (.glb) model to be loaded.

Returns
@NonNull GltfModel

a GltfModel upon completion.

equals

public boolean equals(Object other)

hashCode

public int hashCode()