CGAL 5.4  Weights

#include <CGAL/Weights/wachspress_weights.h>
Wachspress weights which can be computed for a query point with respect to the vertices of a strictly convex polygon.
Classes  
class  CGAL::Weights::Wachspress_weights_2< VertexRange, GeomTraits, PointMap > 
2D Wachspress weights for polygons. More...  
Functions  
template<typename PointRange , typename OutIterator , typename GeomTraits >  
OutIterator  CGAL::Weights::wachspress_weights_2 (const PointRange &polygon, const typename GeomTraits::Point_2 &query, OutIterator w_begin, const GeomTraits &traits) 
computes 2D Wachspress weights for polygons. More...  
OutIterator CGAL::Weights::wachspress_weights_2  (  const PointRange &  polygon, 
const typename GeomTraits::Point_2 &  query,  
OutIterator  w_begin,  
const GeomTraits &  traits  
) 
#include <CGAL/Weights/wachspress_weights.h>
computes 2D Wachspress weights for polygons.
This function computes 2D Wachspress 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 Wachspress_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 