diff --git a/Point_set_shape_detection_3/doc/Point_set_shape_detection_3/Concepts/EfficientRANSACTraits.h b/Point_set_shape_detection_3/doc/Point_set_shape_detection_3/Concepts/EfficientRANSACTraits.h index 70510865e62..037bed81038 100644 --- a/Point_set_shape_detection_3/doc/Point_set_shape_detection_3/Concepts/EfficientRANSACTraits.h +++ b/Point_set_shape_detection_3/doc/Point_set_shape_detection_3/Concepts/EfficientRANSACTraits.h @@ -20,10 +20,10 @@ public: /// It must provide `Geom_traits::FT`, `Geom_traits::Point_3` and `Geom_traits::Vector_3`. /// `Geom_traits::FT` must be a floating point number type like `double` or `float`. typedef unspecified_type Geom_traits; - /// Random access iterator used to get the input points and normals. - typedef InputIt Input_iterator; - /// a model of `ReadablePropertyMap` with `Input_iterator` as key type and `Geom_traits::Point_3` as value type - typedef Ppmap Point_map; - /// a model of `ReadablePropertyMap` with `Input_iterator` as key type and `Geom_traits::Vector_3` as value type - typedef Npmap Normal_map; + /// Model of the concept `boost:RandomAccessRange` providing input points and normals. + typedef unspecified_type Input_range; + /// a model of `ReadablePropertyMap` with `Input_range::iterator` as key type and `Geom_traits::Point_3` as value type. + typedef unspecified_type Point_map; + /// a model of `ReadablePropertyMap` with `Input_range::iterator` as key type and `Geom_traits::Vector_3` as value type. + typedef unspecified_type Normal_map; }; diff --git a/Point_set_shape_detection_3/examples/Point_set_shape_detection_3/efficient_RANSAC_basic.cpp b/Point_set_shape_detection_3/examples/Point_set_shape_detection_3/efficient_RANSAC_basic.cpp index d826c65c553..e382f05a8cf 100644 --- a/Point_set_shape_detection_3/examples/Point_set_shape_detection_3/efficient_RANSAC_basic.cpp +++ b/Point_set_shape_detection_3/examples/Point_set_shape_detection_3/efficient_RANSAC_basic.cpp @@ -18,7 +18,7 @@ typedef CGAL::Normal_of_point_with_normal_pmap Normal_map; // In Efficient_RANSAC_traits the basic types, i.e., Point and Vector types // as well as iterator type and property maps, are defined. typedef CGAL::Shape_detection_3::Efficient_RANSAC_traits - Traits; + Traits; typedef CGAL::Shape_detection_3::Efficient_RANSAC Efficient_ransac; typedef CGAL::Shape_detection_3::Plane Plane; diff --git a/Point_set_shape_detection_3/examples/Point_set_shape_detection_3/efficient_RANSAC_parameters.cpp b/Point_set_shape_detection_3/examples/Point_set_shape_detection_3/efficient_RANSAC_parameters.cpp index 4233701e877..5f14d27c6ea 100644 --- a/Point_set_shape_detection_3/examples/Point_set_shape_detection_3/efficient_RANSAC_parameters.cpp +++ b/Point_set_shape_detection_3/examples/Point_set_shape_detection_3/efficient_RANSAC_parameters.cpp @@ -21,7 +21,7 @@ typedef CGAL::Normal_of_point_with_normal_pmap Normal_map; // In Efficient_RANSAC_traits the basic types, i.e., Point and Vector types // as well as iterator type and property maps, are defined. typedef CGAL::Shape_detection_3::Efficient_RANSAC_traits Traits; + Pwn_vector, Point_map, Normal_map> Traits; typedef CGAL::Shape_detection_3::Efficient_RANSAC Efficient_ransac; typedef CGAL::Shape_detection_3::Cone Cone; typedef CGAL::Shape_detection_3::Cylinder Cylinder; diff --git a/Point_set_shape_detection_3/examples/Point_set_shape_detection_3/efficient_RANSAC_point_access.cpp b/Point_set_shape_detection_3/examples/Point_set_shape_detection_3/efficient_RANSAC_point_access.cpp index d83db2fa0bf..d559737e942 100644 --- a/Point_set_shape_detection_3/examples/Point_set_shape_detection_3/efficient_RANSAC_point_access.cpp +++ b/Point_set_shape_detection_3/examples/Point_set_shape_detection_3/efficient_RANSAC_point_access.cpp @@ -21,7 +21,7 @@ typedef CGAL::Normal_of_point_with_normal_pmap Normal_map; // In Efficient_RANSAC_traits the basic types, i.e., Point and Vector types // as well as iterator type and property maps, are defined. typedef CGAL::Shape_detection_3::Efficient_RANSAC_traits Traits; + Pwn_vector, Point_map, Normal_map> Traits; typedef CGAL::Shape_detection_3::Efficient_RANSAC Efficient_ransac; typedef CGAL::Shape_detection_3::Plane Plane; diff --git a/Point_set_shape_detection_3/include/CGAL/Shape_detection_3/Cone.h b/Point_set_shape_detection_3/include/CGAL/Shape_detection_3/Cone.h index cec2dc03a49..65f368d0f73 100644 --- a/Point_set_shape_detection_3/include/CGAL/Shape_detection_3/Cone.h +++ b/Point_set_shape_detection_3/include/CGAL/Shape_detection_3/Cone.h @@ -51,8 +51,6 @@ namespace CGAL { class Cone : public Shape_base { public: /// \cond SKIP_IN_MANUAL - typedef typename Traits::Input_iterator Input_iterator; - ///< random access iterator for input data. typedef typename Traits::Point_map Point_map; ///< property map to access the location of an input point. typedef typename Traits::Normal_map Normal_map; diff --git a/Point_set_shape_detection_3/include/CGAL/Shape_detection_3/Cylinder.h b/Point_set_shape_detection_3/include/CGAL/Shape_detection_3/Cylinder.h index 978b97e7584..af423ebd79f 100644 --- a/Point_set_shape_detection_3/include/CGAL/Shape_detection_3/Cylinder.h +++ b/Point_set_shape_detection_3/include/CGAL/Shape_detection_3/Cylinder.h @@ -49,8 +49,6 @@ namespace CGAL { class Cylinder : public Shape_base { public: /// \cond SKIP_IN_MANUAL - typedef typename Traits::Input_iterator Input_iterator; - ///< random access iterator for input data. typedef typename Traits::Point_map Point_map; ///< property map to access the location of an input point. typedef typename Traits::Normal_map Normal_map; diff --git a/Point_set_shape_detection_3/include/CGAL/Shape_detection_3/Efficient_RANSAC.h b/Point_set_shape_detection_3/include/CGAL/Shape_detection_3/Efficient_RANSAC.h index 685101cc42b..449749630d8 100644 --- a/Point_set_shape_detection_3/include/CGAL/Shape_detection_3/Efficient_RANSAC.h +++ b/Point_set_shape_detection_3/include/CGAL/Shape_detection_3/Efficient_RANSAC.h @@ -88,8 +88,7 @@ shape. The implementation follows \cgalCite{Schnabel07}. /// \name Types /// @{ - typedef typename Traits::Input_iterator Input_iterator; - ///< random access iterator for input data. + typedef typename Traits::Input_range::iterator Input_iterator; typedef typename Traits::Geom_traits::FT FT; ///< number type. typedef typename Traits::Geom_traits::Point_3 Point; ///< point type. typedef typename Traits::Geom_traits::Vector_3 Vector; ///< vector type. @@ -109,7 +108,7 @@ shape. The implementation follows \cgalCite{Schnabel07}. ///< Range of extracted shapes with typ `Shape *`. Model of the `ConstRange` concept. #ifdef DOXYGEN_RUNNING - typedef unspecified_type Point_index_range; ///< Range of indices of points of type `std::size_t` into the provided Input_iterator. Model of the `boost::BidirectionalRange` concept. + typedef unspecified_type Point_index_range; ///< Range of indices of points of type `std::size_t` into the provided input point range. Model of the `boost::BidirectionalRange` concept. #else typedef typename boost::iterator_range @@ -184,10 +183,9 @@ shape. The implementation follows \cgalCite{Schnabel07}. results is required. The data in the input range is reordered during `detect()` and `build_octrees()`. `clear()` is first called by this function. */ - template void set_input_data( - ///< Range of input data providing 'Input_iterator' for random access. Model of the 'boost:RandomAccessRange'. - RandomAccessInputRange &input_range, + ///< Range of input data points. + typename Traits::Input_range& input_range, ///< past-the-end random access iterator over the input points. Point_map point_pmap = Point_map(), ///< property map to access the position of an input point. diff --git a/Point_set_shape_detection_3/include/CGAL/Shape_detection_3/Efficient_RANSAC_traits.h b/Point_set_shape_detection_3/include/CGAL/Shape_detection_3/Efficient_RANSAC_traits.h index 2ef21278caf..34ac1a6f6b6 100644 --- a/Point_set_shape_detection_3/include/CGAL/Shape_detection_3/Efficient_RANSAC_traits.h +++ b/Point_set_shape_detection_3/include/CGAL/Shape_detection_3/Efficient_RANSAC_traits.h @@ -42,14 +42,14 @@ namespace CGAL { `key_type = InputIterator` and `value_type = Gt::Vector_3`. */ template struct Efficient_RANSAC_traits { /// typedef Gt Geom_traits; /// - typedef InputIterator Input_iterator; + typedef InputRange Input_range; /// typedef Ppmap Point_map; /// diff --git a/Point_set_shape_detection_3/include/CGAL/Shape_detection_3/Octree.h b/Point_set_shape_detection_3/include/CGAL/Shape_detection_3/Octree.h index bb49ba1b84e..5d3ce503cec 100644 --- a/Point_set_shape_detection_3/include/CGAL/Shape_detection_3/Octree.h +++ b/Point_set_shape_detection_3/include/CGAL/Shape_detection_3/Octree.h @@ -48,7 +48,7 @@ namespace CGAL { class DirectPointAccessor { public: typedef Sdt Sd_traits; - typedef typename Sd_traits::Input_iterator Input_iterator; + typedef typename Sd_traits::Input_range::iterator Input_iterator; DirectPointAccessor() {} DirectPointAccessor(const Input_iterator &begin, @@ -104,7 +104,7 @@ namespace CGAL { class IndexedPointAccessor { public: typedef Sdt Sd_traits; - typedef typename Sd_traits::Input_iterator Input_iterator; + typedef typename Sd_traits::Input_range::iterator Input_iterator; IndexedPointAccessor() {} IndexedPointAccessor(const Input_iterator &begin, @@ -165,7 +165,7 @@ namespace CGAL { class Octree : public PointAccessor { typedef typename PointAccessor::Sd_traits Sd_traits; - typedef typename Sd_traits::Input_iterator Input_iterator; + typedef typename Sd_traits::Input_range::iterator Input_iterator; typedef Shape_base Shape; typedef typename Sd_traits::Geom_traits::Point_3 Point; typedef typename Sd_traits::Geom_traits::Vector_3 Vector; diff --git a/Point_set_shape_detection_3/include/CGAL/Shape_detection_3/Plane.h b/Point_set_shape_detection_3/include/CGAL/Shape_detection_3/Plane.h index 044d8ff856a..33d57981bd4 100644 --- a/Point_set_shape_detection_3/include/CGAL/Shape_detection_3/Plane.h +++ b/Point_set_shape_detection_3/include/CGAL/Shape_detection_3/Plane.h @@ -38,8 +38,6 @@ namespace CGAL { class Plane : public Shape_base { public: /// \cond SKIP_IN_MANUAL - typedef typename Traits::Input_iterator Input_iterator; - ///< random access iterator for input data. typedef typename Traits::Point_map Point_map; ///< property map to access the location of an input point. typedef typename Traits::Normal_map Normal_map; diff --git a/Point_set_shape_detection_3/include/CGAL/Shape_detection_3/Shape_base.h b/Point_set_shape_detection_3/include/CGAL/Shape_detection_3/Shape_base.h index 124cb4990e8..f9efef94e09 100644 --- a/Point_set_shape_detection_3/include/CGAL/Shape_detection_3/Shape_base.h +++ b/Point_set_shape_detection_3/include/CGAL/Shape_detection_3/Shape_base.h @@ -67,7 +67,7 @@ namespace CGAL { public: /// \cond SKIP_IN_MANUAL - typedef typename Traits::Input_iterator Input_iterator; + typedef typename Traits::Input_range::iterator Input_iterator; ///< random access iterator for input data. typedef typename Traits::Point_map Point_map; ///< property map to access the location of an input point. diff --git a/Point_set_shape_detection_3/include/CGAL/Shape_detection_3/Sphere.h b/Point_set_shape_detection_3/include/CGAL/Shape_detection_3/Sphere.h index d62a8510917..70568da38b0 100644 --- a/Point_set_shape_detection_3/include/CGAL/Shape_detection_3/Sphere.h +++ b/Point_set_shape_detection_3/include/CGAL/Shape_detection_3/Sphere.h @@ -39,8 +39,6 @@ namespace CGAL { class Sphere : public Shape_base { public: /// \cond SKIP_IN_MANUAL - typedef typename Traits::Input_iterator Input_iterator; - ///< random access iterator for input data. typedef typename Traits::Point_map Point_map; ///< property map to access the location of an input point. typedef typename Traits::Normal_map Normal_map; diff --git a/Point_set_shape_detection_3/include/CGAL/Shape_detection_3/Torus.h b/Point_set_shape_detection_3/include/CGAL/Shape_detection_3/Torus.h index 43f2905b337..645c5219b66 100644 --- a/Point_set_shape_detection_3/include/CGAL/Shape_detection_3/Torus.h +++ b/Point_set_shape_detection_3/include/CGAL/Shape_detection_3/Torus.h @@ -42,8 +42,6 @@ namespace CGAL { class Torus : public Shape_base { public: /// \cond SKIP_IN_MANUAL - typedef typename Traits::Input_iterator Input_iterator; - ///< random access iterator for input data. typedef typename Traits::Point_map Point_map; ///< property map to access the location of an input point. typedef typename Traits::Normal_map Normal_map; diff --git a/Polyhedron/demo/Polyhedron/Polyhedron_demo_point_set_shape_detection_plugin.cpp b/Polyhedron/demo/Polyhedron/Polyhedron_demo_point_set_shape_detection_plugin.cpp index 504b418a670..099dfdc2577 100644 --- a/Polyhedron/demo/Polyhedron/Polyhedron_demo_point_set_shape_detection_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Polyhedron_demo_point_set_shape_detection_plugin.cpp @@ -112,7 +112,7 @@ void Polyhedron_demo_point_set_shape_detection_plugin::on_actionDetect_triggered typedef CGAL::Identity_property_map PointPMap; typedef CGAL::Normal_of_point_with_normal_pmap NormalPMap; - typedef CGAL::Shape_detection_3::Efficient_RANSAC_traits Traits; + typedef CGAL::Shape_detection_3::Efficient_RANSAC_traits Traits; typedef CGAL::Shape_detection_3::Efficient_RANSAC Shape_detection; Shape_detection shape_detection;