-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathobtener_Pos.pde
60 lines (38 loc) · 1.07 KB
/
obtener_Pos.pde
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
void cuantosTengo(){
tuioObjectList = tuioClient.getTuioObjectList();
niveles = tuioObjectList.size();
};
void buscarPosicion()
{
// para detectar de 1 a 5 objetos
tuioObjectList = tuioClient.getTuioObjectList();
for (int i=0;i<tuioObjectList.size();i++) {
tobj = tuioObjectList.get(i);
noStroke();
pushMatrix();
translate(tobj.getScreenX(width), tobj.getScreenY(height));
rotate(tobj.getAngle());
ID=tobj.getSymbolID();
if (ID==0) {
PosX[0]= tobj.getScreenX(width);
PosY[0]= tobj.getScreenY(height);
}
if (ID==1) {
PosX[1]= tobj.getScreenX(width);
PosY[1]= tobj.getScreenY(height);
}
if (ID==2) {
PosX[2]= tobj.getScreenX(width);
PosY[2]= tobj.getScreenY(height);
}
if (ID==3) {
PosX[3]= tobj.getScreenX(width);
PosY[3]= tobj.getScreenY(height);
}
if (ID==4) {
PosX[4]= tobj.getScreenX(width);
PosY[4]= tobj.getScreenY(height);
}
popMatrix();
}
}