Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void drawCube(POLYGON cube) {
- //std::cout << __func__ << std::endl;
- glColor3f(BLACK);
- glBegin(GL_LINE_LOOP);
- for(int i = 0 ; i < 4 ; i++){
- glVertex2d(cube.P[i].x, cube.P[i].y);
- //printf("%.d cube %d. part %d. points (%.0f, %.0f)\n",qq, q, i, cube[q].P[i].x, cube[q].P[i].y);
- }
- glEnd();
- glBegin(GL_LINE_LOOP);
- for(int i = 4 ; i < 8 ; i++)
- glVertex2d(cube.P[i].x, cube.P[i].y);
- glEnd();
- glBegin(GL_LINES);
- glVertex2d(cube.P[0].x, cube.P[0].y);
- glVertex2d(cube.P[4].x, cube.P[4].y);
- glVertex2d(cube.P[1].x, cube.P[1].y);
- glVertex2d(cube.P[5].x, cube.P[5].y);
- glVertex2d(cube.P[2].x, cube.P[2].y);
- glVertex2d(cube.P[6].x, cube.P[6].y);
- glVertex2d(cube.P[3].x, cube.P[3].y);
- glVertex2d(cube.P[7].x, cube.P[7].y);
- glEnd();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement