Flutter Engine
The Flutter Engine
Macros | Typedefs | Functions
arcore_c_api.h File Reference
#include <stddef.h>
#include <stdint.h>

Go to the source code of this file.

Macros

#define AR_DEFINE_ENUM(_type)
 
#define AR_DEPRECATED(_deprecation_string)
 

Typedefs

typedef struct ArConfig_ ArConfig
 
typedef struct ArSession_ ArSession
 
typedef struct ArPose_ ArPose
 
typedef struct ArCamera_ ArCamera
 
typedef struct ArFrame_ ArFrame
 
typedef struct ArLightEstimate_ ArLightEstimate
 
typedef struct ArPointCloud_ ArPointCloud
 
typedef struct ArImageMetadata_ ArImageMetadata
 
typedef struct ArImage_ ArImage
 
typedef struct AImage AImage
 
typedef struct ArTrackable_ ArTrackable
 Trackable base type (reference type, long-lived). More...
 
typedef struct ArTrackableList_ ArTrackableList
 
typedef struct ArPlane_ ArPlane
 
typedef struct ArPoint_ ArPoint
 
typedef struct ArAugmentedImage_ ArAugmentedImage
 
typedef struct ArAugmentedImageDatabase_ ArAugmentedImageDatabase
 
typedef struct ArAnchor_ ArAnchor
 
typedef struct ArAnchorList_ ArAnchorList
 
typedef struct ArHitResult_ ArHitResult
 
typedef struct ArHitResultList_ ArHitResultList
 

Functions

 AR_DEFINE_ENUM (ArTrackableType)
 
 AR_DEFINE_ENUM (ArStatus)
 
 AR_DEFINE_ENUM (ArTrackingState)
 
 AR_DEFINE_ENUM (ArCloudAnchorState)
 
 AR_DEFINE_ENUM (ArAvailability)
 
 AR_DEFINE_ENUM (ArInstallStatus)
 
 AR_DEFINE_ENUM (ArInstallBehavior)
 
 AR_DEFINE_ENUM (ArInstallUserMessageType)
 
 AR_DEFINE_ENUM (ArLightEstimationMode)
 
 AR_DEFINE_ENUM (ArPlaneFindingMode)
 
 AR_DEFINE_ENUM (ArUpdateMode)
 
 AR_DEFINE_ENUM (ArPlaneType)
 
 AR_DEFINE_ENUM (ArLightEstimateState)
 
 AR_DEFINE_ENUM (ArPointOrientationMode)
 
 AR_DEFINE_ENUM (ArCloudAnchorMode)
 
void ArCoreApk_checkAvailability (void *env, void *application_context, ArAvailability *out_availability)
 
ArStatus ArCoreApk_requestInstall (void *env, void *application_activity, bool user_requested_install, ArInstallStatus *out_install_status)
 
ArStatus ArCoreApk_requestInstallCustom (void *env, void *application_activity, int32_t user_requested_install, ArInstallBehavior install_behavior, ArInstallUserMessageType message_type, ArInstallStatus *out_install_status)
 
ArStatus ArSession_create (void *env, void *application_context, ArSession **out_session_pointer)
 
void ArConfig_create (const ArSession *session, ArConfig **out_config)
 
void ArConfig_destroy (ArConfig *config)
 Releases memory used by the provided configuration object. More...
 
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. More...
 
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)
 
void ArSession_destroy (ArSession *session)
 Releases resources used by an ARCore session. More...
 
ArStatus ArSession_checkSupported (const ArSession *session, const ArConfig *config) AR_DEPRECATED("deprecated in release 1.2.0. Please see function documentation")
 
ArStatus ArSession_configure (ArSession *session, const ArConfig *config)
 
ArStatus ArSession_resume (ArSession *session)
 
ArStatus ArSession_pause (ArSession *session)
 
void ArSession_setCameraTextureName (ArSession *session, uint32_t texture_id)
 
void ArSession_setDisplayGeometry (ArSession *session, int32_t rotation, int32_t width, int32_t height)
 
ArStatus ArSession_update (ArSession *session, ArFrame *out_frame)
 
ArStatus ArSession_acquireNewAnchor (ArSession *session, const ArPose *pose, ArAnchor **out_anchor)
 
void ArSession_getAllAnchors (const ArSession *session, ArAnchorList *out_anchor_list)
 
void ArSession_getAllTrackables (const ArSession *session, ArTrackableType filter_type, ArTrackableList *out_trackable_list)
 
