-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcpoints.h
54 lines (43 loc) · 1.29 KB
/
cpoints.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
53
54
#ifndef CPOINTS_H
#define CPOINTS_H
#include <utility>
#include <vector>
#include <glibmm/ustring.h>
#include "cmarkedpoint.h"
#include "defines.h"
#include "cpoint.h"
class cPoints
{
public:
cPoints ();
CPOINTS_PUSH push (double, double, double, double);
CPOINTS_PUSH push (double, double);
CPOINTS_PUSH push (cPoints);
cMarkedPoint& operator[] (size_t);
size_t search_click_point (double, double);
size_t read_from_file (Glib::ustring);
size_t size ();
bool mark_point (double, double, CMARKEDPOINT_FLAG);
bool save_to_file (Glib::ustring);
void delete_marked_points (CMARKEDPOINT_FLAG);
void mark_all_points (CMARKEDPOINT_FLAG);
void correct (double, double);
void calc_b ();
void calc_a ();
void clear ();
void calc ();
friend std::ostream& operator<< (std::ostream &, cPoints);
private:
static const double infelicity = 400.0;
static const double minLength = 20.0;
static const double minTab = 7.0;
typedef std::vector < std::pair < cPoint , cMarkedPoint > > tpPointsArray;
tpPointsArray a;
bool isCalcA;
cMarkedPoint correct_point (cMarkedPoint, double, double);
bool test_min_length_to_segment (cPoint);
bool test_min_length_to_point (cPoint);
bool test_crossing_lines ();
int make_sequence (tpPointsArray, tpPointsArray, int&);
};
#endif