public class 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
From ARAnchor
getId, getPose, getTrackingState, getNode, setNode, detach, isDetached
Constructor details
ARImageAnchor
public ARImageAnchor(String id, ARPose pose, String referenceImageName, float estimatedPhysicalWidth)Creates an image anchor. Intended for platform implementations and
tests.
Parameters
idString- the stable identifier of this anchor
poseARPose- the initial world pose, centered on the physical image
referenceImageNameString- the
ARReferenceImage#getName()of the recognized image estimatedPhysicalWidthfloat- 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().