mirror of https://github.com/CGAL/cgal
making query point type equal to point range value type
This commit is contained in:
parent
85229fee03
commit
fc8c835c46
|
|
@ -437,23 +437,23 @@ namespace Barycentric_coordinates {
|
||||||
const Computation_policy_2 policy =
|
const Computation_policy_2 policy =
|
||||||
Computation_policy_2::FAST_WITH_EDGE_CASES) {
|
Computation_policy_2::FAST_WITH_EDGE_CASES) {
|
||||||
|
|
||||||
Discrete_harmonic_coordinates_2<PointRange, GeomTraits> discrete_harmonic(
|
Discrete_harmonic_coordinates_2<PointRange, GeomTraits>
|
||||||
polygon, policy, traits);
|
discrete_harmonic(polygon, policy, traits);
|
||||||
return discrete_harmonic.weights(query, w_begin);
|
return discrete_harmonic.weights(query, w_begin);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// \cond SKIP_IN_MANUAL
|
/// \cond SKIP_IN_MANUAL
|
||||||
template<
|
template<
|
||||||
typename PointRange,
|
typename PointRange,
|
||||||
typename Point_2,
|
|
||||||
typename OutIterator>
|
typename OutIterator>
|
||||||
OutIterator discrete_harmonic_weights_2(
|
OutIterator discrete_harmonic_weights_2(
|
||||||
const PointRange& polygon,
|
const PointRange& polygon,
|
||||||
const Point_2& query,
|
const typename PointRange::value_type& query,
|
||||||
OutIterator w_begin,
|
OutIterator w_begin,
|
||||||
const Computation_policy_2 policy =
|
const Computation_policy_2 policy =
|
||||||
Computation_policy_2::FAST_WITH_EDGE_CASES) {
|
Computation_policy_2::FAST_WITH_EDGE_CASES) {
|
||||||
|
|
||||||
|
using Point_2 = typename PointRange::value_type;
|
||||||
using GeomTraits = typename Kernel_traits<Point_2>::Kernel;
|
using GeomTraits = typename Kernel_traits<Point_2>::Kernel;
|
||||||
const GeomTraits traits;
|
const GeomTraits traits;
|
||||||
return discrete_harmonic_weights_2(
|
return discrete_harmonic_weights_2(
|
||||||
|
|
@ -524,23 +524,23 @@ namespace Barycentric_coordinates {
|
||||||
const Computation_policy_2 policy =
|
const Computation_policy_2 policy =
|
||||||
Computation_policy_2::PRECISE_WITH_EDGE_CASES) {
|
Computation_policy_2::PRECISE_WITH_EDGE_CASES) {
|
||||||
|
|
||||||
Discrete_harmonic_coordinates_2<PointRange, GeomTraits> discrete_harmonic(
|
Discrete_harmonic_coordinates_2<PointRange, GeomTraits>
|
||||||
polygon, policy, traits);
|
discrete_harmonic(polygon, policy, traits);
|
||||||
return discrete_harmonic(query, c_begin);
|
return discrete_harmonic(query, c_begin);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// \cond SKIP_IN_MANUAL
|
/// \cond SKIP_IN_MANUAL
|
||||||
template<
|
template<
|
||||||
typename PointRange,
|
typename PointRange,
|
||||||
typename Point_2,
|
|
||||||
typename OutIterator>
|
typename OutIterator>
|
||||||
OutIterator discrete_harmonic_coordinates_2(
|
OutIterator discrete_harmonic_coordinates_2(
|
||||||
const PointRange& polygon,
|
const PointRange& polygon,
|
||||||
const Point_2& query,
|
const typename PointRange::value_type& query,
|
||||||
OutIterator c_begin,
|
OutIterator c_begin,
|
||||||
const Computation_policy_2 policy =
|
const Computation_policy_2 policy =
|
||||||
Computation_policy_2::PRECISE_WITH_EDGE_CASES) {
|
Computation_policy_2::PRECISE_WITH_EDGE_CASES) {
|
||||||
|
|
||||||
|
using Point_2 = typename PointRange::value_type;
|
||||||
using GeomTraits = typename Kernel_traits<Point_2>::Kernel;
|
using GeomTraits = typename Kernel_traits<Point_2>::Kernel;
|
||||||
const GeomTraits traits;
|
const GeomTraits traits;
|
||||||
return discrete_harmonic_coordinates_2(
|
return discrete_harmonic_coordinates_2(
|
||||||
|
|
|
||||||
|
|
@ -477,23 +477,23 @@ namespace Barycentric_coordinates {
|
||||||
const Computation_policy_2 policy =
|
const Computation_policy_2 policy =
|
||||||
Computation_policy_2::FAST_WITH_EDGE_CASES) {
|
Computation_policy_2::FAST_WITH_EDGE_CASES) {
|
||||||
|
|
||||||
Mean_value_coordinates_2<PointRange, GeomTraits> mean_value(
|
Mean_value_coordinates_2<PointRange, GeomTraits>
|
||||||
polygon, policy, traits);
|
mean_value(polygon, policy, traits);
|
||||||
return mean_value.weights(query, w_begin);
|
return mean_value.weights(query, w_begin);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// \cond SKIP_IN_MANUAL
|
/// \cond SKIP_IN_MANUAL
|
||||||
template<
|
template<
|
||||||
typename PointRange,
|
typename PointRange,
|
||||||
typename Point_2,
|
|
||||||
typename OutIterator>
|
typename OutIterator>
|
||||||
OutIterator mean_value_weights_2(
|
OutIterator mean_value_weights_2(
|
||||||
const PointRange& polygon,
|
const PointRange& polygon,
|
||||||
const Point_2& query,
|
const typename PointRange::value_type& query,
|
||||||
OutIterator w_begin,
|
OutIterator w_begin,
|
||||||
const Computation_policy_2 policy =
|
const Computation_policy_2 policy =
|
||||||
Computation_policy_2::FAST_WITH_EDGE_CASES) {
|
Computation_policy_2::FAST_WITH_EDGE_CASES) {
|
||||||
|
|
||||||
|
using Point_2 = typename PointRange::value_type;
|
||||||
using GeomTraits = typename Kernel_traits<Point_2>::Kernel;
|
using GeomTraits = typename Kernel_traits<Point_2>::Kernel;
|
||||||
const GeomTraits traits;
|
const GeomTraits traits;
|
||||||
return mean_value_weights_2(
|
return mean_value_weights_2(
|
||||||
|
|
@ -563,23 +563,23 @@ namespace Barycentric_coordinates {
|
||||||
const Computation_policy_2 policy =
|
const Computation_policy_2 policy =
|
||||||
Computation_policy_2::PRECISE_WITH_EDGE_CASES) {
|
Computation_policy_2::PRECISE_WITH_EDGE_CASES) {
|
||||||
|
|
||||||
Mean_value_coordinates_2<PointRange, GeomTraits> mean_value(
|
Mean_value_coordinates_2<PointRange, GeomTraits>
|
||||||
polygon, policy, traits);
|
mean_value(polygon, policy, traits);
|
||||||
return mean_value(query, c_begin);
|
return mean_value(query, c_begin);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// \cond SKIP_IN_MANUAL
|
/// \cond SKIP_IN_MANUAL
|
||||||
template<
|
template<
|
||||||
typename PointRange,
|
typename PointRange,
|
||||||
typename Point_2,
|
|
||||||
typename OutIterator>
|
typename OutIterator>
|
||||||
OutIterator mean_value_coordinates_2(
|
OutIterator mean_value_coordinates_2(
|
||||||
const PointRange& polygon,
|
const PointRange& polygon,
|
||||||
const Point_2& query,
|
const typename PointRange::value_type& query,
|
||||||
OutIterator c_begin,
|
OutIterator c_begin,
|
||||||
const Computation_policy_2 policy =
|
const Computation_policy_2 policy =
|
||||||
Computation_policy_2::PRECISE_WITH_EDGE_CASES) {
|
Computation_policy_2::PRECISE_WITH_EDGE_CASES) {
|
||||||
|
|
||||||
|
using Point_2 = typename PointRange::value_type;
|
||||||
using GeomTraits = typename Kernel_traits<Point_2>::Kernel;
|
using GeomTraits = typename Kernel_traits<Point_2>::Kernel;
|
||||||
const GeomTraits traits;
|
const GeomTraits traits;
|
||||||
return mean_value_coordinates_2(
|
return mean_value_coordinates_2(
|
||||||
|
|
|
||||||
|
|
@ -425,23 +425,23 @@ namespace Barycentric_coordinates {
|
||||||
const Computation_policy_2 policy =
|
const Computation_policy_2 policy =
|
||||||
Computation_policy_2::FAST_WITH_EDGE_CASES) {
|
Computation_policy_2::FAST_WITH_EDGE_CASES) {
|
||||||
|
|
||||||
Wachspress_coordinates_2<PointRange, GeomTraits> wachspress(
|
Wachspress_coordinates_2<PointRange, GeomTraits>
|
||||||
polygon, policy, traits);
|
wachspress(polygon, policy, traits);
|
||||||
return wachspress.weights(query, w_begin);
|
return wachspress.weights(query, w_begin);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// \cond SKIP_IN_MANUAL
|
/// \cond SKIP_IN_MANUAL
|
||||||
template<
|
template<
|
||||||
typename PointRange,
|
typename PointRange,
|
||||||
typename Point_2,
|
|
||||||
typename OutIterator>
|
typename OutIterator>
|
||||||
OutIterator wachspress_weights_2(
|
OutIterator wachspress_weights_2(
|
||||||
const PointRange& polygon,
|
const PointRange& polygon,
|
||||||
const Point_2& query,
|
const typename PointRange::value_type& query,
|
||||||
OutIterator w_begin,
|
OutIterator w_begin,
|
||||||
const Computation_policy_2 policy =
|
const Computation_policy_2 policy =
|
||||||
Computation_policy_2::FAST_WITH_EDGE_CASES) {
|
Computation_policy_2::FAST_WITH_EDGE_CASES) {
|
||||||
|
|
||||||
|
using Point_2 = typename PointRange::value_type;
|
||||||
using GeomTraits = typename Kernel_traits<Point_2>::Kernel;
|
using GeomTraits = typename Kernel_traits<Point_2>::Kernel;
|
||||||
const GeomTraits traits;
|
const GeomTraits traits;
|
||||||
return wachspress_weights_2(
|
return wachspress_weights_2(
|
||||||
|
|
@ -512,23 +512,23 @@ namespace Barycentric_coordinates {
|
||||||
const Computation_policy_2 policy =
|
const Computation_policy_2 policy =
|
||||||
Computation_policy_2::PRECISE_WITH_EDGE_CASES) {
|
Computation_policy_2::PRECISE_WITH_EDGE_CASES) {
|
||||||
|
|
||||||
Wachspress_coordinates_2<PointRange, GeomTraits> wachspress(
|
Wachspress_coordinates_2<PointRange, GeomTraits>
|
||||||
polygon, policy, traits);
|
wachspress(polygon, policy, traits);
|
||||||
return wachspress(query, c_begin);
|
return wachspress(query, c_begin);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// \cond SKIP_IN_MANUAL
|
/// \cond SKIP_IN_MANUAL
|
||||||
template<
|
template<
|
||||||
typename PointRange,
|
typename PointRange,
|
||||||
typename Point_2,
|
|
||||||
typename OutIterator>
|
typename OutIterator>
|
||||||
OutIterator wachspress_coordinates_2(
|
OutIterator wachspress_coordinates_2(
|
||||||
const PointRange& polygon,
|
const PointRange& polygon,
|
||||||
const Point_2& query,
|
const typename PointRange::value_type& query,
|
||||||
OutIterator c_begin,
|
OutIterator c_begin,
|
||||||
const Computation_policy_2 policy =
|
const Computation_policy_2 policy =
|
||||||
Computation_policy_2::PRECISE_WITH_EDGE_CASES) {
|
Computation_policy_2::PRECISE_WITH_EDGE_CASES) {
|
||||||
|
|
||||||
|
using Point_2 = typename PointRange::value_type;
|
||||||
using GeomTraits = typename Kernel_traits<Point_2>::Kernel;
|
using GeomTraits = typename Kernel_traits<Point_2>::Kernel;
|
||||||
const GeomTraits traits;
|
const GeomTraits traits;
|
||||||
return wachspress_coordinates_2(
|
return wachspress_coordinates_2(
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,3 @@
|
||||||
* Merge this package with the natural neighbor coordinates package.
|
* Merge this package with the natural neighbor coordinates package.
|
||||||
* Improve the solver interface and make it a parameter for the harmonic coordinates class.
|
* Improve the solver interface and make it a parameter for the harmonic coordinates class.
|
||||||
* Add a demo with visualization of the coordinate functions.
|
* Add a demo with visualization of the coordinate functions.
|
||||||
|
|
||||||
* Remove Point_2 from the template of free functions and get this type directly from the PointRange typename.
|
|
||||||
* Put in the classes PointMap first and GeomTraits second.
|
|
||||||
* Remove the free overload with the traits parameter.
|
|
||||||
Loading…
Reference in New Issue