ArResolveAnchorOnTerrainFuture

An asynchronous operation for resolving a terrain anchor launched by ArEarth_resolveAnchorOnTerrainAsync.

See the Terrain anchors developer guide for more information.

Summary

Typedefs

ArResolveAnchorOnTerrainCallback)(void *context, ArAnchor *anchor, ArTerrainAnchorState terrain_anchor_state) typedef
void(*
Callback definition for ArEarth_resolveAnchorOnTerrainAsync.
ArResolveAnchorOnTerrainFuture typedef
struct ArResolveAnchorOnTerrainFuture_
Handle to an asynchronous operation launched by ArEarth_resolveAnchorOnTerrainAsync.

Functions

ArResolveAnchorOnTerrainFuture_acquireResultAnchor(const ArSession *session, const ArResolveAnchorOnTerrainFuture *future, ArAnchor **out_anchor)
void
Gets the resolved Terrain anchor.
ArResolveAnchorOnTerrainFuture_getResultTerrainAnchorState(const ArSession *session, const ArResolveAnchorOnTerrainFuture *future, ArTerrainAnchorState *out_terrain_anchor_state)
void
Gets the result status of the resolving operation, if the operation is done.

Typedefs

ArResolveAnchorOnTerrainCallback

void(* ArResolveAnchorOnTerrainCallback)(void *context, ArAnchor *anchor, ArTerrainAnchorState terrain_anchor_state)

Callback definition for ArEarth_resolveAnchorOnTerrainAsync.

The context argument will be the same as that passed to ArEarth_resolveAnchorOnTerrainAsync. The anchor argument will be the same as that returned by ArResolveAnchorOnTerrainFuture_acquireResultAnchor and must be released using ArAnchor_release. The terrain_anchor_state argument will be the same as that returned by ArResolveAnchorOnTerrainFuture_getResultTerrainAnchorState.

It is a best practice to free context memory provided to ArEarth_resolveAnchorOnTerrainAsync at the end of the callback implementation.

ArResolveAnchorOnTerrainFuture

struct ArResolveAnchorOnTerrainFuture_ ArResolveAnchorOnTerrainFuture

Handle to an asynchronous operation launched by ArEarth_resolveAnchorOnTerrainAsync.

Release with ArFuture_release. (reference type, long-lived).

Functions

ArResolveAnchorOnTerrainFuture_acquireResultAnchor

void ArResolveAnchorOnTerrainFuture_acquireResultAnchor(
  const ArSession *session,
  const ArResolveAnchorOnTerrainFuture *future,
  ArAnchor **out_anchor
)

Gets the resolved Terrain anchor.

If the operation isn't done yet or the operation failed, this will be NULL. The caller must release the anchor using ArAnchor_release.

Details
Parameters
session
The ARCore session.
future
The handle for the asynchronous operation.
out_anchor
The anchor.

ArResolveAnchorOnTerrainFuture_getResultTerrainAnchorState

void ArResolveAnchorOnTerrainFuture_getResultTerrainAnchorState(
  const ArSession *session,
  const ArResolveAnchorOnTerrainFuture *future,
  ArTerrainAnchorState *out_terrain_anchor_state
)

Gets the result status of the resolving operation, if the operation is done.

Details
Parameters
session
The ARCore session.
future
The handle for the asynchronous operation.
out_terrain_anchor_state
The result status.