mirror of https://github.com/CGAL/cgal
get rid of the GeomTraits template parameter
This commit is contained in:
parent
b714a6d1ff
commit
db7dfd97e5
|
|
@ -21,9 +21,9 @@ using Point_set_3 = CGAL::Point_set_3<Point_3, Vector_3>;
|
|||
using Point_map = Point_set_2::Point_map;
|
||||
using Normal_map = Point_set_2::Vector_map;
|
||||
|
||||
using Neighbor_query = CGAL::Shape_detection::Point_set::K_neighbor_query_for_point_set<Kernel, Point_set_2>;
|
||||
using Region_type = CGAL::Shape_detection::Point_set::Least_squares_circle_fit_region_for_point_set<Kernel, Point_set_2>;
|
||||
using Sorting = CGAL::Shape_detection::Point_set::Least_squares_circle_fit_sorting_for_point_set<Kernel, Neighbor_query, Point_set_2>;
|
||||
using Neighbor_query = CGAL::Shape_detection::Point_set::K_neighbor_query_for_point_set<Point_set_2>;
|
||||
using Region_type = CGAL::Shape_detection::Point_set::Least_squares_circle_fit_region_for_point_set<Point_set_2>;
|
||||
using Sorting = CGAL::Shape_detection::Point_set::Least_squares_circle_fit_sorting_for_point_set<Neighbor_query, Point_set_2>;
|
||||
using Region_growing = CGAL::Shape_detection::Region_growing<Neighbor_query, Region_type>;
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
|
|
@ -63,10 +63,10 @@ int main(int argc, char** argv) {
|
|||
const std::size_t min_region_size = 20;
|
||||
|
||||
// Create instances of the classes Neighbor_query and Region_type.
|
||||
Neighbor_query neighbor_query = CGAL::Shape_detection::Point_set::make_k_neighbor_query<Kernel>(
|
||||
Neighbor_query neighbor_query = CGAL::Shape_detection::Point_set::make_k_neighbor_query(
|
||||
point_set_2);
|
||||
|
||||
Region_type region_type = CGAL::Shape_detection::Point_set::make_least_squares_circle_fit_region<Kernel>(
|
||||
Region_type region_type = CGAL::Shape_detection::Point_set::make_least_squares_circle_fit_region(
|
||||
point_set_2,
|
||||
CGAL::parameters::
|
||||
maximum_distance(max_distance).
|
||||
|
|
@ -74,7 +74,7 @@ int main(int argc, char** argv) {
|
|||
minimum_region_size(min_region_size));
|
||||
|
||||
// Sort indices.
|
||||
Sorting sorting = CGAL::Shape_detection::Point_set::make_least_squares_circle_fit_sorting<Kernel>(
|
||||
Sorting sorting = CGAL::Shape_detection::Point_set::make_least_squares_circle_fit_sorting(
|
||||
point_set_2, neighbor_query, CGAL::parameters::k_neighbors(k));
|
||||
sorting.sort();
|
||||
|
||||
|
|
|
|||
|
|
@ -208,9 +208,9 @@ namespace Point_set {
|
|||
shortcut to ease the definition of the class when using `CGAL::Point_set_3`.
|
||||
To be used together with `make_least_squares_sphere_fit_sorting_for_point_set()`.
|
||||
*/
|
||||
template <class GeomTraits, class PointSet3>
|
||||
template <class PointSet3>
|
||||
using K_neighbor_query_for_point_set =
|
||||
K_neighbor_query<GeomTraits,
|
||||
K_neighbor_query<typename Kernel_traits<typename PointSet3::Point_3>::Kernel,
|
||||
typename PointSet3::Index,
|
||||
typename PointSet3::Point_map>;
|
||||
|
||||
|
|
@ -218,11 +218,11 @@ namespace Point_set {
|
|||
\ingroup PkgShapeDetectionRGOnPoints
|
||||
returns a instance of the sorting class to be used with `CGAL::Point_set_3`, with point and normal maps added to `np`.
|
||||
*/
|
||||
template <class GeomTraits, class PointSet3, typename CGAL_NP_TEMPLATE_PARAMETERS>
|
||||
K_neighbor_query_for_point_set<GeomTraits, PointSet3>
|
||||
template <class PointSet3, typename CGAL_NP_TEMPLATE_PARAMETERS>
|
||||
K_neighbor_query_for_point_set<PointSet3>
|
||||
make_k_neighbor_query(const PointSet3& ps, CGAL_NP_CLASS np = parameters::default_values())
|
||||
{
|
||||
return K_neighbor_query_for_point_set<GeomTraits, PointSet3>(
|
||||
return K_neighbor_query_for_point_set<PointSet3>(
|
||||
ps, np.point_map(ps.point_map()));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -385,9 +385,9 @@ namespace Point_set {
|
|||
shortcut to ease the definition of the class when using `CGAL::Point_set_3`.
|
||||
To be used together with `make_least_squares_sphere_fit_sorting_for_point_set()`.
|
||||
*/
|
||||
template <class GeomTraits, class PointSet3>
|
||||
template <class PointSet3>
|
||||
using Least_squares_circle_fit_region_for_point_set =
|
||||
Least_squares_circle_fit_region<GeomTraits,
|
||||
Least_squares_circle_fit_region<typename Kernel_traits<typename PointSet3::Point_3>::Kernel,
|
||||
typename PointSet3::Index,
|
||||
typename PointSet3::Point_map,
|
||||
typename PointSet3::Vector_map>;
|
||||
|
|
@ -396,11 +396,11 @@ namespace Point_set {
|
|||
\ingroup PkgShapeDetectionRGOnPoints
|
||||
returns a instance of the sorting class to be used with `CGAL::Point_set_3`, with point and normal maps added to `np`.
|
||||
*/
|
||||
template <class GeomTraits, class PointSet3, typename CGAL_NP_TEMPLATE_PARAMETERS>
|
||||
Least_squares_circle_fit_region_for_point_set<GeomTraits, PointSet3>
|
||||
template <class PointSet3, typename CGAL_NP_TEMPLATE_PARAMETERS>
|
||||
Least_squares_circle_fit_region_for_point_set<PointSet3>
|
||||
make_least_squares_circle_fit_region(const PointSet3& ps, CGAL_NP_CLASS np = parameters::default_values())
|
||||
{
|
||||
return Least_squares_circle_fit_region_for_point_set<GeomTraits, PointSet3>(
|
||||
return Least_squares_circle_fit_region_for_point_set<PointSet3>(
|
||||
np.point_map(ps.point_map()).normal_map(ps.normal_map()));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -216,9 +216,9 @@ namespace Point_set {
|
|||
shortcut to ease the definition of the class when using `CGAL::Point_set_3`.
|
||||
To be used together with `make_least_squares_circle_fit_sorting()`.
|
||||
*/
|
||||
template <class GeomTraits, class NeighborQuery, class PointSet3>
|
||||
template <class NeighborQuery, class PointSet3>
|
||||
using Least_squares_circle_fit_sorting_for_point_set =
|
||||
Least_squares_circle_fit_sorting<GeomTraits,
|
||||
Least_squares_circle_fit_sorting<typename Kernel_traits<typename PointSet3::Point_3>::Kernel,
|
||||
typename PointSet3::Index,
|
||||
NeighborQuery,
|
||||
typename PointSet3::Point_map>;
|
||||
|
|
@ -227,11 +227,11 @@ namespace Point_set {
|
|||
\ingroup PkgShapeDetectionRGOnPoints
|
||||
returns a instance of the sorting class to be used with `CGAL::Point_set_3`, with point and normal maps added to `np`.
|
||||
*/
|
||||
template <class GeomTraits, class NeighborQuery, class PointSet3, typename CGAL_NP_TEMPLATE_PARAMETERS>
|
||||
Least_squares_circle_fit_sorting_for_point_set<GeomTraits, NeighborQuery, PointSet3>
|
||||
template <class NeighborQuery, class PointSet3, typename CGAL_NP_TEMPLATE_PARAMETERS>
|
||||
Least_squares_circle_fit_sorting_for_point_set<NeighborQuery, PointSet3>
|
||||
make_least_squares_circle_fit_sorting(const PointSet3& ps, NeighborQuery& neighbor_query, const CGAL_NP_CLASS np = parameters::default_values())
|
||||
{
|
||||
return Least_squares_circle_fit_sorting_for_point_set<GeomTraits, NeighborQuery, PointSet3>
|
||||
return Least_squares_circle_fit_sorting_for_point_set<NeighborQuery, PointSet3>
|
||||
(ps, neighbor_query, np.point_map(ps.point_map()));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue