diff options
| author | Tim Redfern <tim@gray.(none)> | 2012-11-11 15:59:00 +0000 |
|---|---|---|
| committer | Tim Redfern <tim@gray.(none)> | 2012-11-11 15:59:00 +0000 |
| commit | 4656e88bb1626fcc0e7941883ac475884e4c99b0 (patch) | |
| tree | cadd1759913be53a2ce4adb94d494918f7af2541 /liveengine/src | |
| parent | d06fe4264b760e4be5880456cfd50f817dbeb1ea (diff) | |
working single threaded
Diffstat (limited to 'liveengine/src')
| -rwxr-xr-x | liveengine/src/testApp.cpp | 9 | ||||
| -rwxr-xr-x | liveengine/src/viewport.cpp | 22 |
2 files changed, 18 insertions, 13 deletions
diff --git a/liveengine/src/testApp.cpp b/liveengine/src/testApp.cpp index fb531a5..a2a242f 100755 --- a/liveengine/src/testApp.cpp +++ b/liveengine/src/testApp.cpp @@ -93,7 +93,7 @@ void testApp::setup(){ isTracking = false; isFiltering = false; isMasking = true; - isCloud = false; + isCloud = true; nearThreshold = 500; farThreshold = 1000; @@ -101,6 +101,7 @@ void testApp::setup(){ filterFactor = 10.0f; recordContext.setup(); + recordContext.setMirror(true); recordDepth.setup(&recordContext); recordImage.setup(&recordContext); recordUser.setup(&recordContext); @@ -127,7 +128,11 @@ void testApp::setup(){ } } else printf("no viewports!\n"); - }
+ + XML.popTag(); + + } +
} activeView=-1; diff --git a/liveengine/src/viewport.cpp b/liveengine/src/viewport.cpp index 5a5a5e2..e5e5ef3 100755 --- a/liveengine/src/viewport.cpp +++ b/liveengine/src/viewport.cpp @@ -179,9 +179,9 @@ void viewport::setcam(map<string,string>&settings){ vars=new keyVar[9]; vars[0].set('w','s',ofToFloat(settings["fov"]),0.2,1.0,3.0); - vars[1].set('g','d',ofToFloat(settings["targX"]),1,1.0,3.0); - vars[2].set('r','v',ofToFloat(settings["targY"]),1,1.0,3.0); - vars[3].set('t','c',ofToFloat(settings["targZ"]),1,1.0,3.0); + vars[1].set('g','d',ofToFloat(settings["targX"]),10,1.0,3.0); + vars[2].set('r','v',ofToFloat(settings["targY"]),10,1.0,3.0); + vars[3].set('t','c',ofToFloat(settings["targZ"]),10,1.0,3.0); vars[4].set('u','n',ofToFloat(settings["lat"]),1,1.0,3.0); vars[5].set('j','h',ofToFloat(settings["lng"]),1,1.0,3.0); vars[6].set(',','m',ofToFloat(settings["roll"]),1,1.0,3.0); @@ -282,17 +282,18 @@ void viewport::mapdraw(float a,unsigned char* controllers,int xshift,int yshift, //rb1.draw(0,0);
//map onto kinect skeleton
- bindTexture(rb1); + camera.begin(); if (drawCloud) { - int step = 1; - for(int y = 0; y < h; y += step) { - for(int x = 0; x < w; x += step) { + int step = 1; + glBegin(GL_POINTS); + for(int y = 0; y < 480; y += step) { + for(int x = 0; x < 640; x += step) { ofPoint pos = rUser->getWorldCoordinateAt(x, y, 0); //userID); - if (pos.z == 0 ) continue; // gets rid of background -> still a bit weird if userID > 0... //&& isCPBkgnd + //if (pos.z == 0 ) continue; // gets rid of background -> still a bit weird if userID > 0... //&& isCPBkgnd ofColor color = rUser->getWorldColorAt(x,y, 0); //userID); glColor4ub((unsigned char)color.r, (unsigned char)color.g, (unsigned char)color.b, (unsigned char)color.a); glVertex3f(pos.x, pos.y, pos.z); @@ -301,10 +302,9 @@ void viewport::mapdraw(float a,unsigned char* controllers,int xshift,int yshift, glEnd(); glColor3f(1.0f, 1.0f, 1.0f); } + + bindTexture(rb1); -
- glPushMatrix();
- glScalef(ofGetWidth()/640.0f,ofGetHeight()/480.0f, 1);
for (int i=0;i<rUser->getNumberOfTrackedUsers();i++){
ofxTrackedUser* u=(rUser->getTrackedUser(i+1));
|