ArStatus ArSession_hostAndAcquireNewCloudAnchor (ArSession *session, const ArAnchor *anchor, ArAnchor **out_cloud_anchor)
 
ArStatus ArSession_resolveAndAcquireNewCloudAnchor (ArSession *session, const char *cloud_anchor_id, ArAnchor **out_cloud_anchor)
 
void ArPose_create (const ArSession *session, const float *pose_raw, ArPose **out_pose)
 
void ArPose_destroy (ArPose *pose)
 Releases memory used by a pose object. More...
 
void ArPose_getPoseRaw (const ArSession *session, const ArPose *pose, float *out_pose_raw)
 
void ArPose_getMatrix (const ArSession *session, const ArPose *pose, float *out_matrix_col_major_4x4)
 
void ArCamera_getPose (const ArSession *session, const ArCamera *camera, ArPose *out_pose)
 
void ArCamera_getDisplayOrientedPose (const ArSession *session, const ArCamera *camera, ArPose *out_pose)
 
void ArCamera_getViewMatrix (const ArSession *session, const ArCamera *camera, float *out_col_major_4x4)
 
void ArCamera_getTrackingState (const ArSession *session, const ArCamera *camera, ArTrackingState *out_tracking_state)
 
void ArCamera_getProjectionMatrix (const ArSession *session, const ArCamera *camera, float near, float far, float *dest_col_major_4x4)
 
void ArCamera_release (ArCamera *camera)
 
void ArFrame_create (const ArSession *session, ArFrame **out_frame)
 
void ArFrame_destroy (ArFrame *frame)
 Releases an ArFrame and any references it holds. More...
 
void ArFrame_getDisplayGeometryChanged (const ArSession *session, const ArFrame *frame, int32_t *out_geometry_changed)
 
void ArFrame_getTimestamp (const ArSession *session, const ArFrame *frame, int64_t *out_timestamp_ns)
 
void ArFrame_transformDisplayUvCoords (const ArSession *session, const ArFrame *frame, int32_t num_elements, const float *uvs_in, float *uvs_out)
 
void ArFrame_hitTest (const ArSession *session, const ArFrame *frame, float pixel_x, float pixel_y, ArHitResultList *hit_result_list)
 
void ArFrame_getLightEstimate (const ArSession *session, const ArFrame *frame, ArLightEstimate *out_light_estimate)
 
ArStatus ArFrame_acquirePointCloud (const ArSession *session, const ArFrame *frame, ArPointCloud **out_point_cloud)
 
void ArFrame_acquireCamera (const ArSession *session, const ArFrame *frame, ArCamera **out_camera)
 
ArStatus ArFrame_acquireImageMetadata (const ArSession *session, const ArFrame *frame, ArImageMetadata **out_metadata)
 
void ArFrame_getUpdatedAnchors (const ArSession *session, const ArFrame *frame, ArAnchorList *out_anchor_list)
 
void ArFrame_getUpdatedTrackables (const ArSession *session, const ArFrame *frame, ArTrackableType filter_type, ArTrackableList *out_trackable_list)
 
void ArPointCloud_getNumberOfPoints (const ArSession *session, const ArPointCloud *point_cloud, int32_t *out_number_of_points)
 
void ArPointCloud_getData (const ArSession *session, const ArPointCloud *point_cloud, const float **out_point_cloud_data)
 
void ArPointCloud_getTimestamp (const ArSession *session, const ArPointCloud *point_cloud, int64_t *out_timestamp_ns)
 
void ArPointCloud_release (ArPointCloud *point_cloud)
 
void ArImageMetadata_getNdkCameraMetadata (const ArSession *session, const ArImageMetadata *image_metadata, const ACameraMetadata **out_ndk_metadata)
 
void ArImageMetadata_release (ArImageMetadata *metadata)
 
ArStatus ArFrame_acquireCameraImage (ArSession *session, ArFrame *frame, ArImage **out_image)
 
void ArImage_getNdkImage (const ArImage *image, const AImage **out_ndk_image)
 Converts an ArImage object to an Android NDK AImage object. More...
 
void ArImage_release (ArImage *image)
 Releases an instance of ArImage returned by ArFrame_acquireCameraImage(). More...
 
void ArLightEstimate_create (const ArSession *session, ArLightEstimate **out_light_estimate)
 Allocates a light estimate object. More...
 
void ArLightEstimate_destroy (ArLightEstimate *light_estimate)
 Releases the provided light estimate object. More...
 
