Config.Builder


class Config.Builder


This class can be used to create a Config instance.

Apps can create a default Builder object and then call the appropriate setter methods on the builder to specify any non-default settings. Default settings for each configuration parameter are specified for each setter method. Setters return the builder object so that setter methods can be chained. Builder.build can be used to create a Config with the configuration specified in the builder.

Summary

Public constructors

Creates a Builder instance for a Config with default values.

Builder(config: Config)

Creates a Builder instance with the same configuration settings as the provided Config.

Public functions

Config

Creates a new instance of Config with the configuration specified in this instance.

Config.Builder

Sets the AnchorPersistenceMode this Builder instance will use to build a Config.

Config.Builder
setAugmentedImageDatabase(
    augmentedImageDatabase: AugmentedImageDatabase?
)

Sets the AugmentedImageDatabase this Builder instance will use to build a Config.

Config.Builder
setAugmentedObjectCategories(
    augmentedObjectCategories: Set<AugmentedObjectCategory>
)

Sets the augmented object categories this Builder instance will use to build a Config.

Config.Builder

Sets the DepthEstimationMode this Builder instance will use to build a Config.

Config.Builder

Sets the DeviceTrackingMode this Builder instance will use to build a Config.

Config.Builder

Sets the EyeTrackingMode this Builder instance will use to build a Config.

Config.Builder

Sets the FaceTrackingMode this Builder instance will use to build a Config.

Config.Builder

Sets the GeospatialMode this Builder instance will use to build a Config.

Config.Builder

Sets the HandTrackingMode this Builder instance will use to build a Config.

Config.Builder

Sets the PlaneTrackingMode this Builder instance will use to build a Config.

Config.Builder
setQrCodeSizeMeters(qrCodeSizeMeters: Float)

Sets the QR code size this Builder instance will use to build a Config.

Config.Builder

Sets the QrCodeTrackingMode this Builder instance will use to build a Config.

Public constructors

Builder

Added in 1.0.0-alpha15
Builder()

Creates a Builder instance for a Config with default values.

Builder

Added in 1.0.0-alpha15
Builder(config: Config)

Creates a Builder instance with the same configuration settings as the provided Config.

Parameters
config: Config

the configuration for the Builder instance

Public functions

build

Added in 1.0.0-alpha15
fun build(): Config

Creates a new instance of Config with the configuration specified in this instance.

setAnchorPersistence

Added in 1.0.0-alpha15
fun setAnchorPersistence(anchorPersistence: AnchorPersistenceMode): Config.Builder

Sets the AnchorPersistenceMode this Builder instance will use to build a Config.

The default value is AnchorPersistenceMode.DISABLED.

Parameters
anchorPersistence: AnchorPersistenceMode

AnchorPersistenceMode value to configure the Session

Returns
Config.Builder

a Builder that builds a Config with the supplied anchor persistence mode

setAugmentedImageDatabase

Added in 1.0.0-alpha15
fun setAugmentedImageDatabase(
    augmentedImageDatabase: AugmentedImageDatabase?
): Config.Builder

Sets the AugmentedImageDatabase this Builder instance will use to build a Config.

The default value is null.

Parameters
augmentedImageDatabase: AugmentedImageDatabase?

Nullable AugmentedImageDatabase value to configure the Session

Returns
Config.Builder

a Builder that builds a Config with the supplied augmented image database

setAugmentedObjectCategories

Added in 1.0.0-alpha15
fun setAugmentedObjectCategories(
    augmentedObjectCategories: Set<AugmentedObjectCategory>
): Config.Builder

Sets the augmented object categories this Builder instance will use to build a Config.

The default value is an empty set.

Parameters
augmentedObjectCategories: Set<AugmentedObjectCategory>

AugmentedObjectCategory set to configure the Session

Returns
Config.Builder

a Builder that builds a Config with the supplied AugmentedObjectCategory set

setDepthEstimation

Added in 1.0.0-alpha15
fun setDepthEstimation(depthEstimation: DepthEstimationMode): Config.Builder

