From 51d327513ba268d245527ff59bd208ed907ffe6e Mon Sep 17 00:00:00 2001 From: Tim Date: Wed, 19 Jun 2013 20:21:08 +0100 Subject: working --- 04_playobjects/src/testApp.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/04_playobjects/src/testApp.h b/04_playobjects/src/testApp.h index 873db31..93cacc4 100644 --- a/04_playobjects/src/testApp.h +++ b/04_playobjects/src/testApp.h @@ -59,7 +59,7 @@ class syncOniPlayer{ soundplayer.loadSound(audio); soundplayer.play(); }; - //sleep(2); + sleep(1); drawable=true; } } @@ -92,7 +92,7 @@ class syncOniPlayer{ const XnDepthPixel* depthmap=players[i]->getDepthGenerator().GetDepthMap(); //uint16_t* depthpixels=depthmap.getPixels(); - int range=2500; + //int range=2500; for (int i=0;iprojectiveToWorld(ofPoint(i,j,(float)(depthmap[j*depthW+i]))); + ofPoint p= players[i]->projectiveToWorld(ofPoint(100,100,(float)(depthmap[2000]))); //ofPoint p= projectiveToWorld(ofPoint(i,j,(float)depthmap[j*dmw+i])); - //if (p.z == 0 || p.z>range) continue; // gets rid of background + if (p.z == 0 || p.z>range) continue; // gets rid of background - //glColor4ub((unsigned char)255, (unsigned char)255, (unsigned char)255, (unsigned char)255); - //glVertex3f(p.x, p.y, p.z); + glColor4ub((unsigned char)255, (unsigned char)255, (unsigned char)255, (unsigned char)255); + glVertex3f(p.x, p.y, p.z); //if (i==320&&j==160) cerr<<"world point: "<