src/linetypes/edge.h

Wed, 22 Jan 2020 22:41:17 +0200

author
Teemu Piippo <teemu@hecknology.net>
date
Wed, 22 Jan 2020 22:41:17 +0200
changeset 28
c92c1daf735f
parent 21
0133e565e072
child 33
4c41bfe2ec6e
permissions
-rw-r--r--

modelview matrix set up

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
13
6e838748867b renamings
Teemu Piippo <teemu@hecknology.net>
parents: 8
diff changeset
4 namespace linetypes
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
13
6e838748867b renamings
Teemu Piippo <teemu@hecknology.net>
parents: 8
diff changeset
9 class linetypes::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;
18
Teemu Piippo <teemu@hecknology.net>
parents: 14
diff changeset
14 Edge(const Point3D& point_1, const Point3D& point_2,
13
6e838748867b renamings
Teemu Piippo <teemu@hecknology.net>
parents: 8
diff changeset
15 const Color colorIndex = colors::edge);
18
Teemu Piippo <teemu@hecknology.net>
parents: 14
diff changeset
16 Edge(const QVector<Point3D>& 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;
55a55a9ec2c2 Added lots of code
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
18 SetPropertyResult setProperty(
55a55a9ec2c2 Added lots of code
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
19 Property property,
55a55a9ec2c2 Added lots of code
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
20 const QVariant& value) override;
6
73e448b2943d language support
Teemu Piippo <teemu@hecknology.net>
parents: 3
diff changeset
21 QString textRepresentation() const override;
21
Teemu Piippo <teemu@hecknology.net>
parents: 18
diff changeset
22 void getPolygons(std::vector<gl::Polygon>& polygons, GetPolygonsContext* context) const override;
3
55a55a9ec2c2 Added lots of code
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
23 private:
18
Teemu Piippo <teemu@hecknology.net>
parents: 14
diff changeset
24 Point3D point_1 = {};
Teemu Piippo <teemu@hecknology.net>
parents: 14
diff changeset
25 Point3D point_2 = {};
3
55a55a9ec2c2 Added lots of code
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
26 };

mercurial