From a93d1e7fe52b6417ff66201c5c197f406aacca5d Mon Sep 17 00:00:00 2001 From: Sylvain Pion Date: Wed, 6 Dec 2000 09:30:44 +0000 Subject: [PATCH] Changed typedef .. Point --- .../include/CGAL/Delaunay_triangulation_3.h | 9 ++-- .../include/CGAL/Triangulation_3.h | 7 +-- .../include/CGAL/Triangulation_cell_3.h | 2 +- .../CGAL/Triangulation_geom_traits_3.h | 54 +++++++++---------- .../include/CGAL/Triangulation_vertex_3.h | 2 +- .../CGAL/Triangulation_vertex_base_3.h | 9 ++-- 6 files changed, 43 insertions(+), 40 deletions(-) diff --git a/Packages/Triangulation_3/include/CGAL/Delaunay_triangulation_3.h b/Packages/Triangulation_3/include/CGAL/Delaunay_triangulation_3.h index 7c14c4f6aec..684a56c2cbd 100644 --- a/Packages/Triangulation_3/include/CGAL/Delaunay_triangulation_3.h +++ b/Packages/Triangulation_3/include/CGAL/Delaunay_triangulation_3.h @@ -43,7 +43,7 @@ class Delaunay_triangulation_3 : public Triangulation_3 public: - typedef typename Gt::Point Point; + typedef typename Gt::Point_3 Point; typedef typename Gt::Segment Segment; typedef typename Gt::Triangle Triangle; typedef typename Gt::Tetrahedron Tetrahedron; @@ -432,7 +432,8 @@ fill_hole_3D( std::set & boundhole, Bounded_side sos; Orientation ori; - bool opp_inf, sticked, created; + bool opp_inf, sticked; + //bool created; int nbnew = 1; // to detect a loop in the execution due to an // impossible case @@ -724,7 +725,7 @@ fill_hole_3D( std::set & boundhole, // here fit_stick does not violate any facet // test whether it is visible from oppvert.begin() - created = false; + //created = false; if ( ( ! (is_infinite(v[0]) || is_infinite(v[1]) || is_infinite(v[2])) ) @@ -751,7 +752,7 @@ fill_hole_3D( std::set & boundhole, _tds.add_cell( &(*cnew) ); (fit_stick).first->set_neighbor((fit_stick).second,cnew); - created = true; + //created = true; ((*oppvert.begin()))->set_cell(cnew); boundhole.erase( fit_stick ); diff --git a/Packages/Triangulation_3/include/CGAL/Triangulation_3.h b/Packages/Triangulation_3/include/CGAL/Triangulation_3.h index 8c8ee38743b..02131e929bc 100644 --- a/Packages/Triangulation_3/include/CGAL/Triangulation_3.h +++ b/Packages/Triangulation_3/include/CGAL/Triangulation_3.h @@ -96,7 +96,8 @@ class Triangulation_3 public: - typedef typename GT::Point Point; + typedef typename GT::Point_3 Point_3; + typedef Point_3 Point; typedef typename GT::Segment Segment; typedef typename GT::Triangle Triangle; typedef typename GT::Tetrahedron Tetrahedron; @@ -868,7 +869,7 @@ operator>> (std::istream& is, Triangulation_3 &tr) typedef typename Triangulation::Cell Cell; typedef typename Triangulation::Edge Edge; typedef typename Triangulation::Facet Facet; - typedef typename GT::Point Point; + typedef typename GT::Point_3 Point; typedef typename Tds::Vertex TdsVertex; typedef typename Tds::Cell TdsCell; @@ -1338,7 +1339,7 @@ triangle(const Cell_handle c, int i) const return Triangle(c->vertex(1)->point(), c->vertex(2)->point(), c->vertex(3)->point()); - break; + case 1: return Triangle(c->vertex(0)->point(), c->vertex(2)->point(), diff --git a/Packages/Triangulation_3/include/CGAL/Triangulation_cell_3.h b/Packages/Triangulation_3/include/CGAL/Triangulation_cell_3.h index a343c89d026..6867d47a9a8 100644 --- a/Packages/Triangulation_3/include/CGAL/Triangulation_cell_3.h +++ b/Packages/Triangulation_3/include/CGAL/Triangulation_cell_3.h @@ -45,7 +45,7 @@ class Triangulation_cell_3 { public: - typedef typename Gt::Point Point; + typedef typename Gt::Point_3 Point; typedef typename Tds::Vertex Vtds; typedef typename Tds::Cell Ctds; diff --git a/Packages/Triangulation_3/include/CGAL/Triangulation_geom_traits_3.h b/Packages/Triangulation_3/include/CGAL/Triangulation_geom_traits_3.h index d535648ed2e..744d634e7c5 100644 --- a/Packages/Triangulation_3/include/CGAL/Triangulation_geom_traits_3.h +++ b/Packages/Triangulation_3/include/CGAL/Triangulation_geom_traits_3.h @@ -48,7 +48,7 @@ class Triangulation_geom_traits_3 { public: typedef Repres Rep; - typedef Point_3 Point; + typedef Point_3 Point_3; typedef Point_2< Cartesian< typename Repres::FT> > Point2; typedef Segment_3 Segment; typedef Triangle_3 Triangle; @@ -66,41 +66,41 @@ public: // PREDICATES ON POINTS - bool equal(const Point & p, const Point & q) const + bool equal(const Point_3 & p, const Point_3 & q) const { return ( CGAL::compare_x(p, q)== EQUAL && CGAL::compare_y(p, q)== EQUAL && CGAL::compare_z(p, q)== EQUAL ); } - Comparison_result compare_x(const Point & p, const Point & q) const + Comparison_result compare_x(const Point_3 & p, const Point_3 & q) const { return CGAL::compare_x(p, q); } - Comparison_result compare_y(const Point & p, const Point & q) const + Comparison_result compare_y(const Point_3 & p, const Point_3 & q) const { return CGAL::compare_y(p, q); } - Comparison_result compare_z(const Point & p, const Point & q) const + Comparison_result compare_z(const Point_3 & p, const Point_3 & q) const { return CGAL::compare_z(p, q); } - Orientation orientation(const Point & p, - const Point & q, - const Point & r, - const Point & s) const + Orientation orientation(const Point_3 & p, + const Point_3 & q, + const Point_3 & r, + const Point_3 & s) const { return CGAL::orientation(p, q, r, s); } - Orientation orientation_in_plane(const Point & q, - const Point & r, - const Point & s, - const Point & p) const + Orientation orientation_in_plane(const Point_3 & q, + const Point_3 & r, + const Point_3 & s, + const Point_3 & p) const // p,q,r,s supposed to be coplanar // q,r,s supposed to be non collinear // tests whether p is on the same side of q,r as s @@ -145,9 +145,9 @@ public: return Orientation ( CGAL::orientation(Q,R,S) * CGAL::orientation(Q,R,P) ); } - bool collinear(const Point & p, - const Point & q, - const Point & r) const + bool collinear(const Point_3 & p, + const Point_3 & q, + const Point_3 & r) const { return CGAL::collinear(p,q,r); } @@ -155,20 +155,20 @@ public: // DELAUNAY Oriented_side - side_of_oriented_sphere(const Point & p, - const Point & q, - const Point & r, - const Point & s, - const Point & test) const + side_of_oriented_sphere(const Point_3 & p, + const Point_3 & q, + const Point_3 & r, + const Point_3 & s, + const Point_3 & test) const { return CGAL::side_of_oriented_sphere(p, q, r, s, test); } Oriented_side - side_of_oriented_circle(const Point & p, - const Point & q, - const Point & r, - const Point & test) const + side_of_oriented_circle(const Point_3 & p, + const Point_3 & q, + const Point_3 & r, + const Point_3 & test) const { CGAL_triangulation_precondition( CGAL::orientation(p,q,r,test) == COPLANAR ); @@ -177,9 +177,9 @@ public: // test belongs to the circle if and only if it belongs to a // sphere passing through pqr Orientation ori; - Point O(0,0,0), A(1,0,0), B(0,1,0), C(0,0,1); + Point_3 O(0,0,0), A(1,0,0), B(0,1,0), C(0,0,1); - Point P = ((ori = CGAL::orientation(p,q,r,O)) != ZERO) ? O: + Point_3 P = ((ori = CGAL::orientation(p,q,r,O)) != ZERO) ? O: ((ori = CGAL::orientation(p,q,r,A)) != ZERO) ? A: ((ori = CGAL::orientation(p,q,r,B)) != ZERO) ? B: ((ori = CGAL::orientation(p,q,r,C)) != ZERO) ? C: C; diff --git a/Packages/Triangulation_3/include/CGAL/Triangulation_vertex_3.h b/Packages/Triangulation_3/include/CGAL/Triangulation_vertex_3.h index 974b747a244..000f81e116d 100644 --- a/Packages/Triangulation_3/include/CGAL/Triangulation_vertex_3.h +++ b/Packages/Triangulation_3/include/CGAL/Triangulation_vertex_3.h @@ -49,7 +49,7 @@ class Triangulation_vertex_3 { public: - typedef typename Gt::Point Point; + typedef typename Gt::Point_3 Point; typedef typename Tds::Vertex Vtds; typedef typename Tds::Cell Ctds; diff --git a/Packages/Triangulation_3/include/CGAL/Triangulation_vertex_base_3.h b/Packages/Triangulation_3/include/CGAL/Triangulation_vertex_base_3.h index 451bdd95a74..e518ecb338e 100644 --- a/Packages/Triangulation_3/include/CGAL/Triangulation_vertex_base_3.h +++ b/Packages/Triangulation_3/include/CGAL/Triangulation_vertex_base_3.h @@ -38,7 +38,7 @@ class Triangulation_vertex_base_3 (std::istream&, Triangulation_vertex_base_3&); public: - typedef typename GT::Point Point; + typedef typename GT::Point_3 Point; // CONSTRUCTORS @@ -105,7 +105,7 @@ std::istream& operator >> (std::istream& is, Triangulation_vertex_base_3 & v) // non combinatorial information. Default = point { - typedef typename GT::Point Point; + typedef typename GT::Point_3 Point; // Point p; // is >> p; is >> v._p; @@ -137,7 +137,8 @@ class Triangulation_vertex_base_pointer_3 (std::istream&, Triangulation_vertex_base_pointer_3&); public: - typedef typename GT::Point Point; + typedef typename GT::Point_3 Point; + //typedef Point Point_3; // CONSTRUCTORS @@ -217,7 +218,7 @@ std::istream& operator >> (std::istream& is, Triangulation_vertex_base_pointer_3 & v) // non combinatorial information. Default = point { - typedef typename GT::Point Point; + typedef typename GT::Point_3 Point; Point q; is >> q; const Point * p = new Point(q);