Wed, 11 Mar 2020 17:19:38 +0200
added a render style for pick scene
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); |
77
028798a72591
added some meta stuff, simplified quadrilateral splitting and tested it
Teemu Piippo <teemu@hecknology.net>
parents:
73
diff
changeset
|
18 | Triangle(const std::array<glm::vec3, 3>& vertices, const Color color); |
028798a72591
added some meta stuff, simplified quadrilateral splitting and tested it
Teemu Piippo <teemu@hecknology.net>
parents:
73
diff
changeset
|
19 | Triangle(const glm::vec3 (&vertices)[3], const Color color); |
3 | 20 | QVariant getProperty(Property id) const override; |
21 | SetPropertyResult setProperty(Property id, const QVariant& value) override; | |
6 | 22 | QString textRepresentation() const override; |
21 | 23 | void getPolygons(std::vector<gl::Polygon>& polygons, GetPolygonsContext* context) const override; |
26 | 24 | void invert() override; |
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 |