1 #include "object.h" |
1 #include "object.h" |
2 |
2 |
3 namespace linetypes |
3 namespace ldraw |
4 { |
4 { |
5 class Triangle; |
5 class Triangle; |
6 } |
6 } |
7 |
7 |
8 class linetypes::Triangle : public ColoredObject |
8 class ldraw::Triangle : public ColoredObject |
9 { |
9 { |
10 public: |
10 public: |
11 Triangle() = default; |
11 Triangle() = default; |
12 Triangle( |
12 Triangle( |
13 const glm::vec3 &point_1, |
13 const glm::vec3 &point_1, |
14 const glm::vec3 &point_2, |
14 const glm::vec3 &point_2, |
15 const glm::vec3 &point_3, |
15 const glm::vec3 &point_3, |
16 Color colorIndex = colors::main); |
16 Color colorIndex = ldraw::mainColor); |
17 Triangle(const QVector<glm::vec3>& vertices, const Color color); |
17 Triangle(const QVector<glm::vec3>& vertices, const Color color); |
18 QVariant getProperty(Property id) const override; |
18 QVariant getProperty(Property id) const override; |
19 SetPropertyResult setProperty(Property id, const QVariant& value) override; |
19 SetPropertyResult setProperty(Property id, const QVariant& value) override; |
20 QString textRepresentation() const override; |
20 QString textRepresentation() const override; |
21 void getPolygons(std::vector<gl::Polygon>& polygons, GetPolygonsContext* context) const override; |
21 void getPolygons(std::vector<gl::Polygon>& polygons, GetPolygonsContext* context) const override; |