Most visited

Recently visited

ARAnchor

public class ARAnchor
extends Object

java.lang.Object
   ↳ com.viro.core.ARAnchor
Known Direct Subclasses
ARImageAnchor ARImageAnchor is a specialized ARAnchor that represents a detected ARImageTarget in the real world. 
ARPlaneAnchor ARPlaneAnchor is a specialized ARAnchor that represents a detected plane in the real-world. 


ARAnchor represents real-world objects whose position and orientation can be tracked. ARAnchors are automatically created by Viro when AR features are detected. A corresponding ARNode is created and added to the Scene for each detected anchor.

Summary

Nested classes

enum ARAnchor.Type

Specifies the type of ARAnchor. 

Public methods

String getAnchorId()

Get a unique String ID for this ARAnchor.

Vector getPosition()

Get the position of this ARAnchor in world coordinates.

Vector getRotation()

Get the rotation of this ARAnchor about each principal axis.

Vector getScale()

Get the scale of this ARAnchor in the X, Y, and Z dimensions.

ARAnchor.Type getType()

Return the ARAnchor.Type of this ARAnchor.

Public methods

getAnchorId

String getAnchorId ()

Get a unique String ID for this ARAnchor.

Returns
String Unique ID for the anchor.

getPosition

Vector getPosition ()

Get the position of this ARAnchor in world coordinates.

Returns
Vector The position of the ARAnchor as a Vector.

getRotation

Vector getRotation ()

Get the rotation of this ARAnchor about each principal axis. The rotation defines the anchor's orientation. The position, rotation, and scale of an ARAnchor define its "pose", or transformation in the world.

Returns
Vector The three Euler rotation angles in a Vector in radians.

getScale

Vector getScale ()

Get the scale of this ARAnchor in the X, Y, and Z dimensions. The position, rotation, and scale of an ARAnchor define its "pose", or transformation in the world.

Returns
Vector The scale of this anchor.

getType

ARAnchor.Type getType ()

Return the ARAnchor.Type of this ARAnchor.

Returns
ARAnchor.Type The ARAnchor type.

Hooray!