-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathlinesegment.h
More file actions
41 lines (31 loc) · 1 KB
/
linesegment.h
File metadata and controls
41 lines (31 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#ifndef LINESEGMENT_H_
#define LINESEGMENT_H_
#include <limits>
#include <vector>
#include "lineedge.h"
namespace htwk {
class LineSegment {
public:
LineSegment(const LineSegment& l) = delete;
LineSegment(LineSegment&& l) = delete;
LineSegment& operator=(const LineSegment&) = delete;
LineSegment& operator=(LineSegment&&) = delete;
int x, y;
float vx, vy;
int id; // die ID ist bei Segmenten, die zur gleichen Linienkante gehören,
// identisch
// Datenstrukturen, um zusammengehörige Liniensegmente zu gruppieren
std::vector<LineSegment *> neighbors;
LineSegment *bestNeighbor {nullptr};
LineSegment *pred {nullptr};
LineSegment *link {nullptr};
LineEdge *parentLine {nullptr};
float minError {std::numeric_limits<float>::max()};
LineEdge *edge1 {nullptr};
LineEdge *edge2 {nullptr};
LineSegment(int x, int y, float vecX, float vecY)
: x(x), y(y), vx(vecX), vy(vecY), id(0) {}
~LineSegment() = default;
};
} // namespace htwk
#endif /* LINESEGMENT_H_ */