GuavaExrImage

Added in 1.0.0-alpha05

public final class GuavaExrImage


Summary

Public methods

static final @NonNull ListenableFuture<@NonNull ExrImage>

Public factory for an ExrImage, asynchronously loading a preprocessed skybox from a Path relative to the application's assets/ folder.

static final @NonNull ListenableFuture<@NonNull ExrImage>

Public factory for an ExrImage, asynchronously loading a preprocessed skybox from a Uri.

Public methods

createExrImageFromZipAsync

@MainThread
public static final @NonNull ListenableFuture<@NonNull ExrImagecreateExrImageFromZipAsync(@NonNull Session session, @NonNull Path path)

Public factory for an ExrImage, asynchronously loading a preprocessed skybox from a Path relative to the application's assets/ folder.

The input .zip file should contain the preprocessed image-based lighting (IBL) data, typically generated from an .exr or .hdr environment map using a tool like Filament's cmgen. See: https://github.com/google/filament/tree/main/tools/cmgen

Parameters
@NonNull Session session

The Session to use for loading the asset.

@NonNull Path path

The Path of the preprocessed .zip skybox file to be loaded, relative to the application's assets/ folder.

Returns
@NonNull ListenableFuture<@NonNull ExrImage>

a ListenableFuture which will provide the ExrImage upon completion. Listeners will be called on the main thread if Runnable::run is supplied when adding a listener to the ListenableFuture. @throws IllegalArgumentException if Path.isAbsolute is true, as this method requires a relative path, or if the path does not specify a .zip file.

createExrImageFromZipAsync

@MainThread
public static final @NonNull ListenableFuture<@NonNull ExrImagecreateExrImageFromZipAsync(@NonNull Session session, @NonNull Uri uri)

Public factory for an ExrImage, asynchronously loading a preprocessed skybox from a Uri.

The input .zip file should contain the preprocessed image-based lighting (IBL) data, typically generated from an .exr or .hdr environment map using a tool like Filament's cmgen. See: https://github.com/google/filament/tree/main/tools/cmgen

Parameters
@NonNull Session session

The Session to use for loading the asset.

@NonNull Uri uri

The Uri of the preprocessed .zip skybox file to be loaded.

Returns
@NonNull ListenableFuture<@NonNull ExrImage>

a ListenableFuture which will provide the ExrImage upon completion. Listeners will be called on the main thread if Runnable::run is supplied when adding a listener to the ListenableFuture. @throws IllegalArgumentException if the Uri does not specify a .zip file.