CGAL 5.4.1 - Weights
|
#include <CGAL/Weights/mean_value_weights.h>
Mean value weights which can be computed for a query point with respect to the vertices of a simple polygon.
Classes | |
class | CGAL::Weights::Mean_value_weights_2< VertexRange, GeomTraits, PointMap > |
2D mean value weights for polygons. More... | |
Functions | |
template<typename PointRange , typename OutIterator , typename GeomTraits > | |
OutIterator | CGAL::Weights::mean_value_weights_2 (const PointRange &polygon, const typename GeomTraits::Point_2 &query, OutIterator w_begin, const GeomTraits &traits) |
computes 2D mean value weights for polygons. More... | |
OutIterator CGAL::Weights::mean_value_weights_2 | ( | const PointRange & | polygon, |
const typename GeomTraits::Point_2 & | query, | ||
OutIterator | w_begin, | ||
const GeomTraits & | traits | ||
) |
#include <CGAL/Weights/mean_value_weights.h>
computes 2D mean value weights for polygons.
This function computes 2D mean value weights at a given query
point with respect to the vertices of a simple polygon
, that is one weight per vertex. The weights are stored in a destination range beginning at w_begin
.
Internally, the class Mean_value_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 simple 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 |