123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- #ifndef ABSTRACTRENDERDEVICE_H
- #define ABSTRACTRENDERDEVICE_H
-
- #include <QObject>
- #include <QColor>
- #include "utils/colorvector3d.h"
-
- class AbstractRenderDevice : public QObject
- {
- Q_OBJECT
- public:
- explicit AbstractRenderDevice(QObject *parent = 0);
-
- virtual ~AbstractRenderDevice();
-
- QColor getCurrentColor() const;
-
- Vector3D getLookEye() const;
-
- Vector3D getLookCenter() const;
-
- Vector3D getLookUp() const;
-
- QColor getClearColor() const;
-
- virtual Vector3D get2DFrom3D(const Vector3D& pos) = 0;
-
- virtual Vector3D get3DFrom2D(int x, int y) = 0;
-
- public slots:
- virtual void setClearColor(const QColor &getClearColor);
-
- virtual void setCurrentColor(const QColor &color);
-
- virtual void lookAt(const Vector3D& eye, const Vector3D& center, const Vector3D& up = Vector3D(0.0, 1.0, 0.0));
-
- virtual void initialize(int fov, int width, int height) = 0;
-
- virtual void resize(int width, int height) = 0;
-
- virtual void preDraw() = 0;
-
- virtual void postDraw() = 0;
-
- virtual void drawPoint(const ColorVector3D& point) = 0;
-
- virtual void drawLine(const ColorVector3D& begin, const ColorVector3D& end, double width = 1.0) = 0;
-
- virtual void drawPolygon(const QList<ColorVector3D>& points) = 0;
-
- protected:
- QColor _clearColor;
-
- QColor _currentColor;
-
- Vector3D _lookEye;
-
- Vector3D _lookCenter;
-
- Vector3D _lookUp;
- };
-
- #endif // ABSTRACTRENDERDEVICE_H
|