mirror of https://github.com/CGAL/cgal
cleaning-ups in test
This commit is contained in:
parent
5a92d33e9d
commit
0adc2cb42c
|
|
@ -30,8 +30,6 @@ void testProjection(){
|
||||||
Point p1 = Point (radius/sqrt(2), 0, radius/sqrt(2));
|
Point p1 = Point (radius/sqrt(2), 0, radius/sqrt(2));
|
||||||
points.push_back(p1);
|
points.push_back(p1);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Point p2 = Point (-radius/sqrt(3), radius/sqrt(3),-radius/sqrt(3));
|
Point p2 = Point (-radius/sqrt(3), radius/sqrt(3),-radius/sqrt(3));
|
||||||
points.push_back(p2);
|
points.push_back(p2);
|
||||||
|
|
||||||
|
|
@ -49,8 +47,6 @@ void testProjection(){
|
||||||
points.push_back(p5);
|
points.push_back(p5);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//Points too close
|
//Points too close
|
||||||
Point p6 = Point (5*radius, pow(2,-25),0);
|
Point p6 = Point (5*radius, pow(2,-25),0);
|
||||||
points.push_back(p6);
|
points.push_back(p6);
|
||||||
|
|
@ -157,10 +153,6 @@ void testDelaunay (){
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int main(){
|
int main(){
|
||||||
std::cout<<"Test inserting illegal points with Delaunay_traits"<<std::endl;
|
std::cout<<"Test inserting illegal points with Delaunay_traits"<<std::endl;
|
||||||
testDelaunay();
|
testDelaunay();
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,6 @@ typedef CGAL::Delaunay_triangulation_3<K> Delaunay;
|
||||||
typedef CGAL::Delaunay_triangulation_sphere_traits_2<K> Gt;
|
typedef CGAL::Delaunay_triangulation_sphere_traits_2<K> Gt;
|
||||||
typedef CGAL::Projection_sphere_traits_3<K> Gt2;
|
typedef CGAL::Projection_sphere_traits_3<K> Gt2;
|
||||||
typedef CGAL::Constrained_Delaunay_triangulation_sphere_2<Gt> CTOS;
|
typedef CGAL::Constrained_Delaunay_triangulation_sphere_2<Gt> CTOS;
|
||||||
typedef CGAL::Constrained_Delaunay_triangulation_sphere_2<Gt2> CTOS2;
|
|
||||||
typedef K::Point_3 Point;
|
typedef K::Point_3 Point;
|
||||||
typedef CTOS::Vertex_handle Vertex_handle;
|
typedef CTOS::Vertex_handle Vertex_handle;
|
||||||
|
|
||||||
|
|
@ -50,7 +49,7 @@ int main(){
|
||||||
|
|
||||||
int nu_of_pts;
|
int nu_of_pts;
|
||||||
double radius;
|
double radius;
|
||||||
nu_of_pts =pow(2,5);
|
nu_of_pts =pow(2,15);
|
||||||
radius=sqrt(110);
|
radius=sqrt(110);
|
||||||
CGAL::Timer time;
|
CGAL::Timer time;
|
||||||
|
|
||||||
|
|
@ -60,10 +59,7 @@ int main(){
|
||||||
|
|
||||||
|
|
||||||
std::vector<Point> points;
|
std::vector<Point> points;
|
||||||
//std::vector<Point> points2(points.size()+1);
|
|
||||||
std::vector<Point> points2;
|
std::vector<Point> points2;
|
||||||
//std::vector<Vertex_handle> vertices;
|
|
||||||
//vertices.reserve(nu_of_pts);
|
|
||||||
|
|
||||||
points2.push_back(Point(0,0,0));
|
points2.push_back(Point(0,0,0));
|
||||||
|
|
||||||
|
|
@ -93,46 +89,16 @@ int main(){
|
||||||
rtos.insert_constraint(p2,p3);
|
rtos.insert_constraint(p2,p3);
|
||||||
rtos.insert_constraint(p3,p0);
|
rtos.insert_constraint(p3,p0);
|
||||||
|
|
||||||
//rtos.insert_constraint(points.at(4), points.at(5));
|
rtos.insert(points.begin(),points.end());
|
||||||
//rtos.insert(points.begin(), points.end());
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//rtos.insert(points.begin(),points.end());
|
|
||||||
time.stop();
|
time.stop();
|
||||||
rtos.is_valid();
|
rtos.is_valid();
|
||||||
std::cout<<"triangulation sphere "<< time.time()<<std::endl;
|
std::cout<<"triangulation sphere "<< time.time()<<std::endl;
|
||||||
std::cout<<"number of vertices "<<rtos.number_of_vertices()<<std::endl;
|
std::cout<<"number of vertices "<<rtos.number_of_vertices()<<std::endl;
|
||||||
|
|
||||||
|
|
||||||
//assert(rtos.number_of_vertices() == nu_of_pts+4);
|
assert(rtos.number_of_vertices() == nu_of_pts+4);
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
Point p4 = Point(10/sqrt(2),-10/sqrt(2),0);
|
|
||||||
Point p5 = Point (10/sqrt(2), 10/sqrt(2),0);
|
|
||||||
Point p6 = Point (10/sqrt(2), 0, 10/sqrt(2));
|
|
||||||
Point p7 = Point (10/sqrt(2), 0, -10/sqrt(2));
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//cdts.insert_constraint(p6,p7);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
cdts.insert(Point(0,0,10));
|
|
||||||
cdts.insert(Point(0,0,-10));
|
|
||||||
cdts.insert(Point(0,10,0));
|
|
||||||
cdts.insert(Point(0,-10,0));
|
|
||||||
cdts.insert(Point(10,0,0));
|
|
||||||
cdts.insert(Point(-10,0,0));
|
|
||||||
cdts.insert_constraint(p4,p5);
|
|
||||||
std::cout<<"number of faces "<< cdts.number_of_faces()<<std::endl;
|
|
||||||
cdts.is_valid();
|
|
||||||
cdts.show_all();
|
|
||||||
|
|
||||||
cdts.insert(p7);
|
|
||||||
*/
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue