-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsegment.h
52 lines (41 loc) · 1.3 KB
/
segment.h
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
42
43
44
45
46
47
48
49
50
51
52
#ifndef SEGMENT
#define SEGMENT
#include "my_point.h"
#include <eigen3/Eigen/Dense>
using namespace Eigen;
//TODO implement this class fully, stub for now
class Segment {
my_point point{0,0};
//Handle vectors
my_point handle_in{0,0};
my_point handle_out{0,0};
//TODO are these bools used? Can they be removed?
bool horizontal, vertical;
public:
Segment();
Segment(my_point point);
Segment(my_point point, my_point handle_in, my_point handle_out);
void update_horz_and_vert();
void get_horz_and_vert(bool &horz, bool &vert) const;
my_point get_point() const;
my_point get_handle_in() const;
my_point get_handle_out() const;
void set_point(my_point p);
void set_handle_in(my_point p);
void set_handle_out(my_point p);
Segment get_reverse_segment();
void transform(Transform<double,2,Affine> at);
};
ostream& operator <<(ostream &o, const Segment &seg);
ostream& operator <<(ostream &o, const vector<Segment> &segs);
class FlaggedSegment: public Segment {
bool flag = false;
public:
FlaggedSegment();
FlaggedSegment(my_point point, my_point handle_in, my_point handle_out);
void set_flag(bool b);
bool get_flag() const;
};
ostream& operator <<(ostream &o, const FlaggedSegment &seg);
ostream& operator <<(ostream &o, const vector<FlaggedSegment> &segs);
#endif