-
Examples
-
Polygon/polygon_algorithms.cpp
, and
Polygon/projected_polygon.cpp
.
#include <CGAL/Polygon_2_algorithms.h>
Returns an iterator to the leftmost point from the range
[first,last)
.
In case of a tie, the point with the smallest
y
-coordinate is taken.
-
Template Parameters
-
Traitsis a model of the concept
PolygonTraits_2
. Only the members
Less_xy_2
and
less_xy_2_object()
are used.
ForwardIterator
must have
Traits::Point_2
as value type.
-
See also
-
CGAL::right_vertex_2()
CGAL::top_vertex_2()
CGAL::bottom_vertex_2()
CGAL::Polygon_2
#include <CGAL/Polygon_2_algorithms.h>
Computes if a polygon is clockwise or counterclockwise oriented.
-
Precondition
-
is_simple_2(first, last, traits);
-
Template Parameters
-
Traitsis a model of the concept
PolygonTraits_2
. Only the following members of this traits class are used:
CGAL::Polygon_2
CGAL::Orientation
-
Template Parameters
-
Traitsis a model of the concept
PolygonTraits_2
. Only the following members of this traits class are used:
CGAL::is_simple_2()
CGAL::Polygon_2
Oriented_side
#include <CGAL/Polygon_2_algorithms.h>
Computes the signed area of the polygon defined by the range of points
[first,last)
.
The sign is positive for counterclockwise polygons, negative for clockwise polygons. If the polygon is not simple, the area is not well defined.
-
Template Parameters
-
Traitsis a model of the concept
PolygonTraits_2
. Only the following members of this traits class are used:
CGAL::Polygon_2
#include <CGAL/Polygon_2_algorithms.h>
Returns an iterator to the rightmost point from the range
[first,last)
.
In case of a tie, the point with the largest
y
-coordinate is taken.
-
Template Parameters
-
Traitsis a model of the concept
PolygonTraits_2
. In fact, only the members
Less_xy_2
and
less_xy_2_object()
are used.
ForwardIterator
must have
Traits::Point_2
as value type.
-
See also
-
CGAL::left_vertex_2()
CGAL::top_vertex_2()
CGAL::bottom_vertex_2()
CGAL::Polygon_2
#include <CGAL/Polygon_2_algorithms.h>
Returns an iterator to the topmost point from the range
[first,last)
.
In case of a tie, the point with the largest
x
-coordinate is taken.
-
Template Parameters
-
Traitsis a model of the concept
PolygonTraits_2
. Only the members
Less_yx_2
and
less_yx_2_object()
are used.
ForwardIterator
must have
Traits::Point_2
as value type.
-
See also
-
CGAL::left_vertex_2()
CGAL::right_vertex_2()
CGAL::bottom_vertex_2()
CGAL::Polygon_2