mirror of https://github.com/CGAL/cgal
Merge remote-tracking branch 'cgal/6.0.x-branch' into cgal/master
This commit is contained in:
commit
b6719fc3be
|
|
@ -45,6 +45,7 @@
|
|||
|
||||
#include <boost/mpl/has_xxx.hpp>
|
||||
#include <boost/graph/graph_traits.hpp>
|
||||
#include <boost/range/has_range_iterator.hpp>
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
|
|
@ -69,6 +70,8 @@ template<class VertexPointMap,class Base_traits> class Extreme_points_traits_ada
|
|||
namespace Convex_hull_3 {
|
||||
namespace internal {
|
||||
|
||||
BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(Has_nested_type_Collinear_3, Collinear_3, false)
|
||||
|
||||
// wrapper used as a MutableFaceGraph to extract extreme points
|
||||
template <class OutputIterator>
|
||||
struct Output_iterator_wrapper
|
||||
|
|
@ -993,7 +996,8 @@ void convex_hull_3(InputIterator first, InputIterator beyond,
|
|||
template <class InputIterator, class PolygonMesh, class Traits>
|
||||
void convex_hull_3(InputIterator first, InputIterator beyond,
|
||||
PolygonMesh& polyhedron,
|
||||
const Traits& traits)
|
||||
const Traits& traits,
|
||||
std::enable_if_t<Convex_hull_3::internal::Has_nested_type_Collinear_3<Traits>::value>* = 0)
|
||||
{
|
||||
typedef typename Traits::Point_3 Point_3;
|
||||
typedef std::list<Point_3> Point_3_list;
|
||||
|
|
|
|||
|
|
@ -372,6 +372,35 @@ public:
|
|||
}
|
||||
}; // end class Less_xy_along_axis
|
||||
|
||||
template <class Traits>
|
||||
class Compare_xy_along_axis
|
||||
{
|
||||
// private members
|
||||
typedef typename Traits::Vector_3 Vector_3;
|
||||
typedef typename Traits::Point_2 Point;
|
||||
Vector_3 base1, base2;
|
||||
|
||||
public:
|
||||
Compare_xy_along_axis(const Vector_3& base1, const Vector_3& base2) : base1(base1), base2(base2)
|
||||
{
|
||||
CGAL_PROFILER("Construct Compare_xy_along_axis")
|
||||
CGAL_TIME_PROFILER("Construct Compare_xy_along_axis")
|
||||
}
|
||||
|
||||
typedef Comparison_result result_type;
|
||||
|
||||
Comparison_result operator()(const Point& p, const Point& q) const
|
||||
{
|
||||
Compare_along_axis<Traits> cx(base1);
|
||||
Comparison_result crx = cx(p, q);
|
||||
if (crx != EQUAL) {
|
||||
return crx;
|
||||
}
|
||||
Compare_along_axis<Traits> cy(base2);
|
||||
return cy(p, q);
|
||||
}
|
||||
}; // end class Compare_xy_along_axis
|
||||
|
||||
} // end namespace TriangulationProjectionTraitsCartesianFunctors
|
||||
|
||||
|
||||
|
|
@ -426,12 +455,13 @@ public:
|
|||
typedef typename K::Line_3 Line_2;
|
||||
|
||||
typedef typename K::Angle_3 Angle_2;
|
||||
typedef typename K::Compare_xyz_3 Compare_xy_2;
|
||||
|
||||
typedef TriangulationProjectionTraitsCartesianFunctors::
|
||||
Compare_along_axis<Self> Compare_x_2;
|
||||
typedef TriangulationProjectionTraitsCartesianFunctors::
|
||||
Compare_along_axis<Self> Compare_y_2;
|
||||
typedef TriangulationProjectionTraitsCartesianFunctors::
|
||||
Compare_xy_along_axis<Self> Compare_xy_2;
|
||||
|
||||
typedef TriangulationProjectionTraitsCartesianFunctors::
|
||||
Less_along_axis<Self> Less_x_2;
|
||||
|
|
@ -498,6 +528,12 @@ public:
|
|||
return Compare_y_2(this->base2());
|
||||
}
|
||||
|
||||
Compare_xy_2
|
||||
compare_xy_2_object() const
|
||||
{
|
||||
return Compare_xy_2(this->base1(), this->base2());
|
||||
}
|
||||
|
||||
Orientation_2
|
||||
orientation_2_object() const
|
||||
{
|
||||
|
|
@ -525,9 +561,6 @@ public:
|
|||
Angle_2 angle_2_object() const
|
||||
{return Angle_2();}
|
||||
|
||||
Compare_xy_2 compare_xy_2_object() const
|
||||
{return Compare_xy_2();}
|
||||
|
||||
Construct_point_2 construct_point_2_object() const
|
||||
{return Construct_point_2();}
|
||||
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@
|
|||
#include <CGAL/Real_timer.h>
|
||||
#endif
|
||||
|
||||
#include <boost/range/has_range_iterator.hpp>
|
||||
#include <boost/iterator/transform_iterator.hpp>
|
||||
#include <boost/range/value_type.hpp>
|
||||
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@
|
|||
#include <CGAL/Polygon_mesh_processing/connected_components.h>
|
||||
#include <CGAL/Side_of_triangle_mesh.h>
|
||||
|
||||
#include <boost/range/has_range_iterator.hpp>
|
||||
#include <boost/iterator/function_output_iterator.hpp>
|
||||
|
||||
#include <exception>
|
||||
|
|
|
|||
Loading…
Reference in New Issue