void ArLightEstimate_getState (const ArSession *session, const ArLightEstimate *light_estimate, ArLightEstimateState *out_light_estimate_state)
 
void ArLightEstimate_getPixelIntensity (const ArSession *session, const ArLightEstimate *light_estimate, float *out_pixel_intensity)
 
void ArLightEstimate_getColorCorrection (const ArSession *session, const ArLightEstimate *light_estimate, float *out_color_correction_4)
 
void ArAnchorList_create (const ArSession *session, ArAnchorList **out_anchor_list)
 Creates an anchor list object. More...
 
void ArAnchorList_destroy (ArAnchorList *anchor_list)
 
void ArAnchorList_getSize (const ArSession *session, const ArAnchorList *anchor_list, int32_t *out_size)
 Retrieves the number of anchors in this list. More...
 
void ArAnchorList_acquireItem (const ArSession *session, const ArAnchorList *anchor_list, int32_t index, ArAnchor **out_anchor)
 
void ArAnchor_getPose (const ArSession *session, const ArAnchor *anchor, ArPose *out_pose)
 
void ArAnchor_getTrackingState (const ArSession *session, const ArAnchor *anchor, ArTrackingState *out_tracking_state)
 Retrieves the current state of the pose of this anchor. More...
 
void ArAnchor_detach (ArSession *session, ArAnchor *anchor)
 
void ArAnchor_release (ArAnchor *anchor)
 
void ArAnchor_acquireCloudAnchorId (ArSession *session, ArAnchor *anchor, char **out_cloud_anchor_id)
 
void ArAnchor_getCloudAnchorState (const ArSession *session, const ArAnchor *anchor, ArCloudAnchorState *out_state)
 
void ArTrackableList_create (const ArSession *session, ArTrackableList **out_trackable_list)
 Creates a trackable list object. More...
 
void ArTrackableList_destroy (ArTrackableList *trackable_list)
 
void ArTrackableList_getSize (const ArSession *session, const ArTrackableList *trackable_list, int32_t *out_size)
 Retrieves the number of trackables in this list. More...
 
void ArTrackableList_acquireItem (const ArSession *session, const ArTrackableList *trackable_list, int32_t index, ArTrackable **out_trackable)
 
void ArTrackable_release (ArTrackable *trackable)
 
void ArTrackable_getType (const ArSession *session, const ArTrackable *trackable, ArTrackableType *out_trackable_type)
 Retrieves the type of the trackable. See ::ArTrackableType for valid types. More...
 
void ArTrackable_getTrackingState (const ArSession *session, const ArTrackable *trackable, ArTrackingState *out_tracking_state)
 
ArStatus ArTrackable_acquireNewAnchor (ArSession *session, ArTrackable *trackable, ArPose *pose, ArAnchor **out_anchor)
 
void ArTrackable_getAnchors (const ArSession *session, const ArTrackable *trackable, ArAnchorList *out_anchor_list)
 
void ArPlane_acquireSubsumedBy (const ArSession *session, const ArPlane *plane, ArPlane **out_subsumed_by)
 
void ArPlane_getType (const ArSession *session, const ArPlane *plane, ArPlaneType *out_plane_type)
 Retrieves the type (orientation) of the plane. See ::ArPlaneType. More...
 
void ArPlane_getCenterPose (const ArSession *session, const ArPlane *plane, ArPose *out_pose)
 
void ArPlane_getExtentX (const ArSession *session, const ArPlane *plane, float *out_extent_x)
 
void ArPlane_getExtentZ (const ArSession *session, const ArPlane *plane, float *out_extent_z)
 
void ArPlane_getPolygonSize (const ArSession *session, const ArPlane *plane, int32_t *out_polygon_size)
 
void ArPlane_getPolygon (const ArSession *session, const ArPlane *plane, float *out_polygon_xz)
 
void ArPlane_isPoseInExtents (const ArSession *session, const ArPlane *plane, const ArPose *pose, int32_t *out_pose_in_extents)
 
void ArPlane_isPoseInPolygon (const ArSession *session, const ArPlane *plane, const ArPose *pose, int32_t *out_pose_in_polygon)
 
void ArPoint_getPose (const ArSession *session, const ArPoint *point, ArPose *out_pose)
 
void ArPoint_getOrientationMode (const ArSession *session, const ArPoint *point, ArPointOrientationMode *out_orientation_mode)
 
