src/layers/edittools.h

changeset 322
a39f454a3d7f
parent 315
23b47902d857
child 333
07e65a4c6611
--- a/src/layers/edittools.h	Sun Jul 03 15:59:22 2022 +0300
+++ b/src/layers/edittools.h	Sun Jul 03 20:18:34 2022 +0300
@@ -23,6 +23,7 @@
 #include "src/model.h"
 #include "src/vertexmap.h"
 #include "src/gl/common.h"
+#include "src/inputvertices.h"
 
 enum EditingMode
 {
@@ -38,8 +39,7 @@
 class EditTools final : public QObject, public RenderLayer
 {
 	Q_OBJECT
-	std::vector<glm::vec3> polygon = {{0, 0, 0}};
-	std::size_t numpoints = 1;
+	InputVertices inputPolygon;
 	EditingMode mode = SelectMode;
 	glm::mat4 mvpMatrix;
 	glm::mat4 gridMatrix{1};
@@ -76,8 +76,5 @@
 	bool usePolygon() const;
 	void closeShape();
 	void renderPreview(QPainter* painter, const void* pensptr);
-	void removeLastPoint();
-	[[nodiscard]] bool isCloseToExistingPoints() const;
-	[[nodiscard]] std::size_t calcNumPoints() const;
 	[[nodiscard]] opt<float> cylinderHeight() const;
 };

mercurial