KudanAR - Android  1.6.0
ARArbiTrack Class Reference

Inherits ARGyroManagerListener.

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

◆ addListener()

void ARArbiTrack.addListener ( ARArbiTrackListener  listener)

Adds ARArbiTrack listeners to the listeners list.

Parameters
listenerThe listener to add.

◆ deinitialise()

static void ARArbiTrack.deinitialise ( )
static

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();

◆ getInstance()

static ARArbiTrack ARArbiTrack.getInstance ( )
static

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

Returns
the singleton instance.

◆ getIsInitialised()

boolean ARArbiTrack.getIsInitialised ( )

Returns whether or not the ArbiTracker has been initialised.

Returns
True if the ArbiTracker initialised successfully, false otherwise.

◆ getIsTracking()

boolean ARArbiTrack.getIsTracking ( )

Returns whether or not the ArbiTracker is currently tracking.

Returns
True if the ArbiTracker is tracking, false if not.

◆ getTargetNode()

ARNode ARArbiTrack.getTargetNode ( )

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.

◆ getWorld()

ARWorld ARArbiTrack.getWorld ( )

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.

◆ gyroStarted()

void ARArbiTrack.gyroStarted ( )

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

Implements ARGyroManagerListener.

◆ initialise()

void ARArbiTrack.initialise ( )

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.

◆ notifyListenersArbiTrackStarted()

void ARArbiTrack.notifyListenersArbiTrackStarted ( )

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

◆ removeListener()

void ARArbiTrack.removeListener ( ARArbiTrackListener  listener)

Removes an ARArbiTrack listener from the listeners list.

Parameters
listenerThe listener to remove.

◆ setTargetNode()

void ARArbiTrack.setTargetNode ( ARNode  node)

Sets the target node for the ARArbiTrack.

Parameters
nodeThe ARNode to use as the target node.

◆ start()

void ARArbiTrack.start ( )

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.

◆ stop()

void ARArbiTrack.stop ( )

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: