class ExrImage : Image


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

Summary

Public companion functions

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

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

ListenableFuture<ExrImage>
@MainThread
create(session: Session, assetData: ByteArray, assetKey: String)

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

Public functions

open operator Boolean
equals(other: Any?)
CubeMapTexture

Returns the reflection texture from a preprocessed EXR image.

open Int

Public companion functions

create

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

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
session: Session

The Session to use for loading the asset.

name: String

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

Returns
ListenableFuture<ExrImage>

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

create

Added in 1.0.0-alpha04
@MainThread
fun create(session: Session, assetData: ByteArray, assetKey: String): ListenableFuture<ExrImage>

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
session: Session

The Session to use for loading the asset.

assetData: ByteArray

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

assetKey: String

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

Returns
ListenableFuture<ExrImage>

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

getReflectionTexture

Added in 1.0.0-alpha04
@MainThread
fun getReflectionTexture(): CubeMapTexture

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
CubeMapTexture

a CubeMapTexture.

Throws
kotlin.IllegalStateException

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

hashCode

open fun hashCode(): Int