PointCloud

public class PointCloud

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

Protected Constructors

PointCloud()
(FOR TESTING) Constructs a new instance for use as a mock.

Public Methods

IntBuffer
getIds()
Retrieves a buffer of point cloud point IDs.
FloatBuffer
getPoints()
Returns a buffer of point coordinates and confidence values.
long
getTimestamp()
Returns the timestamp in nanoseconds when this point cloud was observed.
void
release()
Release PointCloud's resources back to ARCore.

Inherited Methods

Protected Constructors

protected PointCloud ()

(FOR TESTING) Constructs a new instance for use as a mock. Calling any base method implementation on this instance may return unexpected results, throw an exception, or even crash.

To obtain a PointCloud normally, use acquirePointCloud().

Public Methods

public IntBuffer getIds ()

Retrieves a buffer of point cloud point IDs.

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.

public FloatBuffer getPoints ()

Returns a buffer of point coordinates and confidence values.

Each point is represented by four consecutive values in the buffer; first the X, Y, Z position coordinates, followed by a confidence value. This is the same format as described in DEPTH_POINT_CLOUD.

Point locations are in the world coordinate space, consistent with the camera position for the frame that provided the point cloud.

public long getTimestamp ()

Returns the timestamp in nanoseconds when this point cloud was observed. This timestamp uses the same time base as getTimestamp().

See Also

public void release ()

Release PointCloud's resources back to ARCore. If too many point clouds are held, additional calls to acquirePointCloud() will fail. Calling this method may invalidate any buffer previously returned by getPoints().

Send feedback about...