void ArAugmentedImage_getCenterPose (const ArSession *session, const ArAugmentedImage *augmented_image, ArPose *out_pose)
 
void ArAugmentedImage_getExtentX (const ArSession *session, const ArAugmentedImage *augmented_image, float *out_extent_x)
 
void ArAugmentedImage_getExtentZ (const ArSession *session, const ArAugmentedImage *augmented_image, float *out_extent_z)
 
void ArAugmentedImage_getIndex (const ArSession *session, const ArAugmentedImage *augmented_image, int32_t *out_index)
 
void ArAugmentedImage_acquireName (const ArSession *session, const ArAugmentedImage *augmented_image, char **out_augmented_image_name)
 
void ArAugmentedImageDatabase_create (const ArSession *session, ArAugmentedImageDatabase **out_augmented_image_database)
 Creates a new empty image database. More...
 
ArStatus ArAugmentedImageDatabase_deserialize (const ArSession *session, const uint8_t *database_raw_bytes, int64_t database_raw_bytes_size, ArAugmentedImageDatabase **out_augmented_image_database)
 
void ArAugmentedImageDatabase_serialize (const ArSession *session, const ArAugmentedImageDatabase *augmented_image_database, uint8_t **out_image_database_raw_bytes, int64_t *out_image_database_raw_bytes_size)
 
ArStatus ArAugmentedImageDatabase_addImage (const ArSession *session, ArAugmentedImageDatabase *augmented_image_database, const char *image_name, const uint8_t *image_grayscale_pixels, int32_t image_width_in_pixels, int32_t image_height_in_pixels, int32_t image_stride_in_pixels, int32_t *out_index)
 
ArStatus ArAugmentedImageDatabase_addImageWithPhysicalSize (const ArSession *session, ArAugmentedImageDatabase *augmented_image_database, const char *image_name, const uint8_t *image_grayscale_pixels, int32_t image_width_in_pixels, int32_t image_height_in_pixels, int32_t image_stride_in_pixels, float image_width_in_meters, int32_t *out_index)
 
void ArAugmentedImageDatabase_getNumImages (const ArSession *session, const ArAugmentedImageDatabase *augmented_image_database, int32_t *out_num_images)
 Returns the number of images in the image database. More...
 
void ArAugmentedImageDatabase_destroy (ArAugmentedImageDatabase *augmented_image_database)
 Releases memory used by an image database. More...
 
void ArHitResultList_create (const ArSession *session, ArHitResultList **out_hit_result_list)
 Creates a hit result list object. More...
 
void ArHitResultList_destroy (ArHitResultList *hit_result_list)
 
void ArHitResultList_getSize (const ArSession *session, const ArHitResultList *hit_result_list, int32_t *out_size)
 Retrieves the number of hit results in this list. More...
 
void ArHitResultList_getItem (const ArSession *session, const ArHitResultList *hit_result_list, int32_t index, ArHitResult *out_hit_result)
 
void ArHitResult_create (const ArSession *session, ArHitResult **out_hit_result)
 Allocates an empty hit result object. More...
 
void ArHitResult_destroy (ArHitResult *hit_result)
 
void ArHitResult_getDistance (const ArSession *session, const ArHitResult *hit_result, float *out_distance)
 Returns the distance from the camera to the hit location, in meters. More...
 
void ArHitResult_getHitPose (const ArSession *session, const ArHitResult *hit_result, ArPose *out_pose)
 
void ArHitResult_acquireTrackable (const ArSession *session, const ArHitResult *hit_result, ArTrackable **out_trackable)
 
ArStatus ArHitResult_acquireNewAnchor (ArSession *session, ArHitResult *hit_result, ArAnchor **out_anchor)
 
void ArString_release (char *str)
 
void ArByteArray_release (uint8_t *byte_array)
 Releases a byte array created using an ARCore API function. More...
 

Macro Definition Documentation

◆ AR_DEFINE_ENUM

#define AR_DEFINE_ENUM (   _type)
Value:
typedef int32_t _type; \
enum

Definition at line 436 of file arcore_c_api.h.

◆ AR_DEPRECATED

#define AR_DEPRECATED (   _deprecation_string)

Definition at line 445 of file arcore_c_api.h.

Function Documentation

◆ ArByteArray_release()

void ArByteArray_release ( uint8_t *  byte_array)

Releases a byte array created using an ARCore API function.

◆ ArString_release()

void ArString_release ( char *  str)

Releases a string acquired using an ARCore API function.

Parameters
[in]strThe string to be released.