public final class Config


Defines a configuration state of all available features to be set at runtime.

An instance of this class should be passed to Session.configure to set the current configuration. Use Config.copy on Session.config to modify a copy of the existing configuration to pass to Session.configure.

Summary

Nested types

public abstract class Config.ConfigMode

Describes a specific value used to set the configuration via Session.configure.

Public constructors

Creates a new Config from an existing Config, updating the sceneSignalTypes.

Config(
    @NonNull PlaneTrackingMode planeTracking,
    @NonNull HandTrackingMode handTracking,
    @NonNull DeviceTrackingMode deviceTracking,
    @NonNull DepthEstimationMode depthEstimation,
    @NonNull AnchorPersistenceMode anchorPersistence,
    @NonNull FaceTrackingMode faceTracking,
    @NonNull GeospatialMode geospatial,
    @NonNull Set<@NonNull AugmentedObjectCategory> augmentedObjectCategories,
    AugmentedImageDatabase augmentedImageDatabase
)

Defines a configuration state of all available features to be set at runtime.

Public methods

final @NonNull Config
copy(
    @NonNull PlaneTrackingMode planeTracking,
    @NonNull HandTrackingMode handTracking,
    @NonNull DeviceTrackingMode deviceTracking,
    @NonNull DepthEstimationMode depthEstimation,
    @NonNull AnchorPersistenceMode anchorPersistence,
    @NonNull FaceTrackingMode faceTracking,
    @NonNull GeospatialMode geospatial,
    @NonNull Set<@NonNull AugmentedObjectCategory> augmentedObjectCategories,
    AugmentedImageDatabase augmentedImageDatabase
)
boolean
equals(Object other)
final @NonNull AnchorPersistenceMode

Feature that allows anchors to be persisted through sessions.

final AugmentedImageDatabase

The current active AugmentedImageDatabase.

final @NonNull Set<@NonNull AugmentedObjectCategory>

Feature that allows tracking of recognizable objects in the environment.

final @NonNull DepthEstimationMode

Feature that allows more accurate information about scene depth and meshes.

final @NonNull DeviceTrackingMode

Feature that allows tracking of the AR device.

final @NonNull FaceTrackingMode
final @NonNull GeospatialMode

Feature that allows geospatial localization and tracking.

final @NonNull HandTrackingMode

Feature that allows tracking of the user's hands and hand joints.

final @NonNull PlaneTrackingMode

Feature that allows tracking of and provides information about scene planes.

final @NonNull Set<@NonNull SceneSignalType>
int

Public constructors

Config

Added in 1.0.0-alpha14
@ExperimentalSceneSignalApi
@PreviewSpatialApi
public Config(
    @NonNull Config config,
    @NonNull Set<@NonNull SceneSignalType> sceneSignalTypes
)

Creates a new Config from an existing Config, updating the sceneSignalTypes.

Parameters
@NonNull Config config

The existing configuration to copy.

@NonNull Set<@NonNull SceneSignalType> sceneSignalTypes

The set of scene signal types to enable for this session. See SceneSignalType. Setting this to an empty set (default) will disable all scene signal types.

Config

Added in 1.0.0-alpha14
public Config(
    @NonNull PlaneTrackingMode planeTracking,
    @NonNull HandTrackingMode handTracking,
    @NonNull DeviceTrackingMode deviceTracking,
    @NonNull DepthEstimationMode depthEstimation,
    @NonNull AnchorPersistenceMode anchorPersistence,
    @NonNull FaceTrackingMode faceTracking,
    @NonNull GeospatialMode geospatial,
    @NonNull Set<@NonNull AugmentedObjectCategory> augmentedObjectCategories,
    AugmentedImageDatabase augmentedImageDatabase
)

Defines a configuration state of all available features to be set at runtime.

An instance of this class should be passed to Session.configure to set the current configuration. Use Config.copy on Session.config to modify a copy of the existing configuration to pass to Session.configure.

