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

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(
    planeTracking: PlaneTrackingMode,
    handTracking: HandTrackingMode,
    deviceTracking: DeviceTrackingMode,
    depthEstimation: DepthEstimationMode,
    anchorPersistence: AnchorPersistenceMode,
    faceTracking: FaceTrackingMode,
    geospatial: GeospatialMode,
    augmentedObjectCategories: Set<AugmentedObjectCategory>,
    augmentedImageDatabase: AugmentedImageDatabase?
)

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

Public functions

Config
copy(
    planeTracking: PlaneTrackingMode,
    handTracking: HandTrackingMode,
    deviceTracking: DeviceTrackingMode,
    depthEstimation: DepthEstimationMode,
    anchorPersistence: AnchorPersistenceMode,
    faceTracking: FaceTrackingMode,
    geospatial: GeospatialMode,
    augmentedObjectCategories: Set<AugmentedObjectCategory>,
    augmentedImageDatabase: AugmentedImageDatabase?
)
open operator Boolean
equals(other: Any?)
Set<SceneSignalType>
open Int

Public properties

AnchorPersistenceMode

Feature that allows anchors to be persisted through sessions.

AugmentedImageDatabase?

The current active AugmentedImageDatabase.

Set<AugmentedObjectCategory>

Feature that allows tracking of recognizable objects in the environment.

DepthEstimationMode

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

DeviceTrackingMode

Feature that allows tracking of the AR device.

FaceTrackingMode
GeospatialMode

Feature that allows geospatial localization and tracking.

HandTrackingMode

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

PlaneTrackingMode

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

Public constructors

Config

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

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

Parameters
config: Config

The existing configuration to copy.

sceneSignalTypes: Set<SceneSignalType>

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
Config(
    planeTracking: PlaneTrackingMode = PlaneTrackingMode.DISABLED,
    handTracking: HandTrackingMode = HandTrackingMode.DISABLED,
    deviceTracking: DeviceTrackingMode = DeviceTrackingMode.DISABLED,
    depthEstimation: DepthEstimationMode = DepthEstimationMode.DISABLED,
    anchorPersistence: AnchorPersistenceMode = AnchorPersistenceMode.DISABLED,
    faceTracking: FaceTrackingMode = FaceTrackingMode.DISABLED,
    geospatial: GeospatialMode = GeospatialMode.DISABLED,
    augmentedObjectCategories: Set<AugmentedObjectCategory> = setOf(),
    augmentedImageDatabase: AugmentedImageDatabase? = null
)

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
planeTracking: PlaneTrackingMode = PlaneTrackingMode.DISABLED

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

handTracking: HandTrackingMode = HandTrackingMode.DISABLED

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

deviceTracking: DeviceTrackingMode = DeviceTrackingMode.DISABLED

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

depthEstimation: DepthEstimationMode = DepthEstimationMode.DISABLED

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

anchorPersistence: AnchorPersistenceMode = AnchorPersistenceMode.DISABLED

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

faceTracking: FaceTrackingMode = FaceTrackingMode.DISABLED

Feature that allows tracking of human faces. See FaceTrackingMode.

geospatial: GeospatialMode = GeospatialMode.DISABLED

Feature that allows geospatial localization and tracking. See GeospatialMode.

augmentedObjectCategories: Set<AugmentedObjectCategory> = setOf()

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

augmentedImageDatabase: AugmentedImageDatabase? = null

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

Public functions

copy

Added in 1.0.0-alpha14
fun copy(
    planeTracking: PlaneTrackingMode = this.planeTracking,
    handTracking: HandTrackingMode = this.handTracking,
    deviceTracking: DeviceTrackingMode = this.deviceTracking,
    depthEstimation: DepthEstimationMode = this.depthEstimation,
    anchorPersistence: AnchorPersistenceMode = this.anchorPersistence,
    faceTracking: FaceTrackingMode = this.faceTracking,
    geospatial: GeospatialMode = this.geospatial,
    augmentedObjectCategories: Set<AugmentedObjectCategory> = this.augmentedObjectCategories,
    augmentedImageDatabase: AugmentedImageDatabase? = this.augmentedImageDatabase
): Config

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

Public properties

anchorPersistence

Added in 1.0.0-alpha14
val anchorPersistenceAnchorPersistenceMode

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

augmentedImageDatabase

Added in 1.0.0-alpha14
val augmentedImageDatabaseAugmentedImageDatabase?

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

augmentedObjectCategories

Added in 1.0.0-alpha14
val augmentedObjectCategoriesSet<AugmentedObjectCategory>

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

depthEstimation

Added in 1.0.0-alpha14
val depthEstimationDepthEstimationMode

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

deviceTracking

Added in 1.0.0-alpha14
val deviceTrackingDeviceTrackingMode

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

faceTracking

Added in 1.0.0-alpha14
val faceTrackingFaceTrackingMode

geospatial

Added in 1.0.0-alpha14
val geospatialGeospatialMode

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

handTracking

Added in 1.0.0-alpha14
val handTrackingHandTrackingMode

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

planeTracking

Added in 1.0.0-alpha14
val planeTrackingPlaneTrackingMode

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