43 |
43 |
44 if (countof(m_drawedVerts) < 3) |
44 if (countof(m_drawedVerts) < 3) |
45 curve[3] = curve[2]; |
45 curve[3] = curve[2]; |
46 |
46 |
47 for (int i = 0; i < countof(curve); ++i) |
47 for (int i = 0; i < countof(curve); ++i) |
48 curve2d[i] = renderer()->convert3dTo2d (curve[i]); |
48 curve2d[i] = renderer()->currentCamera().convert3dTo2d(curve[i]); |
49 |
49 |
50 painter.setPen (QColor (0, 112, 112)); |
50 painter.setPen (QColor (0, 112, 112)); |
51 if (countof(m_drawedVerts) >= 2) |
51 if (countof(m_drawedVerts) >= 2) |
52 painter.drawLine (curve2d[0], curve2d[2]); |
52 painter.drawLine (curve2d[0], curve2d[2]); |
53 |
53 |
69 painter.strokePath (path, renderer()->linePen()); |
69 painter.strokePath (path, renderer()->linePen()); |
70 } |
70 } |
71 else |
71 else |
72 { |
72 { |
73 // Even if we have nothing, still draw the vertex at the cursor |
73 // Even if we have nothing, still draw the vertex at the cursor |
74 QPoint vertex2d = renderer()->convert3dTo2d (getCursorVertex()); |
74 QPoint vertex2d = renderer()->currentCamera().convert3dTo2d(getCursorVertex()); |
75 renderer()->drawPoint (painter, vertex2d); |
75 renderer()->drawPoint (painter, vertex2d); |
76 renderer()->drawBlipCoordinates (painter, getCursorVertex(), vertex2d); |
76 renderer()->drawBlipCoordinates (painter, getCursorVertex(), vertex2d); |
77 } |
77 } |
78 } |
78 } |
79 |
79 |