Parameters
@NonNull PlaneTrackingMode planeTracking

Feature that allows tracking of and provides information about scene planes. See PlaneTrackingMode.

@NonNull HandTrackingMode handTracking

Feature that allows tracking of the user's hands and hand joints. See HandTrackingMode.

@NonNull DeviceTrackingMode deviceTracking

Feature that allows tracking of the AR device. See DeviceTrackingMode.

@NonNull DepthEstimationMode depthEstimation

Feature that allows more accurate information about scene depth and meshes. See DepthEstimationMode.

@NonNull AnchorPersistenceMode anchorPersistence

Feature that allows anchors to be persisted through sessions. See AnchorPersistenceMode.

@NonNull FaceTrackingMode faceTracking

Feature that allows tracking of human faces. See FaceTrackingMode.

@NonNull GeospatialMode geospatial

Feature that allows geospatial localization and tracking. See GeospatialMode.

@NonNull Set<@NonNull AugmentedObjectCategory> augmentedObjectCategories

Feature that allows tracking of recognizable objects in the environment. See AugmentedObjectCategory.

AugmentedImageDatabase augmentedImageDatabase

Feature that allows tracking of recognizable images in the environment. See AugmentedImageDatabase.

Public methods

copy

Added in 1.0.0-alpha14
public final @NonNull Config copy(
    @NonNull PlaneTrackingMode planeTracking,
    @NonNull HandTrackingMode handTracking,
    @NonNull DeviceTrackingMode deviceTracking,
    @NonNull DepthEstimationMode depthEstimation,
    @NonNull AnchorPersistenceMode anchorPersistence,
    @NonNull FaceTrackingMode faceTracking,
    @NonNull GeospatialMode geospatial,
    @NonNull Set<@NonNull AugmentedObjectCategory> augmentedObjectCategories,
    AugmentedImageDatabase augmentedImageDatabase
)

equals

public boolean equals(Object other)

getAnchorPersistence

Added in 1.0.0-alpha14
public final @NonNull AnchorPersistenceMode getAnchorPersistence()

Feature that allows anchors to be persisted through sessions. See androidx.xr.runtime.AnchorPersistenceMode.

getAugmentedImageDatabase

Added in 1.0.0-alpha14
public final AugmentedImageDatabase getAugmentedImageDatabase()

The current active AugmentedImageDatabase. If not empty, the image tracking feature will be enabled.

getAugmentedObjectCategories

Added in 1.0.0-alpha14
public final @NonNull Set<@NonNull AugmentedObjectCategorygetAugmentedObjectCategories()

Feature that allows tracking of recognizable objects in the environment. See androidx.xr.runtime.AugmentedObjectCategory.

getDepthEstimation

Added in 1.0.0-alpha14
public final @NonNull DepthEstimationMode getDepthEstimation()

Feature that allows more accurate information about scene depth and meshes. See androidx.xr.runtime.DepthEstimationMode.

getDeviceTracking

Added in 1.0.0-alpha14
public final @NonNull DeviceTrackingMode getDeviceTracking()

Feature that allows tracking of the AR device. See androidx.xr.runtime.DeviceTrackingMode.

getFaceTracking

Added in 1.0.0-alpha14
public final @NonNull FaceTrackingMode getFaceTracking()

getGeospatial

Added in 1.0.0-alpha14
public final @NonNull GeospatialMode getGeospatial()

Feature that allows geospatial localization and tracking. See androidx.xr.runtime.GeospatialMode.

getHandTracking

Added in 1.0.0-alpha14
public final @NonNull HandTrackingMode getHandTracking()

Feature that allows tracking of the user's hands and hand joints. See androidx.xr.runtime.HandTrackingMode.

getPlaneTracking

Added in 1.0.0-alpha14
public final @NonNull PlaneTrackingMode getPlaneTracking()

Feature that allows tracking of and provides information about scene planes. See androidx.xr.runtime.PlaneTrackingMode.

hashCode

public int hashCode()