-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathedgePointPair.cpp
40 lines (36 loc) · 1.15 KB
/
edgePointPair.cpp
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
#include <iostream>
#include <vector>
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Polygon_2.h>
#include <CGAL/intersections.h>
#include <CGAL/convex_hull_2.h>
#include "geoUtil.hpp"
#include "genericUtil.hpp"
#include "edgePointPair.hpp"
using namespace std;
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Point_2<K> Point;
typedef CGAL::Segment_2<K> Segment;
typedef CGAL::Polygon_2<K> Polygon;
typedef K::Intersect_2 Intersect;
typedef Polygon::Vertex_iterator VertexIterator;
typedef Polygon::Edge_const_iterator EdgeIterator;
typedef CGAL::CartesianKernelFunctors::Intersect_2<K> Intersect;
edgePointPair::edgePointPair(int thePosition,Point current, Segment newSegment){
point = current;
segment = newSegment;
position = thePosition;
area=triangularAreaCalculation(current,newSegment.point(0),newSegment.point(1));
}
const double edgePointPair::getArea(){
return this->area;
}
const Point edgePointPair::getPoint(){
return this->point;
}
const Segment edgePointPair::getSegment(){
return this->segment;
}
const int edgePointPair::getPosition(){
return this->position;
}