From edaa8838459ef8ed4fb220a41941748d0c9465b7 Mon Sep 17 00:00:00 2001 From: Sylvain Pion Date: Fri, 25 Jul 2008 11:01:57 +0000 Subject: [PATCH] Use boost::array instead of Threetuple --- Cartesian_kernel/include/CGAL/Cartesian/Triangle_2.h | 12 ++++++------ Cartesian_kernel/include/CGAL/Cartesian/Triangle_3.h | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Cartesian_kernel/include/CGAL/Cartesian/Triangle_2.h b/Cartesian_kernel/include/CGAL/Cartesian/Triangle_2.h index e80932401f7..38969cb109a 100644 --- a/Cartesian_kernel/include/CGAL/Cartesian/Triangle_2.h +++ b/Cartesian_kernel/include/CGAL/Cartesian/Triangle_2.h @@ -24,8 +24,8 @@ #ifndef CGAL_CARTESIAN_TRIANGLE_2_H #define CGAL_CARTESIAN_TRIANGLE_2_H -#include #include +#include CGAL_BEGIN_NAMESPACE @@ -37,7 +37,7 @@ class TriangleC2 typedef typename R_::Vector_2 Vector_2; typedef typename R_::Triangle_2 Triangle_2; - typedef Threetuple Rep; + typedef boost::array Rep; typedef typename R_::template Handle::type Base; Base base; @@ -48,7 +48,7 @@ public: TriangleC2() {} TriangleC2(const Point_2 &p, const Point_2 &q, const Point_2 &r) - : base(p, q, r) {} + : base(CGALi::make_array(p, q, r)) {} const Point_2 & @@ -56,9 +56,9 @@ public: { if (i>2) i = i%3; else if (i<0) i = (i%3) + 3; - return (i==0) ? get(base).e0 : - (i==1) ? get(base).e1 : - get(base).e2; + return (i==0) ? get(base)[0] : + (i==1) ? get(base)[1] : + get(base)[2]; } const Point_2 & diff --git a/Cartesian_kernel/include/CGAL/Cartesian/Triangle_3.h b/Cartesian_kernel/include/CGAL/Cartesian/Triangle_3.h index 6ed0a9a2095..33b5667fbaf 100644 --- a/Cartesian_kernel/include/CGAL/Cartesian/Triangle_3.h +++ b/Cartesian_kernel/include/CGAL/Cartesian/Triangle_3.h @@ -24,8 +24,8 @@ #ifndef CGAL_CARTESIAN_TRIANGLE_3_H #define CGAL_CARTESIAN_TRIANGLE_3_H -#include #include +#include CGAL_BEGIN_NAMESPACE @@ -38,7 +38,7 @@ class TriangleC3 typedef typename R_::Plane_3 Plane_3; typedef typename R_::Triangle_3 Triangle_3; - typedef Threetuple Rep; + typedef boost::array Rep; typedef typename R_::template Handle::type Base; Base base; @@ -49,7 +49,7 @@ public: TriangleC3() {} TriangleC3(const Point_3 &p, const Point_3 &q, const Point_3 &r) - : base(p, q, r) {} + : base(CGALi::make_array(p, q, r)) {} bool operator==(const TriangleC3 &t) const; bool operator!=(const TriangleC3 &t) const; @@ -94,9 +94,9 @@ TriangleC3::vertex(int i) const { if (i<0) i=(i%3)+3; else if (i>2) i=i%3; - return (i==0) ? get(base).e0 : - (i==1) ? get(base).e1 : - get(base).e2; + return (i==0) ? get(base)[0] : + (i==1) ? get(base)[1] : + get(base)[2]; } template < class R >