//-------------------------------------------------------------- //drawing //-------------------------------------------------------------- void ofApp::drawPostcards(){ //printf("question size %lu",question.size()); int noOfPostcards=(int)allPostcards.size(); ofEnableAlphaBlending(); //---------------draw postcard //blend in if(counterPostcardsAndLetters<FRAME_RATE){ blendInfoLED1+=8; ofSetColor(255, 255, 255, blendInfoLED1); } //blend out else if(counterPostcardsAndLetters>=FRAME_RATE*(lengthPostcards-1) && counterPostcardsAndLetters<FRAME_RATE*lengthPostcards){ blendInfoLED1-=8; ofSetColor(255, 255, 255, blendInfoLED1); } else{ ofSetColor(255); } if(allPostcards.size()-1>=currImgNo){ allPostcards[currImgNo].draw(); } //-----------------question and title //blend in if(counterPostcardsTitle<FRAME_RATE && currImgNo==allPostcards.size()-1){ blendInfoFacade+=8; ofSetColor(255, 255, 255, blendInfoLED1); } //blend out else if(counterPostcardsTitle>FRAME_RATE*(lengthPostcards-1) && currImgNo<1){ blendInfoFacade-=8; ofSetColor(255, 255, 255, blendInfoLED1); } else{ ofSetColor(255); } //draw title //on LED2 ofPushMatrix(); ofTranslate(508, 77); postcardsTitleLED2.draw(screenWidth-postcardsTitleLED2.width-5, 0); questionsLED2[currentQuestionNumber].draw(5,0); ofPopMatrix(); //on LED1 ofPushMatrix(); ofTranslate(220, 452); postcardsTitleLED1.draw(screenWidthLED1-postcardsTitleLED1.width-5, 0); questionsLED2[currentQuestionNumber].draw(5,0); ofPopMatrix(); drawQuestion(); ofDisableAlphaBlending(); }
unsigned int drawHardcodedModelRaw(unsigned int modelType) { switch (modelType) { case OBJ_FOG : drawFog(); break; case OBJ_PLANE : drawObjPlane(0,0,0, 0.5); break; case OBJ_GRIDPLANE : drawGridPlane( 0.0 , 0.0 , 0.0, 1.0); break; case OBJ_AXIS : drawAxis(0,0,0,1.0); break; case OBJ_CUBE : drawCube(); break; case OBJ_PYRAMID : drawPyramid(); break; case OBJ_SPHERE : drawSphere( SPHERE_QUALITY ); break; case OBJ_INVISIBLE : /*DONT DRAW ANYTHING*/ break; case OBJ_QUESTION : drawQuestion(); break; case OBJ_BBOX : drawBoundingBox(0,0,0,-1.0,-1.0,-1.0,1.0,1.0,1.0); break; default : return 0; break; } return 1; }