Skip to content

Commit 5257c9a

Browse files
author
gaurav
committed
Adding isImage Method
1 parent 50b8728 commit 5257c9a

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

mode/libraries/ar/src/processing/ar/ARGraphics.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ public class ARGraphics extends PGraphics3D {
5757
static protected final int PLANE_CEILING = 1;
5858
static protected final int PLANE_WALL = 2;
5959
static protected final int POINT = 3;
60+
static protected final int IMAGE = 4;
6061

6162
static protected final int TRACKING = 0;
6263
static protected final int PAUSED = 1;

mode/libraries/ar/src/processing/ar/ARTrackable.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,11 @@ public boolean isFloorPlane() {
115115
return g.trackableType(idx) == ARGraphics.PLANE_FLOOR;
116116
}
117117

118+
public boolean isImage(){
119+
int idx = g.trackableIndex(id);
120+
return g.trackableType(idx)== ARGraphics.IMAGE;
121+
}
122+
118123
public boolean isCeilingPlane() {
119124
int idx = g.trackableIndex(id);
120125
return g.trackableType(idx) == ARGraphics.PLANE_CEILING;

mode/libraries/ar/src/processing/ar/ARTracker.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040

4141
public class ARTracker {
4242
protected PApplet p;
43-
protected ARGraphics g;
43+
protected ARGraphics g,arg;
4444
protected AugmentedImageDatabase imgDB;
4545

4646
private HashMap<String, ARTrackable> trackables = new HashMap<String, ARTrackable>();
@@ -52,8 +52,8 @@ public ARTracker(PApplet parent) {
5252
this.p = parent;
5353
this.g = (ARGraphics) p.g;
5454
setEventHandler();
55-
ARGraphics arg = (ARGraphics)parent.g;
56-
imgDB = new AugmentedImageDatabase(arg.surfar.session); //A new Database has been created.
55+
this.arg = (ARGraphics)parent.g;
56+
this.imgDB = new AugmentedImageDatabase(arg.surfar.session); //A new Database has been created.
5757
}
5858

5959
public void addImage(String name, PImage img) {

0 commit comments

Comments
 (0)