public class ARImageAnchor

  1. Object
  2. ARAnchor
  3. ARImageAnchor
An anchor tracking a recognized ARReferenceImage in the real world. The anchor pose is centered on the physical image with local X/Z spanning the image surface. Delivered through the session’s ARAnchorListener; use instanceof to distinguish image anchors from plain anchors.

Constructors

public ARImageAnchor(String id, ARPose pose, String referenceImageName, float estimatedPhysicalWidth)Creates an image anchor.

Methods

public String getReferenceImageName()The name of the recognized reference image.
public float getEstimatedPhysicalWidth()The platform’s estimate of the physical image width in meters.

Inherited methods

Constructor details

ARImageAnchor

public ARImageAnchor(String id, ARPose pose, String referenceImageName, float estimatedPhysicalWidth)
Creates an image anchor. Intended for platform implementations and tests.

Parameters

id String
the stable identifier of this anchor
pose ARPose
the initial world pose, centered on the physical image
referenceImageName String
the ARReferenceImage#getName() of the recognized image
estimatedPhysicalWidth float
the platform’s estimate of the physical image width in meters

Method details

getReferenceImageName

public String getReferenceImageName()
The name of the recognized reference image.

getEstimatedPhysicalWidth

public float getEstimatedPhysicalWidth()
The platform’s estimate of the physical image width in meters. May differ slightly from the registered ARReferenceImage#getPhysicalWidthMeters().