Point

public class Point

Represents a point in space that ARCore is tracking. These objects are created as a side-effect of createAnchor(Pose) or when hitTest(float, float) returns results against a point cloud.

Note: Two Point objects may refer to the same logical point managed by ARCore. Be sure to always use equals(Object) when comparing them.

Nested Classes

enum Point.OrientationMode Indicates the point orientation mode. 

Protected Constructors

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

Public Methods

Anchor
createAnchor(Pose pose)
Creates an Anchor at the given Pose in the world coordinate space that is attached to this Trackable.
boolean
equals(Object obj)
Indicates whether some other object is a Trackable referencing the same logical trackable as this one.
Collection<Anchor>
getAnchors()
Gets the Anchors attached to this Trackable.
Point.OrientationMode
getOrientationMode()
Returns the OrientationMode Point.OrientationMode of the point.
TrackingState
getTrackingState()
Gets this trackable's TrackingState.
int
hashCode()
Returns a hash code value for the object.

Inherited Methods

Protected Constructors

protected Point ()

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

To obtain a Point normally, see getTrackable().

Public Methods

public Anchor createAnchor (Pose pose)

Creates an Anchor at the given Pose in the world coordinate space that is attached to this Trackable. The type of Trackable will determine the semantics of attachment and how the Anchor's Pose will be updated to maintain this relationship. Note that the relative offset between the Pose of multiple Anchors attached to a Trackable may adjust slightly over time as ARCore updates its model of the world.

Parameters
pose

public boolean equals (Object obj)

Indicates whether some other object is a Trackable referencing the same logical trackable as this one.

Parameters
obj the reference object with which to compare.
Returns
  • true if this object is the same as the obj argument; false otherwise.

public Collection<Anchor> getAnchors ()

Gets the Anchors attached to this Trackable.

public Point.OrientationMode getOrientationMode ()

Returns the OrientationMode Point.OrientationMode of the point.

public TrackingState getTrackingState ()

Gets this trackable's TrackingState.

public int hashCode ()

Returns a hash code value for the object. This method is supported for the benefit of hash tables such as those provided by HashMap.

Returns
  • a hash code value for this object.
See Also

Send feedback about...