src/linetypes/edge.h

changeset 87
93ec4d630346
parent 86
4bec0525ef1b
child 89
7abaf1d64719
--- a/src/linetypes/edge.h	Thu Mar 19 21:06:06 2020 +0200
+++ b/src/linetypes/edge.h	Wed Mar 25 16:07:20 2020 +0200
@@ -6,21 +6,10 @@
 	class Edge;
 }
 
-class ldraw::Edge : public ColoredObject
+class ldraw::Edge : public PolygonObject<2>
 {
 public:
-	using BaseClass = ColoredObject;
-	Edge() = default;
-	Edge(const glm::vec3& point_1, const glm::vec3& point_2,
-		 const Color colorIndex = ldraw::edgeColor);
-	Edge(const std::array<glm::vec3, 2>& vertices, const Color color);
-	QVariant getProperty(Property property) const override;
+	using PolygonObject::PolygonObject;
 	QString textRepresentation() const override;
 	void getPolygons(std::vector<gl::Polygon>& polygons, GetPolygonsContext* context) const override;
-	int numPoints() const override;
-	const glm::vec3& getPoint(int index) const override;
-	glm::vec3 point_1 = {};
-	glm::vec3 point_2 = {};
-protected:
-	void setProperty(SetPropertyResult* result, const PropertyKeyValue& pair) override;
 };

mercurial