#ifndef _PolygonAlgorithms_HXX_
#define _PolygonAlgorithms_HXX_
+#include <vector>
#include <deque>
#include <map>
{
public:
PolygonAlgorithms(double epsilon, double precision);
- deque<double> intersect_convex_polygons(const double* P_1,const double* P_2, int N1, int N2);
+ std::deque<double> intersect_convex_polygons(const double* P_1,const double* P_2, int N1, int N2);
//Not yet tested
- int convex_decomposition(const double * P, int N, vector< map< int,int > >& components,
- vector< int >& components_index, const double epsilon);
+ int convex_decomposition(const double * P, int N, std::vector< std::map< int,int > >& components,
+ std::vector< int >& components_index, const double epsilon);
private:
- deque< double > _Inter;/* vertices of the intersection P1^P2 */
- vector< pair< int,int > > _End_segments; /* segments containing inter final edges */
+ std::deque< double > _Inter;/* vertices of the intersection P1^P2 */
+ std::vector< std::pair< int,int > > _End_segments; /* segments containing inter final edges */
/* status list of segments (ending point, starting point) intersected by the sweeping line */
/* and a boolean true if the ending point is in the intersection */
- multimap< int, pair< int,bool> > _Status;
+ std::multimap< int, std::pair< int,bool> > _Status;
bool _Is_in_intersection;
bool _Terminus;
double _Vdouble[DIM];
const double * G);
void add_crossing0(const double * A, const double * B, int i, int i_next,
const double * C, const double * D, int j, int j_next);
- void add_crossing( double * ABCD, pair< int,int > i_i_next, pair< int,int > j_j_next);
+ void add_crossing( double * ABCD, std::pair< int,int > i_i_next, std::pair< int,int > j_j_next);
void add_new_vertex( int i, int i_glob, int i_next_glob, int i_prev_glob, const double * P);
bool intersect_segment_segment(const double * A, const double * B, const double * C,
const double * D, const double * E, double * V);
//Not yet tested
- void convex_decomposition(const double* P, int N, double* n, vector< int > subP, int NsubP,
- vector< map< int,int > >& components, vector< int >& components_index,
+ void convex_decomposition(const double* P, int N, double* n, std::vector< int > subP, int NsubP,
+ std::vector< std::map< int,int > >& components, std::vector< int >& components_index,
int& Ncomp, int sign, const double epsilon);
- void conv_hull(const double *P, int N, double * n, map< int,int >& subP,
- map< int,int >& not_in_hull, int& NsubP, const double epsilon);
+ void conv_hull(const double *P, int N, double * n, std::map< int,int >& subP,
+ std::map< int,int >& not_in_hull, int& NsubP, const double epsilon);
};
};