Configuration

Session configuration.

Summary

Enumerations

ArFocusMode{
  AR_FOCUS_MODE_FIXED = 0,
  AR_FOCUS_MODE_AUTO = 1
}
enum
Selects the desired behavior of the camera focus subsystem.
ArLightEstimationMode{
  AR_LIGHT_ESTIMATION_MODE_DISABLED = 0,
  AR_LIGHT_ESTIMATION_MODE_AMBIENT_INTENSITY = 1
}
enum
Select the behavior of the lighting estimation subsystem.
ArPlaneFindingMode{
  AR_PLANE_FINDING_MODE_DISABLED = 0,
  AR_PLANE_FINDING_MODE_HORIZONTAL = 1,
  AR_PLANE_FINDING_MODE_VERTICAL = 2,
  AR_PLANE_FINDING_MODE_HORIZONTAL_AND_VERTICAL = 3
}
enum
Select the behavior of the plane detection subsystem.
ArUpdateMode{
  AR_UPDATE_MODE_BLOCKING = 0,
  AR_UPDATE_MODE_LATEST_CAMERA_IMAGE = 1
}
enum
Selects the behavior of ArSession_update().

Typedefs

ArConfig typedef
struct ArConfig_
An opaque session configuration object (value type).

Functions

ArConfig_create(const ArSession *session, ArConfig **out_config)
void
Creates a new configuration object and initializes it to a sensible default configuration.
ArConfig_destroy(ArConfig *config)
void
Releases memory used by the provided configuration object.
ArConfig_getAugmentedImageDatabase(const ArSession *session, const ArConfig *config, ArAugmentedImageDatabase *out_augmented_image_database)
void
Returns the image database from the session configuration.
ArConfig_getCloudAnchorMode(const ArSession *session, const ArConfig *config, ArCloudAnchorMode *out_cloud_anchor_mode)
void
Gets the current cloud anchor mode from the ArConfig.
ArConfig_getFocusMode(const ArSession *session, ArConfig *config, ArFocusMode *focus_mode)
void
Stores the currently configured focus mode into *focus_mode.
ArConfig_getLightEstimationMode(const ArSession *session, const ArConfig *config, ArLightEstimationMode *light_estimation_mode)
void
Stores the currently configured lighting estimation mode into *light_estimation_mode.
ArConfig_getPlaneFindingMode(const ArSession *session, const ArConfig *config, ArPlaneFindingMode *plane_finding_mode)
void
Stores the currently configured plane finding mode into *plane_finding_mode.
ArConfig_getUpdateMode(const ArSession *session, const ArConfig *config, ArUpdateMode *update_mode)
void
Stores the currently configured behavior of ArSession_update() into *update_mode.
ArConfig_setAugmentedImageDatabase(const ArSession *session, ArConfig *config, const ArAugmentedImageDatabase *augmented_image_database)
void
Sets the image database in the session configuration.
ArConfig_setCloudAnchorMode(const ArSession *session, ArConfig *config, ArCloudAnchorMode cloud_anchor_mode)
void
Sets the cloud configuration that should be used.
ArConfig_setFocusMode(const ArSession *session, ArConfig *config, ArFocusMode focus_mode)
void
Sets the focus mode that should be used.
ArConfig_setLightEstimationMode(const ArSession *session, ArConfig *config, ArLightEstimationMode light_estimation_mode)
void
Sets the lighting estimation mode that should be used.
ArConfig_setPlaneFindingMode(const ArSession *session, ArConfig *config, ArPlaneFindingMode plane_finding_mode)
void
Sets the plane finding mode that should be used.
ArConfig_setUpdateMode(const ArSession *session, ArConfig *config, ArUpdateMode update_mode)
void
Sets the behavior of ArSession_update().

Enumerations

ArFocusMode

 ArFocusMode

Selects the desired behavior of the camera focus subsystem.

Currently, the default focus mode is AR_FOCUS_MODE_FIXED, but the default might change in the future.

For optimal AR tracking performance, use the focus mode provided by the default session config. While capturing pictures or video, use AR_FOCUS_MODE_AUTO. For optimal AR tracking, revert to the default focus mode once auto focus behavior is no longer needed. If your app requires fixed focus camera, call ArConfig_setFocusMode(…, …, AR_FOCUS_MODE_FIXED) before enabling the AR session. This will ensure that your app always uses fixed focus, even if the default camera config focus mode changes in a future release.

Properties
AR_FOCUS_MODE_AUTO

Auto-focus is enabled.

AR_FOCUS_MODE_FIXED

Focus is fixed.

ArLightEstimationMode

 ArLightEstimationMode

Select the behavior of the lighting estimation subsystem.

Properties
AR_LIGHT_ESTIMATION_MODE_AMBIENT_INTENSITY

Lighting estimation is enabled, generating a single-value intensity estimate.

AR_LIGHT_ESTIMATION_MODE_DISABLED

Lighting estimation is disabled.

ArPlaneFindingMode

 ArPlaneFindingMode

