diff -r 4bec0525ef1b -r 93ec4d630346 src/linetypes/quadrilateral.h --- a/src/linetypes/quadrilateral.h Thu Mar 19 21:06:06 2020 +0200 +++ b/src/linetypes/quadrilateral.h Wed Mar 25 16:07:20 2020 +0200 @@ -6,24 +6,11 @@ class Quadrilateral; } -class ldraw::Quadrilateral : public ColoredObject +class ldraw::Quadrilateral : public PolygonObject<4> { public: - Quadrilateral() = default; - Quadrilateral( - const glm::vec3 &point_1, - const glm::vec3 &point_2, - const glm::vec3 &point_3, - const glm::vec3 &point_4, - Color colorIndex = ldraw::mainColor); - Quadrilateral(const std::array& vertices, const Color color); - QVariant getProperty(Property id) const override; + using PolygonObject<4>::PolygonObject; QString textRepresentation() const override; void getPolygons(std::vector& polygons, GetPolygonsContext* context) const override; void invert() override; - int numPoints() const override; - const glm::vec3& getPoint(int index) const override; - glm::vec3 points[4] = {{}}; -protected: - void setProperty(SetPropertyResult* result, const PropertyKeyValue& pair) override; };