Mon, 09 Mar 2020 22:12:50 +0200
finished splitQuadrilateral theoretically (untested)
73
97df974b5ed5
ldraw::Id is now templated for extra type safety
Teemu Piippo <teemu@hecknology.net>
parents:
35
diff
changeset
|
1 | #pragma once |
14 | 2 | #include "object.h" |
3 | 3 | |
35
98906a94732f
renamed the linetypes namespace to ldraw namespace and added more structures to it
Teemu Piippo <teemu@hecknology.net>
parents:
33
diff
changeset
|
4 | namespace ldraw |
3 | 5 | { |
6 | class Triangle; | |
7 | } | |
8 | ||
35
98906a94732f
renamed the linetypes namespace to ldraw namespace and added more structures to it
Teemu Piippo <teemu@hecknology.net>
parents:
33
diff
changeset
|
9 | class ldraw::Triangle : public ColoredObject |
3 | 10 | { |
11 | public: | |
12 | Triangle() = default; | |
13 | Triangle( | |
33
4c41bfe2ec6e
replaced matrix and vertex classes with glm
Teemu Piippo <teemu@hecknology.net>
parents:
26
diff
changeset
|
14 | const glm::vec3 &point_1, |
4c41bfe2ec6e
replaced matrix and vertex classes with glm
Teemu Piippo <teemu@hecknology.net>
parents:
26
diff
changeset
|
15 | const glm::vec3 &point_2, |
4c41bfe2ec6e
replaced matrix and vertex classes with glm
Teemu Piippo <teemu@hecknology.net>
parents:
26
diff
changeset
|
16 | const glm::vec3 &point_3, |
35
98906a94732f
renamed the linetypes namespace to ldraw namespace and added more structures to it
Teemu Piippo <teemu@hecknology.net>
parents:
33
diff
changeset
|
17 | Color colorIndex = ldraw::mainColor); |
33
4c41bfe2ec6e
replaced matrix and vertex classes with glm
Teemu Piippo <teemu@hecknology.net>
parents:
26
diff
changeset
|
18 | Triangle(const QVector<glm::vec3>& vertices, const Color color); |
3 | 19 | QVariant getProperty(Property id) const override; |
20 | SetPropertyResult setProperty(Property id, const QVariant& value) override; | |
6 | 21 | QString textRepresentation() const override; |
21 | 22 | void getPolygons(std::vector<gl::Polygon>& polygons, GetPolygonsContext* context) const override; |
26 | 23 | void invert() override; |
3 | 24 | private: |
33
4c41bfe2ec6e
replaced matrix and vertex classes with glm
Teemu Piippo <teemu@hecknology.net>
parents:
26
diff
changeset
|
25 | glm::vec3 points[3] = {{}}; |
3 | 26 | }; |
27 |