src/linetypes/edge.h

Thu, 19 Mar 2020 21:06:06 +0200

author
Teemu Piippo <teemu@hecknology.net>
date
Thu, 19 Mar 2020 21:06:06 +0200
changeset 86
4bec0525ef1b
parent 81
62373840e33a
child 87
93ec4d630346
permissions
-rw-r--r--

PolygonObjectEditor can now modify the object properly

3
55a55a9ec2c2 Added lots of code
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
1 #pragma once
14
20d2ed3af73d renamings
Teemu Piippo <teemu@hecknology.net>
parents: 13
diff changeset
2 #include "object.h"
3
55a55a9ec2c2 Added lots of code
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
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
55a55a9ec2c2 Added lots of code
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
5 {
55a55a9ec2c2 Added lots of code
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
6 class Edge;
55a55a9ec2c2 Added lots of code
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
7 }
55a55a9ec2c2 Added lots of code
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
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
55a55a9ec2c2 Added lots of code
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
10 {
55a55a9ec2c2 Added lots of code
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
11 public:
13
6e838748867b renamings
Teemu Piippo <teemu@hecknology.net>
parents: 8
diff changeset
12 using BaseClass = ColoredObject;
3
55a55a9ec2c2 Added lots of code
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
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);
77
028798a72591 added some meta stuff, simplified quadrilateral splitting and tested it
Teemu Piippo <teemu@hecknology.net>
parents: 35
diff changeset
16 Edge(const std::array<glm::vec3, 2>& vertices, const Color color);
3
55a55a9ec2c2 Added lots of code
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
17 QVariant getProperty(Property property) const override;
6
73e448b2943d language support
Teemu Piippo <teemu@hecknology.net>
parents: 3
diff changeset
18 QString textRepresentation() const override;
21
Teemu Piippo <teemu@hecknology.net>
parents: 18
diff changeset
19 void getPolygons(std::vector<gl::Polygon>& polygons, GetPolygonsContext* context) const override;
81
62373840e33a object editor widgets start to form up
Teemu Piippo <teemu@hecknology.net>
parents: 77
diff changeset
20 int numPoints() const override;
62373840e33a object editor widgets start to form up
Teemu Piippo <teemu@hecknology.net>
parents: 77
diff changeset
21 const glm::vec3& getPoint(int index) const override;
33
4c41bfe2ec6e replaced matrix and vertex classes with glm
Teemu Piippo <teemu@hecknology.net>
parents: 21
diff changeset
22 glm::vec3 point_1 = {};
4c41bfe2ec6e replaced matrix and vertex classes with glm
Teemu Piippo <teemu@hecknology.net>
parents: 21
diff changeset
23 glm::vec3 point_2 = {};
86
4bec0525ef1b PolygonObjectEditor can now modify the object properly
Teemu Piippo <teemu@hecknology.net>
parents: 81
diff changeset
24 protected:
4bec0525ef1b PolygonObjectEditor can now modify the object properly
Teemu Piippo <teemu@hecknology.net>
parents: 81
diff changeset
25 void setProperty(SetPropertyResult* result, const PropertyKeyValue& pair) override;
3
55a55a9ec2c2 Added lots of code
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
26 };

mercurial