Ejemplo n.º 1
0
void Trogdor::drawTrogdor()
{
	glPushMatrix();
		glTranslated(this->position.getX(), this->position.getY(), this->position.getZ());
		glScalef(8, 8, 8);
		glRotatef(facing, 0, 1, 0);
		glPushMatrix();
		drawBody();
		drawTail();
		drawNeckHead();
		drawLegs();
		drawWings();
		glPopMatrix();
	glPopMatrix();
}
Ejemplo n.º 2
0
void drawBee() {
    mvstack.push(model_view);
    //rotate bee
    model_view *= RotateY(-10*TIME);
    model_view *= Translate(0, 5, 0);
    model_view *= Translate(5, .5*sin(100+TIME), 0);
    model_view *= RotateY(90);

    //draw bee parts
    drawBody();    
    drawHead();
    drawTail();
    drawWings();
    drawLegz();

    model_view = mvstack.pop();
}
Ejemplo n.º 3
0
void Enemy::draw(){
	if (life == 3){
		setYellowRubber();
	}
	else if (life == 2){
		setCyanPlastic();
	}
	else if (life == 1){
		setRedPlastic();
	}
	else if (life == 0){
		setObsidian();
	}
	
	glutSolidSphere(1, 15, 13);
	drawEyes();
	drawWings();
}
Ejemplo n.º 4
0
//--------------------------------------------------------------
void testApp::draw()
{
	performer = user.getTrackedUsers();
	
	if(bCalib){
		vout.begin();
		ofSetHexColor(0x000000);
		ofRect(0, 0, vout.fbo.getWidth(), vout.fbo.getHeight());
		ofSetHexColor(0xffffff);
		glPushMatrix();
		glScalef(skHratio, skVratio, 1);
		glTranslatef(skelHoffset, skelVoffset, 0);
		depth.draw(0, 0, 640, 480);
		//performer = user.getTrackedUsers();
		if(performer.size()>0){
			if(performer[0]!=NULL){
				glPushAttrib(GL_ALL_ATTRIB_BITS);
				performer[0]->debugDraw();
				glPopAttrib();
			}
		}
		glPopMatrix();
		vout.end();
	}else{
		switch (scene) {
			case 0:
				drawWhite();
				break;
			case 1:
				drawSynch();
				break;
			case 2:
				drawGrow();
				break;
			case 3:
				drawWings();
				break;
			case 4:
				drawWings();
				break;
			case 8:
				drawDpt();
				break;
			case 9:
				drawBlack();
				break;

		}
	}
	wing.drawBuffers();
	glPushMatrix();
	glTranslatef(10, 250, 0);
	glScalef(.5, .5, 1);
	depth.draw(0, 0);
	if(performer.size()>0){
		if(performer[0]!=NULL){
			glPushAttrib(GL_ALL_ATTRIB_BITS);
			performer[0]->debugDraw();
			glPopAttrib();
		}
	}
	glPopMatrix();
}
Ejemplo n.º 5
0
void drawFan(float width, float height, float radius){
	drawWings(height, width);
	drawCircle(radius, 0, 0);
}