CGAL 6.2 - 2D Generalized Barycentric Coordinates

Loading...
Searching...
No Matches
List of all members
CGAL::Barycentric_coordinates::BarycentricCoordinates_2 Concept Reference
Reference Manual » Concepts

## Definition

A concept that describes the set of methods that should be defined for all coordinate models used to parameterize the class `Generalized_barycentric_coordinates_2`.

Has models
  `Wachspress_2`
  `Mean_value_2`
  `Discrete_harmonic_2`

Deprecated:
  This part of the package is deprecated since the version 5.4 of CGAL.

## Creation
| BarycentricCoordinates_2 (const std::vector< Traits::Point_2 > &vertices, const Traits &barycentric_traits)
| Creates a class that implements generalized barycentric coordinates for any query point that does not belong to the polygon's boundary.

## Functions
std::optional< OutputIterator > | weights (const Traits::Point_2 &query_point, OutputIterator &output)
| A function that computes generalized barycentric coordinates without normalization that are called generalized barycentric weights (as fast as possible algorithm is used).
std::optional< OutputIterator > | coordinates_on_bounded_side (const Traits::Point_2 &query_point, OutputIterator &output, const Type_of_algorithm type_of_algorithm)
| A function that computes generalized barycentric coordinates on the bounded side of a polygon with one of two possible algorithms: one is precise and one is fast.
std::optional< OutputIterator > | coordinates_on_unbounded_side (const Traits::Point_2 &query_point, OutputIterator &output, const Type_of_algorithm type_of_algorithm)
| A function that computes generalized barycentric coordinates on the unbounded side of a polygon with one of two possible algorithms: one is precise and one is fast.

## Constructor & Destructor Documentation

## ◆ BarycentricCoordinates_2()

CGAL::Barycentric_coordinates::BarycentricCoordinates_2::BarycentricCoordinates_2 | ( | const std::vector< Traits::Point_2 > & | vertices,
|  | const Traits & | barycentric_traits
| ) |  |

Creates a class that implements generalized barycentric coordinates for any query point that does not belong to the polygon's boundary.

The polygon is given by a range of vertices of the type `Traits::Point_2` stored in a container of the type `std::vector`.

## Member Function Documentation

## ◆ coordinates_on_bounded_side()

std::optional< OutputIterator > CGAL::Barycentric_coordinates::BarycentricCoordinates_2::coordinates_on_bounded_side | ( | const Traits::Point_2 & | query_point,
|  | OutputIterator & | output,
|  | const Type_of_algorithm | type_of_algorithm
| ) |  |

A function that computes generalized barycentric coordinates on the bounded side of a polygon with one of two possible algorithms: one is precise and one is fast.

The algorithm type is specified by the parameter `type_of_algorithm`. Coordinates are computed with respect to a query point of the type `Traits::Point_2` and stored in the output iterator `output`. The function returns a pointer to the last stored element.

## ◆ coordinates_on_unbounded_side()

std::optional< OutputIterator > CGAL::Barycentric_coordinates::BarycentricCoordinates_2::coordinates_on_unbounded_side | ( | const Traits::Point_2 & | query_point,
|  | OutputIterator & | output,
|  | const Type_of_algorithm | type_of_algorithm
| ) |  |

A function that computes generalized barycentric coordinates on the unbounded side of a polygon with one of two possible algorithms: one is precise and one is fast.

The algorithm type is specified by the parameter `type_of_algorithm`. Coordinates are computed with respect to a query point of the type `Traits::Point_2` and stored in the output iterator `output`. The function returns a pointer to the last stored element.

## ◆ weights()

std::optional< OutputIterator > CGAL::Barycentric_coordinates::BarycentricCoordinates_2::weights | ( | const Traits::Point_2 & | query_point,
|  | OutputIterator & | output
| ) |  |

A function that computes generalized barycentric coordinates without normalization that are called generalized barycentric weights (as fast as possible algorithm is used).

Weights are computed with respect to a query point of the type `Traits::Point_2` and stored in the output iterator `output`. The function returns a pointer to the last stored element.