QWT API (中文) 7.0.1
Qt绘图库 - 中文API文档
载入中...
搜索中...
未找到
qwt3d_surfaceplot.h
1#ifndef qwt3d_SurfacePlot_h
2#define qwt3d_SurfacePlot_h
3
4#include "qwt3d_plot.h"
5
6namespace Qwt3D {
7
21class QWT3D_EXPORT SurfacePlot : public Plot3D
22{
23 Q_OBJECT
24
25public:
26 SurfacePlot(QWidget *parent = 0);
28 // Recalculates surface normals
29 void updateNormals();
30 // Returns data resolution (1 means all data)
31 int resolution() const { return resolution_p; }
32 // Returns the number of mesh cells for the ORIGINAL data
33 std::pair<int, int> facets() const;
34 bool loadFromData(Qwt3D::Triple **data, unsigned int columns, unsigned int rows,
35 bool uperiodic = false, bool vperiodic = false);
36 bool loadFromData(double **data, unsigned int columns, unsigned int rows, double minx,
37 double maxx, double miny, double maxy);
38 bool loadFromData(Qwt3D::TripleField const &data, Qwt3D::CellField const &poly);
39
40 // Deprecated - Use loadFromData instead
41 bool createDataRepresentation(Qwt3D::Triple **data, unsigned int columns, unsigned int rows,
42 bool uperiodic = false, bool vperiodic = false)
43 {
44 return loadFromData(data, columns, rows, uperiodic, vperiodic);
45 }
46 // Deprecated - Use loadFromData instead
47 bool createDataRepresentation(double **data, unsigned int columns, unsigned int rows,
48 double minx, double maxx, double miny, double maxy)
49 {
50 return loadFromData(data, columns, rows, minx, maxx, miny, maxy);
51 }
52 // Deprecated - Use loadFromData instead
53 bool createDataRepresentation(Qwt3D::TripleField const &data, Qwt3D::CellField const &poly)
54 {
55 return loadFromData(data, poly);
56 }
57
58 // Return floor style
59 Qwt3D::FLOORSTYLE floorStyle() const { return floorstyle_; }
60 // Sets floor style
61 void setFloorStyle(Qwt3D::FLOORSTYLE val) { floorstyle_ = val; }
62 // Draw normals to every vertex
63 void showNormals(bool);
64 // Returns true, if normal drawing is on
65 bool normals() const { return datanormals_p; }
66
67 // Sets length of normals in percent per hull diagonale
68 void setNormalLength(double val);
69 // Returns relative length of normals
70 double normalLength() const { return normalLength_p; }
71 // Increases plotting quality of normal arrows
72 void setNormalQuality(int val);
73 // Returns plotting quality of normal arrows
74 int normalQuality() const
75 {
76 return normalQuality_p;
77 }
78
79Q_SIGNALS:
92
93public Q_SLOTS:
94 void setResolution(int);
95
96protected:
97 bool datanormals_p;
98 double normalLength_p;
99 int normalQuality_p;
100
101 virtual void calculateHull();
102 virtual void createData();
103 virtual void createEnrichment(Qwt3D::Enrichment &p);
104 virtual void createFloorData();
105 void createNormals();
106 void createPoints();
107
108 int resolution_p;
109
110 void readIn(Qwt3D::GridData &gdata, Triple **data, unsigned int columns, unsigned int rows);
111 void readIn(Qwt3D::GridData &gdata, double **data, unsigned int columns, unsigned int rows,
112 double minx, double maxx, double miny, double maxy);
113 void calcNormals(GridData &gdata);
114 void sewPeriodic(GridData &gdata);
115
116private:
117 void Data2Floor();
118 void Isolines2Floor();
119
120 Qwt3D::FLOORSTYLE floorstyle_;
121
122 Qwt3D::GridData *actualDataG_;
123 virtual void createDataG();
124 virtual void createFloorDataG();
125 void createNormalsG();
126 void Data2FloorG();
127 void Isolines2FloorG();
128 void setColorFromVertexG(int ix, int iy, bool skip = false);
129
130 Qwt3D::CellData *actualDataC_;
131 virtual void createDataC();
132 virtual void createFloorDataC();
133 void createNormalsC();
134 void Data2FloorC();
135 void Isolines2FloorC();
136 void setColorFromVertexC(int node, bool skip = false);
137};
138
139} // ns
140
141#endif
实现带限制访问函数的图状单元格结构
Definition qwt3d_types.h:625
数据依赖可见用户对象的抽象基类
Definition qwt3d_enrichment.h:28
实现带限制访问函数的 z 值矩阵
Definition qwt3d_types.h:566
所有绘图控件的基类
Definition qwt3d_plot.h:31
表示表面的类
Definition qwt3d_surfaceplot.h:22
void resolutionChanged(int)
分辨率变化时发出的信号
三元组 [x,y,z]
Definition qwt3d_types.h:240