Each point is represented by four consecutive values in the array; first the X, Y, Z position coordinates, followed by a confidence value. This is the same format as described in DEPTH_POINT_CLOUD.
The pointer returned by this function is valid until ArPointCloud_release is called. If the number of points is zero, then the value of *out_point_cloud_data is undefined.
If your app needs to keep some Point Cloud data, for example to compare Point Cloud data frame to frame, consider copying just the data points your app needs, and then calling ArPointCloud_release to reduce the amount of memory required.
Each point has a unique identifier (within a session) that is persistent across frames. That is, if a point from Point Cloud 1 has the same id as the point from Point Cloud 2, then it represents the same point in space.
The pointer returned by this function is valid until ArPointCloud_release is called. If the number of points is zero, then the value of *out_point_ids is undefined.
If your app needs to keep some Point Cloud data, for example to compare Point Cloud data frame to frame, consider copying just the data points your app needs, and then calling ArPointCloud_release to reduce the amount of memory required.
[[["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\u003eArPointCloud\u003c/code\u003e represents a set of 3D points with confidence values, acquired from an \u003ccode\u003eArFrame\u003c/code\u003e and providing spatial information within an AR session.\u003c/p\u003e\n"],["\u003cp\u003eEach point in the \u003ccode\u003eArPointCloud\u003c/code\u003e is defined by its X, Y, Z coordinates and a confidence value, accessible through \u003ccode\u003eArPointCloud_getData\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eYou can retrieve the number of points, their unique IDs persistent across frames, and the observation timestamp using dedicated functions.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eArPointCloud\u003c/code\u003e is a reference type and requires releasing with \u003ccode\u003eArPointCloud_release\u003c/code\u003e to manage memory effectively after use.\u003c/p\u003e\n"]]],["ArPointCloud manages 3D visual feature points and confidence values. Key actions include retrieving point cloud data, the number of points, and point IDs using `ArPointCloud_getData`, `ArPointCloud_getNumberOfPoints`, and `ArPointCloud_getPointIds`, respectively. `ArPointCloud_getTimestamp` obtains the observation timestamp. `ArPointCloud_release` releases the point cloud reference. Each point has a persistent unique ID across frames. Point data includes X, Y, Z coordinates, and a confidence value.\n"],null,["# ArPointCloud\n============\n\nContains a set of observed 3D points and confidence values.\n\nSummary\n-------\n\n| ### Typedefs ||\n|-------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [ArPointCloud](#arpointcloud) | typedef `struct ArPointCloud_` A cloud of tracked 3D visual feature points ([reference type, large data](/ar/reference/c/group/concepts#object-ownership)). |\n\n| ### Functions ||\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------|\n| [ArPointCloud_getData](#arpointcloud_getdata)`(const `[ArSession](/ar/reference/c/group/ar-session#arsession)` *session, const `[ArPointCloud](/ar/reference/c/group/ar-point-cloud#arpointcloud)` *point_cloud, const float **out_point_cloud_data)` | `void` Retrieves a pointer to the Point Cloud data. |\n| [ArPointCloud_getNumberOfPoints](#arpointcloud_getnumberofpoints)`(const `[ArSession](/ar/reference/c/group/ar-session#arsession)` *session, const `[ArPointCloud](/ar/reference/c/group/ar-point-cloud#arpointcloud)` *point_cloud, int32_t *out_number_of_points)` | `void` Retrieves the number of points in the Point Cloud. |\n| [ArPointCloud_getPointIds](#arpointcloud_getpointids)`(const `[ArSession](/ar/reference/c/group/ar-session#arsession)` *session, const `[ArPointCloud](/ar/reference/c/group/ar-point-cloud#arpointcloud)` *point_cloud, const int32_t **out_point_ids)` | `void` Retrieves a pointer to the Point Cloud point IDs. |\n| [ArPointCloud_getTimestamp](#arpointcloud_gettimestamp)`(const `[ArSession](/ar/reference/c/group/ar-session#arsession)` *session, const `[ArPointCloud](/ar/reference/c/group/ar-point-cloud#arpointcloud)` *point_cloud, int64_t *out_timestamp_ns)` | `void` Returns the timestamp in nanoseconds when this Point Cloud was observed. |\n| [ArPointCloud_release](#arpointcloud_release)`(`[ArPointCloud](/ar/reference/c/group/ar-point-cloud#arpointcloud)` *point_cloud)` | `void` Releases a reference to the Point Cloud. |\n\nTypedefs\n--------\n\n### ArPointCloud\n\n```scdoc\nstruct ArPointCloud_ ArPointCloud\n``` \nA cloud of tracked 3D visual feature points ([reference type, large data](/ar/reference/c/group/concepts#object-ownership)).\n\n\n- Acquire with: [ArFrame_acquirePointCloud](/ar/reference/c/group/ar-frame#arframe_acquirepointcloud)\n- Release with: [ArPointCloud_release](/ar/reference/c/group/ar-point-cloud#arpointcloud_release)\n\n\u003cbr /\u003e\n\nFunctions\n---------\n\n### ArPointCloud_getData\n\n```gdscript\nvoid ArPointCloud_getData(\n const ArSession *session,\n const ArPointCloud *point_cloud,\n const float **out_point_cloud_data\n)\n``` \nRetrieves a pointer to the Point Cloud data.\n\nEach point is represented by four consecutive values in the array; first the X, Y, Z position coordinates, followed by a confidence value. This is the same format as described in [DEPTH_POINT_CLOUD](https://developer.android.com/reference/android/graphics/ImageFormat#DEPTH_POINT_CLOUD).\n\nThe pointer returned by this function is valid until [ArPointCloud_release](/ar/reference/c/group/ar-point-cloud#arpointcloud_release) is called. If the number of points is zero, then the value of `*out_point_cloud_data` is undefined.\n\nIf your app needs to keep some Point Cloud data, for example to compare Point Cloud data frame to frame, consider copying just the data points your app needs, and then calling [ArPointCloud_release](/ar/reference/c/group/ar-point-cloud#arpointcloud_release) to reduce the amount of memory required. \n\n### ArPointCloud_getNumberOfPoints\n\n```gdscript\nvoid ArPointCloud_getNumberOfPoints(\n const ArSession *session,\n const ArPointCloud *point_cloud,\n int32_t *out_number_of_points\n)\n``` \nRetrieves the number of points in the Point Cloud. \n\n### ArPointCloud_getPointIds\n\n```gdscript\nvoid ArPointCloud_getPointIds(\n const ArSession *session,\n const ArPointCloud *point_cloud,\n const int32_t **out_point_ids\n)\n``` \nRetrieves a pointer to the Point Cloud point IDs.\n\nThe number of IDs is the same as number of points, and is given by [ArPointCloud_getNumberOfPoints](/ar/reference/c/group/ar-point-cloud#arpointcloud_getnumberofpoints).\n\nEach point has a unique identifier (within a session) that is persistent across frames. That is, if a point from Point Cloud 1 has the same id as the point from Point Cloud 2, then it represents the same point in space.\n\nThe pointer returned by this function is valid until [ArPointCloud_release](/ar/reference/c/group/ar-point-cloud#arpointcloud_release) is called. If the number of points is zero, then the value of `*out_point_ids` is undefined.\n\nIf your app needs to keep some Point Cloud data, for example to compare Point Cloud data frame to frame, consider copying just the data points your app needs, and then calling [ArPointCloud_release](/ar/reference/c/group/ar-point-cloud#arpointcloud_release) to reduce the amount of memory required. \n\n### ArPointCloud_getTimestamp\n\n```gdscript\nvoid ArPointCloud_getTimestamp(\n const ArSession *session,\n const ArPointCloud *point_cloud,\n int64_t *out_timestamp_ns\n)\n``` \nReturns the timestamp in nanoseconds when this Point Cloud was observed.\n\nThis timestamp uses the same time base as [ArFrame_getTimestamp](/ar/reference/c/group/ar-frame#arframe_gettimestamp). \n\n### ArPointCloud_release\n\n```scdoc\nvoid ArPointCloud_release(\n ArPointCloud *point_cloud\n)\n``` \nReleases a reference to the Point Cloud.\n\nThis must match a call to [ArFrame_acquirePointCloud](/ar/reference/c/group/ar-frame#arframe_acquirepointcloud).\n\nThis function may safely be called with `NULL` - it will do nothing."]]