CGAL::operator>>

Definition

This operator imports a polygon with holes, a general polygon, or a general polygon with holes from the input stream in.

An ASCII and a binary format exist. The stream detects the format automatically and can read both.

#include <CGAL/Polygon_with_holes_2.h>

template <class Kernel, Class Container>
istream& istream& in >> CGAL::Polygon_with_holes_2<Kernel, Container>& P
The format consists of the number of points of the outer boundary followed by the points themselves in counterclockwise order, followed by the number of holes, and for each hole, the number of points of the outer boundary is followed by the points themselves in clockwise order.

#include <CGAL/General_polygon_2.h>

template <class ArrTraits>
istream& istream& in >> CGAL::General_polygon_2<ArrTraits>& P

The format consists of the number of curves of the outer boundary followed by the curves themselves in counterclockwise order.

#include <CGAL/General_polygon_with_holes_2.h>

template <class Polygon>
istream& istream& in >> CGAL::General_polygon_with_holes_2<Polygon>& P

The format consists of the number of curves of the outer boundary followed by the curves themselves in counterclockwise order, followed by the number of holes, and for each hole, the number of curves on its outer boundary is followed by the curves themselves in clockwise order.

See Also

CGAL::Polygon_2<PolygonTraits_2, Container>
CGAL::General_polygon_2<ArrTraits>
CGAL::General_polygon_with_holes_2<Polygon>
operator<<