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 | |
| parent | d06fe4264b760e4be5880456cfd50f817dbeb1ea (diff) | |
working single threaded
Diffstat (limited to 'liveengine')
| -rwxr-xr-x | liveengine/bin/data/settings.xml | 13 | ||||
| -rwxr-xr-x | liveengine/liveengine.layout | 10 | ||||
| -rwxr-xr-x | liveengine/src/testApp.cpp | 9 | ||||
| -rwxr-xr-x | liveengine/src/viewport.cpp | 22 |
4 files changed, 29 insertions, 25 deletions
diff --git a/liveengine/bin/data/settings.xml b/liveengine/bin/data/settings.xml index abe3343..6c31de3 100755 --- a/liveengine/bin/data/settings.xml +++ b/liveengine/bin/data/settings.xml @@ -1,7 +1,6 @@ -<?xml version="1.0" encoding="UTF-8" ?>
-<liveEngine port="1" channel="0">
- <viewport mapped="1" w="1024" h="768" x="0" y="0" rot="0" ox="-512" oy="-384">
- <settings fov="17.5" roll="0" targX="0" targY="0" targZ="0" lat="0" lng="0" dolly="600" />
- </viewport>
-</liveEngine>
- +<?xml version="1.0" encoding="UTF-8" ?> +<liveEngine port="1" channel="0"> + <viewport mapped="1" w="1024" h="768" x="0" y="0" rot="0" ox="-512" oy="-384"> + <settings fov="17.500000" roll="0.000000" targX="-247.713226" targY="212.727859" targZ="0.000000" lat="0.000000" lng="180.000000" dolly="600.000000" /> + </viewport> +</liveEngine> diff --git a/liveengine/liveengine.layout b/liveengine/liveengine.layout index 77840d6..2831ed4 100755 --- a/liveengine/liveengine.layout +++ b/liveengine/liveengine.layout @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <CodeBlocks_layout_file> <ActiveTarget name="Debug" /> - <File name="bin/data/settings.xml" open="1" top="1" tabpos="5"> - <Cursor position="234" topLine="0" /> + <File name="bin/data/settings.xml" open="1" top="0" tabpos="5"> + <Cursor position="236" topLine="0" /> </File> <File name="config.make" open="0" top="0" tabpos="2"> <Cursor position="0" topLine="0" /> @@ -11,13 +11,13 @@ <Cursor position="290" topLine="0" /> </File> <File name="src/testApp.cpp" open="1" top="0" tabpos="2"> - <Cursor position="13919" topLine="138" /> + <Cursor position="4343" topLine="98" /> </File> <File name="src/testApp.h" open="1" top="0" tabpos="1"> <Cursor position="3971" topLine="162" /> </File> - <File name="src/viewport.cpp" open="1" top="0" tabpos="4"> - <Cursor position="8472" topLine="272" /> + <File name="src/viewport.cpp" open="1" top="1" tabpos="4"> + <Cursor position="4871" topLine="271" /> </File> <File name="src/viewport.h" open="1" top="0" tabpos="3"> <Cursor position="283" topLine="0" /> 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));
|
