Processing for Android
ARTracker
At least one ARTracker object is needed in the sketch to handle all trackable entities (only planes at this point) detected in the scene.
- start()
Starts tracking.
- stop()
Stops tracking.
- count()
Returns the current number of trackable planes in the scene.
- ARTrackable get(int i)
Returns the i-th trackable plane.
- ARTrackable get(String id)
Returns the trackable with the given id.
- ARTrackable get(int mx, int my)
Returns the trackable that's being hit by the current touch pointer.
- clearAnchors(Collection anchors)
Disposes the anchors in the list that are no longer being tracked and removes them from the list.
import processing.ar.*;
ARTracker tracker;
ARAnchor anchor;
void setup() {
fullScreen(AR);
tracker = new ARTracker(this);
tracker.start();
}
void draw() {
for (int i = 0; i < tracker.count(); i++) {
ARTrackable trackable = tracker.get(i);
// ...
}
}