Flutter Engine
The Flutter Engine
|
Typedefs | |
typedef struct ArAnchor_ | ArAnchor |
typedef struct ArAnchorList_ | ArAnchorList |
Functions | |
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) |
Describes a fixed location and orientation in the real world.
typedef struct ArAnchor_ ArAnchor |
A position in space attached to a trackable (reference type, long-lived).
Create with ArSession_acquireNewAnchor() or ArHitResult_acquireNewAnchor()
Release with ArAnchor_release()
Definition at line 349 of file arcore_c_api.h.
typedef struct ArAnchorList_ ArAnchorList |
A list of anchors (value type).
Allocate with ArAnchorList_create()
Release with ArAnchorList_destroy()
Definition at line 355 of file arcore_c_api.h.
void ArAnchor_acquireCloudAnchorId | ( | ArSession * | session, |
ArAnchor * | anchor, | ||
char ** | out_cloud_anchor_id | ||
) |
Acquires the cloud anchor ID of the anchor. The ID acquired is an ASCII null-terminated string. The acquired ID must be released after use by the ArString_release
function. For anchors with cloud state #AR_CLOUD_ANCHOR_STATE_NONE or #AR_CLOUD_ANCHOR_STATE_TASK_IN_PROGRESS, this will always be an empty string.
[in] | session | The ARCore session. |
[in] | anchor | The anchor to retrieve the cloud ID of. |
[in,out] | out_cloud_anchor_id | A pointer to the acquired ID string. |
Tells ARCore to stop tracking and forget this anchor. This call does not release the reference to the anchor - that must be done separately using ArAnchor_release().
void ArAnchor_getCloudAnchorState | ( | const ArSession * | session, |
const ArAnchor * | anchor, | ||
ArCloudAnchorState * | out_state | ||
) |
Gets the current cloud anchor state of the anchor. This state is guaranteed not to change until update() is called.
[in] | session | The ARCore session. |
[in] | anchor | The anchor to retrieve the cloud state of. |
[in,out] | out_state | The current cloud state of the anchor. |
Retrieves the pose of the anchor in the world coordinate space. This pose produced by this call may change each time ArSession_update() is called. This pose should only be used for rendering if ArAnchor_getTrackingState() returns #AR_TRACKING_STATE_TRACKING.
[in] | session | The ARCore session. |
[in] | anchor | The anchor to retrieve the pose of. |
[in,out] | out_pose | An already-allocated ArPose object into which the pose will be stored. |
void ArAnchor_getTrackingState | ( | const ArSession * | session, |
const ArAnchor * | anchor, | ||
ArTrackingState * | out_tracking_state | ||
) |
Retrieves the current state of the pose of this anchor.
void ArAnchor_release | ( | ArAnchor * | anchor | ) |
Releases a reference to an anchor. This does not mean that the anchor will stop tracking, as it will be obtainable from e.g. ArSession_getAllAnchors() if any other references exist.
This method may safely be called with nullptr
- it will do nothing.
void ArAnchorList_acquireItem | ( | const ArSession * | session, |
const ArAnchorList * | anchor_list, | ||
int32_t | index, | ||
ArAnchor ** | out_anchor | ||
) |
Acquires a reference to an indexed entry in the list. This call must eventually be matched with a call to ArAnchor_release().
void ArAnchorList_create | ( | const ArSession * | session, |
ArAnchorList ** | out_anchor_list | ||
) |
Creates an anchor list object.
void ArAnchorList_destroy | ( | ArAnchorList * | anchor_list | ) |
Releases the memory used by an anchor list object, along with all the anchor references it holds.
void ArAnchorList_getSize | ( | const ArSession * | session, |
const ArAnchorList * | anchor_list, | ||
int32_t * | out_size | ||
) |
Retrieves the number of anchors in this list.