Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Przygotowanie stosu macierzy modelowania
- glPushMatrix();
- // Rysowanie podstawy dzwigu bez slupow
- glPushMatrix();
- glScalef(6.0,1.0,6.0);
- glTranslatef(0.0, 2.5, 0.0);
- glutWireCube(1.0);
- glPopMatrix();
- // Rysowanie podstawy
- glPushMatrix();
- glTranslatef(1.75,2.0,1.75);
- glRotatef(90.0,1,0,0);
- gluCylinder(podstawaSlup1, 0.5, 0.5, 2.0, 16, 3);
- glTranslatef(-3.5,0.0,0.0);
- gluCylinder(podstawaSlup2, 0.5, 0.5, 2.0, 16, 3);
- glTranslatef(0.0,-3.5,0.0);
- gluCylinder(podstawaSlup2, 0.5, 0.5, 2.0, 16, 3);
- glTranslatef(3.5,0.0,0.0);
- gluCylinder(podstawaSlup2, 0.5, 0.5, 2.0, 16, 3);
- glPopMatrix();
- glPushMatrix();
- //rysowanie slupa
- glTranslatef(0.0,9.0,0.0);
- glRotatef(90.0,1,0,0);
- gluCylinder(konstrukcjaDzwigu, 0.625, 0.625, 6.0, 16, 3);
- glPopMatrix();
- glPushMatrix();
- //rysowanie wspornikow
- glTranslatef(-1.25,4.2,0.0);
- glRotatef(60.0,0,0,1);
- glScalef(3.0,0.25,0.25);
- glutWireCube(1.0);
- glPopMatrix();
- glPushMatrix();
- //rysowanie wspornikow
- glTranslatef(1.25,4.2,0.0);
- glRotatef(-60.0,0,0,1);
- glScalef(3.0,0.25,0.25);
- glutWireCube(1.0);
- glPopMatrix();
- glPushMatrix();
- //rysowanie wspornikow
- glTranslatef(0.0,4.2,-1.25);
- glRotatef(30.0,1,0,0);
- glScalef(0.25,3.0,0.25);
- glutWireCube(1.0);
- glPopMatrix();
- glPushMatrix();
- //rysowanie wspornikow
- glTranslatef(0.0,4.2,1.25);
- glRotatef(-30.0,1,0,0);
- glScalef(0.25,3.0,0.25);
- glutWireCube(1.0);
- glPopMatrix();
- glPushMatrix();
- glTranslatef(0.0,9.25,-0.55);
- gluCylinder(polaczenieRamienia,0.75,0.75,1.25,16,3);
- glPopMatrix();
- glPushMatrix();
- glRotatef(90.0,0,1,0);
- glTranslatef(0.0,9.3,0.25);
- gluCylinder(ramieDzwigu,0.4,0.4,7.5,16,3);
- glPopMatrix();
- glPushMatrix();
- glTranslatef(7.65,9.3,-0.4);
- gluCylinder(zaczepLiny,0.4,0.4,0.8,16,3);
- glPopMatrix();
- glPushMatrix();
- glTranslatef(7.65,9.0,0.0);
- glRotatef(90.0,1,0,0);
- gluCylinder(lina,0.01,0.01,4.0,16,3);
- glPopMatrix();
- glPushMatrix();
- glTranslatef(7.65,4.0,0.0);
- glutWireSphere(1.0,16,16);
- glPopMatrix();
- // Posprzatanie na stosie macierzy modelowania
- glPopMatrix();
- // Przygotowanie stosu macierzy modelowania
- glPushMatrix();
- // Rysowanie podstawy dzwigu bez slupow
- glPushMatrix();
- glScalef(6.0,1.0,6.0);
- glTranslatef(0.0, 2.5, 0.0);
- glutWireCube(1.0);
- glPopMatrix();
- // Rysowanie podstawy
- glPushMatrix();
- glTranslatef(1.75,2.0,1.75);
- glRotatef(90.0,1,0,0);
- gluCylinder(podstawaSlup1, 0.5, 0.5, 2.0, 16, 3);
- glTranslatef(-3.5,0.0,0.0);
- gluCylinder(podstawaSlup2, 0.5, 0.5, 2.0, 16, 3);
- glTranslatef(0.0,-3.5,0.0);
- gluCylinder(podstawaSlup2, 0.5, 0.5, 2.0, 16, 3);
- glTranslatef(3.5,0.0,0.0);
- gluCylinder(podstawaSlup2, 0.5, 0.5, 2.0, 16, 3);
- glPopMatrix();
- glPushMatrix();
- //rysowanie slupa
- glTranslatef(0.0,9.0,0.0);
- glRotatef(90.0,1,0,0);
- gluCylinder(konstrukcjaDzwigu, 0.625, 0.625, 6.0, 16, 3);
- glPopMatrix();
- glPushMatrix();
- //rysowanie wspornikow
- glTranslatef(-1.25,4.2,0.0);
- glRotatef(60.0,0,0,1);
- glScalef(3.0,0.25,0.25);
- glutWireCube(1.0);
- glPopMatrix();
- glPushMatrix();
- //rysowanie wspornikow
- glTranslatef(1.25,4.2,0.0);
- glRotatef(-60.0,0,0,1);
- glScalef(3.0,0.25,0.25);
- glutWireCube(1.0);
- glPopMatrix();
- glPushMatrix();
- //rysowanie wspornikow
- glTranslatef(0.0,4.2,-1.25);
- glRotatef(30.0,1,0,0);
- glScalef(0.25,3.0,0.25);
- glutWireCube(1.0);
- glPopMatrix();
- glPushMatrix();
- //rysowanie wspornikow
- glTranslatef(0.0,4.2,1.25);
- glRotatef(-30.0,1,0,0);
- glScalef(0.25,3.0,0.25);
- glutWireCube(1.0);
- glPopMatrix();
- glPushMatrix();
- glTranslatef(0.0,9.25,-0.55);
- gluCylinder(polaczenieRamienia,0.75,0.75,1.25,16,3);
- glPopMatrix();
- glPushMatrix();
- glRotatef(90.0,0,1,0);
- glTranslatef(0.0,9.3,0.25);
- gluCylinder(ramieDzwigu,0.4,0.4,7.5,16,3);
- glPopMatrix();
- glPushMatrix();
- glTranslatef(7.65,9.3,-0.4);
- gluCylinder(zaczepLiny,0.4,0.4,0.8,16,3);
- glPopMatrix();
- glPushMatrix();
- glTranslatef(7.65,9.0,0.0);
- glRotatef(90.0,1,0,0);
- gluCylinder(lina,0.01,0.01,4.0,16,3);
- glPopMatrix();
- glPushMatrix();
- glTranslatef(7.65,4.0,0.0);
- glutWireSphere(1.0,16,16);
- glPopMatrix();
- // Posprzatanie na stosie macierzy modelowania
- glPopMatrix();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement