stuff

Sun, 25 Jul 2021 16:29:08 +0300

author
Teemu Piippo <teemu@hecknology.net>
date
Sun, 25 Jul 2021 16:29:08 +0300
changeset 110
d922431eacf7
parent 109
40a1cf2f38f5
child 111
1f42c03fafca

stuff

src/ui/canvas.cpp file | annotate | diff | comparison | revisions
src/ui/canvas.h file | annotate | diff | comparison | revisions
--- a/src/ui/canvas.cpp	Sun Jul 25 16:26:38 2021 +0300
+++ b/src/ui/canvas.cpp	Sun Jul 25 16:29:08 2021 +0300
@@ -247,6 +247,11 @@
 	painter->drawPolygon(QPolygonF{points2d});
 }
 
+const std::optional<glm::vec3>& Canvas::getWorldPosition() const
+{
+	return this->worldPosition;
+}
+
 void Canvas::drawWorldPoint(QPainter* painter, const glm::vec3& worldPoint) const
 {
 	const QPointF center = this->modelToScreenCoordinates(worldPoint);
--- a/src/ui/canvas.h	Sun Jul 25 16:26:38 2021 +0300
+++ b/src/ui/canvas.h	Sun Jul 25 16:29:08 2021 +0300
@@ -23,6 +23,7 @@
 	void setOverpaintCallback(OverpaintCallback fn);
 	void drawWorldPoint(QPainter* painter, const glm::vec3& worldPoint) const;
 	void drawWorldPolygon(QPainter* painter, const std::vector<glm::vec3>& points);
+	const std::optional<glm::vec3>& getWorldPosition() const;
 public slots:
 	void handleSelectionChange(const QSet<ldraw::id_t>& selectedIds, const QSet<ldraw::id_t>& deselectedIds);
 protected:

mercurial