Object.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. //
  2. // Created by janco on 6/22/16.
  3. //
  4. #ifndef OPENGLINDIVIDUEEL_OBJECT_H
  5. #define OPENGLINDIVIDUEEL_OBJECT_H
  6. #include <GL/gl.h>
  7. #include <string>
  8. #include "Vector.h"
  9. class Object {
  10. public:
  11. void draw();
  12. void update(float elapsedTime) {};
  13. void quad(int a,int b,int c,int d);
  14. Vec3f position;
  15. Vec3f rotation;
  16. float scale;
  17. std::string text;
  18. float ver[8][3] =
  19. {
  20. {-1.0,-1.0,1.0},
  21. {-1.0,1.0,1.0},
  22. {1.0,1.0,1.0},
  23. {1.0,-1.0,1.0},
  24. {-1.0,-1.0,-1.0},
  25. {-1.0,1.0,-1.0},
  26. {1.0,1.0,-1.0},
  27. {1.0,-1.0,-1.0},
  28. };
  29. GLfloat color[8][3] =
  30. {
  31. {0.0,0.0,0.0},
  32. {1.0,0.0,0.0},
  33. {1.0,1.0,0.0},
  34. {0.0,1.0,0.0},
  35. {0.0,0.0,1.0},
  36. {1.0,0.0,1.0},
  37. {1.0,1.0,1.0},
  38. {0.0,1.0,1.0},
  39. };
  40. };
  41. #endif //OPENGLINDIVIDUEEL_OBJECT_H