-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgeoUtil.hpp
23 lines (20 loc) · 950 Bytes
/
geoUtil.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include <iostream>
#include <cstdlib>
#include <vector>
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Polygon_2.h>
#include "edgeChange.hpp"
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 Polygon::Vertex_iterator VertexIterator;
typedef Polygon::Edge_const_iterator EdgeIterator;
void coordinatesSorting(Polygon* ,std::vector<Point>* ,int ,double* );
Segment visibleEdgeSelector(Point ,std::vector<Segment>* , int ,double* );
int checkRed(std::vector<Point>* , Point , Point );
int checkVisibility(Polygon* , Point , Point );
double triangularAreaCalculation(Point , Point , Point );
double calculateNewArea(Polygon* , Segment , Point , Point , std::vector<Point>* );
void changeEdge(Polygon* ,EdgeChange*, int );
int checkPath(Polygon* ,VertexIterator ,VertexIterator ,EdgeIterator );