QWT API (中文) 7.3.0
Qt绘图库 - 中文API文档
载入中...
搜索中...
未找到
qwt3d_plot_p.h
1#ifndef QWT3D_PLOT_P_H
2#define QWT3D_PLOT_P_H
3
4#include "qwt3d_plot.h"
5#include "qwt3d_portability.h"
6
7#include <QPoint>
8#include <QMatrix4x4>
9#include <QList>
10#include <QOpenGLShaderProgram>
11#include <memory>
12
13
14class Qwt3DPlotItem;
15
16class Qwt3DPlot::PrivateData
17{
18 QWT_DECLARE_PUBLIC(Qwt3DPlot)
19
20public:
21 PrivateData(Qwt3DPlot* q);
22
23 struct Light
24 {
25 Light() : unlit(true)
26 {
27 }
28 bool unlit;
29 Triple rot;
30 Triple shift;
31 };
32
33 Qwt3DCoordinateSystem m_coordinates;
34
35 std::vector< Light > m_lights;
36
37 double m_xRot, m_yRot, m_zRot;
38 double m_xShift, m_yShift, m_zShift;
39 double m_zoom;
40 double m_xScale, m_yScale, m_zScale;
41 double m_xVPShift, m_yVPShift;
42
43 RGBA m_bgColor;
44 bool m_ortho;
45 ASPECTRATIOMODE m_aspectRatioMode = AUTOFILL;
46
47 bool m_displayLegend;
48
49 ParallelEpiped m_hull;
50
51 Qwt3DColorLegend m_legend;
52
53 Qwt3DLabel m_title;
54 Tuple m_titleRel;
55 ANCHOR m_titleAnchor;
56
57 QPoint m_lastMouseMovePosition;
58 bool m_pressed;
59
60 Qwt3DMouseState m_xrotMState, m_yrotMState, m_zrotMState;
61 Qwt3DMouseState m_xscaleMState, m_yscaleMState, m_zscaleMState;
62 Qwt3DMouseState m_zoomMState;
63 Qwt3DMouseState m_xshiftMState, m_yshiftMState;
64
65 bool m_mouseInputEnabled;
66
67 Qwt3DKeyboardState m_xrotKState[ 2 ], m_yrotKState[ 2 ], m_zrotKState[ 2 ];
68 Qwt3DKeyboardState m_xscaleKState[ 2 ], m_yscaleKState[ 2 ], m_zscaleKState[ 2 ];
69 Qwt3DKeyboardState m_zoomKState[ 2 ];
70 Qwt3DKeyboardState m_xshiftKState[ 2 ], m_yshiftKState[ 2 ];
71
72 bool m_kPressed;
73 bool m_kbdInputEnabled;
74 double m_kbdRotSpeed, m_kbdScaleSpeed, m_kbdShiftSpeed;
75
76 bool m_lightingEnabled;
77 bool m_initializedGL;
78 bool m_renderPixmapRequest;
79
80 Qwt3DTheme m_theme;
81
82 // CPU-side transformation matrices
83 QMatrix4x4 m_modelView;
84 QMatrix4x4 m_projection;
85
86 // Viewport dimensions
87 int m_viewportWidth = 0;
88 int m_viewportHeight = 0;
89
90 // Shared generic shaders
91 std::unique_ptr< QOpenGLShaderProgram > m_lineShader;
92 std::unique_ptr< QOpenGLShaderProgram > m_pointShader;
93 std::unique_ptr< QOpenGLShaderProgram > m_polygonShader;
94 std::unique_ptr< QOpenGLShaderProgram > m_textShader;
95
96 // Attached items list (sorted by z-order)
98};
99
100
101#endif // QWT3D_PLOT_P_H
Definition qwt_raster_data.h:38
A flat color legend
Definition qwt3d_colorlegend.h:19
A coordinate system with different styles (BOX, FRAME)
Definition qwt3d_coordsys.h:13
Creates a (key-button, modifier) pair
Definition qwt3d_portability.h:52
A Qt string or an output device dependent string
Definition qwt3d_label.h:21
Creates a (mouse-button, modifier) pair
Definition qwt3d_portability.h:21
Base class for all 3D plot items
Definition qwt3d_plotitem.h:55
Pure rendering window for 3D plots
Definition qwt3d_plot.h:36
Complete visual theme descriptor for Qwt3DPlot widgets.
Definition qwt3d_theme.h:34
Parallelepiped spanned by 2 Triples
Definition qwt3d_types.h:334
Red-Green-Blue-Alpha value
Definition qwt3d_types.h:395
Triple [x,y,z]
Definition qwt3d_types.h:201
Tuple [x,y]
Definition qwt3d_types.h:182