CGAL 5.6.1 - Weights
|
#include <CGAL/Weights/discrete_harmonic_weights.h>
Discrete Harmonic weights which can be computed for a query point with respect to the vertices of a strictly convex polygon.
Classes | |
class | CGAL::Weights::Discrete_harmonic_weights_2< VertexRange, GeomTraits, PointMap > |
2D discrete harmonic weights for polygons. More... | |
Functions | |
template<typename PointRange , typename OutIterator , typename GeomTraits > | |
OutIterator | CGAL::Weights::discrete_harmonic_weights_2 (const PointRange &polygon, const typename GeomTraits::Point_2 &query, OutIterator w_begin, const GeomTraits &traits) |
computes 2D discrete harmonic weights for polygons. More... | |
OutIterator CGAL::Weights::discrete_harmonic_weights_2 | ( | const PointRange & | polygon, |
const typename GeomTraits::Point_2 & | query, | ||
OutIterator | w_begin, | ||
const GeomTraits & | traits | ||
) |
#include <CGAL/Weights/discrete_harmonic_weights.h>
computes 2D discrete harmonic weights for polygons.
This function computes 2D discrete harmonic weights at a given query
point with respect to the vertices of a strictly convex polygon
, that is one weight per vertex. The weights are stored in a destination range beginning at w_begin
.
Internally, the class Discrete_harmonic_weights_2
is used. If one wants to process multiple query points, it is better to use that class. When using the free function, internal memory is allocated for each query point, while when using the class, it is allocated only once which is much more efficient. However, for a few query points, it is easier to use this function. It can also be used when the processing time is not a concern.
PointRange | a model of ConstRange whose iterator type is RandomAccessIterator and value type is GeomTraits::Point_2 |
OutIterator | a model of OutputIterator whose value type is GeomTraits::FT |
GeomTraits | a model of AnalyticWeightTraits_2 |
polygon | an instance of PointRange with 2D points which form a strictly convex polygon |
query | a query point |
w_begin | the beginning of the destination range with the computed weights |
traits | a traits class with geometric objects, predicates, and constructions; this parameter can be omitted if the traits class can be deduced from the point type |
polygon.size() >= 3
polygon
is simple polygon
is strictly convex