From 3ae19a3bcaa0b5fb6c9c100b9157cf3a5cdecf54 Mon Sep 17 00:00:00 2001 From: Claudia Werner Date: Tue, 27 Nov 2012 15:56:53 +0100 Subject: [PATCH] forgot to change code before last commit (after renaming classes) fixed know - last commit will not be compiled without error. --- ...elaunay_triangulation_face_base_sphere_2.h | 12 ++-- .../CGAL/Delaunay_triangulation_sphere_2.h | 68 +++++++++---------- ...y_triangulation_sphere_filtered_traits_2.h | 6 +- .../Delaunay_triangulation_sphere_traits_2.h | 14 ++-- .../test/bugs_minimal_examples.cpp | 8 +-- .../test/test_random.cpp | 8 +-- .../test/test_regular_sphere_traits.cpp | 4 +- .../test/test_triangulation_on_sphere_2.cpp | 21 +++--- 8 files changed, 72 insertions(+), 69 deletions(-) diff --git a/Triangulation_on_sphere_2/include/CGAL/Delaunay_triangulation_face_base_sphere_2.h b/Triangulation_on_sphere_2/include/CGAL/Delaunay_triangulation_face_base_sphere_2.h index d30d7e69f3e..21fbd52a896 100644 --- a/Triangulation_on_sphere_2/include/CGAL/Delaunay_triangulation_face_base_sphere_2.h +++ b/Triangulation_on_sphere_2/include/CGAL/Delaunay_triangulation_face_base_sphere_2.h @@ -28,7 +28,7 @@ namespace CGAL { template > -class Regular_triangulation_face_base_on_sphere_2 +class Delaunay_triangulation_face_base_sphere_2 : public Fb { typedef Fb Fbase; @@ -42,7 +42,7 @@ public: template < typename TDS2 > struct Rebind_TDS { typedef typename Fb::template Rebind_TDS::Other Fb2; - typedef Regular_triangulation_face_base_on_sphere_2 Other; + typedef Delaunay_triangulation_face_base_sphere_2 Other; }; typedef std::list Vertex_list; @@ -55,13 +55,13 @@ public: void set_in_conflict_flag(unsigned char f) { _in_conflict_flag = f; } unsigned char get_in_conflict_flag() const { return _in_conflict_flag; } - Regular_triangulation_face_base_on_sphere_2() + Delaunay_triangulation_face_base_sphere_2() : Fbase(), vlist() { set_in_conflict_flag(0); } - Regular_triangulation_face_base_on_sphere_2(Vertex_handle v0, + Delaunay_triangulation_face_base_sphere_2(Vertex_handle v0, Vertex_handle v1, Vertex_handle v2) : Fbase(v0,v1,v2), vlist() @@ -69,7 +69,7 @@ public: set_in_conflict_flag(0); } - Regular_triangulation_face_base_on_sphere_2(Vertex_handle v0, + Delaunay_triangulation_face_base_sphere_2(Vertex_handle v0, Vertex_handle v1, Vertex_handle v2, Face_handle n0, @@ -80,7 +80,7 @@ public: set_in_conflict_flag(0); } - ~Regular_triangulation_face_base_on_sphere_2() + ~Delaunay_triangulation_face_base_sphere_2() { vlist.clear(); } diff --git a/Triangulation_on_sphere_2/include/CGAL/Delaunay_triangulation_sphere_2.h b/Triangulation_on_sphere_2/include/CGAL/Delaunay_triangulation_sphere_2.h index 0537b130668..898072383e3 100644 --- a/Triangulation_on_sphere_2/include/CGAL/Delaunay_triangulation_sphere_2.h +++ b/Triangulation_on_sphere_2/include/CGAL/Delaunay_triangulation_sphere_2.h @@ -1,10 +1,10 @@ -#ifndef CGAL_Regular_triangulation_on_sphere_2_H -#define CGAL_Regular_triangulation_on_sphere_2_H +#ifndef CGAL_Delaunay_triangulation_sphere_2_H +#define CGAL_Delaunay_triangulation_sphere_2_H #define HOLE_APPROACH #include -#include +#include #include #include #include @@ -28,12 +28,12 @@ namespace CGAL { template < class Gt, class Tds = Triangulation_data_structure_2 < Regular_triangulation_vertex_base_2, - Regular_triangulation_face_base_on_sphere_2 > > -class Regular_triangulation_on_sphere_2 + Delaunay_triangulation_face_base_sphere_2 > > +class Delaunay_triangulation_sphere_2 : public Triangulation_on_sphere_2 { - typedef Regular_triangulation_on_sphere_2 Self; + typedef Delaunay_triangulation_sphere_2 Self; typedef Triangulation_on_sphere_2 Base; //private: double _radius; @@ -127,7 +127,7 @@ public: public: //CONSTRUCTORS - Regular_triangulation_on_sphere_2(const Gt& gt=Gt()) + Delaunay_triangulation_sphere_2(const Gt& gt=Gt()) //:Base(_radius(1)) ,_minDist(pow (2, -25)), _minDistSquared( pow(_minDist, 2)), Base(Gt(gt)) :Base(Gt(gt)) {} @@ -399,7 +399,7 @@ propagate_conflicts (const Point &p, Face_handle fh, int i, template < class Gt, class Tds > Oriented_side - Regular_triangulation_on_sphere_2:: + Delaunay_triangulation_sphere_2:: power_test(const Face_handle &f, const Point &p, bool perturb) const { return power_test(f->vertex(0)->point(), f->vertex(1)->point(), f->vertex(2)->point(),p, perturb); @@ -407,7 +407,7 @@ propagate_conflicts (const Point &p, Face_handle fh, int i, template < class Gt, class Tds > Oriented_side - Regular_triangulation_on_sphere_2:: + Delaunay_triangulation_sphere_2:: power_test(const Face_handle& f, int i, const Point &p) const { CGAL_triangulation_precondition ( orientation(f->vertex(ccw(i))->point(), @@ -420,7 +420,7 @@ propagate_conflicts (const Point &p, Face_handle fh, int i, template < class Gt, class Tds > inline Oriented_side - Regular_triangulation_on_sphere_2:: + Delaunay_triangulation_sphere_2:: power_test(const Point &p0, const Point &p1, const Point &p2, const Point &p, bool perturb) const { Oriented_side os = geom_traits().power_test_2_object()(p0,p1,p2,p); @@ -477,7 +477,7 @@ propagate_conflicts (const Point &p, Face_handle fh, int i, template < class Gt, class Tds > inline Oriented_side - Regular_triangulation_on_sphere_2:: + Delaunay_triangulation_sphere_2:: power_test(const Point &p, const Point &q, const Point &r) const { if(number_of_vertices()==2) @@ -499,7 +499,7 @@ propagate_conflicts (const Point &p, Face_handle fh, int i, //----------------------------------------------------------------------CHECK---------------------------------------------------------------// template bool -Regular_triangulation_on_sphere_2:: +Delaunay_triangulation_sphere_2:: is_plane()const{ bool plane = true; @@ -539,7 +539,7 @@ is_plane()const{ template < class Gt, class Tds > bool -Regular_triangulation_on_sphere_2:: +Delaunay_triangulation_sphere_2:: is_valid(bool verbose, int level ) const //int level { bool result = true; @@ -588,7 +588,7 @@ is_valid(bool verbose, int level ) const //int level template < class Gt, class Tds > bool -Regular_triangulation_on_sphere_2:: +Delaunay_triangulation_sphere_2:: is_valid_vertex(Vertex_handle vh, bool verbose, int level) const { bool result = vh->face()->has_vertex(vh); @@ -608,7 +608,7 @@ return true; template < class Gt, class Tds > bool -Regular_triangulation_on_sphere_2:: +Delaunay_triangulation_sphere_2:: is_valid_face(Face_handle fh, bool verbose, int level) const { bool result = fh->get_in_conflict_flag()==0; @@ -629,7 +629,7 @@ is_valid_face(Face_handle fh, bool verbose, int level) const template < class Gt, class Tds > inline bool -Regular_triangulation_on_sphere_2:: +Delaunay_triangulation_sphere_2:: test_conflict(const Point &p, Face_handle fh) const { return(power_test(fh,p, true) != ON_NEGATIVE_SIDE); @@ -641,8 +641,8 @@ test_conflict(const Point &p, Face_handle fh) const template < class Gt, class Tds > -typename Regular_triangulation_on_sphere_2::Vertex_handle -Regular_triangulation_on_sphere_2:: +typename Delaunay_triangulation_sphere_2::Vertex_handle +Delaunay_triangulation_sphere_2:: insert(const Point &p, Face_handle start) { Locate_type lt; @@ -657,8 +657,8 @@ insert(const Point &p, Face_handle start) template < class Gt, class Tds> -typename Regular_triangulation_on_sphere_2::Vertex_handle -Regular_triangulation_on_sphere_2:: +typename Delaunay_triangulation_sphere_2::Vertex_handle +Delaunay_triangulation_sphere_2:: insert_in_plane_triangulation(const Point &p, Locate_type lt, Face_handle loc){ CGAL_triangulation_precondition(!test_dim_up(p)); @@ -691,7 +691,7 @@ insert_in_plane_triangulation(const Point &p, Locate_type lt, Face_handle loc){ template typename Triangulation_on_sphere_2::Vertex_handle -Regular_triangulation_on_sphere_2:: +Delaunay_triangulation_sphere_2:: insert_first(const Point& p) { CGAL_triangulation_precondition(number_of_vertices() == 0); @@ -702,7 +702,7 @@ insert_first(const Point& p) template typename Triangulation_on_sphere_2::Vertex_handle -Regular_triangulation_on_sphere_2:: +Delaunay_triangulation_sphere_2:: insert_second(const Point& p) { CGAL_triangulation_precondition(number_of_vertices() == 1); @@ -714,8 +714,8 @@ insert_second(const Point& p) template < class Gt, class Tds > -typename Regular_triangulation_on_sphere_2::Vertex_handle -Regular_triangulation_on_sphere_2:: +typename Delaunay_triangulation_sphere_2::Vertex_handle +Delaunay_triangulation_sphere_2:: insert(const Point &p, Locate_type lt, Face_handle loc, int li) { Vertex_handle v; @@ -766,7 +766,7 @@ insert(const Point &p, Locate_type lt, Face_handle loc, int li) { template typename Triangulation_on_sphere_2::Vertex_handle -Regular_triangulation_on_sphere_2:: +Delaunay_triangulation_sphere_2:: insert_outside_affine_hull_regular(const Point& p) { if(dimension()==0){ @@ -825,7 +825,7 @@ insert_outside_affine_hull_regular(const Point& p) template < class Gt, class Tds > bool -Regular_triangulation_on_sphere_2:: +Delaunay_triangulation_sphere_2:: update_ghost_faces(Vertex_handle v, bool first) { bool neg_found=false; @@ -879,7 +879,7 @@ update_ghost_faces(Vertex_handle v, bool first) //-------------------------------------------------------------------------------REMOVAL----------------------------------------------------// template < class Gt, class Tds > void -Regular_triangulation_on_sphere_2:: +Delaunay_triangulation_sphere_2:: remove_degree_3(Vertex_handle v, Face_handle f) { if (f == Face_handle()) f=v->face(); @@ -891,7 +891,7 @@ remove_degree_3(Vertex_handle v, Face_handle f) template < class Gt, class Tds > void -Regular_triangulation_on_sphere_2:: +Delaunay_triangulation_sphere_2:: remove(Vertex_handle v ) { CGAL_triangulation_precondition( v != Vertex_handle() ); @@ -910,7 +910,7 @@ CGAL_triangulation_precondition( v != Vertex_handle() ); template void -Regular_triangulation_on_sphere_2:: +Delaunay_triangulation_sphere_2:: remove_1D(Vertex_handle v) { this->_tds.remove_1D(v); @@ -922,7 +922,7 @@ remove_1D(Vertex_handle v) template < class Gt, class Tds > void -Regular_triangulation_on_sphere_2:: +Delaunay_triangulation_sphere_2:: remove_2D(Vertex_handle v) { CGAL_triangulation_precondition(dimension()==2); @@ -942,7 +942,7 @@ remove_2D(Vertex_handle v) template bool -Regular_triangulation_on_sphere_2:: +Delaunay_triangulation_sphere_2:: test_dim_down(Vertex_handle v) { CGAL_triangulation_precondition(dimension()==2); @@ -969,7 +969,7 @@ test_dim_down(Vertex_handle v) template bool -Regular_triangulation_on_sphere_2:: +Delaunay_triangulation_sphere_2:: test_dim_up(const Point &p) const{ // dimension of triangulation increase from 1 to 2 iff the new vertex in not coplanar with the old vertices //std::cout< void -Regular_triangulation_on_sphere_2:: +Delaunay_triangulation_sphere_2:: fill_hole_regular(std::list & first_hole) { typedef std::list Hole; @@ -1140,4 +1140,4 @@ fill_hole_regular(std::list & first_hole) } //namespace CGAL -#endif // CGAL_Regular_triangulation_on_sphere_2_H +#endif // CGAL_Delaunay_triangulation_sphere_2_H diff --git a/Triangulation_on_sphere_2/include/CGAL/Delaunay_triangulation_sphere_filtered_traits_2.h b/Triangulation_on_sphere_2/include/CGAL/Delaunay_triangulation_sphere_filtered_traits_2.h index a25fb271fba..cc31a4bd4a1 100644 --- a/Triangulation_on_sphere_2/include/CGAL/Delaunay_triangulation_sphere_filtered_traits_2.h +++ b/Triangulation_on_sphere_2/include/CGAL/Delaunay_triangulation_sphere_filtered_traits_2.h @@ -6,7 +6,7 @@ #include #include #include -#include +//#include namespace CGAL { @@ -41,6 +41,8 @@ struct Delaunay_weighted_converter_2 } }; + /* + // The argument is supposed to be a Filtered_kernel like kernel. template < typename K > class Delaunay_triangulation_sphere_filtered_traits_2 @@ -123,7 +125,7 @@ public: // The following are inherited since they are constructions : // Construct_weighted_circumcenter_2 // Construct_radical_axis_2 -}; +};*/ } //namespace CGAL diff --git a/Triangulation_on_sphere_2/include/CGAL/Delaunay_triangulation_sphere_traits_2.h b/Triangulation_on_sphere_2/include/CGAL/Delaunay_triangulation_sphere_traits_2.h index 1fadfeba27c..a61bec2a948 100644 --- a/Triangulation_on_sphere_2/include/CGAL/Delaunay_triangulation_sphere_traits_2.h +++ b/Triangulation_on_sphere_2/include/CGAL/Delaunay_triangulation_sphere_traits_2.h @@ -1,6 +1,6 @@ -#ifndef CGAL_REGULAR_TRIANGULATION_SPHERE_TRAITS_2_H -#define CGAL_REGULAR_TRIANGULATION_SPHERE_TRAITS_2_H +#ifndef CGAL_DELAUNAY_TRIANGULATION_SPHERE_TRAITS_2_H +#define CGAL_DELAUNAY_TRIANGULATION_SPHERE_TRAITS_2_H #include #include @@ -192,7 +192,7 @@ Power_test_2(const Point_2& sphere) template < class R > -class Regular_triangulation_sphere_traits_2 +class Delaunay_triangulation_sphere_traits_2 : public R { public: @@ -201,7 +201,7 @@ public: typedef typename R::Point_3 Weighted_point_2; - typedef Regular_triangulation_sphere_traits_2 Self; + typedef Delaunay_triangulation_sphere_traits_2 Self; typedef CGAL::Power_test_2 Power_test_2; typedef CGAL::Orientation_sphere_2 Orientation_2; typedef CGAL::Coradial_sphere_2 Coradial_sphere_2; @@ -213,7 +213,7 @@ public: - Regular_triangulation_sphere_traits_2(const Point_2& sphere=Point_2(0,0,0)); + Delaunay_triangulation_sphere_traits_2(const Point_2& sphere=Point_2(0,0,0)); Orientation_2 orientation_2_object()const @@ -243,8 +243,8 @@ protected : }; template < class R > -Regular_triangulation_sphere_traits_2 :: -Regular_triangulation_sphere_traits_2(const Point_2& sphere) +Delaunay_triangulation_sphere_traits_2 :: +Delaunay_triangulation_sphere_traits_2(const Point_2& sphere) : _sphere(sphere) {} diff --git a/Triangulation_on_sphere_2/test/bugs_minimal_examples.cpp b/Triangulation_on_sphere_2/test/bugs_minimal_examples.cpp index 9012dc6df33..0e7003cf3f9 100644 --- a/Triangulation_on_sphere_2/test/bugs_minimal_examples.cpp +++ b/Triangulation_on_sphere_2/test/bugs_minimal_examples.cpp @@ -10,8 +10,8 @@ #include #include -#include -#include +#include +#include #include #include @@ -25,8 +25,8 @@ #include typedef CGAL::Exact_predicates_inexact_constructions_kernel K; -typedef CGAL::Regular_triangulation_sphere_traits_2 Gt; -typedef CGAL::Regular_triangulation_on_sphere_2 RTOS; +typedef CGAL::Delaunay_triangulation_sphere_traits_2 Gt; +typedef CGAL::Delaunay_triangulation_sphere_2 RTOS; //typedef CGAL::Triangulation_2 RTOS; typedef RTOS::Vertex_handle Vertex_handle; typedef RTOS::Face_handle Face_handle; diff --git a/Triangulation_on_sphere_2/test/test_random.cpp b/Triangulation_on_sphere_2/test/test_random.cpp index 62cd1c5c0db..2cf78ecb8f4 100644 --- a/Triangulation_on_sphere_2/test/test_random.cpp +++ b/Triangulation_on_sphere_2/test/test_random.cpp @@ -1,7 +1,7 @@ #include -#include +#include //#include -#include +#include #include #include #include @@ -11,9 +11,9 @@ #include typedef CGAL::Exact_predicates_inexact_constructions_kernel K; -typedef CGAL::Regular_triangulation_sphere_traits_2 Gt; +typedef CGAL::Delaunay_triangulation_sphere_traits_2 Gt; //typedef CGAL::Projection_sphere_traits_3 Gt; -typedef CGAL::Regular_triangulation_on_sphere_2 RTOS; +typedef CGAL::Delaunay_triangulation_sphere_2 RTOS; typedef RTOS::Vertex_handle Vertex_handle; typedef RTOS::Face_handle Face_handle; typedef RTOS::Point Point; diff --git a/Triangulation_on_sphere_2/test/test_regular_sphere_traits.cpp b/Triangulation_on_sphere_2/test/test_regular_sphere_traits.cpp index f8eed3b2c30..652c9d53cad 100644 --- a/Triangulation_on_sphere_2/test/test_regular_sphere_traits.cpp +++ b/Triangulation_on_sphere_2/test/test_regular_sphere_traits.cpp @@ -1,10 +1,10 @@ #include -#include +#include #include #include typedef CGAL::Exact_predicates_inexact_constructions_kernel K; -typedef CGAL::Regular_triangulation_sphere_traits_2 Gt; +typedef CGAL::Delaunay_triangulation_sphere_traits_2 Gt; typedef Gt::Point_2 Point; typedef Gt::Orientation_2 Orientation_2; typedef Gt::Power_test_2 Power_test_2; diff --git a/Triangulation_on_sphere_2/test/test_triangulation_on_sphere_2.cpp b/Triangulation_on_sphere_2/test/test_triangulation_on_sphere_2.cpp index 35e04de8bec..5b5be2616e5 100644 --- a/Triangulation_on_sphere_2/test/test_triangulation_on_sphere_2.cpp +++ b/Triangulation_on_sphere_2/test/test_triangulation_on_sphere_2.cpp @@ -1,15 +1,16 @@ #include #include -#include +#include #include #include #include #include - +int main(){} +/* typedef CGAL::Exact_predicates_inexact_constructions_kernel K; -typedef CGAL::Triangulation_sphere_traits_2 Gt; +typedef CGAL::Delaunay_triangulation_sphere_traits_2 Gt; typedef CGAL::Triangulation_on_sphere_2 TOS; @@ -60,9 +61,9 @@ int main(){ //std::ofstream hpts2("hpts2.off"); - /*--------------------------*/ + //--------------------------// // TEST INPUTS // - /*--------------------------*/ + //--------------------------// // SPHERES Point S1=Point(0,0,0); @@ -419,9 +420,9 @@ int main(){ assert(tr_2_s.xy_equal(Loc_result->vertex(li)->point(),P13)); - /*--------------------------*/ + //--------------------------// // REMOVAL // - /*--------------------------*/ + //--------------------------// // DIM 2 // DIM 0 // DIM 1 @@ -435,7 +436,7 @@ Stream &write_triangulation_to_off_2(Stream &out,Stream &out2, Triangulation &t) // Points of triangulation for (Face_iterator it = t.faces_begin(); it != t.faces_end(); it++) { if(!it->is_negative() - /*(t.orientation(it->vertex(0)->point(),it->vertex(1)->point(),it->vertex(2)->point())==1)*/ + //(t.orientation(it->vertex(0)->point(),it->vertex(1)->point(),it->vertex(2)->point())==1)// ){ for (int i=0 ; i<3 ; i++) { if(it->vertex(i)!=Vertex_handle()) @@ -527,5 +528,5 @@ Stream &write_vertices(Stream &out, Triangulation &t) << p.y() << " " << p.z() << std::endl; - } -} + }*/ +//}