src/document.cpp

changeset 201
5d201ee4a9c3
parent 200
ca23936b455b
child 203
1909a0123c72
equal deleted inserted replaced
200:ca23936b455b 201:5d201ee4a9c3
152 drawState->previewPolygon = drawState->polygon; 152 drawState->previewPolygon = drawState->polygon;
153 drawState->previewPolygon.resize(drawState->polygon.size() + 1); 153 drawState->previewPolygon.resize(drawState->polygon.size() + 1);
154 drawState->previewPolygon.back() = drawState->previewPoint; 154 drawState->previewPolygon.back() = drawState->previewPoint;
155 if (drawState->previewPolygon.size() > 2) 155 if (drawState->previewPolygon.size() > 2)
156 { 156 {
157 drawState->isconcave = not geom::isConvex(drawState->previewPolygon); 157 drawState->isconcave = not isConvex(drawState->previewPolygon);
158 } 158 }
159 } 159 }
160 160
161 void removeLastPoint(DrawState* drawState) 161 void removeLastPoint(DrawState* drawState)
162 { 162 {
167 } 167 }
168 } 168 }
169 169
170 bool isCloseToExistingPoints(const std::vector<glm::vec3>& points, const glm::vec3 &pos) 170 bool isCloseToExistingPoints(const std::vector<glm::vec3>& points, const glm::vec3 &pos)
171 { 171 {
172 return any(points, std::bind(geom::isclose, std::placeholders::_1, pos)); 172 return any(points, std::bind(isclose, std::placeholders::_1, pos));
173 } 173 }
174 174
175 void EditorTabWidget::canvasMouseClick(QMouseEvent *event) 175 void EditorTabWidget::canvasMouseClick(QMouseEvent *event)
176 { 176 {
177 switch(this->drawState.mode) 177 switch(this->drawState.mode)

mercurial