Guest User

Untitled

a guest
Oct 22nd, 2018
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. // Create the points of our cube
  2. Vec3f v0(-100,-100,-100);
  3. Vec3f v1( 100,-100,-100);
  4. Vec3f v2( 100, 100,-100);
  5. Vec3f v3(-100, 100,-100);
  6. Vec3f v4(-100,-100, 100);
  7. Vec3f v5( 100,-100, 100);
  8. Vec3f v6( 100, 100, 100);
  9. Vec3f v7(-100, 100, 100);
  10. // Create the colors for each vertex
  11. Color c0( 0, 0, 0 );
  12. Color c1( 1, 0, 0 );
  13. Color c2( 1, 1, 0 );
  14. Color c3( 0, 1, 0 );
  15. Color c4( 0, 0, 1 );
  16. Color c5( 1, 0, 1 );
  17. Color c6( 1, 1, 1 );
  18. Color c7( 0, 1, 1 );
  19. Vec3f faces[6][4] = { /* Vertices for the 6 faces of a cube. */
  20. {v0, v1, v2, v3}, {v3, v2, v6, v7}, {v7, v6, v5, v4},
  21. {v4, v5, v1, v0}, {v5, v6, v2, v1}, {v7, v4, v0, v3} };
  22. Color colors[6][4] = { /* colors for each vertex of the cube. */
  23. {c0, c1, c2, c3}, {c3, c2, c6, c7}, {c7, c6, c5, c4},
  24. {c4, c5, c1, c0}, {c5, c6, c2, c1}, {c7, c4, c0, c3} };
Add Comment
Please, Sign In to add comment