public final class ExrImage implements Image


ExrImage represents an EXR Image resource in SceneCore. EXR images are used by the Environment for drawing skyboxes.

Summary

Public methods

static final @NonNull ListenableFuture<@NonNull ExrImage>

Public factory function for a preprocessed EXRImage, where the preprocessed EXRImage is asynchronously loaded.

static final @NonNull ListenableFuture<@NonNull ExrImage>
@MainThread
create(
    @NonNull Session session,
    @NonNull byte[] assetData,
    @NonNull String assetKey
)

Public factory function for a preprocessed EXRImage, where the preprocessed EXRImage is asynchronously loaded.

boolean
equals(Object other)
final @NonNull CubeMapTexture

Returns the reflection texture from a preprocessed EXR image.

int

Public methods

create

Added in 1.0.0-alpha04
@MainThread
public static final @NonNull ListenableFuture<@NonNull ExrImagecreate(@NonNull Session session, @NonNull String name)

Public factory function for a preprocessed EXRImage, where the preprocessed EXRImage is asynchronously loaded.

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

Parameters
@NonNull Session session

The Session to use for loading the asset.

@NonNull String name

The URL or asset-relative path of a the preprocessed EXR image to be loaded

Returns
@NonNull ListenableFuture<@NonNull ExrImage>

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

create

Added in 1.0.0-alpha04
@MainThread
public static final @NonNull ListenableFuture<@NonNull ExrImagecreate(
    @NonNull Session session,
    @NonNull byte[] assetData,
    @NonNull String assetKey
)

Public factory function for a preprocessed EXRImage, where the preprocessed EXRImage is asynchronously loaded.

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

Parameters
@NonNull Session session

The Session to use for loading the asset.

@NonNull byte[] assetData

The byte array of the preprocessed EXR image to be loaded.

@NonNull String assetKey

The key of the preprocessed EXR image to be loaded. This is used to identify the asset in the SceneCore cache.

Returns
@NonNull ListenableFuture<@NonNull ExrImage>

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

equals

public boolean equals(Object other)

getReflectionTexture

Added in 1.0.0-alpha04
@MainThread
public final @NonNull CubeMapTexture getReflectionTexture()

Returns the reflection texture from a preprocessed EXR image.

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

Returns
@NonNull CubeMapTexture

a CubeMapTexture.

Throws
kotlin.IllegalStateException

if the reflection texture couldn't be retrieved or if the EXR image was not preprocessed.

hashCode

public int hashCode()