src/gldraw.h

changeset 539
72ad83a67165
parent 538
2f85d4d286e5
child 540
0334789cb4d7
equal deleted inserted replaced
538:2f85d4d286e5 539:72ad83a67165
61 // g_win->R() 61 // g_win->R()
62 // ============================================================================= 62 // =============================================================================
63 class GLRenderer : public QGLWidget 63 class GLRenderer : public QGLWidget
64 { Q_OBJECT 64 { Q_OBJECT
65 65
66 PROPERTY (bool, drawOnly, setDrawOnly) 66 PROPERTY (public, bool, DrawOnly, BOOL_OPS, NO_CB)
67 PROPERTY (MessageManager*, msglog, setMessageLog) 67 PROPERTY (public, MessageManager*, MessageLog, NO_OPS, NO_CB)
68 READ_PROPERTY (bool, picking, setPicking) 68 PROPERTY (private, bool, Picking, BOOL_OPS, NO_CB)
69 DECLARE_PROPERTY (LDFile*, file, setFile) 69 PROPERTY (public, LDFile*, File, NO_OPS, WITH_CB)
70 DECLARE_PROPERTY (EditMode, editMode, setEditMode) 70 PROPERTY (public, EditMode, EditMode, NO_OPS, WITH_CB)
71 71
72 public: 72 public:
73 enum Camera { Top, Front, Left, Bottom, Back, Right, Free }; 73 enum Camera { Top, Front, Left, Bottom, Back, Right, Free };
74 enum ListType { NormalList, PickList, BFCFrontList, BFCBackList }; 74 enum ListType { NormalList, PickList, BFCFrontList, BFCBackList };
75 75
174 LDOverlay* findOverlayObject (Camera cam); 174 LDOverlay* findOverlayObject (Camera cam);
175 void updateRectVerts(); 175 void updateRectVerts();
176 void getRelativeAxes (Axis& relX, Axis& relY) const; 176 void getRelativeAxes (Axis& relX, Axis& relY) const;
177 matrix getCircleDrawMatrix (double scale); 177 matrix getCircleDrawMatrix (double scale);
178 void drawBlip (QPainter& paint, QPoint pos) const; 178 void drawBlip (QPainter& paint, QPoint pos) const;
179 179
180 // Compute geometry for camera icons 180 // Compute geometry for camera icons
181 void calcCameraIcons(); 181 void calcCameraIcons();
182 182
183 // How large is the circle we're drawing right now? 183 // How large is the circle we're drawing right now?
184 double getCircleDrawDist (int pos) const; 184 double getCircleDrawDist (int pos) const;
185 185
186 // Clamps an angle to [0, 360] 186 // Clamps an angle to [0, 360]
187 void clampAngle (double& angle) const; 187 void clampAngle (double& angle) const;
188 188
189 // Compile one of the lists of an object 189 // Compile one of the lists of an object
190 void compileList (LDObject* obj, const ListType list); 190 void compileList (LDObject* obj, const ListType list);
191 191
192 // Sub-routine for object compiling 192 // Sub-routine for object compiling
193 void compileSubObject (LDObject* obj, const GLenum gltype); 193 void compileSubObject (LDObject* obj, const GLenum gltype);
194 194
195 // Compile a single vertex to a list 195 // Compile a single vertex to a list
196 void compileVertex (const vertex& vrt); 196 void compileVertex (const vertex& vrt);
197 197
198 // Convert a 2D point to a 3D point 198 // Convert a 2D point to a 3D point
199 vertex coordconv2_3 (const QPoint& pos2d, bool snap) const; 199 vertex coordconv2_3 (const QPoint& pos2d, bool snap) const;
200 200
201 // Convert a 3D point to a 2D point 201 // Convert a 3D point to a 2D point
202 QPoint coordconv3_2 (const vertex& pos3d) const; 202 QPoint coordconv3_2 (const vertex& pos3d) const;
203 203
204 // Determine which color to draw text with 204 // Determine which color to draw text with
205 QColor getTextPen() const; 205 QColor getTextPen() const;

mercurial