mirror of https://github.com/CGAL/cgal
Merge pull request #2938 from afabri/Triangulation_2-internal-GF
Triangulation_2: Cleanup of include/CGAL
This commit is contained in:
commit
7b01c13f8d
|
|
@ -1,25 +0,0 @@
|
|||
|
||||
namespace CGAL {
|
||||
|
||||
/*!
|
||||
\ingroup PkgTriangulation2TraitsClasses
|
||||
|
||||
\deprecated The class is deprecated since \cgal 4.10, as the weighted point and the function
|
||||
objects for weighted points are part of the concept `Kernel`. The class is kept for backward
|
||||
compatibility, but ignores the template parameter `Weight`.
|
||||
|
||||
\tparam K must be a model of the `Kernel` concept.
|
||||
|
||||
\tparam Weight This template parameter is ignored, as `Kernel::Weighted_point_2`
|
||||
uses the type `Kernel::FT`.
|
||||
|
||||
\cgalModels `RegularTriangulationTraits_2`
|
||||
|
||||
*/
|
||||
template< typename K, typename Weight >
|
||||
class Regular_triangulation_euclidean_traits_2 : public K {
|
||||
public:
|
||||
|
||||
}; /* end Regular_triangulation_euclidean_traits_2 */
|
||||
|
||||
} /* end namespace CGAL */
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
|
||||
namespace CGAL {
|
||||
|
||||
/*!
|
||||
\ingroup PkgTriangulation2TraitsClasses
|
||||
|
||||
\deprecated This class is deprecated, as the predicates and constructions that operate
|
||||
on weighted points are now define in the concept `Kernel`, and are dealt with by filtered kernels.
|
||||
|
||||
*/
|
||||
template< typename FK >
|
||||
class Regular_triangulation_filtered_traits_2 {
|
||||
public:
|
||||
|
||||
/// @}
|
||||
|
||||
}; /* end Regular_triangulation_filtered_traits_2 */
|
||||
} /* end namespace CGAL */
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
|
||||
namespace CGAL {
|
||||
|
||||
/*!
|
||||
\ingroup PkgTriangulation2TraitsClasses
|
||||
|
||||
\deprecated This class is deprecated since \cgal 4.9. Instead of using it, pass directly the kernel.
|
||||
|
||||
|
||||
The class `Triangulation_euclidean_traits_2` can be used to instantiate the geometric traits
|
||||
class of basic and Delaunay triangulations.
|
||||
The template parameter `K` has to
|
||||
be instantiated by a model of the `Kernel` concept.
|
||||
The class `Triangulation_euclidean_traits_2` uses types
|
||||
and predicates defined in `K`.
|
||||
|
||||
\cgalModels `TriangulationTraits_2`
|
||||
\cgalModels `DelaunayTriangulationTraits_2`
|
||||
|
||||
\sa `TriangulationTraits_2`
|
||||
\sa `DelaunayTriangulationTraits_2`
|
||||
\sa `CGAL::Triangulation_2<Traits,Tds>`
|
||||
\sa `CGAL::Delaunay_triangulation_2<Traits,Tds>`
|
||||
\sa `CGAL::Projection_traits_xy_3<K>`
|
||||
\sa `CGAL::Projection_traits_xz_3<K>`
|
||||
\sa `CGAL::Projection_traits_yz_3<K>`
|
||||
|
||||
*/
|
||||
template< typename K >
|
||||
class Triangulation_euclidean_traits_2 {
|
||||
public:
|
||||
|
||||
/// @}
|
||||
|
||||
}; /* end Triangulation_euclidean_traits_2 */
|
||||
} /* end namespace CGAL */
|
||||
|
|
@ -1,83 +0,0 @@
|
|||
|
||||
namespace CGAL {
|
||||
|
||||
/*!
|
||||
\ingroup PkgTriangulation2Miscellaneous
|
||||
|
||||
\deprecated This class is deprecated, as 2D and 3D weighted point classes are now part of the concept `Kernel`.
|
||||
|
||||
|
||||
The class `Weighted_point` provides a type associating
|
||||
a point type `Pt` with a weight type `Wt`.
|
||||
It was used in the traits classes `Regular_triangulation_euclidean_traits_2`
|
||||
and `Regular_triangulation_euclidean_traits_3`, which are now also deprecated.
|
||||
|
||||
\sa `CGAL::Regular_triangulation_euclidean_traits_2<Rep,Weight>`
|
||||
\sa `CGAL::Regular_triangulation_euclidean_traits_3<R,Weight>`
|
||||
|
||||
*/
|
||||
template< typename Pt, typename Wt >
|
||||
class Weighted_point : public Pt {
|
||||
public:
|
||||
|
||||
/// \name Types
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
The point type
|
||||
*/
|
||||
Pt Point;
|
||||
|
||||
/*!
|
||||
The weight type.
|
||||
*/
|
||||
Wt Weight;
|
||||
|
||||
/// @}
|
||||
|
||||
/// \name Creation
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
copy constructor.
|
||||
*/
|
||||
Weighted_point(Weighted_point wq);
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
Weighted_point(Point p=Point(), Weight w= Weight(0));
|
||||
|
||||
/*!
|
||||
Constructs the point from `x`
|
||||
and `y` coordinates, with a weight of 0. Requires that the ambient
|
||||
dimension be 2.
|
||||
*/
|
||||
Weighted_point(FT x, FT y);
|
||||
|
||||
/*!
|
||||
Constructs the point from
|
||||
`x`, `y` and `z` coordinates, with a weight of 0. Requires that
|
||||
the ambient dimension be 3.
|
||||
*/
|
||||
Weighted_point(FT x, FT y, FT z);
|
||||
|
||||
/// @}
|
||||
|
||||
/// \name Access Functions
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
Point point() const;
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
Weight weight() const;
|
||||
|
||||
/// @}
|
||||
|
||||
}; /* end Weighted_point */
|
||||
} /* end namespace CGAL */
|
||||
|
|
@ -6,9 +6,6 @@
|
|||
/// \ingroup PkgTriangulation2Ref
|
||||
|
||||
|
||||
/// \defgroup PkgTriangulation2TraitsClasses Traits Classes
|
||||
/// \ingroup PkgTriangulation2Ref
|
||||
|
||||
/// \defgroup PkgTriangulation2VertexFaceClasses Vertex and Face Classes
|
||||
/// \ingroup PkgTriangulation2Ref
|
||||
|
||||
|
|
@ -95,9 +92,6 @@ are described in Chapter \ref PkgTDS2Ref "2D Triangulation Data Structure".
|
|||
- `CGAL::Constrained_triangulation_plus_2<Tr>`
|
||||
- `CGAL::Triangulation_hierarchy_2<Tr>`
|
||||
|
||||
- `CGAL::Regular_triangulation_euclidean_traits_2<K,Weight>`
|
||||
- `CGAL::Regular_triangulation_filtered_traits_2<FK>`
|
||||
|
||||
- `CGAL::Triangulation_face_base_2<Traits,Fb>`
|
||||
- `CGAL::Triangulation_vertex_base_2<Traits,Vb>`
|
||||
- `CGAL::Regular_triangulation_face_base_2<Traits,Fb>`
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
#include <CGAL/triangulation_assertions.h>
|
||||
#include <CGAL/Polygon_2.h>
|
||||
#include <CGAL/Polyline_constraint_hierarchy_2.h>
|
||||
#include <CGAL/Triangulation_2/internal/Polyline_constraint_hierarchy_2.h>
|
||||
#include <boost/tuple/tuple.hpp>
|
||||
|
||||
#include <CGAL/Default.h>
|
||||
|
|
|
|||
|
|
@ -1,106 +0,0 @@
|
|||
// Copyright (c) 1997 INRIA Sophia-Antipolis (France).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org).
|
||||
// You can redistribute it and/or modify it under the terms of the GNU
|
||||
// General Public License as published by the Free Software Foundation,
|
||||
// either version 3 of the License, or (at your option) any later version.
|
||||
//
|
||||
// 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$
|
||||
// SPDX-License-Identifier: GPL-3.0+
|
||||
//
|
||||
//
|
||||
// Author(s) : Mariette Yvinec
|
||||
// Sylvain Pion
|
||||
|
||||
#ifndef CGAL_DISTANCE_2_H
|
||||
#define CGAL_DISTANCE_2_H
|
||||
|
||||
#include <CGAL/license/Triangulation_2.h>
|
||||
|
||||
|
||||
#include <CGAL/assertions.h>
|
||||
#include <CGAL/distance_predicates_2.h>
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
template <class I>
|
||||
struct Distance_2
|
||||
{
|
||||
typedef typename I::Point Point;
|
||||
|
||||
Distance_2(const I* = NULL) {}
|
||||
|
||||
Distance_2(const Point& p0, const I* = NULL)
|
||||
{ p[0]=p0; }
|
||||
|
||||
Distance_2(const Point& p0, const Point& p1, const I* = NULL)
|
||||
{ p[0]=p0; p[1]=p1; }
|
||||
|
||||
Distance_2(const Point& p0, const Point& p1, const Point& p2,
|
||||
const I* = NULL)
|
||||
{ p[0]=p0; p[1]=p1; p[2]=p2; }
|
||||
|
||||
void set_point(int i, const Point& q)
|
||||
{
|
||||
CGAL_precondition( ((unsigned int) i) < 3 );
|
||||
p[i] = q;
|
||||
}
|
||||
|
||||
Point get_point(int i) const
|
||||
{
|
||||
CGAL_precondition( ((unsigned int) i) < 3 );
|
||||
return p[i];
|
||||
}
|
||||
|
||||
Comparison_result compare() const
|
||||
{
|
||||
return cmp_dist_to_point(p[0], p[1], p[2]);
|
||||
}
|
||||
|
||||
private:
|
||||
Point p[3];
|
||||
};
|
||||
|
||||
template <class Traits>
|
||||
struct Distance_xy_3 : public Distance_2<Traits>
|
||||
{
|
||||
typedef typename Distance_2<Traits>::Point Point;
|
||||
|
||||
public:
|
||||
Distance_xy_3(const Point& p0,
|
||||
const Traits* traits = NULL)
|
||||
: Distance_2<Traits>(p0, traits) { }
|
||||
|
||||
|
||||
Distance_xy_3(const Point& p0,
|
||||
const Point& p1,
|
||||
const Traits* traits = NULL)
|
||||
: Distance_2<Traits>(p0,p1,traits) { }
|
||||
|
||||
Distance_xy_3(const Point& p0,
|
||||
const Point& p1,
|
||||
const Point& p2,
|
||||
const Traits* traits = NULL)
|
||||
: Distance_2<Traits>(p0,p1,p2,traits) { }
|
||||
|
||||
Comparison_result
|
||||
compare() const
|
||||
{
|
||||
Point p0 = this->get_point(0);
|
||||
Point p1 = this->get_point(1);
|
||||
Point p2 = this->get_point(2);
|
||||
return cmp_dist_to_pointC2(x(p0),y(p0),x(p1),y(p1),x(p2),y(p2));
|
||||
}
|
||||
};
|
||||
|
||||
} //namespace CGAL
|
||||
|
||||
#endif // CGAL_DISTANCE_2_H
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
// Copyright (c) 1997 INRIA Sophia-Antipolis (France).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org).
|
||||
// You can redistribute it and/or modify it under the terms of the GNU
|
||||
// General Public License as published by the Free Software Foundation,
|
||||
// either version 3 of the License, or (at your option) any later version.
|
||||
//
|
||||
// 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$
|
||||
// SPDX-License-Identifier: GPL-3.0+
|
||||
//
|
||||
// Author(s) : Mariette Yvinec <Mariette.Yvinec@sophia.inria.fr>
|
||||
// Sylvain Pion
|
||||
|
||||
#ifndef CGAL_REGULAR_TRIANGULATION_EUCLIDEAN_TRAITS_2_H
|
||||
#define CGAL_REGULAR_TRIANGULATION_EUCLIDEAN_TRAITS_2_H
|
||||
|
||||
#include <CGAL/license/Triangulation_2.h>
|
||||
|
||||
#define CGAL_DEPRECATED_HEADER "<CGAL/Regular_triangulation_euclidean_traits_2.h>"
|
||||
#define CGAL_DEPRECATED_MESSAGE_DETAILS \
|
||||
"The kernel K can be used directly as traits since weighted points and "\
|
||||
"the associated function objects are now part of the concept Kernel."
|
||||
#include <CGAL/internal/deprecation_warning.h>
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
template < class K, class W = typename K::RT>
|
||||
class Regular_triangulation_euclidean_traits_2
|
||||
: public K
|
||||
{
|
||||
public:
|
||||
Regular_triangulation_euclidean_traits_2() {}
|
||||
Regular_triangulation_euclidean_traits_2(const K& k) : K(k) {}
|
||||
};
|
||||
|
||||
} //namespace CGAL
|
||||
|
||||
#endif // CGAL_REGULAR_TRIANGULATION_EUCLIDEAN_TRAITS_2_H
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
// Copyright (c) 2004 INRIA Sophia-Antipolis (France).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org).
|
||||
// You can redistribute it and/or modify it under the terms of the GNU
|
||||
// General Public License as published by the Free Software Foundation,
|
||||
// either version 3 of the License, or (at your option) any later version.
|
||||
//
|
||||
// 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$
|
||||
// SPDX-License-Identifier: GPL-3.0+
|
||||
//
|
||||
//
|
||||
// Author(s) : Sylvain Pion
|
||||
|
||||
// kept for backward compatibility
|
||||
|
|
@ -41,7 +41,7 @@
|
|||
#include <CGAL/Triangulation_data_structure_2.h>
|
||||
#include <CGAL/Triangulation_vertex_base_2.h>
|
||||
#include <CGAL/Triangulation_face_base_2.h>
|
||||
#include <CGAL/Triangulation_line_face_circulator_2.h>
|
||||
#include <CGAL/Triangulation_2/internal/Triangulation_line_face_circulator_2.h>
|
||||
#include <CGAL/spatial_sort.h>
|
||||
#include <CGAL/Spatial_sort_traits_adapter_2.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
#include <CGAL/license/Triangulation_2.h>
|
||||
|
||||
|
||||
#include <CGAL/internal/Triangulation_2_projection_traits_base_3.h>
|
||||
#include <CGAL/Triangulation_2/internal/Triangulation_2_projection_traits_base_3.h>
|
||||
#include <CGAL/Filtered_predicate_with_state.h>
|
||||
|
||||
namespace CGAL {
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
// Copyright (c) 2009 GeometryFactory (France)
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org).
|
||||
// You can redistribute it and/or modify it under the terms of the GNU
|
||||
// General Public License as published by the Free Software Foundation,
|
||||
// either version 3 of the License, or (at your option) any later version.
|
||||
//
|
||||
// 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$
|
||||
// SPDX-License-Identifier: GPL-3.0+
|
||||
//
|
||||
//
|
||||
// Author(s) : Laurent Rineau
|
||||
|
||||
|
||||
#ifndef CGAL_TRIANGULATION_2_FILTERED_PROJECTION_TRAITS_3_H
|
||||
#define CGAL_TRIANGULATION_2_FILTERED_PROJECTION_TRAITS_3_H
|
||||
|
||||
#include <CGAL/license/Triangulation_2.h>
|
||||
|
||||
#define CGAL_DEPRECATED_HEADER "<CGAL/Triangulation_2_filtered_projection_traits_3.h>"
|
||||
#define CGAL_REPLACEMENT_HEADER "<CGAL/Triangulation_2_projection_traits_3.h>"
|
||||
#include <CGAL/internal/deprecation_warning.h>
|
||||
|
||||
#include <CGAL/Triangulation_2_projection_traits_3.h>
|
||||
|
||||
#endif // CGAL_TRIANGULATION_2_FILTERED_PROJECTION_TRAITS_3_H
|
||||
|
|
@ -26,7 +26,7 @@
|
|||
#include <CGAL/license/Triangulation_2.h>
|
||||
|
||||
|
||||
#include <CGAL/internal/Triangulation_2_filtered_projection_traits_3.h>
|
||||
#include <CGAL/Triangulation_2/internal/Triangulation_2_filtered_projection_traits_3.h>
|
||||
|
||||
namespace CGAL{
|
||||
|
||||
|
|
|
|||
|
|
@ -1,140 +0,0 @@
|
|||
// Copyright (c) 1997 INRIA Sophia-Antipolis (France).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org).
|
||||
// You can redistribute it and/or modify it under the terms of the GNU
|
||||
// General Public License as published by the Free Software Foundation,
|
||||
// either version 3 of the License, or (at your option) any later version.
|
||||
//
|
||||
// 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$
|
||||
// SPDX-License-Identifier: GPL-3.0+
|
||||
//
|
||||
//
|
||||
// Author(s) : Mariette Yvinec
|
||||
|
||||
#ifndef CGAL_TRIANGULATION_EUCLIDEAN_TRAITS_2_H
|
||||
#define CGAL_TRIANGULATION_EUCLIDEAN_TRAITS_2_H
|
||||
|
||||
#include <CGAL/license/Triangulation_2.h>
|
||||
|
||||
|
||||
#define CGAL_DEPRECATED_HEADER "<CGAL/Triangulation_euclidean_traits_2.h>"
|
||||
#include <CGAL/internal/deprecation_warning.h>
|
||||
|
||||
#include <CGAL/Point_2.h>
|
||||
#include <CGAL/Segment_2.h>
|
||||
#include <CGAL/Triangle_2.h>
|
||||
#include <CGAL/Line_2.h>
|
||||
#include <CGAL/Ray_2.h>
|
||||
#include <CGAL/predicates_on_points_2.h>
|
||||
#include <CGAL/basic_constructions_2.h>
|
||||
#include <CGAL/distance_predicates_2.h>
|
||||
|
||||
#include <CGAL/triangulation_assertions.h>
|
||||
#include <CGAL/Intersections_2/Segment_2_Segment_2.h>
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
template < class R >
|
||||
class Triangulation_euclidean_traits_2 {
|
||||
public:
|
||||
typedef R Rep;
|
||||
typedef typename R::Point_2 Point_2;
|
||||
typedef typename R::Segment_2 Segment_2;
|
||||
typedef typename R::Triangle_2 Triangle_2;
|
||||
typedef typename R::Line_2 Line_2;
|
||||
typedef typename R::Ray_2 Ray_2;
|
||||
|
||||
typedef typename R::Less_x_2 Less_x_2;
|
||||
typedef typename R::Less_y_2 Less_y_2;
|
||||
typedef typename R::Compare_x_2 Compare_x_2;
|
||||
typedef typename R::Compare_y_2 Compare_y_2;
|
||||
typedef typename R::Orientation_2 Orientation_2;
|
||||
typedef typename R::Side_of_oriented_circle_2 Side_of_oriented_circle_2;
|
||||
typedef typename R::Construct_circumcenter_2 Construct_circumcenter_2;
|
||||
typedef typename R::Construct_bisector_2 Construct_bisector_2;
|
||||
typedef typename R::Compare_distance_2 Compare_distance_2;
|
||||
typedef typename R::Construct_segment_2 Construct_segment_2;
|
||||
typedef typename R::Construct_triangle_2 Construct_triangle_2;
|
||||
typedef typename R::Construct_direction_2 Construct_direction_2;
|
||||
typedef typename R::Construct_ray_2 Construct_ray_2;
|
||||
|
||||
//for natural_neighbor_coordinates_2
|
||||
typedef typename R::FT FT;
|
||||
typedef typename R::Equal_x_2 Equal_x_2;
|
||||
typedef typename R::Compute_area_2 Compute_area_2;
|
||||
Compute_area_2 compute_area_2_object () const {return Compute_area_2();}
|
||||
|
||||
// for compatibility with previous versions
|
||||
typedef Point_2 Point;
|
||||
typedef Segment_2 Segment;
|
||||
typedef Triangle_2 Triangle;
|
||||
typedef Ray_2 Ray;
|
||||
typedef Line_2 Line;
|
||||
|
||||
Triangulation_euclidean_traits_2() {}
|
||||
Triangulation_euclidean_traits_2(const Triangulation_euclidean_traits_2 &) {}
|
||||
Triangulation_euclidean_traits_2 &operator=
|
||||
(const Triangulation_euclidean_traits_2 &)
|
||||
{return *this;}
|
||||
|
||||
Less_x_2
|
||||
less_x_2_object() const
|
||||
{ return Less_x_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();}
|
||||
|
||||
Compare_y_2
|
||||
compare_y_2_object() const
|
||||
{ return Compare_y_2();}
|
||||
|
||||
Orientation_2
|
||||
orientation_2_object() const
|
||||
{ return Orientation_2();}
|
||||
|
||||
Side_of_oriented_circle_2
|
||||
side_of_oriented_circle_2_object() const
|
||||
{return Side_of_oriented_circle_2();}
|
||||
|
||||
Construct_circumcenter_2
|
||||
construct_circumcenter_2_object() const
|
||||
{ return Construct_circumcenter_2();}
|
||||
|
||||
Construct_bisector_2
|
||||
construct_bisector_2_object() const
|
||||
{return Construct_bisector_2();}
|
||||
|
||||
Compare_distance_2
|
||||
compare_distance_2_object() const
|
||||
{return Compare_distance_2();}
|
||||
|
||||
Construct_segment_2 construct_segment_2_object() const
|
||||
{return Construct_segment_2();}
|
||||
|
||||
Construct_triangle_2 construct_triangle_2_object() const
|
||||
{return Construct_triangle_2();}
|
||||
|
||||
Construct_direction_2 construct_direction_2_object() const
|
||||
{return Construct_direction_2();}
|
||||
|
||||
Construct_ray_2 construct_ray_2_object() const
|
||||
{return Construct_ray_2();}
|
||||
|
||||
};
|
||||
|
||||
} //namespace CGAL
|
||||
|
||||
#endif // CGAL_TRIANGULATION_EUCLIDEAN_TRAITS_2_H
|
||||
|
|
@ -1,60 +0,0 @@
|
|||
// Copyright (c) 1997 INRIA Sophia-Antipolis (France).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org).
|
||||
// You can redistribute it and/or modify it under the terms of the GNU
|
||||
// General Public License as published by the Free Software Foundation,
|
||||
// either version 3 of the License, or (at your option) any later version.
|
||||
//
|
||||
// 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$
|
||||
// SPDX-License-Identifier: GPL-3.0+
|
||||
//
|
||||
//
|
||||
// Author(s) : Mariette Yvinec
|
||||
// Menelaos Karavelas <mkaravel@cse.nd.edu>
|
||||
|
||||
#ifndef CGAL_TRIANGULATION_ITERATOR_ADAPTATOR_H
|
||||
#define CGAL_TRIANGULATION_ITERATOR_ADAPTATOR_H
|
||||
|
||||
#include <CGAL/license/Triangulation_2.h>
|
||||
|
||||
|
||||
#include <CGAL/triangulation_assertions.h>
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
template <class Base, class Handle>
|
||||
struct Triangulation_iterator_handle_adaptor
|
||||
: public Base
|
||||
{
|
||||
typedef Triangulation_iterator_handle_adaptor<Base, Handle> Self;
|
||||
Triangulation_iterator_handle_adaptor() : Base() {}
|
||||
|
||||
Triangulation_iterator_handle_adaptor(const Base & b)
|
||||
: Base(b) {}
|
||||
|
||||
// MK: added this to satisfy the mips_CC-7.40 compiler
|
||||
Self& operator=(const Self& other) {
|
||||
static_cast<Base &>(*this) = static_cast<const Base&>(other);
|
||||
return *this;
|
||||
}
|
||||
|
||||
operator Handle() const {return Base::base();}
|
||||
Self& operator++() { Base::operator++(); return *this;}
|
||||
Self& operator--() { Base::operator--(); return *this;}
|
||||
Self operator++(int) { Self tmp(*this); ++(*this); return tmp; }
|
||||
Self operator--(int) { Self tmp(*this); --(*this); return tmp; }
|
||||
};
|
||||
|
||||
|
||||
|
||||
} //namespace CGAL
|
||||
|
||||
#endif //CGAL_TRIANGULATION_ITERATOR_ADAPTATOR_H
|
||||
|
|
@ -1,142 +0,0 @@
|
|||
// Copyright (c) 2002 INRIA Sophia-Antipolis (France).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org).
|
||||
// You can redistribute it and/or modify it under the terms of the GNU
|
||||
// General Public License as published by the Free Software Foundation,
|
||||
// either version 3 of the License, or (at your option) any later version.
|
||||
//
|
||||
// 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$
|
||||
// SPDX-License-Identifier: GPL-3.0+
|
||||
//
|
||||
//
|
||||
// Author(s) : Sylvain Pion
|
||||
|
||||
#ifndef CGAL_TRIVIAL_ITERATOR_H
|
||||
#define CGAL_TRIVIAL_ITERATOR_H
|
||||
|
||||
#include <CGAL/license/Triangulation_2.h>
|
||||
|
||||
|
||||
#include <iterator>
|
||||
#include <CGAL/iterator.h>
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
// TODO :
|
||||
// - comparison operators should be global, but it causes problems...
|
||||
// - Have a look at Boost's concept_checking and archetypes :
|
||||
// https://www.boost.org/libs/concept_check/concept_check.htm
|
||||
|
||||
class Trivial_iterator_tag{};
|
||||
|
||||
|
||||
template <class I>
|
||||
class Trivial_iterator
|
||||
{
|
||||
public:
|
||||
typedef I Iterator;
|
||||
typedef Trivial_iterator<I> Self;
|
||||
typedef typename std::iterator_traits<I>::value_type value_type;
|
||||
typedef typename std::iterator_traits<I>::difference_type difference_type;
|
||||
typedef typename std::iterator_traits<I>::reference reference;
|
||||
typedef typename std::iterator_traits<I>::pointer pointer;
|
||||
typedef Trivial_iterator_tag iterator_category;
|
||||
// Special for circulators.
|
||||
typedef I_Circulator_size_traits<iterator_category,I> C_S_Traits;
|
||||
typedef typename C_S_Traits::size_type size_type;
|
||||
|
||||
|
||||
Trivial_iterator() {}
|
||||
Trivial_iterator(const I &i) : base_(i) {}
|
||||
|
||||
// To allow conversion from iterator to const_iterator.
|
||||
template <class Iter>
|
||||
Trivial_iterator(const Trivial_iterator<Iter> &t)
|
||||
: base_(t.base()) {}
|
||||
|
||||
reference operator*() const { return *base_; }
|
||||
pointer operator->() const { return &*base_; }
|
||||
|
||||
bool operator==(const Trivial_iterator &b) const { return base()==b.base(); }
|
||||
bool operator!=(const Trivial_iterator &b) const { return base()!=b.base(); }
|
||||
|
||||
private:
|
||||
const Iterator & base() const { return base_; }
|
||||
|
||||
Iterator base_;
|
||||
};
|
||||
|
||||
|
||||
|
||||
class Trivial_comparable_iterator_tag{};
|
||||
|
||||
template <class I>
|
||||
class Trivial_comparable_iterator
|
||||
{
|
||||
public:
|
||||
typedef I Iterator;
|
||||
typedef Trivial_comparable_iterator<I> Self;
|
||||
typedef typename std::iterator_traits<I>::value_type value_type;
|
||||
typedef typename std::iterator_traits<I>::difference_type
|
||||
difference_type;
|
||||
typedef typename std::iterator_traits<I>::reference reference;
|
||||
typedef typename std::iterator_traits<I>::pointer pointer;
|
||||
typedef Trivial_comparable_iterator_tag iterator_category;
|
||||
// Special for circulators.
|
||||
typedef I_Circulator_size_traits<iterator_category,I> C_S_Traits;
|
||||
typedef typename C_S_Traits::size_type size_type;
|
||||
|
||||
|
||||
Trivial_comparable_iterator() {}
|
||||
Trivial_comparable_iterator(const I &i) : base_(i) {}
|
||||
|
||||
// To allow conversion from iterator to const_iterator.
|
||||
template <class Iter>
|
||||
Trivial_comparable_iterator(const Trivial_comparable_iterator<Iter> &t)
|
||||
: base_(t.base()) {}
|
||||
|
||||
reference operator*() const { return *base_; }
|
||||
pointer operator->() const { return &*base_; }
|
||||
|
||||
bool operator==(const Trivial_comparable_iterator &b) const
|
||||
{ return base()==b.base(); }
|
||||
bool operator!=(const Trivial_comparable_iterator &b) const
|
||||
{ return base()!=b.base(); }
|
||||
|
||||
bool operator< (const Trivial_comparable_iterator &b) const
|
||||
{ return base()< b.base(); }
|
||||
bool operator> (const Trivial_comparable_iterator &b) const
|
||||
{ return base()> b.base(); }
|
||||
bool operator<=(const Trivial_comparable_iterator &b) const
|
||||
{ return base()<=b.base(); }
|
||||
bool operator>=(const Trivial_comparable_iterator &b) const
|
||||
{ return base()>=b.base(); }
|
||||
|
||||
private:
|
||||
const Iterator & base() const { return base_; }
|
||||
|
||||
Iterator base_;
|
||||
};
|
||||
|
||||
|
||||
// Some macros depending on CGAL_NO_CONCEPT_CHECKING.
|
||||
#ifndef CGAL_NO_CONCEPT_CHECKING
|
||||
# define CGAL_TRIVIAL_ITERATOR_CHECKER(X) CGAL::Trivial_iterator<X>
|
||||
# define CGAL_TRIVIAL_COMPARABLE_ITERATOR_CHECKER(X) \
|
||||
CGAL::Trivial_comparable_iterator<X>
|
||||
#else
|
||||
# define CGAL_TRIVIAL_ITERATOR_CHECKER(X) X
|
||||
# define CGAL_TRIVIAL_COMPARABLE_ITERATOR_CHECKER(X) X
|
||||
#endif
|
||||
|
||||
} //namespace CGAL
|
||||
|
||||
#endif // CGAL_TRIVIAL_ITERATOR_H
|
||||
|
|
@ -1,154 +0,0 @@
|
|||
// Copyright (c) 1999-2004 INRIA Sophia-Antipolis (France).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org).
|
||||
// You can redistribute it and/or modify it under the terms of the GNU
|
||||
// General Public License as published by the Free Software Foundation,
|
||||
// either version 3 of the License, or (at your option) any later version.
|
||||
//
|
||||
// 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$
|
||||
// SPDX-License-Identifier: GPL-3.0+
|
||||
//
|
||||
//
|
||||
// Author(s) : Mariette Yvinec
|
||||
// Sylvain Pion
|
||||
|
||||
#ifndef CGAL_WEIGHTED_POINT_H
|
||||
#define CGAL_WEIGHTED_POINT_H
|
||||
|
||||
#include <CGAL/license/Triangulation_2.h>
|
||||
|
||||
#define CGAL_DEPRECATED_HEADER "<CGAL/Weighted_point.h>"
|
||||
#define CGAL_DEPRECATED_MESSAGE_DETAILS \
|
||||
"Weighted points are now part of the concept Kernel. One should therefore "\
|
||||
"use `CGAL::Weighted_point_2<K>` and `CGAL::Weighted_point_3<K>`."
|
||||
#include <CGAL/internal/deprecation_warning.h>
|
||||
|
||||
#include <CGAL/Kernel_traits.h>
|
||||
#include <CGAL/Dimension.h>
|
||||
#include <CGAL/IO/io.h>
|
||||
#include <iostream>
|
||||
#include <boost/utility/enable_if.hpp>
|
||||
#include <boost/type_traits/is_convertible.hpp>
|
||||
#include <boost/mpl/and.hpp>
|
||||
#include <boost/mpl/bool.hpp>
|
||||
#include <boost/mpl/logical.hpp>
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
template < class Pt, class We >
|
||||
class Weighted_point : public Pt
|
||||
{
|
||||
typedef typename Kernel_traits<Pt>::Kernel::FT FT;
|
||||
public:
|
||||
typedef We Weight;
|
||||
typedef Pt Point;
|
||||
|
||||
Weighted_point ()
|
||||
: Point(), _weight(0) {}
|
||||
|
||||
//explicit
|
||||
Weighted_point (const Point &p)
|
||||
: Point(p), _weight(0)
|
||||
{
|
||||
// CGAL_error_msg( "Warning : truncated weight !!!");
|
||||
}
|
||||
|
||||
Weighted_point (const Point &p, const Weight &w)
|
||||
: Point(p), _weight(w) {}
|
||||
|
||||
|
||||
// Constructors from coordinates are also provided for convenience, except
|
||||
// that they are only from Cartesian coordinates, and with no weight, so as
|
||||
// to avoid any potential ambiguity between the homogeneous weight and the
|
||||
// power weight (it should be easy enough to pass a Point explicitly in those
|
||||
// cases).
|
||||
// The enable_if complexity comes from the fact that we separate dimension 2 and 3.
|
||||
|
||||
template < typename Tx, typename Ty >
|
||||
Weighted_point (const Tx &x, const Ty &y,
|
||||
typename boost::enable_if< boost::mpl::and_<boost::is_convertible<Tx, FT>,
|
||||
boost::is_convertible<Ty, FT>,
|
||||
boost::mpl::bool_<CGAL::Ambient_dimension<Point>::value == 2> > >::type* = 0)
|
||||
: Point(x, y), _weight(0) {}
|
||||
|
||||
template < typename Tx, typename Ty, typename Tz >
|
||||
Weighted_point (const Tx &x, const Ty &y, const Tz &z,
|
||||
typename boost::enable_if< boost::mpl::and_<boost::is_convertible<Tx, FT>,
|
||||
boost::is_convertible<Ty, FT>,
|
||||
boost::is_convertible<Tz, FT>,
|
||||
boost::mpl::bool_<CGAL::Ambient_dimension<Point>::value == 3> > >::type* = 0)
|
||||
: Point(x, y, z), _weight(0) {}
|
||||
|
||||
const Point & point() const
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
|
||||
const Weight & weight() const
|
||||
{
|
||||
return _weight;
|
||||
}
|
||||
|
||||
// The following power() member functions are not used at the moment.
|
||||
// They belong to the traits class anyway.
|
||||
//
|
||||
// Weight power(const Point &p)
|
||||
// {
|
||||
// return squared_distance(*this, p) - weight();
|
||||
// }
|
||||
//
|
||||
// Weight power(const Weighted_point &p)
|
||||
// {
|
||||
// return squared_distance(*this, p) - weight() - p.weight();
|
||||
// }
|
||||
|
||||
private:
|
||||
Weight _weight;
|
||||
};
|
||||
|
||||
|
||||
template < class Point, class Weight >
|
||||
std::ostream &
|
||||
operator<<(std::ostream &os, const Weighted_point<Point,Weight> &p)
|
||||
{
|
||||
switch(get_mode(os))
|
||||
{
|
||||
case IO::ASCII :
|
||||
return os << p.point() << " " << p.weight();
|
||||
case IO::BINARY :
|
||||
os << p.point();
|
||||
write(os, p.weight());
|
||||
return os;
|
||||
default:
|
||||
return os << "Weighted_point(" << p.point() << ", " << p.weight() << ")";
|
||||
}
|
||||
}
|
||||
|
||||
template < class Point, class Weight >
|
||||
std::istream &
|
||||
operator>>(std::istream &is, Weighted_point<Point,Weight> &wp)
|
||||
{
|
||||
Weight w;
|
||||
Point p;
|
||||
is >> p;
|
||||
if(!is) return is;
|
||||
if(is_ascii(is))
|
||||
is >> w;
|
||||
else
|
||||
read(is, w);
|
||||
if (is)
|
||||
wp = Weighted_point<Point,Weight>(p,w);
|
||||
return is;
|
||||
}
|
||||
|
||||
} // namespace CGAL
|
||||
|
||||
#endif // CGAL_WEIGHTED_POINT_H
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
#include <CGAL/Constraint_hierarchy_2.h>
|
||||
#include <CGAL/Triangulation_2/internal/Constraint_hierarchy_2.h>
|
||||
|
||||
struct Less
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,3 @@
|
|||
// This file tests the deprecated headers
|
||||
// Triangulation_euclidean_traits_.._3 on purpose.
|
||||
|
||||
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
||||
#include <CGAL/Projection_traits_xy_3.h>
|
||||
#include <CGAL/Projection_traits_yz_3.h>
|
||||
|
|
|
|||
Loading…
Reference in New Issue