#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Barycentric_coordinates_2/Mean_value_coordinates_2.h>
using FT = Kernel::FT;
int main() {
const std::vector<Point_2> star_shaped = {
const std::vector<Point_2> interior_points = {
const Policy policy = Policy::PRECISE;
std::vector<FT> coordinates;
coordinates.reserve(star_shaped.size());
std::cout << std::endl << "mean value coordinates (interior): " << std::endl << std::endl;
for (const auto& query : interior_points) {
coordinates.clear();
star_shaped, query, std::back_inserter(coordinates), policy);
for (std::size_t i = 0; i < coordinates.size() - 1; ++i) {
std::cout << coordinates[i] << ", ";
}
std::cout << coordinates[coordinates.size() - 1] << std::endl;
}
std::cout << std::endl;
return EXIT_SUCCESS;
}
OutIterator mean_value_coordinates_2(const PointRange &polygon, const typename GeomTraits::Point_2 &query, OutIterator c_begin, const GeomTraits &traits, const Computation_policy_2 policy=Computation_policy_2::PRECISE_WITH_EDGE_CASES)
computes 2D mean value coordinates.
Definition: Mean_value_coordinates_2.h:558
Computation_policy_2
Computation_policy_2 provides a way to choose an asymptotic time complexity of the algorithm and its ...
Definition: barycentric_enum_2.h:36