Go to the source code of this file.
Defines | |
#define | vgl_area_txx_ |
#define | VGL_AREA_INSTANTIATE(T) |
Functions | |
template<class T > | |
T | vgl_area_signed (vgl_polygon< T > const &poly) |
Computes the signed area of a polygon. | |
template<class T > | |
vgl_point_2d< T > | vgl_centroid (vgl_polygon< T > const &poly) |
The area weighted center of a polygon. | |
template<class T > | |
T | vgl_area (const vgl_polygon< T > &poly) |
The area of a polygon. | |
template<class T > | |
T | vgl_area_enforce_orientation (vgl_polygon< T > const &poly) |
The orientation enforced area of a polygon. |
Definition in file vgl_area.txx.
#define VGL_AREA_INSTANTIATE | ( | T | ) |
template T vgl_area(vgl_polygon<T > const&); \ template T vgl_area_signed(vgl_polygon<T > const&); \ template T vgl_area_enforce_orientation(vgl_polygon<T > const&); \ template vgl_point_2d<T > vgl_centroid(vgl_polygon<T > const&)
Definition at line 109 of file vgl_area.txx.
#define vgl_area_txx_ |
Definition at line 3 of file vgl_area.txx.
T vgl_area | ( | vgl_polygon< T > const & | poly | ) |
T vgl_area_enforce_orientation | ( | vgl_polygon< T > const & | poly | ) |
The orientation enforced area of a polygon.
Definition at line 59 of file vgl_area.txx.
T vgl_area_signed | ( | vgl_polygon< T > const & | poly | ) |
Computes the signed area of a polygon.
The sign is positive if the polygon is oriented counter-clockwise (in RH coordinate system) and negative otherwise. For "polygons" consisting of more than one contour, the result is valid only if the contours are oriented consistently. That is, an enclosed contour must have opposite orientation to the enclosing contour.
Definition at line 12 of file vgl_area.txx.
vgl_point_2d<T> vgl_centroid | ( | vgl_polygon< T > const & | poly | ) |
The area weighted center of a polygon.
In general this is different than the mean of the polygon's vertices
Definition at line 26 of file vgl_area.txx.