diff options
| -rw-r--r-- | openBTSviz_win.depend | 5 | ||||
| -rw-r--r-- | openBTSviz_win.layout | 2 | ||||
| -rw-r--r-- | src/testApp.cpp | 35 | ||||
| -rw-r--r-- | src/testApp.h | 5 |
4 files changed, 36 insertions, 11 deletions
diff --git a/openBTSviz_win.depend b/openBTSviz_win.depend index d13c0b6..302ab55 100644 --- a/openBTSviz_win.depend +++ b/openBTSviz_win.depend @@ -2498,7 +2498,7 @@ "ofCamera.h"
"ofEvents.h"
-1337594328 e:\workspace\openbtsviz\src\testapp.h
+1337607359 e:\workspace\openbtsviz\src\testapp.h
"ofMain.h"
1333210877 e:\workspace\openframeworks-020912\libs\openframeworks\app\ofappglutwindow.h
@@ -2511,3 +2511,6 @@ "ofPoint.h"
"ofTypes.h"
+1337620190 source:e:\workspace\openbtsviz\src\testapp.cpp
+ "testApp.h"
+
diff --git a/openBTSviz_win.layout b/openBTSviz_win.layout index 7cd9d4e..e6b1aa9 100644 --- a/openBTSviz_win.layout +++ b/openBTSviz_win.layout @@ -5,7 +5,7 @@ <Cursor position="159" topLine="0" /> </File> <File name="src\testApp.cpp" open="1" top="1" tabpos="1"> - <Cursor position="1170" topLine="23" /> + <Cursor position="2953" topLine="103" /> </File> <File name="src\testApp.h" open="1" top="0" tabpos="2"> <Cursor position="0" topLine="0" /> diff --git a/src/testApp.cpp b/src/testApp.cpp index ea03c54..6091759 100644 --- a/src/testApp.cpp +++ b/src/testApp.cpp @@ -18,7 +18,7 @@ represents a handset how to deal with time/ range being limited -exponential --choose VP carefully- perspective +-choose VP carefully- perspective -just decide the longest time that it will be active scalability @@ -82,11 +82,32 @@ void testApp::setup(){ imeis[i]+=(char)(ofRandom(10)+48); } } -<<<<<<< HEAD - - //bgimg.allocate( -======= ->>>>>>> 02635c7127b158a2821ce1f2e9fde20407d81037 + + + //bgimg.allocate(256,256,OF_IMAGE_COLOR); + // + /* + cols=new ofColor[4]; + cols[0]=ofColor(80,80,80); + cols[1]=ofColor(80,80,80); + cols[2]=ofColor(0,0,0); + cols[3]=ofColor(0,0,0); + float fi,fj,ifi,ifj; + float si=1.0f/bgimg.width; + float sj=1.0f/bgimg.height; + for (int i=0,fi=0.0f,ifi=1.0f;i<bgimg.width;i++,fi+=si,ifi-=si){ + for (int j=0,fj=0.0f,ifj=1.0f;j<bgimg.width;j++,fj+=sj,ifj-=sj){ + bgimg.getPixels()[(j*bgimg.width+i)*3]=(unsigned char)((ifj*((ifi*cols[0].r)+(fi*cols[1].r)))+(fj*((ifi*cols[2].r)+(fi*cols[3].r)))); + bgimg.getPixels()[(j*bgimg.width+i)*3+1]=(unsigned char)((ifj*((ifi*cols[0].g)+(fi*cols[1].g)))+(fj*((ifi*cols[2].g)+(fi*cols[3].g)))); + bgimg.getPixels()[(j*bgimg.width+i)*3+2]=(unsigned char)((ifj*((ifi*cols[0].b)+(fi*cols[1].b)))+(fj*((ifi*cols[2].b)+(fi*cols[3].b)))); + } + } + + */ + bgimg.loadImage("TextureTrapdoor.jpg"); + bgimg.setUseTexture(true); + bgimg.update(); + } @@ -101,7 +122,7 @@ void testApp::update(){ void testApp::draw(){ glDisable(GL_LIGHTING); - ofBackground(0,0,0); + bgimg.draw(0,0,256,256); //windowWidth,windowHeight); camera.begin(); diff --git a/src/testApp.h b/src/testApp.h index 6f64416..3b6d4ba 100644 --- a/src/testApp.h +++ b/src/testApp.h @@ -22,12 +22,13 @@ class testApp : public ofBaseApp{ int windowWidth, windowHeight; ofCamera camera; - + int numLines; ofPoint *lines; string *imeis; - + ofImage bgimg; + ofColor *cols; }; |
