Sun, 02 Feb 2020 00:58:59 +0200
added configurable line anti-aliasing
3 | 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 Edge; | |
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::Edge : public ColoredObject |
3 | 10 | { |
11 | public: | |
13 | 12 | using BaseClass = ColoredObject; |
3 | 13 | Edge() = default; |
33
4c41bfe2ec6e
replaced matrix and vertex classes with glm
Teemu Piippo <teemu@hecknology.net>
parents:
21
diff
changeset
|
14 | Edge(const glm::vec3& point_1, const glm::vec3& point_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
|
15 | const Color colorIndex = ldraw::edgeColor); |
33
4c41bfe2ec6e
replaced matrix and vertex classes with glm
Teemu Piippo <teemu@hecknology.net>
parents:
21
diff
changeset
|
16 | Edge(const QVector<glm::vec3>& vertices, const Color color); |
3 | 17 | QVariant getProperty(Property property) const override; |
18 | SetPropertyResult setProperty( | |
19 | Property property, | |
20 | const QVariant& value) override; | |
6 | 21 | QString textRepresentation() const override; |
21 | 22 | void getPolygons(std::vector<gl::Polygon>& polygons, GetPolygonsContext* context) const override; |
3 | 23 | private: |
33
4c41bfe2ec6e
replaced matrix and vertex classes with glm
Teemu Piippo <teemu@hecknology.net>
parents:
21
diff
changeset
|
24 | glm::vec3 point_1 = {}; |
4c41bfe2ec6e
replaced matrix and vertex classes with glm
Teemu Piippo <teemu@hecknology.net>
parents:
21
diff
changeset
|
25 | glm::vec3 point_2 = {}; |
3 | 26 | }; |