src/linetypes/edge.h

changeset 87
93ec4d630346
parent 86
4bec0525ef1b
child 89
7abaf1d64719
equal deleted inserted replaced
86:4bec0525ef1b 87:93ec4d630346
4 namespace ldraw 4 namespace ldraw
5 { 5 {
6 class Edge; 6 class Edge;
7 } 7 }
8 8
9 class ldraw::Edge : public ColoredObject 9 class ldraw::Edge : public PolygonObject<2>
10 { 10 {
11 public: 11 public:
12 using BaseClass = ColoredObject; 12 using PolygonObject::PolygonObject;
13 Edge() = default;
14 Edge(const glm::vec3& point_1, const glm::vec3& point_2,
15 const Color colorIndex = ldraw::edgeColor);
16 Edge(const std::array<glm::vec3, 2>& vertices, const Color color);
17 QVariant getProperty(Property property) const override;
18 QString textRepresentation() const override; 13 QString textRepresentation() const override;
19 void getPolygons(std::vector<gl::Polygon>& polygons, GetPolygonsContext* context) const override; 14 void getPolygons(std::vector<gl::Polygon>& polygons, GetPolygonsContext* context) const override;
20 int numPoints() const override;
21 const glm::vec3& getPoint(int index) const override;
22 glm::vec3 point_1 = {};
23 glm::vec3 point_2 = {};
24 protected:
25 void setProperty(SetPropertyResult* result, const PropertyKeyValue& pair) override;
26 }; 15 };

mercurial