diff --git a/Point_set_shape_detection_3/doc/Point_set_shape_detection_3/PackageDescription.txt b/Point_set_shape_detection_3/doc/Point_set_shape_detection_3/PackageDescription.txt index 237b531d8bc..554729df485 100644 --- a/Point_set_shape_detection_3/doc/Point_set_shape_detection_3/PackageDescription.txt +++ b/Point_set_shape_detection_3/doc/Point_set_shape_detection_3/PackageDescription.txt @@ -35,17 +35,17 @@ - `EfficientRANSACTraits` ## Main Classes ## -- `CGAL::Shape_detection_3::Efficient_RANSAC` +- `CGAL::Shape_detection_3::Efficient_RANSAC` - `CGAL::Shape_detection_3::Efficient_RANSAC_traits` ## Shape Interface ## -- `CGAL::Shape_detection_3::Shape_base` +- `CGAL::Shape_detection_3::Shape_base` ## Shape Classes ## -- `CGAL::Shape_detection_3::Plane` -- `CGAL::Shape_detection_3::Sphere` -- `CGAL::Shape_detection_3::Cylinder` -- `CGAL::Shape_detection_3::Cone` -- `CGAL::Shape_detection_3::Torus` +- `CGAL::Shape_detection_3::Plane` +- `CGAL::Shape_detection_3::Sphere` +- `CGAL::Shape_detection_3::Cylinder` +- `CGAL::Shape_detection_3::Cone` +- `CGAL::Shape_detection_3::Torus` */ diff --git a/Point_set_shape_detection_3/examples/Point_set_shape_detection_3/efficient_RANSAC_custom_shape.h b/Point_set_shape_detection_3/examples/Point_set_shape_detection_3/efficient_RANSAC_custom_shape.h index 513a608bf63..a862246edf1 100644 --- a/Point_set_shape_detection_3/examples/Point_set_shape_detection_3/efficient_RANSAC_custom_shape.h +++ b/Point_set_shape_detection_3/examples/Point_set_shape_detection_3/efficient_RANSAC_custom_shape.h @@ -7,14 +7,14 @@ My_Plane derives from Shape_base. The plane is represented by its normal vector and distance to the origin. */ -template -class My_Plane : public CGAL::Shape_detection_3::Shape_base { +template +class My_Plane : public CGAL::Shape_detection_3::Shape_base { public: - typedef typename ERTraits::Geom_traits::FT FT;///< number type. - typedef typename ERTraits::Geom_traits::Point_3 Point;///< point type. + typedef typename Traits::Geom_traits::FT FT;///< number type. + typedef typename Traits::Geom_traits::Point_3 Point;///< point type. public: - My_Plane() : Shape_base() {} + My_Plane() : Shape_base() {} // Computes squared Euclidean distance from query point to the shape. virtual FT squared_distance(const Point &p) const { 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 a49aaac20b7..e5acc9c5c67 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 @@ -43,27 +43,27 @@ namespace CGAL { \brief Cone implements Shape_base. The cone is represented by its apex, the axis and the opening angle. This representation models an open infinite single-cone. - \tparam ERTraits a model of `EfficientRANSACTraits` + \tparam Traits a model of `EfficientRANSACTraits` \ingroup PkgPointSetShapeDetection3Shapes */ - template - class Cone : public Shape_base { + template + class Cone : public Shape_base { public: /// \cond SKIP_IN_MANUAL - typedef typename ERTraits::Input_iterator Input_iterator; + typedef typename Traits::Input_iterator Input_iterator; ///< random access iterator for input data. - typedef typename ERTraits::Point_pmap Point_pmap; + typedef typename Traits::Point_pmap Point_pmap; ///< property map to access the location of an input point. - typedef typename ERTraits::Normal_pmap Normal_pmap; + typedef typename Traits::Normal_pmap Normal_pmap; ///< property map to access the unoriented normal of an input point. - typedef typename ERTraits::Geom_traits::FT FT; ///< number type. - typedef typename ERTraits::Geom_traits::Point_3 Point;///< point type. - typedef typename ERTraits::Geom_traits::Vector_3 Vector;///< vector type. + 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. /// \endcond - Cone() : Shape_base() {} + Cone() : Shape_base() {} /*! The opening angle between the axis and the surface of the cone. 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 5ea37aa3e06..c2fa9af712d 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 @@ -42,28 +42,28 @@ namespace CGAL { \brief Cylinder implements Shape_base. The cylinder is represented by the axis, i.e. a point and direction, and the radius. The cylinder is unbounded, thus caps are not modelled. - \tparam ERTraits a model of `EfficientRANSACTraits` + \tparam Traits a model of `EfficientRANSACTraits` \ingroup PkgPointSetShapeDetection3Shapes */ - template - class Cylinder : public Shape_base { + template + class Cylinder : public Shape_base { public: /// \cond SKIP_IN_MANUAL - typedef typename ERTraits::Input_iterator Input_iterator; + typedef typename Traits::Input_iterator Input_iterator; ///< random access iterator for input data. - typedef typename ERTraits::Point_pmap Point_pmap; + typedef typename Traits::Point_pmap Point_pmap; ///< property map to access the location of an input point. - typedef typename ERTraits::Normal_pmap Normal_pmap; + typedef typename Traits::Normal_pmap Normal_pmap; ///< property map to access the unoriented normal of an input point. - typedef typename ERTraits::Geom_traits::Vector_3 Vector; ///< vector type. - typedef typename ERTraits::Geom_traits::Point_3 Point; ///< point type. - typedef typename ERTraits::Geom_traits::FT FT; ///< number type. + typedef typename Traits::Geom_traits::Vector_3 Vector; ///< vector type. + typedef typename Traits::Geom_traits::Point_3 Point; ///< point type. + typedef typename Traits::Geom_traits::FT FT; ///< number type. /// \endcond - typedef typename ERTraits::Geom_traits::Line_3 Line; ///< line type. + typedef typename Traits::Geom_traits::Line_3 Line; ///< line type. public: - Cylinder() : Shape_base() {} + Cylinder() : Shape_base() {} /*! Axis of the cylinder. 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 d60eda1a94f..d7dedba6325 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 @@ -60,10 +60,10 @@ this classes enables to detect subset of connected points lying on the surface o Each input point is assigned to either none or at most one detected primitive shape. The implementation follows \cgalCite{Schnabel07}. -\tparam ERTraits a model of `EfficientRANSACTraits` +\tparam Traits a model of `EfficientRANSACTraits` */ - template + template class Efficient_RANSAC { public: @@ -88,16 +88,16 @@ shape. The implementation follows \cgalCite{Schnabel07}. /// \name Types /// @{ - typedef typename ERTraits::Input_iterator Input_iterator; + typedef typename Traits::Input_iterator Input_iterator; ///< random access iterator for input data. - typedef typename ERTraits::Geom_traits::FT FT; ///< number type. - typedef typename ERTraits::Geom_traits::Point_3 Point; ///< point type. - typedef typename ERTraits::Geom_traits::Vector_3 Vector; ///< vector type. - typedef typename ERTraits::Point_pmap Point_pmap; + 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. + typedef typename Traits::Point_pmap Point_pmap; ///< property map to access the location of an input point. - typedef typename ERTraits::Normal_pmap Normal_pmap; + typedef typename Traits::Normal_pmap Normal_pmap; ///< property map to access the unoriented normal of an input point - typedef Shape_base Shape; ///< shape type. + typedef Shape_base Shape; ///< shape type. #ifdef DOXYGEN_RUNNING typedef unspecified_type Shape_range; @@ -141,9 +141,9 @@ shape. The implementation follows \cgalCite{Schnabel07}. /// @} private: - typedef internal::Octree > + typedef internal::Octree > Direct_octree; - typedef internal::Octree > + typedef internal::Octree > Indexed_octree; //--------------------------------------------typedef 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 be898fbc816..b7a01c97e1f 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 @@ -39,7 +39,7 @@ extern int scoreTime; namespace CGAL { namespace Shape_detection_3 { - template + template class Efficient_RANSAC; namespace internal { 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 54093089470..4b13bad04ec 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 @@ -32,27 +32,27 @@ namespace CGAL { /*! \ingroup PkgPointSetShapeDetection3Shapes \brief Plane implements Shape_base. The plane is represented by the normal vector and the distance to the origin. - \tparam ERTraits a model of `EfficientRANSACTraits` + \tparam Traits a model of `EfficientRANSACTraits` */ - template - class Plane : public Shape_base { + template + class Plane : public Shape_base { public: /// \cond SKIP_IN_MANUAL - typedef typename ERTraits::Input_iterator Input_iterator; + typedef typename Traits::Input_iterator Input_iterator; ///< random access iterator for input data. - typedef typename ERTraits::Point_pmap Point_pmap; + typedef typename Traits::Point_pmap Point_pmap; ///< property map to access the location of an input point. - typedef typename ERTraits::Normal_pmap Normal_pmap; + typedef typename Traits::Normal_pmap Normal_pmap; ///< property map to access the unoriented normal of an input point. - typedef typename ERTraits::Geom_traits::FT FT; ///< number type. - typedef typename ERTraits::Geom_traits::Point_3 Point; ///< point type. - typedef typename ERTraits::Geom_traits::Vector_3 Vector; + 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; /// \endcond - typedef typename ERTraits::Geom_traits::Plane_3 Plane_3;///< plane type for conversion operator. + typedef typename Traits::Geom_traits::Plane_3 Plane_3;///< plane type for conversion operator. public: - Plane() : Shape_base() {} + Plane() : Shape_base() {} /*! Conversion operator to Plane_3 type. 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 905e8ed306b..cbdea0facdf 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 @@ -56,7 +56,7 @@ namespace CGAL { identify the inliers from the input data and to extract the largest cluster of spatially neighbored points. */ - template + template class Shape_base { /// \cond SKIP_IN_MANUAL template @@ -67,19 +67,19 @@ namespace CGAL { public: /// \cond SKIP_IN_MANUAL - typedef typename ERTraits::Input_iterator Input_iterator; + typedef typename Traits::Input_iterator Input_iterator; ///< random access iterator for input data. - typedef typename ERTraits::Point_pmap Point_pmap; + typedef typename Traits::Point_pmap Point_pmap; ///< property map to access the location of an input point. - typedef typename ERTraits::Normal_pmap Normal_pmap; + typedef typename Traits::Normal_pmap Normal_pmap; ///< property map to access the unoriented normal of an input point. - typedef Shape_base Shape; + typedef Shape_base Shape; ///< own type. /// \endcond - typedef typename ERTraits::Geom_traits::FT FT; ///< number type. - typedef typename ERTraits::Geom_traits::Point_3 Point; ///< point type. - typedef typename ERTraits::Geom_traits::Vector_3 Vector; ///< vector type. + 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. Shape_base() : m_is_valid(false), @@ -274,12 +274,12 @@ namespace CGAL { std::size_t connected_component_kdTree(std::vector &indices, FT cluster_epsilon) { typedef typename CGAL::Search_traits_3< - typename ERTraits::Geom_traits> Traits_base; + typename Traits::Geom_traits> Traits_base; typedef typename boost::tuple Point_and_int; typedef typename CGAL::Search_traits_adapter, Traits_base> Traits; - typedef typename CGAL::Kd_tree Kd_Tree; - typedef typename CGAL::Fuzzy_sphere Fuzzy_sphere; + CGAL::Nth_of_tuple_property_map<0, Point_and_int>, Traits_base> Search_traits; + typedef typename CGAL::Kd_tree Kd_Tree; + typedef typename CGAL::Fuzzy_sphere Fuzzy_sphere; m_has_connected_component = true; 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 21feb7697b7..fb56d0ca434 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 @@ -33,30 +33,30 @@ namespace CGAL { /*! \ingroup PkgPointSetShapeDetection3Shapes \brief Sphere implements Shape_base. The sphere is represented by its center and the radius. - \tparam ERTraits a model of `EfficientRANSACTraits` + \tparam Traits a model of `EfficientRANSACTraits` */ - template - class Sphere : public Shape_base { + template + class Sphere : public Shape_base { public: /// \cond SKIP_IN_MANUAL - typedef typename ERTraits::Input_iterator Input_iterator; + typedef typename Traits::Input_iterator Input_iterator; ///< random access iterator for input data. - typedef typename ERTraits::Point_pmap Point_pmap; + typedef typename Traits::Point_pmap Point_pmap; ///< property map to access the location of an input point. - typedef typename ERTraits::Normal_pmap Normal_pmap; + typedef typename Traits::Normal_pmap Normal_pmap; ///< property map to access the unoriented normal of an input point. - typedef typename ERTraits::Geom_traits::Vector_3 Vector; + typedef typename Traits::Geom_traits::Vector_3 Vector; ///< vector type. - typedef typename ERTraits::Geom_traits::Sphere_3 Sphere_3; + typedef typename Traits::Geom_traits::Sphere_3 Sphere_3; ///< sphere type. - typedef typename ERTraits::Geom_traits::FT FT; + typedef typename Traits::Geom_traits::FT FT; ///< number type. - typedef typename ERTraits::Geom_traits::Point_3 Point; + typedef typename Traits::Geom_traits::Point_3 Point; ///< point type. /// \endcond public: - Sphere() : Shape_base() {} + Sphere() : Shape_base() {} /*! Conversion operator to convert to common Sphere_3 type. 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 cb584754bc4..6639e029df4 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 @@ -36,28 +36,28 @@ namespace CGAL { \ingroup PkgPointSetShapeDetection3Shapes \brief Torus implements Shape_base. The torus is represented by the symmetry axis, its center on the axis and the major and minor radii. - \tparam ERTraits a model of `EfficientRANSACTraits` + \tparam Traits a model of `EfficientRANSACTraits` */ - template - class Torus : public Shape_base { + template + class Torus : public Shape_base { public: /// \cond SKIP_IN_MANUAL - typedef typename ERTraits::Input_iterator Input_iterator; + typedef typename Traits::Input_iterator Input_iterator; ///< random access iterator for input data. - typedef typename ERTraits::Point_pmap Point_pmap; + typedef typename Traits::Point_pmap Point_pmap; ///< property map to access the location of an input point. - typedef typename ERTraits::Normal_pmap Normal_pmap; + typedef typename Traits::Normal_pmap Normal_pmap; ///< property map to access the unoriented normal of an input point. - typedef typename ERTraits::Geom_traits::FT FT; ///< number type. - typedef typename ERTraits::Geom_traits::Point_3 Point; ///< point type. - typedef typename ERTraits::Geom_traits::Vector_3 Vector; ///< vector type. - typedef typename ERTraits::Geom_traits::Point_2 Point_2; + 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. + typedef typename Traits::Geom_traits::Point_2 Point_2; ///< 2D point type used during construction. - typedef typename ERTraits::Geom_traits::Circle_2 Circle; + typedef typename Traits::Geom_traits::Circle_2 Circle; ///< cricle type used during construction. /// \endcond - Torus() : Shape_base() {} + Torus() : Shape_base() {} /*! Direction of symmetry axis.