Class ARImageAnchor
java.lang.Object
com.codename1.ar.ARAnchor
com.codename1.ar.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.-
Constructor Summary
ConstructorsConstructorDescriptionARImageAnchor(String id, ARPose pose, String referenceImageName, float estimatedPhysicalWidth) Creates an image anchor. -
Method Summary
Modifier and TypeMethodDescriptionfloatThe platform's estimate of the physical image width in meters.The name of the recognized reference image.Methods inherited from class ARAnchor
detach, getId, getNode, getPose, getTrackingState, isDetached, setNode
-
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: the stable identifier of this anchor -
pose: the initial world pose, centered on the physical image -
referenceImageName: theARReferenceImage#getName()of the recognized image -
estimatedPhysicalWidth: the platform's estimate of the physical image width in meters
-
-
-
Method Details
-
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 registeredARReferenceImage#getPhysicalWidthMeters().
-