QWT API (中文) 7.3.0
Qt绘图库 - 中文API文档
载入中...
搜索中...
未找到
qwt3d_drawable.h
1#ifndef QWT3D_DRAWABLE_H
2#define QWT3D_DRAWABLE_H
3
4#include "qwt3d_global.h"
5#include "qwt3d_types.h"
6#include "qwt3d_io_gl2ps.h"
7
8namespace Qwt3D
9{
10
14class QWT3D_EXPORT Drawable
15{
16 QWT_DECLARE_PRIVATE(Drawable)
17
18public:
19 virtual ~Drawable() = 0;
20
21 virtual void draw();
22
23 virtual void saveGLState();
24 virtual void restoreGLState();
25
26 void attach(Drawable*);
27 void detach(Drawable*);
28 void detachAll();
29
30 virtual void setColor(double r, double g, double b, double a = 1);
31 virtual void setColor(Qwt3D::RGBA rgba);
32 Qwt3D::Triple relativePosition(Qwt3D::Triple rel);
33
34protected:
35 Qwt3D::RGBA color;
36 void Enable(GLenum what, GLboolean val);
37 Qwt3D::Triple ViewPort2World(Qwt3D::Triple win, bool* err = nullptr);
38 Qwt3D::Triple World2ViewPort(Qwt3D::Triple obj, bool* err = nullptr);
39
40 Drawable();
41 Drawable(Drawable&& other) noexcept;
42 Drawable& operator=(Drawable&& other) noexcept;
43
44 GLdouble modelMatrix[ 16 ];
45 GLdouble projMatrix[ 16 ];
46 GLint viewport[ 4 ];
47};
48
49} // ns
50
51#endif
Abstract base class for Drawables
Definition qwt3d_drawable.h:15
Red-Green-Blue-Alpha value
Definition qwt3d_types.h:364
Triple [x,y,z]
Definition qwt3d_types.h:170