C++ Java Unity
Java Reference
TrackableResult Class Reference

Detailed Description

Base class for data about actively tracked objects.

A TrackableResult represents the state of a particular Trackable at a particular moment in time.

The state information includes:

  • A 6DOF pose
  • A status (i.e. whether and/or how the Trackable is currently being tracked)
  • The corresponding Trackable and its Type

TrackableResult instances are typically retrieved from (and fully owned by) a State.

Inheritance diagram for TrackableResult:
AnchorResult DeviceTrackableResult ObjectTargetResult CylinderTargetResult ImageTargetResult ModelTargetResult MultiTargetResult VuMarkTargetResult

Classes

class  STATUS
 The tracking status of the trackable. More...
 
class  STATUS_INFO
 Information on the tracking status. More...
 

Public Member Functions

boolean equals (Object obj)
 
Type getType ()
 Get the Type of this instance (typically a subclass of TrackableResult). More...
 
boolean isOfType (Type type)
 Check if this instance is of the given Type or any of its subclasses. More...
 
double getTimeStamp ()
 Get the time stamp for this result. More...
 
int getStatus ()
 Get the tracking status of the Trackable. More...
 
int getStatusInfo ()
 Get further information about the tracking status of the Trackable. More...
 
Trackable getTrackable ()
 Get the Trackable that participated in generating this result. More...
 
Matrix34F getPose ()
 Get the pose of the associated Trackable. More...
 

Static Public Member Functions

static Type getClassType ()
 Get the Type for class 'TrackableResult'. More...
 

Member Function Documentation

boolean equals ( Object  obj)
static Type getClassType ( )
static

Get the Type for class 'TrackableResult'.

Type getType ( )

Get the Type of this instance (typically a subclass of TrackableResult).

boolean isOfType ( Type  type)

Check if this instance is of the given Type or any of its subclasses.

double getTimeStamp ( )

Get the time stamp for this result.

Get the time stamp representing the time that this result was observed, in seconds since application startup time. Typically this is the same as the timestamp of the Frame where this TrackableResult was observed, unless the Trackable uses a predictive model or non-camera-based tracking.

The time stamp can be used to compare different TrackableResult instances for the same Trackable over time.

Note: If the Trackable's STATUS (as returned by getStatus() is NO_POSE, this method will return 0.0.

Returns
Time stamp for this result, in seconds since the application startup time; or 0.0 if the Trackable's STATUS is NO_POSE.
int getStatus ( )

Get the tracking status of the Trackable.

You can use the returned STATUS to help determine the quality and characteristics of the tracking process that was when creating this TrackableResult.

int getStatusInfo ( )

Get further information about the tracking status of the Trackable.

Trackable getTrackable ( )

Get the Trackable that participated in generating this result.

Matrix34F getPose ( )

Get the pose of the associated Trackable.

Get the pose of the Trackable at the moment in time when this TrackableResult was observed (or predicted).

The pose represents a transform from a target coordinate system (i.e. the coordinate system of the Trackable) to the world coordinate system.

In other words, if this TrackableResult comes from an ObjectTracker and you render 3D geometry using

  • the pose matrix as the geometry's model-view matrix, and
  • a projection matrix obtained from a RenderingPrimitives instance

then

  • (0,0,0) in your 3D geometry's local coordinate space will correspond to (0,0,0) in the Trackable's coordinate space, and
  • your 3D geometry will rotate in the view to match the rotation of the Trackable.

The result of this is that your application's view will contain geometry that appears to be at the same place in the view as the Trackable. (Note that depending on the type of Tracker there may be some drift under certain conditions.)

Note: When the Trackable's STATUS (as returned by getStatus()) is NO_POSE, this method will return the identity matrix.

Returns
A 3x4 row-major matrix representing the observed pose of the Trackable, or the identity matrix if the Trackable's STATUS is NO_POSE. (When using OpenGL, use Tool::convertPose2GLMatrix to convert to an OpenGL-compatible matrix).