1391:5fa4bf1fc781 | 1392:0541d9b21968 |
---|---|
58 } | 58 } |
59 | 59 |
60 return 0.0; | 60 return 0.0; |
61 } | 61 } |
62 | 62 |
63 #if 0 | |
63 static Matrix shearMatrixForPlane(Canvas* renderer) | 64 static Matrix shearMatrixForPlane(Canvas* renderer) |
64 { | 65 { |
65 const Plane& plane = renderer->drawPlane(); | 66 const Plane& plane = renderer->drawPlane(); |
66 Axis localx, localy; | 67 Axis localx, localy; |
67 renderer->getRelativeAxes(localx, localy); | 68 renderer->getRelativeAxes(localx, localy); |
80 shearMatrix(Y, Z) = -normalAsVertex[localy] / normalAsVertex[localz]; | 81 shearMatrix(Y, Z) = -normalAsVertex[localy] / normalAsVertex[localz]; |
81 } | 82 } |
82 | 83 |
83 return shearMatrix; | 84 return shearMatrix; |
84 } | 85 } |
86 #endif | |
85 | 87 |
86 void CircleMode::endDraw() | 88 void CircleMode::endDraw() |
87 { | 89 { |
88 Model model {m_documents}; | 90 Model model {m_documents}; |
89 PrimitiveModel primitiveModel; | 91 PrimitiveModel primitiveModel; |
135 } | 137 } |
136 } | 138 } |
137 else | 139 else |
138 { | 140 { |
139 // Ring finder failed, last resort: draw the ring with quads | 141 // Ring finder failed, last resort: draw the ring with quads |
140 Axis localx, localy, localz; | 142 Axis localx, localy; |
141 renderer()->getRelativeAxes (localx, localy); | 143 renderer()->getRelativeAxes (localx, localy); |
142 localz = (Axis) (3 - localx - localy); | |
143 double x0 = m_drawedVerts[0][localx]; | 144 double x0 = m_drawedVerts[0][localx]; |
144 double y0 = m_drawedVerts[0][localy]; | 145 double y0 = m_drawedVerts[0][localy]; |
145 | 146 |
146 Vertex templ; | 147 Vertex templ; |
147 templ.setCoordinate(localx, x0); | 148 templ.setCoordinate(localx, x0); |