[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-07-14 UTC."],[[["\u003cp\u003e\u003ccode\u003eArResolveAnchorOnRooftopFuture\u003c/code\u003e handles asynchronous operations launched by \u003ccode\u003eArEarth_resolveAnchorOnRooftopAsync\u003c/code\u003e for resolving rooftop anchors in ARCore.\u003c/p\u003e\n"],["\u003cp\u003eYou can get the resolved rooftop anchor and its result status using functions like \u003ccode\u003eArResolveAnchorOnRooftopFuture_acquireResultAnchor\u003c/code\u003e and \u003ccode\u003eArResolveAnchorOnRooftopFuture_getResultRooftopAnchorState\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eAn \u003ccode\u003eArResolveAnchorOnRooftopCallback\u003c/code\u003e is used to get the context, resolved anchor, and its state after the asynchronous operation completes.\u003c/p\u003e\n"],["\u003cp\u003eRefer to the Rooftop anchors developer guide for more detailed information on using rooftop anchors in your AR application.\u003c/p\u003e\n"]]],[],null,["# ArResolveAnchorOnRooftopFuture\n==============================\n\nHandle to an async operation launched by [ArEarth_resolveAnchorOnRooftopAsync](/ar/reference/c/group/ar-earth#arearth_resolveanchoronrooftopasync).\n\nSee the [Rooftop anchors developer guide](https://developers.google.com/ar/develop/geospatial/c/anchors#rooftop-anchors) for more information.\n\nSummary\n-------\n\n| ### Typedefs ||\n|------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [ArResolveAnchorOnRooftopCallback](#arresolveanchoronrooftopcallback)`)(void *context, ArAnchor *anchor, ArRooftopAnchorState rooftop_anchor_state)` | typedef `void(*` Callback definition for [ArEarth_resolveAnchorOnRooftopAsync](/ar/reference/c/group/ar-earth#arearth_resolveanchoronrooftopasync). |\n| [ArResolveAnchorOnRooftopFuture](#arresolveanchoronrooftopfuture) | typedef `struct ArResolveAnchorOnRooftopFuture_` Handle to an asynchronous operation launched by [ArEarth_resolveAnchorOnRooftopAsync](/ar/reference/c/group/ar-earth#arearth_resolveanchoronrooftopasync). |\n\n| ### Functions ||\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------|\n| [ArResolveAnchorOnRooftopFuture_acquireResultAnchor](#arresolveanchoronrooftopfuture_acquireresultanchor)`(const `[ArSession](/ar/reference/c/group/ar-session#arsession)` *session, const `[ArResolveAnchorOnRooftopFuture](/ar/reference/c/group/ar-resolve-anchor-on-rooftop-future#arresolveanchoronrooftopfuture)` *future, `[ArAnchor](/ar/reference/c/group/ar-anchor#aranchor)` **out_anchor)` | `void` Gets the resolved Rooftop anchor. |\n| [ArResolveAnchorOnRooftopFuture_getResultRooftopAnchorState](#arresolveanchoronrooftopfuture_getresultrooftopanchorstate)`(const `[ArSession](/ar/reference/c/group/ar-session#arsession)` *session, const `[ArResolveAnchorOnRooftopFuture](/ar/reference/c/group/ar-resolve-anchor-on-rooftop-future#arresolveanchoronrooftopfuture)` *future, `[ArRooftopAnchorState](/ar/reference/c/group/ar-anchor#arrooftopanchorstate)` *out_rooftop_anchor_state)` | `void` Gets the result status of the resolving operation, if the operation is done. |\n\nTypedefs\n--------\n\n### ArResolveAnchorOnRooftopCallback\n\n```scdoc\nvoid(* ArResolveAnchorOnRooftopCallback)(void *context, ArAnchor *anchor, ArRooftopAnchorState rooftop_anchor_state)\n``` \nCallback definition for [ArEarth_resolveAnchorOnRooftopAsync](/ar/reference/c/group/ar-earth#arearth_resolveanchoronrooftopasync).\n\nThe `context` argument will be the same as that passed to [ArEarth_resolveAnchorOnRooftopAsync](/ar/reference/c/group/ar-earth#arearth_resolveanchoronrooftopasync). The `anchor` argument will be the same as that returned by [ArResolveAnchorOnRooftopFuture_acquireResultAnchor](/ar/reference/c/group/ar-resolve-anchor-on-rooftop-future#arresolveanchoronrooftopfuture_acquireresultanchor) and must be released using [ArAnchor_release](/ar/reference/c/group/ar-anchor#aranchor_release). The `rooftop_anchor_state` argument will be the same as that returned by [ArResolveAnchorOnRooftopFuture_getResultRooftopAnchorState](/ar/reference/c/group/ar-resolve-anchor-on-rooftop-future#arresolveanchoronrooftopfuture_getresultrooftopanchorstate).\n\nIt is a best practice to free `context` memory provided to [ArEarth_resolveAnchorOnRooftopAsync](/ar/reference/c/group/ar-earth#arearth_resolveanchoronrooftopasync) at the end of the callback implementation. \n\n### ArResolveAnchorOnRooftopFuture\n\n```scdoc\nstruct ArResolveAnchorOnRooftopFuture_ ArResolveAnchorOnRooftopFuture\n``` \nHandle to an asynchronous operation launched by [ArEarth_resolveAnchorOnRooftopAsync](/ar/reference/c/group/ar-earth#arearth_resolveanchoronrooftopasync).\n\nRelease with [ArFuture_release](/ar/reference/c/group/ar-future#arfuture_release). ([reference type, long-lived](/ar/reference/c/group/concepts#object-ownership)).\n\nFunctions\n---------\n\n### ArResolveAnchorOnRooftopFuture_acquireResultAnchor\n\n```gdscript\nvoid ArResolveAnchorOnRooftopFuture_acquireResultAnchor(\n const ArSession *session,\n const ArResolveAnchorOnRooftopFuture *future,\n ArAnchor **out_anchor\n)\n``` \nGets the resolved Rooftop anchor.\n\nIf the operation isn't done yet or the operation failed, this will be `NULL`. The caller must release the anchor using [ArAnchor_release](/ar/reference/c/group/ar-anchor#aranchor_release).\n\n\n| Details ||\n|------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Parameters | |--------------|--------------------------------------------| | `session` | The ARCore session. | | `future` | The handle for the asynchronous operation. | | `out_anchor` | The anchor. | |\n\n### ArResolveAnchorOnRooftopFuture_getResultRooftopAnchorState\n\n```gdscript\nvoid ArResolveAnchorOnRooftopFuture_getResultRooftopAnchorState(\n const ArSession *session,\n const ArResolveAnchorOnRooftopFuture *future,\n ArRooftopAnchorState *out_rooftop_anchor_state\n)\n``` \nGets the result status of the resolving operation, if the operation is done.\n\n\n| Details ||\n|------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Parameters | |----------------------------|--------------------------------------------| | `session` | The ARCore session. | | `future` | The handle for the asynchronous operation. | | `out_rooftop_anchor_state` | The result status. | |"]]