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.

abstractrenderdevice.h 1.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #ifndef ABSTRACTRENDERDEVICE_H
  2. #define ABSTRACTRENDERDEVICE_H
  3. #include <QObject>
  4. #include <QColor>
  5. #include "vector3d.h"
  6. class AbstractRenderDevice : public QObject
  7. {
  8. Q_OBJECT
  9. public:
  10. explicit AbstractRenderDevice(QObject *parent = 0);
  11. virtual ~AbstractRenderDevice();
  12. QColor getCurrentColor() const;
  13. Vector3D getLookEye() const;
  14. Vector3D getLookCenter() const;
  15. Vector3D getLookUp() const;
  16. QColor getClearColor() const;
  17. public slots:
  18. virtual void setClearColor(const QColor &getClearColor);
  19. virtual void setCurrentColor(const QColor &color);
  20. virtual void lookAt(const Vector3D& eye, const Vector3D& center, const Vector3D& up = Vector3D(0.0, 1.0, 0.0));
  21. virtual void initialize(int fov, int width, int height) = 0;
  22. virtual void resize(int width, int height) = 0;
  23. virtual void preDraw() = 0;
  24. virtual void postDraw() = 0;
  25. protected:
  26. QColor _clearColor;
  27. QColor _currentColor;
  28. Vector3D _lookEye;
  29. Vector3D _lookCenter;
  30. Vector3D _lookUp;
  31. };
  32. #endif // ABSTRACTRENDERDEVICE_H