PointCloud

Contains a set of observed 3D points and confidence values.

Summary

Typedefs

ArPointCloud typedef
struct ArPointCloud_
A cloud of tracked 3D visual feature points (reference type, large data).

Functions

ArPointCloud_getData(const ArSession *session, const ArPointCloud *point_cloud, const float **out_point_cloud_data)
void
Retrieves a pointer to the point cloud data.
ArPointCloud_getNumberOfPoints(const ArSession *session, const ArPointCloud *point_cloud, int32_t *out_number_of_points)
void
Retrieves the number of points in the point cloud.
ArPointCloud_getTimestamp(const ArSession *session, const ArPointCloud *point_cloud, int64_t *out_timestamp_ns)
void
Returns the timestamp in nanoseconds when this point cloud was observed.
ArPointCloud_release(ArPointCloud *point_cloud)
void
Releases a reference to the point cloud.

Typedefs

ArPointCloud

struct ArPointCloud_ ArPointCloud

A cloud of tracked 3D visual feature points (reference type, large data).

Acquire with ArFrame_acquirePointCloud()
Release with ArPointCloud_release()

Functions

ArPointCloud_getData

void ArPointCloud_getData(
  const ArSession *session,
  const ArPointCloud *point_cloud,
  const float **out_point_cloud_data
)

Retrieves a pointer to the point cloud data.

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. The application must copy the data if they wish to retain it for longer. The points are in world coordinates consistent with the frame it was obtained from. If the number of points is zero, then the value of *out_point_cloud_data should is undefined.

ArPointCloud_getNumberOfPoints

void ArPointCloud_getNumberOfPoints(
  const ArSession *session,
  const ArPointCloud *point_cloud,
  int32_t *out_number_of_points
)

Retrieves the number of points in the point cloud.

ArPointCloud_getTimestamp

void ArPointCloud_getTimestamp(
  const ArSession *session,
  const ArPointCloud *point_cloud,
  int64_t *out_timestamp_ns
)

Returns the timestamp in nanoseconds when this point cloud was observed.

This timestamp uses the same time base as ArFrame_getTimestamp().

ArPointCloud_release

void ArPointCloud_release(
  ArPointCloud *point_cloud
)

Releases a reference to the point cloud.

This must match a call to ArFrame_acquirePointCloud().

This method may safely be called with nullptr - it will do nothing.

Send feedback about...