KudanAR - Android
ARArbiTrack Class Reference
+ Inheritance diagram for ARArbiTrack:
+ Collaboration diagram for ARArbiTrack:

Public Member Functions

void initialise ()
 
void setTargetNode (ARNode node)
 
ARNode getTargetNode ()
 
ARWorld getWorld ()
 
boolean getIsTracking ()
 
void start ()
 
void stop ()
 
void notifyListenersArbiTrackStarted ()
 
void addListener (ARArbiTrackListener listener)
 
void removeListener (ARArbiTrackListener listener)
 
void gyroStarted ()
 
boolean getIsInitialised ()
 

Static Public Member Functions

static ARArbiTrack getInstance ()
 
static void deinitialise ()
 

Detailed Description

ARArbiTrack is a tracking class used for markerless tracking. Access to this class is controlled through the ARArbiTrack singleton. ARArbiTrack requires a gyroscope to function.

Member Function Documentation

void addListener ( ARArbiTrackListener  listener)
inline

Adds ARArbiTrack listeners to the listeners list.

Parameters
listenerThe listener to add.
static void deinitialise ( )
inlinestatic

Deinitialise ARArbiTrack. This method should only be called once during cleanup, ideally when the ARActivity is being dismissed. This is called automatically when the ARFragment is destroyed. When ARArbiTrack is deinitialised, it performs the following:

  • ARArbiTrack is stopped. Any nodes being tracked at this time will stop being rendered.
  • The native ArbiTracker is deinitialised and destroyed.
  • The Target Node and World of ARArbiTrack are both destroyed and should no longer be used.

Example of use:

ARArbiTrack.getInstance().deinitialise();
static ARArbiTrack getInstance ( )
inlinestatic

Returns the ARArbiTrack singleton. The first time this is called, a new ARArbiTrack singleton is initialised.

Returns
the singleton instance.
boolean getIsInitialised ( )
inline

Returns whether or not the ArbiTracker has been initialised.

Returns
True if the ArbiTracker initialised successfully, false otherwise.
boolean getIsTracking ( )
inline

Returns whether or not the ArbiTracker is currently tracking.

Returns
True if the ArbiTracker is tracking, false if not.
ARNode getTargetNode ( )
inline

Returns the node whose transformation will be used when the ArbiTracker is started. Position this to determine the initial transformation of the ArbiTracker's world when ArbiTrack begins, and to define the coordinate space. In order to utilise the targetNode for markerless tracking, add it as a child of the Gyro Place Manager's world. It will then automatically change its position based on the orientation of the device. It can also be added to an ARImageTrackable's world for the purposes of starting ArbiTrack using an Image Trackable's position and orientation.

Returns
The target node for the ArbiTracker.
ARWorld getWorld ( )
inline

Return the ARWorld of the ArbiTracker. When the ArbiTracker is tracking, the transformation of its world node is updated by the tracker. Add content to this node in order to track it using ArbiTrack.

Returns
The ArbiTracker's world node.
void gyroStarted ( )
inline

ARArbiTrackListener interface method. Notifies users that the ARGyroManager has started receiving device gyro data and ARArbiTrack has started.

Implements ARGyroManagerListener.

void initialise ( )
inline

Initialises ARArbiTrack. This is called automatically when return and the ARArbiTrack singleton for the first time.

When the ArbiTacker is initialised, it performs the following:

  • The native ArbiTracker is initialised.
  • The ArbiTracker is added as a listener for Gyro events.
  • An empty list of listeners for ArbiTrack events is created.
void notifyListenersArbiTrackStarted ( )
inline

Notifies listeners that markerless tracking has started. This method is called automatically when ArbiTrack starts.

void removeListener ( ARArbiTrackListener  listener)
inline

Removes an ARArbiTrack listener from the listeners list.

Parameters
listenerThe listener to remove.
void setTargetNode ( ARNode  node)
inline

Sets the target node for the ARArbiTrack.

Parameters
nodeThe ARNode to use as the target node.
void start ( )
inline

Start markerless tracking. The targetNode's transformation at this time is used to determine the initial pose of the tracker. The target node must be initialised and attached to ARArbiTrack, or it will not work.

void stop ( )
inline

Stop markerless tracking. Any nodes being rendered will stop rendering after the current frame.


The documentation for this class was generated from the following file: