1 | #ifndef qwt3d_enrichment_std_h__2004_02_23_19_25_begin_guarded_code
|
---|
2 | #define qwt3d_enrichment_std_h__2004_02_23_19_25_begin_guarded_code
|
---|
3 |
|
---|
4 | #include "qwt3d_enrichment.h"
|
---|
5 |
|
---|
6 | namespace Qwt3D
|
---|
7 | {
|
---|
8 |
|
---|
9 | class Plot3D;
|
---|
10 |
|
---|
11 | //! The Cross Hair Style
|
---|
12 | class QWT3D_EXPORT CrossHair : public VertexEnrichment
|
---|
13 | {
|
---|
14 | public:
|
---|
15 | CrossHair();
|
---|
16 | CrossHair(double rad, double linewidth, bool smooth, bool boxed);
|
---|
17 |
|
---|
18 | Qwt3D::Enrichment* clone() const {return new CrossHair(*this);}
|
---|
19 |
|
---|
20 | void configure(double rad, double linewidth, bool smooth, bool boxed);
|
---|
21 | void drawBegin();
|
---|
22 | void drawEnd();
|
---|
23 | void draw(Qwt3D::Triple const&);
|
---|
24 |
|
---|
25 | private:
|
---|
26 | bool boxed_, smooth_;
|
---|
27 | double linewidth_, radius_;
|
---|
28 | GLboolean oldstate_;
|
---|
29 | };
|
---|
30 |
|
---|
31 | //! The Point Style
|
---|
32 | class QWT3D_EXPORT Dot : public VertexEnrichment
|
---|
33 | {
|
---|
34 | public:
|
---|
35 | Dot();
|
---|
36 | Dot(double pointsize, bool smooth);
|
---|
37 |
|
---|
38 | Qwt3D::Enrichment* clone() const {return new Dot(*this);}
|
---|
39 |
|
---|
40 | void configure(double pointsize, bool smooth);
|
---|
41 | void drawBegin();
|
---|
42 | void drawEnd();
|
---|
43 | void draw(Qwt3D::Triple const&);
|
---|
44 |
|
---|
45 | private:
|
---|
46 | bool smooth_;
|
---|
47 | double pointsize_;
|
---|
48 | GLboolean oldstate_;
|
---|
49 | };
|
---|
50 |
|
---|
51 | //! The Cone Style
|
---|
52 | class QWT3D_EXPORT Cone : public VertexEnrichment
|
---|
53 | {
|
---|
54 | public:
|
---|
55 | Cone();
|
---|
56 | Cone(double rad, unsigned quality);
|
---|
57 | ~Cone();
|
---|
58 |
|
---|
59 | Qwt3D::Enrichment* clone() const {return new Cone(*this);}
|
---|
60 |
|
---|
61 | void configure(double rad, unsigned quality);
|
---|
62 | void draw(Qwt3D::Triple const&);
|
---|
63 |
|
---|
64 | private:
|
---|
65 | GLUquadricObj *hat;
|
---|
66 | GLUquadricObj *disk;
|
---|
67 | unsigned quality_;
|
---|
68 | double radius_;
|
---|
69 | GLboolean oldstate_;
|
---|
70 | };
|
---|
71 |
|
---|
72 | //! 3D vector field.
|
---|
73 | /**
|
---|
74 | The class encapsulates a vector field including his OpenGL representation as arrow field.
|
---|
75 | The arrows can be configured in different aspects (color, shape, painting quality).
|
---|
76 |
|
---|
77 | */
|
---|
78 | class QWT3D_EXPORT Arrow : public VertexEnrichment
|
---|
79 | {
|
---|
80 | public:
|
---|
81 |
|
---|
82 | Arrow();
|
---|
83 | ~Arrow();
|
---|
84 |
|
---|
85 | Qwt3D::Enrichment* clone() const {return new Arrow(*this);}
|
---|
86 |
|
---|
87 | void configure(int segs, double relconelength, double relconerad, double relstemrad);
|
---|
88 | void setQuality(int val) {segments_ = val;} //!< Set the number of faces for the arrow
|
---|
89 | void draw(Qwt3D::Triple const&);
|
---|
90 |
|
---|
91 | void setTop(Qwt3D::Triple t){top_ = t;}
|
---|
92 | void setColor(Qwt3D::RGBA rgba) {rgba_ = rgba;}
|
---|
93 |
|
---|
94 | private:
|
---|
95 |
|
---|
96 | GLUquadricObj *hat;
|
---|
97 | GLUquadricObj *disk;
|
---|
98 | GLUquadricObj *base;
|
---|
99 | GLUquadricObj *bottom;
|
---|
100 | GLboolean oldstate_;
|
---|
101 |
|
---|
102 | double calcRotation(Qwt3D::Triple& axis, Qwt3D::FreeVector const& vec);
|
---|
103 |
|
---|
104 | int segments_;
|
---|
105 | double rel_cone_length;
|
---|
106 |
|
---|
107 | double rel_cone_radius;
|
---|
108 | double rel_stem_radius;
|
---|
109 |
|
---|
110 | Qwt3D::Triple top_;
|
---|
111 | Qwt3D::RGBA rgba_;
|
---|
112 | };
|
---|
113 |
|
---|
114 | } // ns
|
---|
115 |
|
---|
116 | #endif
|
---|