Inherits ARGyroManagerListener.
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.
◆ addListener()
Adds ARArbiTrack listeners to the listeners list.
- Parameters
-
listener | The 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()
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()
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 |
( |
| ) |
|
◆ 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()
Removes an ARArbiTrack listener from the listeners list.
- Parameters
-
listener | The listener to remove. |
◆ setTargetNode()
void ARArbiTrack.setTargetNode |
( |
ARNode |
node | ) |
|
Sets the target node for the ARArbiTrack.
- Parameters
-
node | The 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: