diff options
| -rw-r--r-- | openBTSviz.layout | 6 | ||||
| -rw-r--r-- | src/testApp.cpp | 71 | ||||
| -rw-r--r-- | src/testApp.h | 2 |
3 files changed, 55 insertions, 24 deletions
diff --git a/openBTSviz.layout b/openBTSviz.layout index 62e61b0..0431eae 100644 --- a/openBTSviz.layout +++ b/openBTSviz.layout @@ -7,14 +7,14 @@ <File name="addons.make" open="1" top="0" tabpos="2"> <Cursor position="0" topLine="0" /> </File> - <File name="config.make" open="1" top="1" tabpos="3"> + <File name="config.make" open="1" top="0" tabpos="3"> <Cursor position="328" topLine="0" /> </File> <File name="src/main.cpp" open="0" top="0" tabpos="9"> <Cursor position="519" topLine="0" /> </File> - <File name="src/testApp.cpp" open="0" top="0" tabpos="7"> - <Cursor position="574" topLine="9" /> + <File name="src/testApp.cpp" open="1" top="1" tabpos="4"> + <Cursor position="553" topLine="7" /> </File> <File name="src/testApp.h" open="0" top="0" tabpos="6"> <Cursor position="976" topLine="29" /> diff --git a/src/testApp.cpp b/src/testApp.cpp index 983c3a5..d0df870 100644 --- a/src/testApp.cpp +++ b/src/testApp.cpp @@ -5,6 +5,33 @@ openBTS visualisation ALL units relative to screen size in H or W +viewpoint dynamic? focus on 'interesting' events? + +FRAMING + +REPRESENTATION OF TIME + +LABELLING & INFO + +handset class +represents a handset + +how to deal with time/ range being limited +-exponential +-choose VP carefully- perspective +-just decide the longest time that it will be active + +scalability +-amount of text on screen + +icons +-worthwhile? + +call/sms -pointer from caller to callee + +position update + +function to interpolate position */ @@ -31,19 +58,19 @@ void testApp::setup(){ camera.rotate(70,1,0,0); camera.cacheMatrices(); //stop error messages */ - + ofSetFrameRate(60); - - ofSetCircleResolution(windowWidth); + + ofSetCircleResolution(windowWidth); ofEnableSmoothing(); - + camera.setPosition(0,windowHeight*10,windowHeight); - camera.lookAt(ofVec3f(0,0,-windowHeight*.5),ofVec3f(0, 0, -1)); + camera.lookAt(ofVec3f(0,0,-windowHeight*.5),ofVec3f(0, 0, 1)); camera.setFov(6.5); - camera.cacheMatrices(); - + camera.cacheMatrices(); + numLines=20; - + lines = new ofPoint[numLines]; imeis = new string[numLines]; for (int i=0;i<numLines;i++) { @@ -56,6 +83,8 @@ void testApp::setup(){ } } + //bgimg.allocate( + } @@ -70,43 +99,43 @@ void testApp::draw(){ glDisable(GL_LIGHTING); ofBackground(0,0,0); - + camera.begin(); - + //ofSphere(0,0,0,10); - + glDisable(GL_DEPTH_TEST); glDisable(GL_BLEND); - + ofPushMatrix(); ofRotate(ofGetElapsedTimef(),0,0,1); - + ofNoFill(); - + float rt=((ofGetElapsedTimef()*.25f)-floor(ofGetElapsedTimef()*.25f)); for (float f=rt*(windowWidth/10);f<windowWidth*0.9;f+=windowWidth/10) { float rf=sin((f/(windowWidth*0.9))*TWO_PI); ofSetColor(0x7f*rf,0x7f*rf,0xff*rf); ofCircle(0,0,0,f); } - - + + for (int i=0;i<numLines;i++) { float rf=sin((lines[i].y/(windowWidth*0.9))*TWO_PI); ofSetColor(0x8f*rf,0x8f*rf,0x8f*rf); - ofLine(cos(lines[i].x)*lines[i].y,sin(lines[i].x)*lines[i].y,0,cos(lines[i].x)*lines[i].y,sin(lines[i].x)*lines[i].y,lines[i].z); + ofLine(cos(lines[i].x)*lines[i].y,sin(lines[i].x)*lines[i].y,0,cos(lines[i].x)*lines[i].y,sin(lines[i].x)*lines[i].y,lines[i].z); } - + ofPopMatrix(); camera.end(); - + for (int i=0;i<numLines;i++) { float rf=sin((lines[i].y/(windowWidth*0.9))*TWO_PI); ofSetColor(0x8f*rf,0x8f*rf,0x8f*rf); ofVec3f p=camera.worldToScreen(ofVec3f(cos(lines[i].x)*lines[i].y,sin(lines[i].x)*lines[i].y,lines[i].z).rotated(ofGetElapsedTimef(),ofVec3f(0,0,1)),ofGetCurrentViewport()); - ofDrawBitmapString(imeis[i],p.x-20,p.y,p.z); + ofDrawBitmapString(imeis[i],p.x-20,p.y,p.z); } - + ofSetHexColor(0xffffff); char reportStr[1024]; sprintf(reportStr, "fps: %f", ofGetFrameRate()); diff --git a/src/testApp.h b/src/testApp.h index fca62af..6f64416 100644 --- a/src/testApp.h +++ b/src/testApp.h @@ -26,6 +26,8 @@ class testApp : public ofBaseApp{ int numLines; ofPoint *lines; string *imeis; + + ofImage bgimg; }; |
