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.

rotationsmatrix.h 615B

1234567891011121314151617181920212223242526272829303132333435
  1. #ifndef __ROTATIONSMATRIX_H
  2. #define __ROTATIONSMATRIX_H
  3. #include <cmath>
  4. #include "punkt3d.h"
  5. #include "emath.h"
  6. #include "matrix.h"
  7. namespace segl {
  8. enum axis { x_axis=0, y_axis, z_axis };
  9. class Rotationsmatrix : public Matrix {
  10. private:
  11. float deg;
  12. Punkt3D rotvec;
  13. void initRot();
  14. public:
  15. Rotationsmatrix();
  16. Rotationsmatrix(axis, float);
  17. Rotationsmatrix(Punkt3D, float);
  18. ~Rotationsmatrix();
  19. void set(float);
  20. void set(axis, float);
  21. void set(Punkt3D, float);
  22. Punkt3D operator*(const Punkt3D&);
  23. Rotationsmatrix operator*(const Rotationsmatrix&);
  24. };
  25. } // namespace segl
  26. #endif