summaryrefslogtreecommitdiff
path: root/liveengine
diff options
context:
space:
mode:
authorTim Redfern <tim@gray.(none)>2012-11-02 17:26:53 +0000
committerTim Redfern <tim@gray.(none)>2012-11-02 17:26:53 +0000
commitcaace54e8adb8f0ad13303f6f387f3f62e429579 (patch)
tree56336888e8e651824f60a85a3abeadec5e9c9fc8 /liveengine
parent796d647fd38f7cf01cb70bbb0700b75427e42d55 (diff)
kinect integration
Diffstat (limited to 'liveengine')
-rwxr-xr-xliveengine/liveengine.layout19
-rwxr-xr-xliveengine/src/viewport.cpp14
-rwxr-xr-xliveengine/src/viewport.h3
3 files changed, 23 insertions, 13 deletions
diff --git a/liveengine/liveengine.layout b/liveengine/liveengine.layout
index d3b2e36..636f5d1 100755
--- a/liveengine/liveengine.layout
+++ b/liveengine/liveengine.layout
@@ -1,22 +1,25 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_layout_file>
- <ActiveTarget name="Release" />
- <File name="bin/data/settings.xml" open="1" top="0" tabpos="6">
- <Cursor position="142" topLine="0" />
+ <ActiveTarget name="Debug" />
+ <File name="bin/data/settings.xml" open="1" top="0" tabpos="5">
+ <Cursor position="157" topLine="0" />
</File>
<File name="config.make" open="1" top="0" tabpos="2">
<Cursor position="0" topLine="0" />
</File>
- <File name="src/main.cpp" open="1" top="0" tabpos="7">
+ <File name="src/main.cpp" open="1" top="0" tabpos="6">
<Cursor position="290" topLine="0" />
</File>
- <File name="src/testApp.cpp" open="1" top="1" tabpos="3">
- <Cursor position="14559" topLine="524" />
+ <File name="src/testApp.cpp" open="1" top="0" tabpos="3">
+ <Cursor position="1370" topLine="27" />
</File>
<File name="src/testApp.h" open="1" top="0" tabpos="1">
- <Cursor position="0" topLine="0" />
+ <Cursor position="4449" topLine="196" />
+ </File>
+ <File name="src/viewport.cpp" open="1" top="1" tabpos="7">
+ <Cursor position="6457" topLine="226" />
</File>
<File name="src/viewport.h" open="1" top="0" tabpos="4">
- <Cursor position="0" topLine="0" />
+ <Cursor position="1184" topLine="1" />
</File>
</CodeBlocks_layout_file>
diff --git a/liveengine/src/viewport.cpp b/liveengine/src/viewport.cpp
index 82ee5a0..fab77ce 100755
--- a/liveengine/src/viewport.cpp
+++ b/liveengine/src/viewport.cpp
@@ -68,6 +68,7 @@ void viewport::setup(int _w,int _h,int _x,int _y,float _r,int _ox,int _oy) {
oy=_oy;
rb1.allocate(w,h,GL_RGB);
rb2.allocate(w,h,GL_RGB);
+ rb3.allocate(w,h,GL_RGB);
printf("%ix%i, vp offset: %f,%f\n",w,h,-(sin(ofDegToRad(r))*h/2)-(cos(ofDegToRad(r))*w/2),-(sin(ofDegToRad(r))*w/2)-(cos(ofDegToRad(r))*h/2));
}
@@ -214,13 +215,18 @@ void viewport::mapdraw(float a,unsigned char* controllers,int xshift,int yshift,
}
rb1.end();
-
+
rb2.begin();
ofSetColor(255,255,255);
+ rb1.draw(0,0);
+ rb2.end();
+
+ rb3.begin();
+ ofSetColor(255,255,255);
ofBackground(0,0,0);
//rb1.draw(0,0);
- //map on kinect skeleton
+ //map onto kinect skeleton
bindTexture(rb1);
glPushMatrix();
@@ -324,7 +330,7 @@ void viewport::mapdraw(float a,unsigned char* controllers,int xshift,int yshift,
unbindTexture(rb1);
- rb2.end();
+ rb3.end();
ofPushMatrix();
ofTranslate(x+(w/2),y+(h/2));
@@ -332,7 +338,7 @@ void viewport::mapdraw(float a,unsigned char* controllers,int xshift,int yshift,
//ofTranslate(-abs(sin(ofDegToRad(r))*h/2)-abs(cos(ofDegToRad(r))*w/2),-abs(sin(ofDegToRad(r))*w/2)-abs(cos(ofDegToRad(r))*h/2));
ofTranslate(ox,oy);
- rb2.draw(0,0);
+ rb3.draw(0,0);
ofPopStyle();
diff --git a/liveengine/src/viewport.h b/liveengine/src/viewport.h
index 350ea5d..4c3f948 100755
--- a/liveengine/src/viewport.h
+++ b/liveengine/src/viewport.h
@@ -28,9 +28,10 @@ class viewport
void draw(float a,unsigned char* controllers,int xshift,int yshift,playlist &list,bool transparentBlack,int note,int mode,ofColor* controller_colours,bool controlColours,float scale,float fscale,float colShift);
void mapdraw(float a,unsigned char* controllers,int xshift,int yshift,playlist &list,bool transparentBlack,int note,int mode,ofColor* controller_colours,bool controlColours,float scale,float fscale,float colShift);
+ ofImage testtexture;
virtual ~viewport();
void setUG(ofxUserGenerator *_rUser);
- ofFbo rb1,rb2;
+ ofFbo rb1,rb2,rb3;
float r;
bool isMapped;
protected: