Small OpenGL based c++ rendering library
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

quader.cpp 633B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #include "quader.h"
  2. namespace segl {
  3. void Quader::clean() {
  4. a.set(0.0f, 0.0f, 0.0f);
  5. b = c = d = e = f = g = h = a;
  6. }
  7. void Quader::render() {
  8. glBegin(GL_LINES);
  9. glVertexP3D(a);
  10. glVertexP3D(b);
  11. glVertexP3D(b);
  12. glVertexP3D(c);
  13. glVertexP3D(c);
  14. glVertexP3D(d);
  15. glVertexP3D(d);
  16. glVertexP3D(a);
  17. glVertexP3D(e);
  18. glVertexP3D(f);
  19. glVertexP3D(f);
  20. glVertexP3D(g);
  21. glVertexP3D(g);
  22. glVertexP3D(h);
  23. glVertexP3D(h);
  24. glVertexP3D(e);
  25. glVertexP3D(a);
  26. glVertexP3D(e);
  27. glVertexP3D(b);
  28. glVertexP3D(f);
  29. glVertexP3D(c);
  30. glVertexP3D(g);
  31. glVertexP3D(d);
  32. glVertexP3D(h);
  33. glEnd();
  34. }
  35. } // namespace segl