Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void drawEstantes(){
- //estante1
- glPushMatrix();
- glTranslated(5.3,5,14.2);
- glRotatef(90,0,1,0);
- glScaled(1.8, 0.3,4);
- glColor3f(0.1,0.5,1);
- glutSolidCube(1.0);
- glPopMatrix();
- //estante2
- glPushMatrix();
- glTranslated(14.2,13,-5.2);
- glScaled(1.8, 0.3,4);
- glColor3f(0.1,0.5,1);
- glutSolidCube(1.0);
- glPopMatrix();
- //estante 3
- glPushMatrix();
- glTranslated(-5.2,21,-14.2);
- glRotatef(90,0,1,0);
- glScaled(1.8, 0.3,4);
- glColor3f(0.1,0.5,1);
- glutSolidCube(1.0);
- glPopMatrix();
- }
- void drawObjectos(){
- //teapot
- glPushMatrix();
- glTranslated(5.5 ,5.5,14);
- glRotatef(90,0,1,0);
- glColor4f(1,1,1,0.7);
- glEnable(GL_TEXTURE_2D);
- glEnable(GL_BLEND);
- glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
- glutSolidTeapot(0.5);
- glPopMatrix();
- glDisable(GL_BLEND);
- //teapot 2 floor
- glPushMatrix();
- glTranslated(14.4 ,13.5,-5);
- glColor4f(1,1,1,0.7);
- glEnable(GL_TEXTURE_2D);
- glEnable(GL_BLEND);
- glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
- glutSolidTeapot(0.5);
- glPopMatrix();
- glDisable(GL_BLEND);
- //teapot 3 floor
- glPushMatrix();
- glTranslated(-5.2, 21.5, -14.2);
- glRotatef(-90,0,1,0);
- glColor4f(1,1,1,0.7);
- glEnable(GL_TEXTURE_2D);
- glEnable(GL_BLEND);
- glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
- glutSolidTeapot(0.5);
- glPopMatrix();
- glDisable(GL_BLEND);
- }
- void drawTrashCan()
- {
- //desenha da mesa
- GLUquadricObj *y = gluNewQuadric();
- glEnable(GL_BLEND);
- glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
- //glColor4f(0.0f, 0.3f, 0.5f, 1.0f);
- glColor4f(0, 0.5, 1, 0.5);
- glDisable(GL_TEXTURE_2D);
- glPushMatrix();
- glTranslatef(5.3, 0.1, 13.8);
- glRotatef(-90, 1, 0, 0);
- gluQuadricDrawStyle(y, GLU_FILL);
- gluQuadricNormals(y, GLU_SMOOTH);
- gluQuadricTexture(y, GL_TRUE);
- gluCylinder(y, 0.7, 1, 2, 100, 100);
- glPopMatrix();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement