src/gldraw.h

changeset 498
791c831c8020
parent 497
c51941e590b6
child 499
ebd30d9eb667
equal deleted inserted replaced
497:c51941e590b6 498:791c831c8020
39 }; 39 };
40 40
41 // Meta for overlays 41 // Meta for overlays
42 struct LDGLOverlay 42 struct LDGLOverlay
43 { vertex v0, v1; 43 { vertex v0, v1;
44 ushort ox, oy; 44 int ox, oy;
45 double lw, lh; 45 double lw, lh;
46 str fname; 46 str fname;
47 QImage* img; 47 QImage* img;
48 }; 48 };
49 49
94 void hardRefresh(); 94 void hardRefresh();
95 void initGLData(); 95 void initGLData();
96 void overlaysFromObjects(); 96 void overlaysFromObjects();
97 void refresh(); 97 void refresh();
98 void resetAngles(); 98 void resetAngles();
99 uchar* screencap (ushort& w, ushort& h); 99 uchar* screencap (int& w, int& h);
100 void setBackground(); 100 void setBackground();
101 void setCamera (const Camera cam); 101 void setCamera (const Camera cam);
102 void setDepthValue (double depth); 102 void setDepthValue (double depth);
103 bool setupOverlay (GLRenderer::Camera cam, str file, int x, int y, int w, int h); 103 bool setupOverlay (GLRenderer::Camera cam, str file, int x, int y, int w, int h);
104 void updateOverlayObjects(); 104 void updateOverlayObjects();
133 133
134 CameraIcon m_cameraIcons[7]; 134 CameraIcon m_cameraIcons[7];
135 QTimer* m_toolTipTimer; 135 QTimer* m_toolTipTimer;
136 Qt::MouseButtons m_lastButtons; 136 Qt::MouseButtons m_lastButtons;
137 Qt::KeyboardModifiers m_keymods; 137 Qt::KeyboardModifiers m_keymods;
138 ulong m_totalmove;
139 vertex m_hoverpos; 138 vertex m_hoverpos;
140 double m_virtWidth, 139 double m_virtWidth,
141 m_virtHeight, 140 m_virtHeight,
142 m_rotX, 141 m_rotX,
143 m_rotY, 142 m_rotY,
156 m_thinBorderPen; 155 m_thinBorderPen;
157 Camera m_camera, 156 Camera m_camera,
158 m_toolTipCamera; 157 m_toolTipCamera;
159 GLuint m_axeslist; 158 GLuint m_axeslist;
160 int m_width, 159 int m_width,
161 m_height; 160 m_height,
161 m_totalmove;
162 List<vertex> m_drawedVerts; 162 List<vertex> m_drawedVerts;
163 bool m_rectdraw; 163 bool m_rectdraw;
164 vertex m_rectverts[4]; 164 vertex m_rectverts[4];
165 QColor m_bgcolor; 165 QColor m_bgcolor;
166 double m_depthValues[6]; 166 double m_depthValues[6];
176 void compileVertex (const vertex& vrt); // Compile a single vertex to a list 176 void compileVertex (const vertex& vrt); // Compile a single vertex to a list
177 vertex coordconv2_3 (const QPoint& pos2d, bool snap) const; // Convert a 2D point to a 3D point 177 vertex coordconv2_3 (const QPoint& pos2d, bool snap) const; // Convert a 2D point to a 3D point
178 QPoint coordconv3_2 (const vertex& pos3d) const; // Convert a 3D point to a 2D point 178 QPoint coordconv3_2 (const vertex& pos3d) const; // Convert a 3D point to a 2D point
179 LDOverlay* findOverlayObject (Camera cam); 179 LDOverlay* findOverlayObject (Camera cam);
180 void updateRectVerts(); 180 void updateRectVerts();
181 void pick (uint mouseX, uint mouseY); // Perform object selection 181 void pick (int mouseX, int mouseY); // Perform object selection
182 void setObjectColor (LDObject* obj, const ListType list); // Set the color to an object list 182 void setObjectColor (LDObject* obj, const ListType list); // Set the color to an object list
183 QColor getTextPen() const; // Determine which color to draw text with 183 QColor getTextPen() const; // Determine which color to draw text with
184 void getRelativeAxes (Axis& relX, Axis& relY) const; 184 void getRelativeAxes (Axis& relX, Axis& relY) const;
185 185
186 void drawBlip (QPainter& paint, QPoint pos) const; 186 void drawBlip (QPainter& paint, QPoint pos) const;

mercurial