245 points2d.push_back(this->modelToScreenCoordinates(point)); |
245 points2d.push_back(this->modelToScreenCoordinates(point)); |
246 } |
246 } |
247 painter->drawPolygon(QPolygonF{points2d}); |
247 painter->drawPolygon(QPolygonF{points2d}); |
248 } |
248 } |
249 |
249 |
|
250 const std::optional<glm::vec3>& Canvas::getWorldPosition() const |
|
251 { |
|
252 return this->worldPosition; |
|
253 } |
|
254 |
250 void Canvas::drawWorldPoint(QPainter* painter, const glm::vec3& worldPoint) const |
255 void Canvas::drawWorldPoint(QPainter* painter, const glm::vec3& worldPoint) const |
251 { |
256 { |
252 const QPointF center = this->modelToScreenCoordinates(worldPoint); |
257 const QPointF center = this->modelToScreenCoordinates(worldPoint); |
253 painter->drawEllipse(geom::inscribe(geom::CircleF{center, 5})); |
258 painter->drawEllipse(geom::inscribe(geom::CircleF{center, 5})); |
254 } |
259 } |