Select the behavior of the plane detection subsystem.

Properties
AR_PLANE_FINDING_MODE_DISABLED

Plane detection is disabled.

AR_PLANE_FINDING_MODE_HORIZONTAL

Detection of only horizontal planes is enabled.

AR_PLANE_FINDING_MODE_HORIZONTAL_AND_VERTICAL

Detection of horizontal and vertical planes is enabled.

AR_PLANE_FINDING_MODE_VERTICAL

Detection of only vertical planes is enabled.

ArUpdateMode

 ArUpdateMode

Selects the behavior of ArSession_update().

Properties
AR_UPDATE_MODE_BLOCKING

update() will wait until a new camera image is available, or until the built-in timeout (currently 66ms) is reached.

On most devices the camera is configured to capture 30 frames per second. If the camera image does not arrive by the built-in timeout, then update() will return the most recent ArFrame object.

AR_UPDATE_MODE_LATEST_CAMERA_IMAGE

update() will return immediately without blocking.

If no new camera image is available, then update() will return the most recent ArFrame object.

Typedefs

ArConfig

struct ArConfig_ ArConfig

An opaque session configuration object (value type).

Create with ArConfig_create()
Release with ArConfig_destroy()

Functions

ArConfig_create

void ArConfig_create(
  const ArSession *session,
  ArConfig **out_config
)

Creates a new configuration object and initializes it to a sensible default configuration.

Plane detection and lighting estimation are enabled, and blocking update is selected. This configuration is guaranteed to be supported on all devices that support ARCore.

ArConfig_destroy

void ArConfig_destroy(
  ArConfig *config
)

Releases memory used by the provided configuration object.

ArConfig_getAugmentedImageDatabase

void ArConfig_getAugmentedImageDatabase(
  const ArSession *session,
  const ArConfig *config,
  ArAugmentedImageDatabase *out_augmented_image_database
)

Returns the image database from the session configuration.

This function returns a copy of the internally stored image database.

ArConfig_getCloudAnchorMode

void ArConfig_getCloudAnchorMode(
  const ArSession *session,
  const ArConfig *config,
  ArCloudAnchorMode *out_cloud_anchor_mode
)

Gets the current cloud anchor mode from the ArConfig.

ArConfig_getFocusMode

void ArConfig_getFocusMode(
  const ArSession *session,
  ArConfig *config,
  ArFocusMode *focus_mode
)

Stores the currently configured focus mode into *focus_mode.

ArConfig_getLightEstimationMode

void ArConfig_getLightEstimationMode(
  const ArSession *session,
  const ArConfig *config,
  ArLightEstimationMode *light_estimation_mode
)

Stores the currently configured lighting estimation mode into *light_estimation_mode.

ArConfig_getPlaneFindingMode

void ArConfig_getPlaneFindingMode(
  const ArSession *session,
  const ArConfig *config,
  ArPlaneFindingMode *plane_finding_mode
)

Stores the currently configured plane finding mode into *plane_finding_mode.

ArConfig_getUpdateMode

void ArConfig_getUpdateMode(
  const ArSession *session,
  const ArConfig *config,
  ArUpdateMode *update_mode
)

Stores the currently configured behavior of ArSession_update() into *update_mode.

ArConfig_setAugmentedImageDatabase

void ArConfig_setAugmentedImageDatabase(
  const ArSession *session,
  ArConfig *config,
  const ArAugmentedImageDatabase *augmented_image_database
)

Sets the image database in the session configuration.

Any images in the currently active image database that have a TRACKING/PAUSED state will immediately be set to the STOPPED state if a different or null image database is set.

This function makes a copy of the image database.

ArConfig_setCloudAnchorMode

void ArConfig_setCloudAnchorMode(
  const ArSession *session,
  ArConfig *config,
  ArCloudAnchorMode cloud_anchor_mode
)

Sets the cloud configuration that should be used.

See ArCloudAnchorMode for available options.

ArConfig_setFocusMode

void ArConfig_setFocusMode(
  const ArSession *session,
  ArConfig *config,
  ArFocusMode focus_mode
)

Sets the focus mode that should be used.

See ArFocusMode for available options.

ArConfig_setLightEstimationMode

void ArConfig_setLightEstimationMode(
  const ArSession *session,
  ArConfig *config,
  ArLightEstimationMode light_estimation_mode
)

Sets the lighting estimation mode that should be used.

See ArLightEstimationMode for available options.

ArConfig_setPlaneFindingMode

void ArConfig_setPlaneFindingMode(
  const ArSession *session,
  ArConfig *config,
  ArPlaneFindingMode plane_finding_mode
)

Sets the plane finding mode that should be used.

See ArPlaneFindingMode for available options.

ArConfig_setUpdateMode

void ArConfig_setUpdateMode(
  const ArSession *session,
  ArConfig *config,
  ArUpdateMode update_mode
)

Sets the behavior of ArSession_update().

See ArUpdateMode for available options.

Send feedback about...