Sets the DepthEstimationMode this Builder instance will use to build a Config.

The default value is DepthEstimationMode.DISABLED.

Parameters
depthEstimation: DepthEstimationMode

DepthEstimationMode value to configure the Session

Returns
Config.Builder

a Builder that builds a Config with the supplied depth estimation mode

setDeviceTracking

Added in 1.0.0-alpha15
fun setDeviceTracking(deviceTracking: DeviceTrackingMode): Config.Builder

Sets the DeviceTrackingMode this Builder instance will use to build a Config.

The default value is DeviceTrackingMode.DISABLED.

Parameters
deviceTracking: DeviceTrackingMode

DeviceTrackingMode value to configure the Session

Returns
Config.Builder

a Builder that builds a Config with the supplied device tracking mode

setEyeTracking

Added in 1.0.0-alpha15
fun setEyeTracking(eyeTracking: EyeTrackingMode): Config.Builder

Sets the EyeTrackingMode this Builder instance will use to build a Config.

The default value is EyeTrackingMode.DISABLED.

Parameters
eyeTracking: EyeTrackingMode

EyeTrackingMode value to configure the Session

Returns
Config.Builder

a Builder that builds a Config with the supplied eye tracking mode

setFaceTracking

Added in 1.0.0-alpha15
fun setFaceTracking(faceTracking: FaceTrackingMode): Config.Builder

Sets the FaceTrackingMode this Builder instance will use to build a Config.

The default value is FaceTrackingMode.DISABLED.

Parameters
faceTracking: FaceTrackingMode

FaceTrackingMode value to configure the Session

Returns
Config.Builder

a Builder that builds a Config with the supplied face tracking mode

setGeospatial

Added in 1.0.0-alpha15
fun setGeospatial(geospatial: GeospatialMode): Config.Builder

Sets the GeospatialMode this Builder instance will use to build a Config.

The default value is GeospatialMode.DISABLED.

Parameters
geospatial: GeospatialMode

GeospatialMode value to configure the Session

Returns
Config.Builder

a Builder that builds a Config with the supplied geospatial mode

setHandTracking

Added in 1.0.0-alpha15
fun setHandTracking(handTracking: HandTrackingMode): Config.Builder

Sets the HandTrackingMode this Builder instance will use to build a Config.

The default value is HandTrackingMode.DISABLED.

Parameters
handTracking: HandTrackingMode

HandTrackingMode value to configure the Session

Returns
Config.Builder

a Builder that builds a Config with the supplied hand tracking mode

setPlaneTracking

Added in 1.0.0-alpha15
fun setPlaneTracking(planeTracking: PlaneTrackingMode): Config.Builder

Sets the PlaneTrackingMode this Builder instance will use to build a Config.

The default value is PlaneTrackingMode.DISABLED.

Parameters
planeTracking: PlaneTrackingMode

PlaneTrackingMode value to configure the Session

Returns
Config.Builder

a Builder that builds a Config with the supplied plane tracking mode

setQrCodeSizeMeters

Added in 1.0.0-alpha15
fun setQrCodeSizeMeters(qrCodeSizeMeters: Float): Config.Builder

Sets the QR code size this Builder instance will use to build a Config.

The default value is 0.0, indicating that the system should attempt to estimate the QR code size.

Parameters
qrCodeSizeMeters: Float

size of QR code to configure the Session

Returns
Config.Builder

a Builder that builds a Config with the supplied QR code size

setQrCodeTracking

Added in 1.0.0-alpha15
fun setQrCodeTracking(qrCodeTracking: QrCodeTrackingMode): Config.Builder

Sets the QrCodeTrackingMode this Builder instance will use to build a Config.

The default value is QrCodeTrackingMode.DISABLED.

Parameters
qrCodeTracking: QrCodeTrackingMode

QrCodeTrackingMode value configure the Session

Returns
Config.Builder

a Builder that builds a Config with the supplied QR code tracking mode