Fri, 06 Mar 2020 16:08:45 +0200
default to XZ
14 | 1 | #include "object.h" |
3 | 2 | |
35
98906a94732f
renamed the linetypes namespace to ldraw namespace and added more structures to it
Teemu Piippo <teemu@hecknology.net>
parents:
33
diff
changeset
|
3 | namespace ldraw |
3 | 4 | { |
5 | class Triangle; | |
6 | } | |
7 | ||
35
98906a94732f
renamed the linetypes namespace to ldraw namespace and added more structures to it
Teemu Piippo <teemu@hecknology.net>
parents:
33
diff
changeset
|
8 | class ldraw::Triangle : public ColoredObject |
3 | 9 | { |
10 | public: | |
11 | Triangle() = default; | |
12 | Triangle( | |
33
4c41bfe2ec6e
replaced matrix and vertex classes with glm
Teemu Piippo <teemu@hecknology.net>
parents:
26
diff
changeset
|
13 | const glm::vec3 &point_1, |
4c41bfe2ec6e
replaced matrix and vertex classes with glm
Teemu Piippo <teemu@hecknology.net>
parents:
26
diff
changeset
|
14 | const glm::vec3 &point_2, |
4c41bfe2ec6e
replaced matrix and vertex classes with glm
Teemu Piippo <teemu@hecknology.net>
parents:
26
diff
changeset
|
15 | 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
|
16 | Color colorIndex = ldraw::mainColor); |
33
4c41bfe2ec6e
replaced matrix and vertex classes with glm
Teemu Piippo <teemu@hecknology.net>
parents:
26
diff
changeset
|
17 | Triangle(const QVector<glm::vec3>& vertices, const Color color); |
3 | 18 | QVariant getProperty(Property id) const override; |
19 | SetPropertyResult setProperty(Property id, const QVariant& value) override; | |
6 | 20 | QString textRepresentation() const override; |
21 | 21 | void getPolygons(std::vector<gl::Polygon>& polygons, GetPolygonsContext* context) const override; |
26 | 22 | void invert() override; |
3 | 23 | private: |
33
4c41bfe2ec6e
replaced matrix and vertex classes with glm
Teemu Piippo <teemu@hecknology.net>
parents:
26
diff
changeset
|
24 | glm::vec3 points[3] = {{}}; |
3 | 25 | }; |
26 |