C++ Java Unity
Java Reference
State Class Reference
Inheritance diagram for State:

Public Member Functions

State clone ()
 Returns a shallow copy of this State object that is valid beyond the context of the original object. More...
 
boolean equals (Object obj)
 
 State ()
 Default constructor. More...
 
 State (State other)
 Copy constructor. More...
 
Frame getFrame ()
 Get the Frame associated with this State. More...
 
CameraCalibration getCameraCalibration ()
 Get the camera calibration for this State, if available. More...
 
Illumination getIllumination ()
 Get illumination information for this State (if available). More...
 
DeviceTrackableResult getDeviceTrackableResult ()
 Get the DeviceTrackableResult, if it exists. More...
 
int getNumTrackables ()
 Get the number of Trackable objects that were involved in generating TrackableResult objects for this State. More...
 
Trackable getTrackable (int idx)
 Get an immutable Trackable specific to this State. More...
 
int getNumTrackableResults ()
 Get the number of TrackableResult objects for this State. More...
 
TrackableResult getTrackableResult (int idx)
 Get a single TrackableResult object. More...
 
TrackableResultList getTrackableResults ()
 Provides access to the list of TrackableResults in the State referring to Trackable objects currently being tracked. More...
 

Constructor & Destructor Documentation

State ( )

Default constructor.

State ( State  other)

Copy constructor.

A State is a lightweight object which keeps internal smart pointers to its data.

Copying is therefore cheap, and recommended over using references.

Member Function Documentation

State clone ( )

Returns a shallow copy of this State object that is valid beyond the context of the original object.

This new state object and it's Frame resource will remain until it all references are removed and the object is Garbage Collected. The Frame object owned by the original State object will be reclaimed at the end of it's life cycle. To continue to reference the cloned State's Frame object, obtain a new reference from getFrame().

boolean equals ( Object  obj)
Frame getFrame ( )

Get the Frame associated with this State.

Returns
A Frame object representing the camera frame that any camera-based Trackable instances used to generate the TrackableResults accessible via getTrackableResult().

Note: For non-camera-based TrackableResult instances, the timestamp of this Frame may not match the timestamp of the TrackableResult. See StateUpdater for more details.

CameraCalibration getCameraCalibration ( )

Get the camera calibration for this State, if available.

Returns
Camara calibration information for this State, or NULL if no camera calibration was available when this State was captured.

The returned object is only valid as long as the State object is valid. Do not keep a copy of the pointer!

Illumination getIllumination ( )

Get illumination information for this State (if available).

Returns
An Illumination instance containing illumination information for this State, or NULL if no illumination information is available.

The returned object is only valid as long as the State object is valid. Do not keep a copy of the pointer!

DeviceTrackableResult getDeviceTrackableResult ( )

Get the DeviceTrackableResult, if it exists.

This is a convenience method that provides easy access to the DeviceTrackableResult, if a DeviceTracker has been started.

Note: The DeviceTrackableResult is also available via getTrackableResult().

Note: The returned object is only valid as long as the State object is valid. Do not keep a copy of the pointer!

Returns
the DeviceTrackableResult, or NULL if no DeviceTracker is running.
int getNumTrackables ( )

Get the number of Trackable objects that were involved in generating TrackableResult objects for this State.

(DEPRECATED)

Deprecated:
This API has been deprecated. It will be removed in an upcoming Vuforia release. Use the getTrackableResults() API instead to get the list of TrackableResults from the State and check the list size.
Trackable getTrackable ( int  idx)

Get an immutable Trackable specific to this State.

(DEPRECATED)

Parameters
idxThe index of the Trackable, in the range 0..getNumTrackables()-1
Returns
An immutable, non-comparable pointer to the requested Trackable.

Each of the Trackable instances that this function returns was involved in generating one or more of the TrackableResults available via getTrackableResult().

This Trackable allows historic access to the state of the Trackable at the time when this State was assembled (including access to any DataSet instances that may since have been destroyed). It does not reflect any changes that were made to the Trackable after this State was assembled. It is therefore incompatible with the Trackable returned when querying the Tracker instance (they are not pointer-comparable), even if they refer to the same potentially trackable object.

Note that a Trackable provides only high-level information for reference about a potentially trackable object, whether or not is currently being tracked. To query details such as its position or orientation in the world, use getTrackableResult() instead.

To make changes to the Trackable, query the appropriate Tracker for the canonical Trackable instance, and make your changes there instead. Note however that any changes made there will not be reflected on the Trackable returned here.

The returned object is only valid as long as the State object is valid. Do not keep a copy of the pointer!

Deprecated:
This API has been deprecated. It will be removed in an upcoming Vuforia release. Use the getTrackableResults() API instead to get the list of TrackableResults from the State, then call getTrackable() on the TrackableResult list element with the given index.
int getNumTrackableResults ( )

Get the number of TrackableResult objects for this State.

(DEPRECATED)

Deprecated:
This API has been deprecated. It will be removed in an upcoming Vuforia release. Use the getTrackableResults() API instead to get the list of TrackableResults from the State and check the list size.
TrackableResult getTrackableResult ( int  idx)

Get a single TrackableResult object.

(DEPRECATED)

Parameters
idxThe index of the TrackableResult, in the range 0..getNumTrackableResults()-1
Returns
A pointer to the requested TrackableResult, specific to this State instance.

A TrackableResult returned from this function represents information about a Trackable object that is being actively tracked in this State.

The TrackableResult should be considered specific to this State, i.e., it represents a snapshot of the tracked object at the point in time associated with this State.

The returned object is only valid as long as the State object is valid. Do not keep a copy of the pointer!

Deprecated:
This API has been deprecated. It will be removed in an upcoming Vuforia release. Use the getTrackableResults() API instead.
TrackableResultList getTrackableResults ( )

Provides access to the list of TrackableResults in the State referring to Trackable objects currently being tracked.

The returned list is only valid as long as the State object is valid. Do not keep a copy of the list or the TrackableResults list elements point to!