src/gldraw.h

changeset 489
0b32138fedcc
parent 487
a350c4b25133
child 665
4355e72ffd47
equal deleted inserted replaced
488:0ea49207a4ec 489:0b32138fedcc
65 65
66 public: 66 public:
67 enum Camera { Top, Front, Left, Bottom, Back, Right, Free }; 67 enum Camera { Top, Front, Left, Bottom, Back, Right, Free };
68 enum ListType { NormalList, PickList, BFCFrontList, BFCBackList }; 68 enum ListType { NormalList, PickList, BFCFrontList, BFCBackList };
69 69
70 enum VAOType {
71 MainArray,
72 EdgeArray,
73 CondEdgeArray,
74 BFCArray,
75 PickArray,
76 EdgePickArray,
77 NumArrays
78 };
79
70 GLRenderer (QWidget* parent = null); 80 GLRenderer (QWidget* parent = null);
71 ~GLRenderer(); 81 ~GLRenderer();
72 82
73 Camera camera() const { return m_camera; } 83 Camera camera() const { return m_camera; }
74 Axis cameraAxis (bool y, Camera camid = (Camera) -1); 84 Axis cameraAxis (bool y, Camera camid = (Camera) -1);
129 double m_virtWidth, m_virtHeight, m_rotX, m_rotY, m_rotZ, m_panX, m_panY; 139 double m_virtWidth, m_virtHeight, m_rotX, m_rotY, m_rotZ, m_panX, m_panY;
130 bool m_darkbg, m_rangepick, m_addpick, m_drawToolTip, m_screencap; 140 bool m_darkbg, m_rangepick, m_addpick, m_drawToolTip, m_screencap;
131 QPoint m_pos, m_globalpos, m_rangeStart; 141 QPoint m_pos, m_globalpos, m_rangeStart;
132 QPen m_thickBorderPen, m_thinBorderPen; 142 QPen m_thickBorderPen, m_thinBorderPen;
133 Camera m_camera, m_toolTipCamera; 143 Camera m_camera, m_toolTipCamera;
134 uint m_axeslist; 144 GLuint m_axeslist;
135 ushort m_width, m_height; 145 int m_width, m_height;
136 List<vertex> m_drawedVerts; 146 List<vertex> m_drawedVerts;
137 bool m_rectdraw; 147 bool m_rectdraw;
138 vertex m_rectverts[4]; 148 vertex m_rectverts[4];
139 QColor m_bgcolor; 149 QColor m_bgcolor;
140 double m_depthValues[6]; 150 double m_depthValues[6];
145 void addDrawnVertex (vertex m_hoverpos); 155 void addDrawnVertex (vertex m_hoverpos);
146 void calcCameraIcons(); // Compute geometry for camera icons 156 void calcCameraIcons(); // Compute geometry for camera icons
147 void clampAngle (double& angle) const; // Clamps an angle to [0, 360] 157 void clampAngle (double& angle) const; // Clamps an angle to [0, 360]
148 vertex coordconv2_3 (const QPoint& pos2d, bool snap) const; // Convert a 2D point to a 3D point 158 vertex coordconv2_3 (const QPoint& pos2d, bool snap) const; // Convert a 2D point to a 3D point
149 QPoint coordconv3_2 (const vertex& pos3d) const; // Convert a 3D point to a 2D point 159 QPoint coordconv3_2 (const vertex& pos3d) const; // Convert a 3D point to a 2D point
160 void drawVAOs (VAOType arrayType, GLenum type); // Draw a VAO array
150 LDOverlay* findOverlayObject (Camera cam); 161 LDOverlay* findOverlayObject (Camera cam);
151 void updateRectVerts(); 162 void updateRectVerts();
152 void pick (uint mouseX, uint mouseY); // Perform object selection 163 void pick (uint mouseX, uint mouseY); // Perform object selection
153 QColor getTextPen() const; // Determine which color to draw text with 164 QColor getTextPen() const; // Determine which color to draw text with
154 165

mercurial