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 =
|
||||
Computation_policy_2::FAST_WITH_EDGE_CASES) {
|
||||
|
||||
Discrete_harmonic_coordinates_2<PointRange, GeomTraits> discrete_harmonic(
|
||||
polygon, policy, traits);
|
||||
Discrete_harmonic_coordinates_2<PointRange, GeomTraits>
|
||||
discrete_harmonic(polygon, policy, traits);
|
||||
return discrete_harmonic.weights(query, w_begin);
|
||||
}
|
||||
|
||||
/// \cond SKIP_IN_MANUAL
|
||||
template<
|
||||
typename PointRange,
|
||||
typename Point_2,
|
||||
typename OutIterator>
|
||||
OutIterator discrete_harmonic_weights_2(
|
||||
const PointRange& polygon,
|
||||
const Point_2& query,
|
||||
const typename PointRange::value_type& query,
|
||||
OutIterator w_begin,
|
||||
const Computation_policy_2 policy =
|
||||
Computation_policy_2::FAST_WITH_EDGE_CASES) {
|
||||
|
||||
using Point_2 = typename PointRange::value_type;
|
||||
using GeomTraits = typename Kernel_traits<Point_2>::Kernel;
|
||||
const GeomTraits traits;
|
||||
return discrete_harmonic_weights_2(
|
||||
|
|
@ -524,23 +524,23 @@ namespace Barycentric_coordinates {
|
|||
const Computation_policy_2 policy =
|
||||
Computation_policy_2::PRECISE_WITH_EDGE_CASES) {
|
||||
|
||||
Discrete_harmonic_coordinates_2<PointRange, GeomTraits> discrete_harmonic(
|
||||
polygon, policy, traits);
|
||||
Discrete_harmonic_coordinates_2<PointRange, GeomTraits>
|
||||
discrete_harmonic(polygon, policy, traits);
|
||||
return discrete_harmonic(query, c_begin);
|
||||
}
|
||||
|
||||
/// \cond SKIP_IN_MANUAL
|
||||
template<
|
||||
typename PointRange,
|
||||
typename Point_2,
|
||||
typename OutIterator>
|
||||
OutIterator discrete_harmonic_coordinates_2(
|
||||
const PointRange& polygon,
|
||||
const Point_2& query,
|
||||
const typename PointRange::value_type& query,
|
||||
OutIterator c_begin,
|
||||
const Computation_policy_2 policy =
|
||||
Computation_policy_2::PRECISE_WITH_EDGE_CASES) {
|
||||
|
||||
using Point_2 = typename PointRange::value_type;
|
||||
using GeomTraits = typename Kernel_traits<Point_2>::Kernel;
|
||||
const GeomTraits traits;
|
||||
return discrete_harmonic_coordinates_2(
|
||||
|
|
|
|||
|
|
@ -477,23 +477,23 @@ namespace Barycentric_coordinates {
|
|||
const Computation_policy_2 policy =
|
||||
Computation_policy_2::FAST_WITH_EDGE_CASES) {
|
||||
|
||||
Mean_value_coordinates_2<PointRange, GeomTraits> mean_value(
|
||||
polygon, policy, traits);
|
||||
Mean_value_coordinates_2<PointRange, GeomTraits>
|
||||
mean_value(polygon, policy, traits);
|
||||
return mean_value.weights(query, w_begin);
|
||||
}
|
||||
|
||||
/// \cond SKIP_IN_MANUAL
|
||||
template<
|
||||
typename PointRange,
|
||||
typename Point_2,
|
||||
typename OutIterator>
|
||||
OutIterator mean_value_weights_2(
|
||||
const PointRange& polygon,
|
||||
const Point_2& query,
|
||||
const typename PointRange::value_type& query,
|
||||
OutIterator w_begin,
|
||||
const Computation_policy_2 policy =
|
||||
Computation_policy_2::FAST_WITH_EDGE_CASES) {
|
||||
|
||||
using Point_2 = typename PointRange::value_type;
|
||||
using GeomTraits = typename Kernel_traits<Point_2>::Kernel;
|
||||
const GeomTraits traits;
|
||||
return mean_value_weights_2(
|
||||
|
|
@ -563,23 +563,23 @@ namespace Barycentric_coordinates {
|
|||
const Computation_policy_2 policy =
|
||||
Computation_policy_2::PRECISE_WITH_EDGE_CASES) {
|
||||
|
||||
Mean_value_coordinates_2<PointRange, GeomTraits> mean_value(
|
||||
polygon, policy, traits);
|
||||
Mean_value_coordinates_2<PointRange, GeomTraits>
|
||||
mean_value(polygon, policy, traits);
|
||||
return mean_value(query, c_begin);
|
||||
}
|
||||
|
||||
/// \cond SKIP_IN_MANUAL
|
||||
template<
|
||||
typename PointRange,
|
||||
typename Point_2,
|
||||
typename OutIterator>
|
||||
OutIterator mean_value_coordinates_2(
|
||||
const PointRange& polygon,
|
||||
const Point_2& query,
|
||||
const typename PointRange::value_type& query,
|
||||
OutIterator c_begin,
|
||||
const Computation_policy_2 policy =
|
||||
Computation_policy_2::PRECISE_WITH_EDGE_CASES) {
|
||||
|
||||
using Point_2 = typename PointRange::value_type;
|
||||
using GeomTraits = typename Kernel_traits<Point_2>::Kernel;
|
||||
const GeomTraits traits;
|
||||
return mean_value_coordinates_2(
|
||||
|
|
|
|||
|
|
@ -425,23 +425,23 @@ namespace Barycentric_coordinates {
|
|||
const Computation_policy_2 policy =
|
||||
Computation_policy_2::FAST_WITH_EDGE_CASES) {
|
||||
|
||||
Wachspress_coordinates_2<PointRange, GeomTraits> wachspress(
|
||||
polygon, policy, traits);
|
||||
Wachspress_coordinates_2<PointRange, GeomTraits>
|
||||
wachspress(polygon, policy, traits);
|
||||
return wachspress.weights(query, w_begin);
|
||||
}
|
||||
|
||||
/// \cond SKIP_IN_MANUAL
|
||||
template<
|
||||
typename PointRange,
|
||||
typename Point_2,
|
||||
typename OutIterator>
|
||||
OutIterator wachspress_weights_2(
|
||||
const PointRange& polygon,
|
||||
const Point_2& query,
|
||||
const typename PointRange::value_type& query,
|
||||
OutIterator w_begin,
|
||||
const Computation_policy_2 policy =
|
||||
Computation_policy_2::FAST_WITH_EDGE_CASES) {
|
||||
|
||||
using Point_2 = typename PointRange::value_type;
|
||||
using GeomTraits = typename Kernel_traits<Point_2>::Kernel;
|
||||
const GeomTraits traits;
|
||||
return wachspress_weights_2(
|
||||
|
|
@ -512,23 +512,23 @@ namespace Barycentric_coordinates {
|
|||
const Computation_policy_2 policy =
|
||||
Computation_policy_2::PRECISE_WITH_EDGE_CASES) {
|
||||
|
||||
Wachspress_coordinates_2<PointRange, GeomTraits> wachspress(
|
||||
polygon, policy, traits);
|
||||
Wachspress_coordinates_2<PointRange, GeomTraits>
|
||||
wachspress(polygon, policy, traits);
|
||||
return wachspress(query, c_begin);
|
||||
}
|
||||
|
||||
/// \cond SKIP_IN_MANUAL
|
||||
template<
|
||||
typename PointRange,
|
||||
typename Point_2,
|
||||
typename OutIterator>
|
||||
OutIterator wachspress_coordinates_2(
|
||||
const PointRange& polygon,
|
||||
const Point_2& query,
|
||||
const typename PointRange::value_type& query,
|
||||
OutIterator c_begin,
|
||||
const Computation_policy_2 policy =
|
||||
Computation_policy_2::PRECISE_WITH_EDGE_CASES) {
|
||||
|
||||
using Point_2 = typename PointRange::value_type;
|
||||
using GeomTraits = typename Kernel_traits<Point_2>::Kernel;
|
||||
const GeomTraits traits;
|
||||
return wachspress_coordinates_2(
|
||||
|
|
|
|||
|
|
@ -9,7 +9,3 @@
|
|||
* Merge this package with the natural neighbor coordinates package.
|
||||
* Improve the solver interface and make it a parameter for the harmonic coordinates class.
|
||||
* 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