From 3e04fb16fb5a2362dbaa7a5f25ee5d218766aa69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 11 Jan 2011 07:18:36 +0000 Subject: [PATCH] merge packages related to projection traits into the trunk. --- .gitattributes | 2 +- .../Alpha_shapes_2_ref/AlphaShapeTraits_2.tex | 1 + .../Convex_hull_2/traits_classes_2.tex | 13 +- .../Convex_hull_2_ref/ConvexHullTraits_2.tex | 7 +- .../Convex_hull_projective_xy_traits_2.tex | 8 + .../Convex_hull_projective_xz_traits_2.tex | 8 + .../Convex_hull_projective_yz_traits_2.tex | 8 + Kernel_23/doc_tex/Kernel_23/kernel_toc.tex | 1 + Kernel_23/doc_tex/Kernel_23/main.tex | 1 + .../doc_tex/Kernel_23/projection_traits.tex | 12 ++ .../Kernel_23_ref/Projection_traits_xy_3.tex | 101 +++++++++++++ Kernel_23/doc_tex/Kernel_23_ref/main.tex | 1 + .../include/CGAL/Projection_traits_xy_3.h | 34 +++++ .../include/CGAL/Projection_traits_yz_3.h | 34 +++++ .../include/CGAL/Projection_traits_zx_3.h | 34 +++++ .../CGAL/internal/Projection_traits_3.h | 139 ++++++++++++++---- Polygon/doc_tex/Polygon/polygon.tex | 25 +++- .../doc_tex/Polygon_ref/PolygonTraits_2.tex | 7 +- .../examples/Polygon/projected_polygon.cpp | 15 ++ .../Triangulation_2/triangulation_user.tex | 4 + .../ConstrainedTriangulationTraits_2.tex | 11 +- .../DelaunayTriangulationTraits_2.tex | 15 +- .../TriangulationTraits_2.tex | 13 +- .../Triangulation_euclidean_traits_xy_3.tex | 5 + .../examples/Triangulation_2/terrain.cpp | 4 +- .../Triangulation_euclidean_traits_xy_3.h | 4 +- .../Triangulation_euclidean_traits_xz_3.h | 5 +- .../Triangulation_euclidean_traits_yz_3.h | 4 +- .../test_triangulation_geom_traits.cpp | 40 ++--- 29 files changed, 472 insertions(+), 84 deletions(-) create mode 100644 Kernel_23/doc_tex/Kernel_23/projection_traits.tex create mode 100644 Kernel_23/doc_tex/Kernel_23_ref/Projection_traits_xy_3.tex create mode 100644 Kernel_23/include/CGAL/Projection_traits_xy_3.h create mode 100644 Kernel_23/include/CGAL/Projection_traits_yz_3.h create mode 100644 Kernel_23/include/CGAL/Projection_traits_zx_3.h rename Triangulation_2/include/CGAL/internal/Triangulation_euclidean_traits_projected_3.h => Kernel_23/include/CGAL/internal/Projection_traits_3.h (76%) create mode 100644 Polygon/examples/Polygon/projected_polygon.cpp diff --git a/.gitattributes b/.gitattributes index 539031d3511..ac22f903f44 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1689,6 +1689,7 @@ Kernel_23/doc_tex/Kernel_23_ref/fig/transvectwo.gif -text svneol=unset#image/gif Kernel_23/doc_tex/Kernel_23_ref/radical_line.tex -text Kernel_23/examples/Kernel_23/cartesian_converter.cpp -text Kernel_23/include/CGAL/functions_on_enums.h -text +Kernel_23/include/CGAL/internal/Projection_traits_3.h -text Kernel_23/test/Kernel_23/CMakeLists.txt -text Kernel_d/doc_tex/Kernel_d/hypercube.png -text Kernel_d/doc_tex/Kernel_d_ref/Kernel_Compute_coordinate_d.tex -text @@ -3914,7 +3915,6 @@ Triangulation_2/doc_tex/Triangulation_2_ref/insert3.gif -text svneol=unset#image Triangulation_2/doc_tex/Triangulation_2_ref/neighbors.gif -text svneol=unset#image/gif Triangulation_2/doc_tex/Triangulation_2_ref/remove.gif -text svneol=unset#image/gif Triangulation_2/doc_tex/Triangulation_2_ref/walk.gif -text svneol=unset#image/gif -Triangulation_2/include/CGAL/internal/Triangulation_euclidean_traits_projected_3.h -text Triangulation_2/test/Triangulation_2/test_delaunay_triangulation_proj.cpp -text Triangulation_3/demo/Triangulation_3/CMakeLists.txt -text Triangulation_3/demo/Triangulation_3/MainWindow.cpp -text diff --git a/Alpha_shapes_2/doc_tex/Alpha_shapes_2_ref/AlphaShapeTraits_2.tex b/Alpha_shapes_2/doc_tex/Alpha_shapes_2_ref/AlphaShapeTraits_2.tex index a5c3fb46c58..f2978ab280c 100644 --- a/Alpha_shapes_2/doc_tex/Alpha_shapes_2_ref/AlphaShapeTraits_2.tex +++ b/Alpha_shapes_2/doc_tex/Alpha_shapes_2_ref/AlphaShapeTraits_2.tex @@ -64,6 +64,7 @@ metric for regular triangulation. The kernels supplied by \cgal\ are models of \ccRefName. +\ccRefConceptPage{Projection_traits_xy_3} \ccTypes diff --git a/Convex_hull_2/doc_tex/Convex_hull_2/traits_classes_2.tex b/Convex_hull_2/doc_tex/Convex_hull_2/traits_classes_2.tex index 9dd30fcdabc..f415f110218 100644 --- a/Convex_hull_2/doc_tex/Convex_hull_2/traits_classes_2.tex +++ b/Convex_hull_2/doc_tex/Convex_hull_2/traits_classes_2.tex @@ -12,13 +12,12 @@ points lie. The class is a second traits class based on \cgal\ primitives but differs from \ccc{Convex_hull_traits_2} in that some of its primitives reuse intermediate results to speed up computation. -In addition, there are three projective traits classes -(\ccc{Convex_hull_projective_xy_traits_2}, -\ccc{Convex_hull_projective_xz_traits_2}, and -\ccc{Convex_hull_projective_yz_traits_2}), % -\ccIndexMainItem[C]{Convex_hull_projective_xy_traits_2}% -\ccIndexMainItem[C]{Convex_hull_projective_xz_traits_2}% -\ccIndexMainItem[C]{Convex_hull_projective_yz_traits_2}% + +In addition, the 2D and 3D Linear Geometric Kernel provides three projective traits classes +(\ccc{Projection_traits_xy_3}, +\ccc{Projection_traits_zx_3} \\ +\ccRefIdfierPage{CGAL::Convex_hull_traits_2} \\ +\ccRefIdfierPage{CGAL::Projection_traits_xy_3}\\ +\ccc{CGAL::Projection_traits_yz_3}\\ +\ccc{CGAL::Projection_traits_zx_3} +\begin{ccDeprecated} \ccRefIdfierPage{CGAL::Convex_hull_projective_xy_traits_2} \\ \ccRefIdfierPage{CGAL::Convex_hull_projective_xz_traits_2} \\ \ccRefIdfierPage{CGAL::Convex_hull_projective_yz_traits_2} \\ -\ccRefIdfierPage{CGAL::Convex_hull_traits_2} \\ +\end{ccDeprecated} \ccAutoIndexingOn \ccSeeAlso diff --git a/Convex_hull_2/doc_tex/Convex_hull_2_ref/Convex_hull_projective_xy_traits_2.tex b/Convex_hull_2/doc_tex/Convex_hull_2_ref/Convex_hull_projective_xy_traits_2.tex index ea448af7620..a510892a702 100644 --- a/Convex_hull_2/doc_tex/Convex_hull_2_ref/Convex_hull_projective_xy_traits_2.tex +++ b/Convex_hull_2/doc_tex/Convex_hull_2_ref/Convex_hull_projective_xy_traits_2.tex @@ -11,6 +11,14 @@ \ccAutoIndexingOn \ccIndexTraitsClassBegin{Convex_hull_projective_xy_traits_2}{}{convex hull, 2D} + +\begin{ccDeprecated} +The functionality of this class has been generalized to other packages than 2D convex hulls. +The more general class \ccc{Projection_traits_xy_3} can be found in the 2D and 3D Linear Geometric Kernel. +Note that the deprecated class was templated by a point class, whereas the new class +is templated by a geometric kernel. +\end{ccDeprecated} + \ccDefinition The class \ccRefName\ serves as a traits class for all the two-dimensional diff --git a/Convex_hull_2/doc_tex/Convex_hull_2_ref/Convex_hull_projective_xz_traits_2.tex b/Convex_hull_2/doc_tex/Convex_hull_2_ref/Convex_hull_projective_xz_traits_2.tex index ce9954529ae..342f6f2f675 100644 --- a/Convex_hull_2/doc_tex/Convex_hull_2_ref/Convex_hull_projective_xz_traits_2.tex +++ b/Convex_hull_2/doc_tex/Convex_hull_2_ref/Convex_hull_projective_xz_traits_2.tex @@ -11,6 +11,14 @@ \ccAutoIndexingOn \ccIndexTraitsClassBegin{Convex_hull_projective_xz_traits_2}{}{convex hull, 2D} + +\begin{ccDeprecated} +The functionality of this class has been generalized to other packages than 2D convex hulls. +The more general class \ccc{Projection_traits_xy_3} can be found in the 2D and 3D Linear Geometric Kernel. +Note that the deprecated class was templated by a point class, whereas the new class +is templated by a geometric kernel. +\end{ccDeprecated} + \ccDefinition The class \ccRefName\ serves as a traits class for all the two-dimensional diff --git a/Convex_hull_2/doc_tex/Convex_hull_2_ref/Convex_hull_projective_yz_traits_2.tex b/Convex_hull_2/doc_tex/Convex_hull_2_ref/Convex_hull_projective_yz_traits_2.tex index 90c1e3d7935..a230ba16f4b 100644 --- a/Convex_hull_2/doc_tex/Convex_hull_2_ref/Convex_hull_projective_yz_traits_2.tex +++ b/Convex_hull_2/doc_tex/Convex_hull_2_ref/Convex_hull_projective_yz_traits_2.tex @@ -11,6 +11,14 @@ \ccAutoIndexingOn \ccIndexTraitsClassBegin{Convex_hull_projective_yz_traits_2}{}{convex hull, 2D} + +\begin{ccDeprecated} +The functionality of this class has been generalized to other packages than 2D convex hulls. +The more general class \ccc{Projection_traits_xy_3} can be found in the 2D and 3D Linear Geometric Kernel. +Note that the deprecated class was templated by a point class, whereas the new class +is templated by a geometric kernel. +\end{ccDeprecated} + \ccDefinition The class \ccRefName\ serves as a traits class for all the two-dimensional diff --git a/Kernel_23/doc_tex/Kernel_23/kernel_toc.tex b/Kernel_23/doc_tex/Kernel_23/kernel_toc.tex index 3e5ab4c5406..dbb38ce5ba4 100644 --- a/Kernel_23/doc_tex/Kernel_23/kernel_toc.tex +++ b/Kernel_23/doc_tex/Kernel_23/kernel_toc.tex @@ -19,6 +19,7 @@ \ccRefIdfierPage{CGAL::quotient_cartesian_to_homogeneous} \\ \ccRefIdfierPage{CGAL::Simple_cartesian} \\ \ccRefIdfierPage{CGAL::Simple_homogeneous} \\ +\ccRefIdfierPage{CGAL::Projection_traits_xy_3} \subsubsection*{Predefined Kernels} diff --git a/Kernel_23/doc_tex/Kernel_23/main.tex b/Kernel_23/doc_tex/Kernel_23/main.tex index 9d58f44d12c..771d2ee584b 100644 --- a/Kernel_23/doc_tex/Kernel_23/main.tex +++ b/Kernel_23/doc_tex/Kernel_23/main.tex @@ -13,5 +13,6 @@ \input{Kernel_23/kernel_geometry} \input{Kernel_23/predicates_constructions} \input{Kernel_23/extensible_kernel} +\input{Kernel_23/projection_traits} \input{Kernel_23/history} diff --git a/Kernel_23/doc_tex/Kernel_23/projection_traits.tex b/Kernel_23/doc_tex/Kernel_23/projection_traits.tex new file mode 100644 index 00000000000..eceb625f3f9 --- /dev/null +++ b/Kernel_23/doc_tex/Kernel_23/projection_traits.tex @@ -0,0 +1,12 @@ +\section{Projection Traits Classes \label{section-projection-traits}} + +It is sometimes useful to apply 2D algorithms to the projection of 3D points on +a plane. Examples are +triangulated terrains, which are points with elevation, or surface +reconstruction from parallel slices, where one wants to check the simplicity +or orientation of polygons. + +For this purpose \cgal\ provides several projection traits classes, +which are a model of traits class concepts of 2D triangulations, +2D polygon and 2D convex hull traits classes. The projection traits classes +are listed in the ``{\em Is Model for the Concepts}'' sections of the concepts. diff --git a/Kernel_23/doc_tex/Kernel_23_ref/Projection_traits_xy_3.tex b/Kernel_23/doc_tex/Kernel_23_ref/Projection_traits_xy_3.tex new file mode 100644 index 00000000000..32ccf10dd06 --- /dev/null +++ b/Kernel_23/doc_tex/Kernel_23_ref/Projection_traits_xy_3.tex @@ -0,0 +1,101 @@ + +\begin{ccRefClass}{Projection_traits_xy_3} %% add template arg's if necessary + +%% \ccHtmlCrossLink{} %% add further rules for cross referencing links +%% \ccHtmlIndexC[class]{} %% add further index entries +\ccCreationVariable{traits} +\ccDefinition + +The class \ccRefName\ is an adapter to apply 2D algorithms to the projections of 3D data on the \ccc{xy}-plane. + + +\cgal\ provides also predefined geometric traits classes +\ccc{Projection_traits_yz_3} and +\ccc{Projection_traits_zx_3} to +deal with projections on the + \ccc{zx}- and the \ccc{yz}-plane, +respectively. It is the \ccc{zx}-plane and not the \ccc{xz}-plane +in order that the third unit vector is on the positive halfspace +defined by the plane. + +\ccParameters +The template parameter \ccc{K} has to +be instantiated by a model of the \ccc{Kernel} concept. +\ccRefName\ uses types +and predicates defined in \ccc{K}. + +\ccInclude{CGAL/Projection_traits_xy_3.h} + +\ccIsModel + +The class is a model of several 2D triangulation traits class concepts, +except that it does not provide the type and constructors +required to build the dual Voronoi diagram. The class is also a model +of the concepts \ccc{PolygonTraits_2} and \ccc{ConvexHullTraits_2}. + +\ccRefConceptPage{TriangulationTraits_2} \\ +\ccRefConceptPage{DelaunayTriangulationTraits_2} \\ +\ccRefConceptPage{ConstrainedTriangulationTraits_2} \\ +\ccRefConceptPage{PolygonTraits_2} \\ +\ccRefConceptPage{ConvexHullTraits_2} + +\ccTypes + +\ccTwo{typedef Triangle_3}{} +\ccTypedef{typedef Point_3 Point_2;}{} +\ccGlue +\ccTypedef{typedef Segment_3 Segment_2;}{} +\ccGlue +\ccTypedef{typedef Triangle_3 Triangle_2;}{} +\ccGlue +\ccTypedef{typedef Line_3 Line_2;}{} + +\ccTypedef{typedef K::Object_3 Object_2;}{} + + +The functors provided by this class are those listed in the concepts, +except that it does not provide the type and constructors +required to build the dual Voronoi diagram. +The functors operate on the 2D projection of their arguments. They come with preconditions that projections of the arguments are non-degenerate, eg. a line segment does not project on a single point, two points do not project on the same point, etc. + +In the following, we specify the choice of the \ccc{z}-coordinate +in case a new point is constructed. + + +\ccNestedType{Intersect_2}{A construction object. +Provides the operator~:\\ +\ccHtmlNoLinksFrom{\ccc{Object_2 operator()(Segment_2 s1, Segment_2 s2);}} +which returns a 3D object whose projection on the xy-plane + is the intersection of the projections of \ccc{s1} and \ccc{s2}. +If non empty, the returned object is either a segment or a point. + Its embedding in 3D is computed as the interpolation + between \ccc{s1} and \ccc{s2}, + meaning that any point \ccc{p} of the returned object + is the midpoint of segment \ccc{p1p2} where \ccc{p1} and \ccc{p2} are the two points of \ccc{s1} and \ccc{s2} respectively, both projecting on \ccc{p}. +\ccPrecond{The projection of \ccc{s1} and the projection of \ccc{s2} are non-degenerate +\ccc{2D} segments.} +} + + +\ccCreation +\ccCreationVariable{traits} + +\ccThree{Projection_traits_xy_3()}{traits=tr }{} + +\ccConstructor{Projection_traits_xy_3();}{ +default constructor.} +\ccGlue +\ccConstructor{Projection_traits_xy_3( + Projection_traits_xy_3 tr);} +{Copy constructor.} +\ccMethod{Projection_traits_xy_3 operator= + (Projection_traits_xy_3 tr);} +{Assignment operator.} + +\end{ccRefClass} + +% +------------------------------------------------------------------------+ +%%RefPage: end of main body, begin of footer +% EOF +% +------------------------------------------------------------------------+ + diff --git a/Kernel_23/doc_tex/Kernel_23_ref/main.tex b/Kernel_23/doc_tex/Kernel_23_ref/main.tex index b75c9bbc4cd..113fad7f3c1 100644 --- a/Kernel_23/doc_tex/Kernel_23_ref/main.tex +++ b/Kernel_23/doc_tex/Kernel_23_ref/main.tex @@ -43,6 +43,7 @@ in the kernel. \input{Kernel_23_ref/Kernel_traits.tex} \input{Kernel_23_ref/Simple_cartesian.tex} \input{Kernel_23_ref/Simple_homogeneous.tex} +\input{Kernel_23_ref/Projection_traits_xy_3.tex} \clearpage \section{Predefined Kernels} diff --git a/Kernel_23/include/CGAL/Projection_traits_xy_3.h b/Kernel_23/include/CGAL/Projection_traits_xy_3.h new file mode 100644 index 00000000000..7bf735dbfc8 --- /dev/null +++ b/Kernel_23/include/CGAL/Projection_traits_xy_3.h @@ -0,0 +1,34 @@ +// Copyright (c) 1997-2010 INRIA Sophia-Antipolis (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org); you may redistribute it under +// the terms of the Q Public License version 1.0. +// See the file LICENSE.QPL distributed with CGAL. +// +// Licensees holding a valid commercial license may use this file in +// accordance with the commercial license agreement provided with the software. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +// +// $URL$ +// $Id$ +// +// +// Author(s) : Mariette Yvinec + +#ifndef CGAL_PROJECTION_TRAITS_XY_3_H +#define CGAL_PROJECTION_TRAITS_XY_3_H + +#include + +namespace CGAL { + +template < class R > +class Projection_traits_xy_3 + : public internal::Projection_traits_3 +{}; + +} //namespace CGAL + +#endif // CGAL_PROJECTION_TRAITS_XY_3_H diff --git a/Kernel_23/include/CGAL/Projection_traits_yz_3.h b/Kernel_23/include/CGAL/Projection_traits_yz_3.h new file mode 100644 index 00000000000..1f3b1dec916 --- /dev/null +++ b/Kernel_23/include/CGAL/Projection_traits_yz_3.h @@ -0,0 +1,34 @@ +// Copyright (c) 1997-2010 INRIA Sophia-Antipolis (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org); you may redistribute it under +// the terms of the Q Public License version 1.0. +// See the file LICENSE.QPL distributed with CGAL. +// +// Licensees holding a valid commercial license may use this file in +// accordance with the commercial license agreement provided with the software. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +// +// $URL$ +// $Id$ +// +// +// Author(s) : Mariette Yvinec + +#ifndef CGAL_PROJECTION_TRAITS_YZ_3_H +#define CGAL_PROJECTION_TRAITS_YZ_3_H + +#include + +namespace CGAL { + +template < class R > +class Projection_traits_yz_3 + : public internal::Projection_traits_3 +{}; + +} //namespace CGAL + +#endif // CGAL_PROJECTION_TRAITS_YZ_3_H diff --git a/Kernel_23/include/CGAL/Projection_traits_zx_3.h b/Kernel_23/include/CGAL/Projection_traits_zx_3.h new file mode 100644 index 00000000000..08b1f9bef1c --- /dev/null +++ b/Kernel_23/include/CGAL/Projection_traits_zx_3.h @@ -0,0 +1,34 @@ +// Copyright (c) 1997-2010 INRIA Sophia-Antipolis (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org); you may redistribute it under +// the terms of the Q Public License version 1.0. +// See the file LICENSE.QPL distributed with CGAL. +// +// Licensees holding a valid commercial license may use this file in +// accordance with the commercial license agreement provided with the software. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +// +// $URL$ +// $Id$ +// +// +// Author(s) : Mariette Yvinec + +#ifndef CGAL_PROJECTION_TRAITS_XZ_3_H +#define CGAL_PROJECTION_TRAITS_XZ_3_H + +#include + +namespace CGAL { + +template < class R > +class Projection_traits_xz_3 + : public internal::Projection_traits_3 +{}; + +} //namespace CGAL + +#endif // CGAL_PROJECTION_TRAITS_XZ_3_H diff --git a/Triangulation_2/include/CGAL/internal/Triangulation_euclidean_traits_projected_3.h b/Kernel_23/include/CGAL/internal/Projection_traits_3.h similarity index 76% rename from Triangulation_2/include/CGAL/internal/Triangulation_euclidean_traits_projected_3.h rename to Kernel_23/include/CGAL/internal/Projection_traits_3.h index 519c5b61ba6..a4b36305880 100644 --- a/Triangulation_2/include/CGAL/internal/Triangulation_euclidean_traits_projected_3.h +++ b/Kernel_23/include/CGAL/internal/Projection_traits_3.h @@ -17,15 +17,14 @@ // // Author(s) : Mariette Yvinec, Sebastien Loriot -#ifndef CGAL_INTERNAL_TRIANGULATION_EUCLIDEAN_TRAITS_PROJECTED_3_H -#define CGAL_INTERNAL_TRIANGULATION_EUCLIDEAN_TRAITS_PROJECTED_3_H +#ifndef CGAL_INTERNAL_PROJECTION_TRAITS_3_H +#define CGAL_INTERNAL_PROJECTION_TRAITS_3_H #include #include #include #include -#include namespace CGAL { @@ -51,21 +50,22 @@ struct Projector static const int x_index=1; static const int y_index=2; }; -//project onto xz +//project onto zx template struct Projector { - typedef typename R::Less_x_3 Less_x_2; - typedef typename R::Less_z_3 Less_y_2; - typedef typename R::Compare_x_3 Compare_x_2; - typedef typename R::Compare_z_3 Compare_y_2; - typedef typename R::Equal_x_3 Equal_x_2; - typedef typename R::Equal_z_3 Equal_y_2; - static typename R::FT x(const typename R::Point_3& p) {return p.x();} - static typename R::FT y(const typename R::Point_3& p) {return p.z();} - static const int x_index=0; - static const int y_index=2; + typedef typename R::Less_z_3 Less_x_2; + typedef typename R::Less_x_3 Less_y_2; + typedef typename R::Compare_z_3 Compare_x_2; + typedef typename R::Compare_x_3 Compare_y_2; + typedef typename R::Equal_z_3 Equal_x_2; + typedef typename R::Equal_x_3 Equal_y_2; + static typename R::FT x(const typename R::Point_3& p) {return p.z();} + static typename R::FT y(const typename R::Point_3& p) {return p.x();} + static const int x_index=2; + static const int y_index=0; }; + //project onto xy template struct Projector @@ -90,11 +90,16 @@ public: typename R::FT x(const Point &p) const { return Projector::x(p); } typename R::FT y(const Point &p) const { return Projector::y(p); } + typename R::Point_2 project(const Point& p) const + { + return typename R::Point_2(x(p),y(p)); + } + CGAL::Orientation operator()(const Point& p, const Point& q, const Point& r) const { - return orientationC2(x(p), y(p), x(q), y(q), x(r), y(r)); + return CGAL::orientation(project(p), project(q), project(r)); } }; @@ -106,15 +111,39 @@ public: typename R::FT x(const Point &p) const { return Projector::x(p); } typename R::FT y(const Point &p) const { return Projector::y(p); } + + typename R::Point_2 project(const Point& p) const + { + return typename R::Point_2(x(p),y(p)); + } CGAL::Oriented_side operator() (const Point &p, const Point &q, const Point &r, const Point &s) const { - return side_of_oriented_circleC2(x(p), y(p), - x(q), y(q), - x(r), y(r), - x(s), y(s)); + return CGAL::side_of_oriented_circle(project(p),project(q),project(r),project(s) ); + } +}; + +template +class Side_of_bounded_circle_projected_3 +{ +public: + typedef typename R::Point_3 Point; + typename R::FT x(const Point &p) const { return Projector::x(p); } + typename R::FT y(const Point &p) const { return Projector::y(p); } + + + typename R::Point_2 project(const Point& p) const + { + return typename R::Point_2(x(p),y(p)); + } + CGAL::Bounded_side operator() (const Point &p, + const Point &q, + const Point &r, + const Point &s) const + { + return CGAL::side_of_bounded_circle(project(p),project(q),project(r),project(s) ); } }; @@ -205,7 +234,18 @@ public: const Segment_2* si=CGAL::object_cast(&o); if (si==NULL) return Object(); FT src[3],tgt[3]; - tgt[dim] = src[dim] = FT(0); //the third coordinate is arbitrarily set to 0 (not used in Constrained DT) + tgt[dim] = src[dim] = FT(0); //the third coordinate is the midpoint between the points on s1 and s2 + + FT z1 = s1.source()[dim] + ( si->source().x()-s1_source.x() ) / (s1_target.x() - s1_source.x()) * ( s1.target()[dim] - s1.source()[dim] ); + FT z2 = s2.source()[dim] + ( si->source().x()-s2_source.x() ) / (s2_target.x() - s2_source.x()) * ( s2.target()[dim] - s2.source()[dim] ); + src[dim] = (z1+z2) / FT(2); + + + z1 = s1.source()[dim] + ( si->target().x()-s1_source.x() ) / (s1_target.x() - s1_source.x()) * ( s1.target()[dim] - s1.source()[dim] ); + z2 = s2.source()[dim] + ( si->target().x()-s2_source.x() ) / (s2_target.x() - s2_source.x()) * ( s2.target()[dim] - s2.source()[dim] ); + tgt[dim] = (z1+z2) / FT(2); + + src[Projector::x_index] = si->source().x(); src[Projector::y_index] = si->source().y(); tgt[Projector::x_index] = si->target().x(); @@ -216,6 +256,7 @@ public: //compute the third coordinate of the projected intersection point onto 3D segments FT z1 = s1.source()[dim] + ( pi->x()-s1_source.x() ) / (s1_target.x() - s1_source.x()) * ( s1.target()[dim] - s1.source()[dim] ); FT z2 = s2.source()[dim] + ( pi->x()-s2_source.x() ) / (s2_target.x() - s2_source.x()) * ( s2.target()[dim] - s2.source()[dim] ); + coords[dim] = (z1+z2) / FT(2); coords[Projector::x_index] = pi->x(); coords[Projector::y_index] = pi->y(); @@ -284,9 +325,9 @@ public: }; template < class R, int dim > -class Triangulation_euclidean_traits_projected_3 { +class Projection_traits_3 { public: - typedef Triangulation_euclidean_traits_projected_3 Traits; + typedef Projection_traits_3 Traits; typedef R Rp; typedef typename R::FT FT; typedef typename Rp::Point_3 Point_2; @@ -300,12 +341,39 @@ public: typedef typename Projector::Compare_y_2 Compare_y_2; typedef Orientation_projected_3 Orientation_2; typedef Side_of_oriented_circle_projected_3 Side_of_oriented_circle_2; + typedef Side_of_bounded_circle_projected_3 Side_of_bounded_circle_2; typedef Compare_distance_projected_3 Compare_distance_2; typedef Squared_distance_projected_3 Compute_squared_distance_2; typedef Intersect_projected_3 Intersect_2; typedef typename Rp::Construct_segment_3 Construct_segment_2; typedef typename Rp::Construct_triangle_3 Construct_triangle_2; typedef typename Rp::Construct_line_3 Construct_line_2; + typedef typename Rp::Compute_squared_radius_3 Compute_squared_radius_2; + + struct Less_xy_2 { + bool operator()(const Point_2& p, const Point_2& q) const + { + Compare_x_2 cx; + Comparison_result crx = cx(p,q); + if(crx == SMALLER){ return true;} + if(crx == LARGER){return false;} + Less_y_2 ly; + return ly(p,q); + } + }; + + + struct Less_yx_2 { + bool operator()(const Point_2& p, const Point_2& q) const + { + Compare_y_2 cy; + Comparison_result cry = cy(p,q); + if(cry == SMALLER){ return true;} + if(cry == LARGER){return false;} + Less_x_2 lx; + return lx(p,q); + } + }; //for natural_neighbor_coordinates_2 typedef typename Projector::Equal_x_2 Equal_x_2; @@ -320,11 +388,11 @@ public: typedef Segment_2 Segment; typedef Triangle_2 Triangle; - Triangulation_euclidean_traits_projected_3(){} - Triangulation_euclidean_traits_projected_3( - const Triangulation_euclidean_traits_projected_3&){} - Triangulation_euclidean_traits_projected_3 &operator=( - const Triangulation_euclidean_traits_projected_3&){return *this;} + Projection_traits_3(){} + Projection_traits_3( + const Projection_traits_3&){} + Projection_traits_3 &operator=( + const Projection_traits_3&){return *this;} typename Rp::FT x(const Point_2 &p) const { return Projector::x(p); } typename Rp::FT y(const Point_2 &p) const { return Projector::y(p); } @@ -334,10 +402,13 @@ public: less_x_2_object() const { return Less_x_2();} + Less_xy_2 + less_xy_2_object() const + { return Less_xy_2();} + Less_y_2 less_y_2_object() const { return Less_y_2();} - Compare_x_2 compare_x_2_object() const { return Compare_x_2();} @@ -354,6 +425,10 @@ public: side_of_oriented_circle_2_object() const {return Side_of_oriented_circle_2();} + Side_of_bounded_circle_2 + side_of_bounded_circle_2_object() const + {return Side_of_bounded_circle_2();} + Compare_distance_2 compare_distance_2_object() const { @@ -366,6 +441,12 @@ public: return Compute_squared_distance_2(); } + Compute_squared_radius_2 + compute_squared_radius_2_object () const + { + return Compute_squared_radius_2(); + } + Intersect_2 intersect_2_object () const { @@ -386,4 +467,4 @@ public: } } //namespace CGAL::internal -#endif // CGAL_INTERNAL_TRIANGULATION_EUCLIDEAN_TRAITS_PROJECTED_3_H +#endif // CGAL_INTERNAL_PROJECTION_TRAITS_3_H diff --git a/Polygon/doc_tex/Polygon/polygon.tex b/Polygon/doc_tex/Polygon/polygon.tex index 924ebde8357..c662d882aaf 100644 --- a/Polygon/doc_tex/Polygon/polygon.tex +++ b/Polygon/doc_tex/Polygon/polygon.tex @@ -30,9 +30,11 @@ points, but little more. Especially, computed values are not cached. That is, when the \ccc{is_simple()} member function is called twice or more, the result is computed each time anew. -\section{Example} +\section{Examples} -The following code fragment creates a polygon and does some checks. +\subsection{The Polygon Class} + +The following example creates a polygon and illustrates the usage of some member functions. \ccIncludeExampleCode{Polygon/Polygon.cpp} @@ -51,4 +53,23 @@ The following code fragment creates a polygon and does some checks. \label{I1_Fig_a_polygon}} \end{figure} +\subsection{Algorithms Operating on Sequences of Points} + +The following example creates a polygon and illustrates the usage of some +global functions that operate on sequences of points. + \ccIncludeExampleCode{Polygon/polygon_algorithms.cpp} + + +\subsection{Polygons in 3D Space} + +Sometimes it is useful to run a 2D algorithm on 3D data. +Polygons may be contours of a 3D object, where the contours +are organized in parallel slices, generated by segmentation +of image data from a scanner. + +In order to avoid an explixit projection on the \ccc{xy} +plane, one can use the traits class \ccc{Projection_traits_xy_3} +which is part of the 2D and 3D Linear Geometric Kernel, + +\ccIncludeExampleCode{Polygon/projected_polygon.cpp} diff --git a/Polygon/doc_tex/Polygon_ref/PolygonTraits_2.tex b/Polygon/doc_tex/Polygon_ref/PolygonTraits_2.tex index c22d8de9e12..171dbef9e36 100644 --- a/Polygon/doc_tex/Polygon_ref/PolygonTraits_2.tex +++ b/Polygon/doc_tex/Polygon_ref/PolygonTraits_2.tex @@ -71,9 +71,10 @@ types must exist. \ccHasModels -The kernels supplied by \cgal\ are models of \ccRefName. - -\ccRefConceptPage{Projection_traits_xy_3} +The kernels supplied by \cgal\ are models of \ccRefName. \\ +\ccRefConceptPage{CGAL::Projection_traits_xy_3}\\ +\ccc{CGAL::Projection_traits_yz_3}\\ +\ccc{CGAL::Projection_traits_zx_3} \ccSeeAlso diff --git a/Polygon/examples/Polygon/projected_polygon.cpp b/Polygon/examples/Polygon/projected_polygon.cpp new file mode 100644 index 00000000000..2cee3375ac0 --- /dev/null +++ b/Polygon/examples/Polygon/projected_polygon.cpp @@ -0,0 +1,15 @@ +#include +#include +#include + +typedef CGAL::Exact_predicates_inexact_constructions_kernel K; +typedef K::Point_3 Point_3; + +int main() +{ + Point_3 points[4] = { Point_3(0,1,1), Point_3(0,2,1), Point_3(0,2,2), Point_3(0,1,2) }; + bool b = CGAL::is_simple_2(points, + points+4, + CGAL::Projection_traits_yz_3()); + return 0; +} diff --git a/Triangulation_2/doc_tex/Triangulation_2/triangulation_user.tex b/Triangulation_2/doc_tex/Triangulation_2/triangulation_user.tex index 4b5ee67ce4b..43f344c0026 100644 --- a/Triangulation_2/doc_tex/Triangulation_2/triangulation_user.tex +++ b/Triangulation_2/doc_tex/Triangulation_2/triangulation_user.tex @@ -662,6 +662,10 @@ terrain model. The points have elevation, that is they are 3D points, but the predicates used to build the Delaunay triangulation are computed using only the $x$ and $y$ coordinates of these points. + +The class \ccc{Projection_traits_xy_3} is part of the 2D and 3D Linear Geometric Kernel, +and replaces the class \ccc{Triangulation_euclidean_traits_xy_3} which is deprecated. + \ccIncludeExampleCode{Triangulation_2/terrain.cpp} \subsection{Example: Voronoi Diagram\label{Subsection_2D_Triangulations_Voronoi}} diff --git a/Triangulation_2/doc_tex/Triangulation_2_ref/ConstrainedTriangulationTraits_2.tex b/Triangulation_2/doc_tex/Triangulation_2_ref/ConstrainedTriangulationTraits_2.tex index d6766952c5f..e6ddf60f628 100644 --- a/Triangulation_2/doc_tex/Triangulation_2_ref/ConstrainedTriangulationTraits_2.tex +++ b/Triangulation_2/doc_tex/Triangulation_2_ref/ConstrainedTriangulationTraits_2.tex @@ -78,9 +78,14 @@ the intersection tag is \ccc{Exact_predicates_tag}.} \ccHasModels The kernels of \cgal\ are models for this traits class.\\ -\ccc{Triangulation_euclidean_traits_xy}\\ -\ccc{Triangulation_euclidean_traits_yz}\\ -\ccc{Triangulation_euclidean_traits_xz} +\ccRefIdfierPage{CGAL::Projection_traits_xy_3}\\ +\ccc{CGAL::Projection_traits_yz_3}\\ +\ccc{CGAL::Projection_traits_zx_3} +\begin{ccDeprecated} +\ccRefIdfierPage{CGAL::Triangulation_euclidean_traits_xy_3}, \\ +\ccc{CGAL::Triangulation_euclidean_traits_yz_3}, \\ +\ccc{CGAL::Triangulation_euclidean_traits_zx_3}. +\end{ccDeprecated} \ccSeeAlso diff --git a/Triangulation_2/doc_tex/Triangulation_2_ref/DelaunayTriangulationTraits_2.tex b/Triangulation_2/doc_tex/Triangulation_2_ref/DelaunayTriangulationTraits_2.tex index 5110287c5f9..4ce4ecb6514 100644 --- a/Triangulation_2/doc_tex/Triangulation_2_ref/DelaunayTriangulationTraits_2.tex +++ b/Triangulation_2/doc_tex/Triangulation_2_ref/DelaunayTriangulationTraits_2.tex @@ -128,11 +128,16 @@ compare_distance_2_object();} {} \cgal\ kernels\\ \ccc{CGAL::Triangulation_euclidean_traits_2}. -The following traits class provide everything except types and member -functions required for the dual Voronoi diagram~;\\ -\ccc{CGAL::Triangulation_euclidean_traits_xy_3}, \\ -\ccc{CGAL::Triangulation_euclidean_traits_yz_3}, \\ -\ccc{CGAL::Triangulation_euclidean_traits_zx_3}. +The following traits classes provide everything except types and member +functions required for the dual Voronoi diagram:\\ +\ccRefIdfierPage{CGAL::Projection_traits_xy_3}\\ +\ccc{CGAL::Projection_traits_yz_3}\\ +\ccc{CGAL::Projection_traits_zx_3} +\begin{ccDeprecated} +\ccRefIdfierPage{CGAL::Triangulation_euclidean_traits_xy_3}, \\ +\ccc{CGAL::Triangulation_euclidean_traits_yz_3}, \\ +\ccc{CGAL::Triangulation_euclidean_traits_zx_3}. +\end{ccDeprecated} \ccSeeAlso \ccc{TriangulationTraits_2} diff --git a/Triangulation_2/doc_tex/Triangulation_2_ref/TriangulationTraits_2.tex b/Triangulation_2/doc_tex/Triangulation_2_ref/TriangulationTraits_2.tex index bff8ca5d9bc..40d1165176c 100644 --- a/Triangulation_2/doc_tex/Triangulation_2_ref/TriangulationTraits_2.tex +++ b/Triangulation_2/doc_tex/Triangulation_2_ref/TriangulationTraits_2.tex @@ -142,10 +142,15 @@ called.} \ccHasModels All the CGAL Kernels \\ -\ccc{CGAL::Triangulation_euclidean_traits_2} \\ -\ccc{CGAL::Triangulation_euclidean_traits_xy_3} \\ -\ccc{CGAL::Triangulation_euclidean_traits_yz_3} \\ -\ccc{CGAL::Triangulation_euclidean_traits_zx_3} \\ +\ccRefIdfierPage{CGAL::Triangulation_euclidean_traits_2} \\ +\ccRefIdfierPage{CGAL::Projection_traits_xy_3}\\ +\ccc{CGAL::Projection_traits_yz_3}\\ +\ccc{CGAL::Projection_traits_zx_3} +\begin{ccDeprecated} +\ccRefIdfierPage{CGAL::Triangulation_euclidean_traits_xy_3}, \\ +\ccc{CGAL::Triangulation_euclidean_traits_yz_3}, \\ +\ccc{CGAL::Triangulation_euclidean_traits_zx_3}. +\end{ccDeprecated} \ccSeeAlso \ccc{CGAL::Triangulation_2} diff --git a/Triangulation_2/doc_tex/Triangulation_2_ref/Triangulation_euclidean_traits_xy_3.tex b/Triangulation_2/doc_tex/Triangulation_2_ref/Triangulation_euclidean_traits_xy_3.tex index 6b9269cf704..49e5dc0059e 100644 --- a/Triangulation_2/doc_tex/Triangulation_2_ref/Triangulation_euclidean_traits_xy_3.tex +++ b/Triangulation_2/doc_tex/Triangulation_2_ref/Triangulation_euclidean_traits_xy_3.tex @@ -13,6 +13,11 @@ \begin{ccRefClass}{Triangulation_euclidean_traits_xy_3} %% add template arg's if necessary +\begin{ccDeprecated} +The functionality of this class has been generalized to other packages than 2D triangulations. +The more general class \ccc{Projection_traits_xy_3} can be found in the 2D and 3D Linear Geometric Kernel. +\end{ccDeprecated} + %% \ccHtmlCrossLink{} %% add further rules for cross referencing links %% \ccHtmlIndexC[class]{} %% add further index entries \ccCreationVariable{traits} diff --git a/Triangulation_2/examples/Triangulation_2/terrain.cpp b/Triangulation_2/examples/Triangulation_2/terrain.cpp index 4ca1d732672..873eee0b50e 100644 --- a/Triangulation_2/examples/Triangulation_2/terrain.cpp +++ b/Triangulation_2/examples/Triangulation_2/terrain.cpp @@ -1,12 +1,12 @@ #include -#include +#include #include #include typedef CGAL::Exact_predicates_inexact_constructions_kernel K; -typedef CGAL::Triangulation_euclidean_traits_xy_3 Gt; +typedef CGAL::Projection_traits_xy_3 Gt; typedef CGAL::Delaunay_triangulation_2 Delaunay; typedef K::Point_3 Point; diff --git a/Triangulation_2/include/CGAL/Triangulation_euclidean_traits_xy_3.h b/Triangulation_2/include/CGAL/Triangulation_euclidean_traits_xy_3.h index adb9a05ac5c..159b0d9940f 100644 --- a/Triangulation_2/include/CGAL/Triangulation_euclidean_traits_xy_3.h +++ b/Triangulation_2/include/CGAL/Triangulation_euclidean_traits_xy_3.h @@ -20,13 +20,13 @@ #ifndef CGAL_TRIANGULATION_EUCLIDEAN_TRAITS_XY_3_H #define CGAL_TRIANGULATION_EUCLIDEAN_TRAITS_XY_3_H -#include +#include namespace CGAL { template < class R > class Triangulation_euclidean_traits_xy_3 - : public internal::Triangulation_euclidean_traits_projected_3 + : public internal::Projection_traits_3 {}; } //namespace CGAL diff --git a/Triangulation_2/include/CGAL/Triangulation_euclidean_traits_xz_3.h b/Triangulation_2/include/CGAL/Triangulation_euclidean_traits_xz_3.h index 206b34d54e3..bd4e00fde74 100644 --- a/Triangulation_2/include/CGAL/Triangulation_euclidean_traits_xz_3.h +++ b/Triangulation_2/include/CGAL/Triangulation_euclidean_traits_xz_3.h @@ -20,13 +20,12 @@ #ifndef CGAL_TRIANGULATION_EUCLIDEAN_TRAITS_XZ_3_H #define CGAL_TRIANGULATION_EUCLIDEAN_TRAITS_XZ_3_H -#include - +#include namespace CGAL { template < class R > class Triangulation_euclidean_traits_xz_3 - : public internal::Triangulation_euclidean_traits_projected_3 + : public internal::Projection_traits_3 {}; } //namespace CGAL diff --git a/Triangulation_2/include/CGAL/Triangulation_euclidean_traits_yz_3.h b/Triangulation_2/include/CGAL/Triangulation_euclidean_traits_yz_3.h index 809ed3f57e2..b87789864e3 100644 --- a/Triangulation_2/include/CGAL/Triangulation_euclidean_traits_yz_3.h +++ b/Triangulation_2/include/CGAL/Triangulation_euclidean_traits_yz_3.h @@ -20,13 +20,13 @@ #ifndef CGAL_TRIANGULATION_EUCLIDEAN_TRAITS_YZ_3_H #define CGAL_TRIANGULATION_EUCLIDEAN_TRAITS_YZ_3_H -#include +#include namespace CGAL { template < class R > class Triangulation_euclidean_traits_yz_3 - : public internal::Triangulation_euclidean_traits_projected_3 + : public internal::Projection_traits_3 {}; } //namespace CGAL diff --git a/Triangulation_2/test/Triangulation_2/test_triangulation_geom_traits.cpp b/Triangulation_2/test/Triangulation_2/test_triangulation_geom_traits.cpp index 2f2559042c0..ac3fa904514 100644 --- a/Triangulation_2/test/Triangulation_2/test_triangulation_geom_traits.cpp +++ b/Triangulation_2/test/Triangulation_2/test_triangulation_geom_traits.cpp @@ -163,16 +163,16 @@ main() typedef CGAL::Triangulation_euclidean_traits_xz_3 Cls7; typedef Cls7::Point_2 Pt7; Pt7 p7[34] = { - Pt7(1,1,3), Pt7(3,3,5), Pt7(3,6,8), - Pt7(1,4,3), Pt7(3,8,5), Pt7(7,8,5), - Pt7(4,5,4), Pt7(4,1,4), Pt7(2,4,6), - Pt7(1,2,1), Pt7(2,6,2), Pt7(1,2,3), - Pt7(1,4,1), Pt7(2,3,3), Pt7(5,5,0), - Pt7(6,7,0), Pt7(0,2,6), Pt7(3,8,3), - Pt7(91,3,312), Pt7(125,3,300), Pt7(204,3,253), Pt7(324,42,0), - Pt7(91,3,312), Pt7(125,3,300), Pt7(204,3,253), Pt7(326,42,0), - Pt7(91,3,312), Pt7(125,3,300), Pt7(204,3,253), Pt7(325,42,0), - Pt7(91,3,312), Pt7(125,3,300), Pt7(204,3,253), Pt7(0,23,0) + Pt7(3,5,1),Pt7(5,4,3),Pt7(8,1,3), + Pt7(3,6,1),Pt7(5,3,3),Pt7(5,7,7), + Pt7(4,9,4),Pt7(4,4,4),Pt7(6,5,2), + Pt7(1,3,1),Pt7(2,7,2),Pt7(3,2,1), + Pt7(1,4,1),Pt7(3,2,2),Pt7(0,3,5), + Pt7(0,6,6),Pt7(6,1,0),Pt7(3,4,3), + Pt7(312,5,91),Pt7(300,5,125),Pt7(253,5,204),Pt7(0,5,324), + Pt7(312,5,91),Pt7(300,5,125),Pt7(253,5,204),Pt7(0,5,326), + Pt7(312,5,91),Pt7(300,5,125),Pt7(253,5,204),Pt7(0,5,325), + Pt7(312,5,91),Pt7(300,5,125),Pt7(253,5,204),Pt7(0,5,0) }; _test_cls_geom_traits( p7, Cls7() ); @@ -180,16 +180,16 @@ main() typedef CGAL::Triangulation_euclidean_traits_xz_3 Cls8; typedef Cls8::Point_2 Pt8; Pt8 p8[34] = { - Pt8(1,7,3,1), Pt8(6,7,10,2), Pt8(3,7,8,1), - Pt8(1,7,3,1), Pt8(3,7,5,1), Pt8(14,7,10,2), - Pt8(4,7,4,1), Pt8(12,7,12,3), Pt8(2,7,6,1), - Pt8(1,7,1,1), Pt8(2,7,2,1), Pt8(1,7,3,1), - Pt8(1,7,1,1), Pt8(2,7,3,1), Pt8(5,7,0,1), - Pt8(6,7,0,1), Pt8(0,7,6,1), Pt8(6,7,6,2), - Pt8(91,653,312,325), Pt8(125,632,300,325), Pt8(204,632,253,325), Pt8(324,632,0,325), - Pt8(91,632,312,325), Pt8(125,632,300,325), Pt8(204,632,253,325), Pt8(326,632,0,325), - Pt8(91,632,312,325), Pt8(125,632,300,325), Pt8(204,632,253,325), Pt8(1,632,0,1), - Pt8(91,632,312,325), Pt8(125,632,300,325), Pt8(204,632,253,325), Pt8(0,632,0,43) + Pt8(3,6,1,1),Pt8(10,6,6,2),Pt8(8,6,3,1), + Pt8(3,6,1,1),Pt8(5,6,3,1),Pt8(10,6,14,2), + Pt8(4,6,4,1),Pt8(8,6,8,2),Pt8(6,6,2,1), + Pt8(1,6,1,1),Pt8(2,6,2,1),Pt8(3,6,1,1), + Pt8(1,6,1,1),Pt8(3,6,2,1),Pt8(0,6,5,1), + Pt8(0,6,6,1),Pt8(6,6,0,1),Pt8(6,6,6,2), + Pt8(312,234,91,325),Pt8(300,534,125,325),Pt8(253,241,204,325),Pt8(0,214,324,325), + Pt8(312,21,91,325),Pt8(300,534,125,325),Pt8(253,52,204,325),Pt8(0,421,326,325), + Pt8(312,42,91,325),Pt8(300,42,125,325),Pt8(253,542,204,325),Pt8(0,441,1,1), + Pt8(312,534,91,325),Pt8(300,21,125,325),Pt8(253,123,204,325),Pt8(423,0,0,43) }; _test_cls_geom_traits( p8, Cls8() );