mirror of https://github.com/CGAL/cgal
Fix spatial_sort
This commit is contained in:
parent
a7b58d60d4
commit
a2f9041d54
|
|
@ -26,6 +26,8 @@
|
||||||
#include <CGAL/spatial_sort.h>
|
#include <CGAL/spatial_sort.h>
|
||||||
#include <CGAL/Spatial_sort_traits_adapter_d.h>
|
#include <CGAL/Spatial_sort_traits_adapter_d.h>
|
||||||
|
|
||||||
|
#include <boost/property_map/function_property_map.hpp>
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
||||||
template< typename RTTraits, typename TDS_ = Default >
|
template< typename RTTraits, typename TDS_ = Default >
|
||||||
|
|
@ -222,11 +224,15 @@ public:
|
||||||
typedef std::vector<Weighted_point> WP_vec;
|
typedef std::vector<Weighted_point> WP_vec;
|
||||||
WP_vec points(start, end);
|
WP_vec points(start, end);
|
||||||
|
|
||||||
// CJTODO à remettre et corriger
|
typedef boost::function_property_map<
|
||||||
/*typedef CGAL::Spatial_sort_traits_adapter_d<
|
typename Geom_traits::Point_drop_weight_d,
|
||||||
Geom_traits, typename Geom_traits::Point_drop_weight_d> Search_traits_d;
|
Point,
|
||||||
Search_traits_d st_d(geom_traits().point_drop_weight_d_object());
|
Bare_point> Drop_weight_pmap;
|
||||||
spatial_sort(points.begin(), points.end(), st_d);*/
|
typedef CGAL::Spatial_sort_traits_adapter_d<
|
||||||
|
typename Geom_traits::Base, Drop_weight_pmap> Search_traits_d;
|
||||||
|
Search_traits_d st_d(boost::make_function_property_map<Point>(
|
||||||
|
geom_traits().point_drop_weight_d_object()));
|
||||||
|
spatial_sort(points.begin(), points.end(), st_d);
|
||||||
|
|
||||||
Full_cell_handle hint;
|
Full_cell_handle hint;
|
||||||
for(typename WP_vec::const_iterator p = points.begin(); p != points.end(); ++p )
|
for(typename WP_vec::const_iterator p = points.begin(); p != points.end(); ++p )
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue