SpatialEnvironmentTester


public final class SpatialEnvironmentTester


A test utility for accessing and inspecting the spatial data associated with the SpatialEnvironment.

Summary

Public methods

final void
triggerPassthroughOpacityChanged(
    @FloatRange(from = 0.0, to = 1.0) float opacity
)

Simulates a change in the user-visible passthrough opacity, notifying all registered listeners.

final void

Simulates a change in the active state of the preferred spatial environment, notifying all registered listeners.

Public methods

triggerPassthroughOpacityChanged

Added in 1.0.0-alpha16
public final void triggerPassthroughOpacityChanged(
    @FloatRange(from = 0.0, to = 1.0) float opacity
)

Simulates a change in the user-visible passthrough opacity, notifying all registered listeners.

This affects the value returned by SpatialEnvironment.currentPassthroughOpacity and triggers callbacks registered via SpatialEnvironment.addPassthroughOpacityChangedListener.

A value of 0.0f means no passthrough is shown, and a value of 1.0f means the passthrough completely obscures the spatial environment geometry and skybox.

Parameters
@FloatRange(from = 0.0, to = 1.0) float opacity

The current passthrough opacity value between 0.0f and 1.0f.

triggerSpatialEnvironmentChanged

Added in 1.0.0-alpha16
public final void triggerSpatialEnvironmentChanged(boolean active)

Simulates a change in the active state of the preferred spatial environment, notifying all registered listeners.

This affects the value returned by SpatialEnvironment.isPreferredSpatialEnvironmentActive and triggers callbacks registered via SpatialEnvironment.addSpatialEnvironmentChangedListener.

Parameters
boolean active

True if the environment preference is active.