Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Typedefs | Functions
Configuration

Typedefs

typedef struct ArConfig_ ArConfig
 

Functions

 AR_DEFINE_ENUM (ArLightEstimationMode)
 
 AR_DEFINE_ENUM (ArPlaneFindingMode)
 
 AR_DEFINE_ENUM (ArUpdateMode)
 
void ArConfig_create (const ArSession *session, ArConfig **out_config)
 
void ArConfig_destroy (ArConfig *config)
 Releases memory used by the provided configuration object.
 
void ArConfig_getLightEstimationMode (const ArSession *session, const ArConfig *config, ArLightEstimationMode *light_estimation_mode)
 
void ArConfig_setLightEstimationMode (const ArSession *session, ArConfig *config, ArLightEstimationMode light_estimation_mode)
 
void ArConfig_getPlaneFindingMode (const ArSession *session, const ArConfig *config, ArPlaneFindingMode *plane_finding_mode)
 
void ArConfig_setPlaneFindingMode (const ArSession *session, ArConfig *config, ArPlaneFindingMode plane_finding_mode)
 
void ArConfig_getUpdateMode (const ArSession *session, const ArConfig *config, ArUpdateMode *update_mode)
 
void ArConfig_setUpdateMode (const ArSession *session, ArConfig *config, ArUpdateMode update_mode)
 
void ArConfig_getCloudAnchorMode (const ArSession *session, const ArConfig *config, ArCloudAnchorMode *out_cloud_anchor_mode)
 Gets the current cloud anchor mode from the ArConfig.
 
void ArConfig_setCloudAnchorMode (const ArSession *session, ArConfig *config, ArCloudAnchorMode cloud_anchor_mode)
 
void ArConfig_setAugmentedImageDatabase (const ArSession *session, ArConfig *config, const ArAugmentedImageDatabase *augmented_image_database)
 
void ArConfig_getAugmentedImageDatabase (const ArSession *session, const ArConfig *config, ArAugmentedImageDatabase *out_augmented_image_database)
 

Detailed Description

Session configuration.

Typedef Documentation

◆ ArConfig

typedef struct ArConfig_ ArConfig

An opaque session configuration object (value type).

Create with ArConfig_create()
Release with ArConfig_destroy()

Definition at line 153 of file arcore_c_api.h.

Function Documentation

◆ AR_DEFINE_ENUM() [1/3]

AR_DEFINE_ENUM ( ArLightEstimationMode  )

Select the behavior of the lighting estimation subsystem.

Lighting estimation is disabled.

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

Definition at line 707 of file arcore_c_api.h.

707 {
708 /// Lighting estimation is disabled.
709 AR_LIGHT_ESTIMATION_MODE_DISABLED = 0,
710 /// Lighting estimation is enabled, generating a single-value intensity
711 /// estimate.
712 AR_LIGHT_ESTIMATION_MODE_AMBIENT_INTENSITY = 1};

◆ AR_DEFINE_ENUM() [2/3]

AR_DEFINE_ENUM ( ArPlaneFindingMode  )

Select the behavior of the plane detection subsystem.

Plane detection is disabled.

Detection of only horizontal planes is enabled.

Detection of only vertical planes is enabled.

Detection of horizontal and vertical planes is enabled.

Definition at line 716 of file arcore_c_api.h.

716 {
717 /// Plane detection is disabled.
718 AR_PLANE_FINDING_MODE_DISABLED = 0,
719 /// Detection of only horizontal planes is enabled.
720 AR_PLANE_FINDING_MODE_HORIZONTAL = 1,
721 /// Detection of only vertical planes is enabled.
722 AR_PLANE_FINDING_MODE_VERTICAL = 2,
723 /// Detection of horizontal and vertical planes is enabled.
724 AR_PLANE_FINDING_MODE_HORIZONTAL_AND_VERTICAL = 3};

◆ AR_DEFINE_ENUM() [3/3]

AR_DEFINE_ENUM ( ArUpdateMode  )

Selects the behavior of ArSession_update().

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.

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

Definition at line 728 of file arcore_c_api.h.

728 {
729 /// @c update() will wait until a new camera image is available, or until
730 /// the built-in timeout (currently 66ms) is reached. On most
731 /// devices the camera is configured to capture 30 frames per second.
732 /// If the camera image does not arrive by the built-in timeout, then
733 /// @c update() will return the most recent ::ArFrame object.
734 AR_UPDATE_MODE_BLOCKING = 0,
735 /// @c update() will return immediately without blocking. If no new camera
736 /// image is available, then @c update() will return the most recent
737 /// ::ArFrame object.
738 AR_UPDATE_MODE_LATEST_CAMERA_IMAGE = 1};

◆ 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_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_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.