Most visited

Recently visited

ARHitTestResult

public class ARHitTestResult
extends Object

java.lang.Object
   ↳ com.viro.core.ARHitTestResult


ARHitTestResult encapsulates a single result of an AR hit-test. AR hit-tests are initiated from the ViroViewARCore. These hit tests are a mechanism for you to discover what real-world objects are contained along a given ray in the Scene or at a given 2D point on the ViroViewARCore.

Summary

Nested classes

enum ARHitTestResult.Type

Hit-tests can intersect different kinds of real-world features, each identified by their Type. 

Public methods

Vector getPosition()

Returns the position of the detected real-world object, in world coordinates.

Vector getRotation()

Return the orientation of the detected real-world object, along each of the three principal axes.

Vector getScale()

Return the scale of the detected real-world object.

ARHitTestResult.Type getType()

Returns the kind of detected real-world object contained in this result.

Public methods

getPosition

Vector getPosition ()

Returns the position of the detected real-world object, in world coordinates.

Returns
Vector The position in world coordinates, in a Vector.

getRotation

Vector getRotation ()

Return the orientation of the detected real-world object, along each of the three principal axes.

Returns
Vector The rotation in radians along the X, Y, and Z axes, stored in a Vector.

getScale

Vector getScale ()

Return the scale of the detected real-world object.

Returns
Vector The scale in a Vector.

getType

ARHitTestResult.Type getType ()

Returns the kind of detected real-world object contained in this result.

Returns
ARHitTestResult.Type The type of the real-world object.

Hooray!