diff --git a/Packages/Polygon/examples/Polygon/CustomPoint1.C b/Packages/Polygon/examples/Polygon/CustomPoint1.C index 3249d05d478..775684bc0a8 100644 --- a/Packages/Polygon/examples/Polygon/CustomPoint1.C +++ b/Packages/Polygon/examples/Polygon/CustomPoint1.C @@ -7,9 +7,9 @@ // 1) define a point, vector and segment type // 2) define a polygon traits class using these types // -// In this example the type MyPoint derives from CGAL_Point_2. As a result -// most of the work from 1) and 2) isn't necessary. The types CGAL_Segment_2 -// and CGAL_Vector_2 and an existing traits class can be reused. +// In this example the type MyPoint derives from CGAL::Point_2. As a result +// most of the work from 1) and 2) isn't necessary. The types CGAL::Segment_2 +// and CGAL::Vector_2 and an existing traits class can be reused. //-----------------------------------------------------------------------// #include @@ -19,36 +19,36 @@ enum MyColor { Red, Green, Blue }; template -class MyPoint: public CGAL_Point_2 +class MyPoint: public CGAL::Point_2 { public: MyColor color; // additional attribute for points MyPoint(): color(Red) {} MyPoint(const typename R::RT &x, const typename R::RT &y, MyColor c) - : CGAL_Point_2(x,y), color(c) {} + : CGAL::Point_2(x,y), color(c) {} }; -// N.B. The class MyPoint derives from CGAL_Point_2. This is not always a -// good idea, since the class CGAL_Point_2 doesn't have a virtual destructor. +// N.B. The class MyPoint derives from CGAL::Point_2. This is not always a +// good idea, since the class CGAL::Point_2 doesn't have a virtual destructor. -typedef CGAL_Cartesian R; +typedef CGAL::Cartesian R; typedef MyPoint Point; -#ifdef CGAL_CFG_NO_TEMPLATE_FUNCTION_MATCHING +//#ifdef CGAL_CFG_NO_TEMPLATE_FUNCTION_MATCHING // This is a workaround for the g++ 2.7.2 compiler. -#include "template_function_matching_workaround.h" -#endif // CGAL_CFG_NO_TEMPLATE_FUNCTION_MATCHING +//#include "template_function_matching_workaround.h" +//#endif // CGAL_CFG_NO_TEMPLATE_FUNCTION_MATCHING #include #include -typedef CGAL_Polygon_traits_2_aux Traits; -// The class MyPoint derives from CGAL_Point, so the polygon traits class -// CGAL_Polygon_traits_2_aux can be reused. +typedef CGAL::Polygon_traits_2_aux Traits; +// The class MyPoint derives from CGAL::Point, so the polygon traits class +// CGAL::Polygon_traits_2_aux can be reused. -typedef CGAL_Polygon_2 > Polygon; -typedef CGAL_Polygon_2 >::Vertex_iterator VI; -typedef CGAL_Polygon_2 >::Edge_const_iterator EI; +typedef CGAL::Polygon_2 > Polygon; +typedef CGAL::Polygon_2 >::Vertex_iterator VI; +typedef CGAL::Polygon_2 >::Edge_const_iterator EI; //-----------------------------------------------------------------------// // main @@ -64,7 +64,7 @@ int main() p.push_back(Point(2,2,Red)); p.push_back(Point(0,4,Red)); - CGAL_set_pretty_mode(cout); + CGAL::set_pretty_mode(cout); cout << "created the polygon p:" << endl; cout << p << endl; cout << endl; @@ -72,7 +72,7 @@ int main() // determine some properties of the polygon bool IsSimple = p.is_simple(); bool IsConvex = p.is_convex(); - bool IsClockwise = (p.orientation() == CGAL_CLOCKWISE); + bool IsClockwise = (p.orientation() == CGAL::CLOCKWISE); double Area = p.area(); cout << "polygon p is"; @@ -95,7 +95,7 @@ int main() cout << "created point q = " << q << endl; cout << endl; - bool IsInside = (p.bounded_side(q) == CGAL_ON_BOUNDED_SIDE); + bool IsInside = (p.bounded_side(q) == CGAL::ON_BOUNDED_SIDE); cout << "point q is"; if (!IsInside) cout << " not"; cout << " inside polygon p." << endl; diff --git a/Packages/Polygon/examples/Polygon/CustomPoint2.C b/Packages/Polygon/examples/Polygon/CustomPoint2.C index 3834a071ff7..e89bb342e69 100644 --- a/Packages/Polygon/examples/Polygon/CustomPoint2.C +++ b/Packages/Polygon/examples/Polygon/CustomPoint2.C @@ -14,9 +14,9 @@ #include #include -#ifdef CGAL_CFG_NO_LAZY_INSTANTIATION -#include -#endif // CGAL_CFG_NO_LAZY_INSTANTIATION +//#ifdef CGAL_CFG_NO_LAZY_INSTANTIATION +//#include +//#endif // CGAL_CFG_NO_LAZY_INSTANTIATION //-----------------------------------------------------------------------// // MyPoint @@ -33,10 +33,10 @@ class MyPoint double x() const { return d_x; } double y() const { return d_y; } -#ifdef CGAL_CFG_NO_LAZY_INSTANTIATION - CGAL_Bbox_2 bbox() const - { return CGAL_Bbox_2(d_x, d_y, d_x, d_y); } -#endif // CGAL_CFG_NO_LAZY_INSTANTIATION +//#ifdef CGAL_CFG_NO_LAZY_INSTANTIATION +// CGAL::Bbox_2 bbox() const +// { return CGAL::Bbox_2(d_x, d_y, d_x, d_y); } +//#endif // CGAL_CFG_NO_LAZY_INSTANTIATION }; ostream& operator<<(ostream& to, const MyPoint& p) @@ -122,32 +122,32 @@ class MyTraits return (x < FT(0)) ? -1: (FT(0) < x) ? 1 : 0; } - CGAL_Orientation orientation(const Point_2& p, + CGAL::Orientation orientation(const Point_2& p, const Point_2& q, const Point_2& r) const { int i = sign(determinant_2(p,q,r)); switch (i) { - case -1: return CGAL_COUNTERCLOCKWISE; - case 0: return CGAL_COLLINEAR; - case 1: return CGAL_CLOCKWISE; + case -1: return CGAL::COUNTERCLOCKWISE; + case 0: return CGAL::COLLINEAR; + case 1: return CGAL::CLOCKWISE; } - return CGAL_COLLINEAR; // to prevent compiler warnings + return CGAL::COLLINEAR; // to prevent compiler warnings } - CGAL_Comparison_result compare_x(const Point_2 &p, const Point_2 &q) const + CGAL::Comparison_result compare_x(const Point_2 &p, const Point_2 &q) const { if (p.x() == q.x()) - return CGAL_EQUAL; - return (p.x() < q.x()) ? CGAL_SMALLER : CGAL_LARGER; + return CGAL::EQUAL; + return (p.x() < q.x()) ? CGAL::SMALLER : CGAL::LARGER; } - CGAL_Comparison_result compare_y(const Point_2 &p, const Point_2 &q) const + CGAL::Comparison_result compare_y(const Point_2 &p, const Point_2 &q) const { if (p.y() == q.y()) - return CGAL_EQUAL; - return (p.y() < q.y()) ? CGAL_SMALLER : CGAL_LARGER; + return CGAL::EQUAL; + return (p.y() < q.y()) ? CGAL::SMALLER : CGAL::LARGER; } bool have_equal_direction(const Vector_2&, @@ -176,7 +176,7 @@ class MyTraits #include -typedef CGAL_Polygon_2 > Polygon; +typedef CGAL::Polygon_2 > Polygon; typedef Polygon::Vertex_iterator VI; typedef Polygon::Edge_const_iterator EI; @@ -197,7 +197,7 @@ int main() // determine some properties of the polygon bool IsSimple = p.is_simple(); bool IsConvex = p.is_convex(); - bool IsClockwise = (p.orientation() == CGAL_CLOCKWISE); + bool IsClockwise = (p.orientation() == CGAL::CLOCKWISE); double Area = p.area(); cout << "polygon p is"; @@ -219,7 +219,7 @@ int main() MyPoint q(1,1); cout << endl; - bool IsInside = (p.bounded_side(q) == CGAL_ON_BOUNDED_SIDE); + bool IsInside = (p.bounded_side(q) == CGAL::ON_BOUNDED_SIDE); cout << "point q is"; if (!IsInside) cout << " not"; cout << " inside polygon p." << endl; diff --git a/Packages/Polygon/examples/Polygon/Example.C b/Packages/Polygon/examples/Polygon/Example.C index 61bb6d5807f..3d5e9b01721 100644 --- a/Packages/Polygon/examples/Polygon/Example.C +++ b/Packages/Polygon/examples/Polygon/Example.C @@ -1,6 +1,6 @@ //-----------------------------------------------------------------------// // This is just a simple example that demonstrates how to use the -// class CGAL_Polygon_2. +// class CGAL::Polygon_2. //-----------------------------------------------------------------------// #include @@ -8,12 +8,12 @@ #include -typedef CGAL_Cartesian R; -typedef CGAL_Polygon_traits_2 Traits; -typedef CGAL_Point_2 Point; -typedef CGAL_Polygon_2 > Polygon; -typedef CGAL_Polygon_2 >::Vertex_iterator VertexIterator; -typedef CGAL_Polygon_2 >::Edge_const_iterator EdgeIterator; +typedef CGAL::Cartesian R; +typedef CGAL::Polygon_traits_2 Traits; +typedef CGAL::Point_2 Point; +typedef CGAL::Polygon_2 > Polygon; +typedef CGAL::Polygon_2 >::Vertex_iterator VertexIterator; +typedef CGAL::Polygon_2 >::Edge_const_iterator EdgeIterator; //-----------------------------------------------------------------------// // main @@ -29,7 +29,7 @@ int main() p.push_back(Point(2,2)); p.push_back(Point(0,4)); - CGAL_set_pretty_mode(cout); + CGAL::set_pretty_mode(cout); cout << "created the polygon p:" << endl; cout << p << endl; cout << endl; @@ -37,7 +37,7 @@ int main() // determine some properties of the polygon bool IsSimple = p.is_simple(); bool IsConvex = p.is_convex(); - bool IsClockwise = (p.orientation() == CGAL_CLOCKWISE); + bool IsClockwise = (p.orientation() == CGAL::CLOCKWISE); double Area = p.area(); cout << "polygon p is"; @@ -60,7 +60,7 @@ int main() cout << "created point q = " << q << endl; cout << endl; - bool IsInside = (p.bounded_side(q) == CGAL_ON_BOUNDED_SIDE); + bool IsInside = (p.bounded_side(q) == CGAL::ON_BOUNDED_SIDE); cout << "point q is"; if (!IsInside) cout << " not"; cout << " inside polygon p." << endl; diff --git a/Packages/Polygon/examples/Polygon/Polygon.C b/Packages/Polygon/examples/Polygon/Polygon.C index 93eb1240b84..aee16726d79 100644 --- a/Packages/Polygon/examples/Polygon/Polygon.C +++ b/Packages/Polygon/examples/Polygon/Polygon.C @@ -7,11 +7,11 @@ #include #include -typedef CGAL_Cartesian R; -typedef CGAL_Polygon_traits_2 Traits; +typedef CGAL::Cartesian R; +typedef CGAL::Polygon_traits_2 Traits; typedef Traits::Point_2 Point; typedef list Container; -typedef CGAL_Polygon_2 Polygon; +typedef CGAL::Polygon_2 Polygon; #include diff --git a/Packages/Polygon/examples/Polygon/template_function_matching_workaround.h b/Packages/Polygon/examples/Polygon/template_function_matching_workaround.h index d75ed1830b0..6f0dde0be66 100644 --- a/Packages/Polygon/examples/Polygon/template_function_matching_workaround.h +++ b/Packages/Polygon/examples/Polygon/template_function_matching_workaround.h @@ -3,61 +3,61 @@ template inline -bool CGAL_lexicographically_xy_smaller(const MyPoint& p, const MyPoint& q) +bool CGAL::lexicographically_xy_smaller(const MyPoint& p, const MyPoint& q) { - return CGAL_lexicographically_xy_smaller((const CGAL_Point_2&) p, - (const CGAL_Point_2&) q ); + return CGAL::lexicographically_xy_smaller((const CGAL::Point_2&) p, + (const CGAL::Point_2&) q ); } template inline -bool CGAL_lexicographically_yx_smaller(const MyPoint& p, const MyPoint& q) +bool CGAL::lexicographically_yx_smaller(const MyPoint& p, const MyPoint& q) { - return CGAL_lexicographically_yx_smaller((const CGAL_Point_2&) p, - (const CGAL_Point_2&) q ); + return CGAL::lexicographically_yx_smaller((const CGAL::Point_2&) p, + (const CGAL::Point_2&) q ); } template inline -bool CGAL_lexicographically_yx_smaller_or_equal(const MyPoint& p, const MyPoint& q) +bool CGAL::lexicographically_yx_smaller_or_equal(const MyPoint& p, const MyPoint& q) { - return CGAL_lexicographically_yx_smaller_or_equal((const CGAL_Point_2&) p, - (const CGAL_Point_2&) q ); + return CGAL::lexicographically_yx_smaller_or_equal((const CGAL::Point_2&) p, + (const CGAL::Point_2&) q ); } template -CGAL_Comparison_result CGAL_compare_x(const MyPoint& p, const MyPoint& q) +CGAL::Comparison_result CGAL::compare_x(const MyPoint& p, const MyPoint& q) { - return CGAL_compare_x((const CGAL_Point_2&) p, - (const CGAL_Point_2&) q ); + return CGAL::compare_x((const CGAL::Point_2&) p, + (const CGAL::Point_2&) q ); } template -CGAL_Comparison_result CGAL_compare_y(const MyPoint& p, const MyPoint& q) +CGAL::Comparison_result CGAL::compare_y(const MyPoint& p, const MyPoint& q) { - return CGAL_compare_y((const CGAL_Point_2&) p, - (const CGAL_Point_2&) q ); + return CGAL::compare_y((const CGAL::Point_2&) p, + (const CGAL::Point_2&) q ); } template ostream& operator<<(ostream& to, const MyPoint& p) { - return to << (const CGAL_Point_2&) p; + return to << (const CGAL::Point_2&) p; } template -CGAL_Vector_2 operator-(const MyPoint& p, const MyPoint& q) +CGAL::Vector_2 operator-(const MyPoint& p, const MyPoint& q) { - return ((const CGAL_Point_2&) p) - ((const CGAL_Point_2&) q ); + return ((const CGAL::Point_2&) p) - ((const CGAL::Point_2&) q ); } template < class R > -CGAL_Orientation CGAL_orientation(const MyPoint& p, +CGAL::Orientation CGAL::orientation(const MyPoint& p, const MyPoint& q, const MyPoint& r) { - return CGAL_orientation((const CGAL_Point_2&) p, - (const CGAL_Point_2&) q, - (const CGAL_Point_2&) r ); + return CGAL::orientation((const CGAL::Point_2&) p, + (const CGAL::Point_2&) q, + (const CGAL::Point_2&) r ); }