CGAL::operator<<

Definition

This operator exports a polygon with holes, a general polygon, or a general polygon with holes P to the output stream out. The output is in ASCII format.

An ASCII and a binary format exist. The format can be selected with the Cgal modifiers for streams, set_ascii_mode and set_binary_mode respectively. The modifier set_pretty_mode can be used to allow for (a few) structuring comments in the output. Otherwise, the output would be free of comments. The default for writing is ASCII without comments.

#include <CGAL/Polygon_with_holes_2.h>

template <class Kernel, class Container>
ostream& ostream& out << CGAL::Polygon_with_holes_2<Kernel,Container> P

The number of points of the outer boundary is exported followed by the points themselves in counterclockwise order. Then, the number of holes is exported, and for each hole, the number of points on its outer boundary is exported followed by the points themselves in clockwise order.

#include <CGAL/General_polygon_2.h>

template <class ArrTraits>
ostream& ostream& out << CGAL::General_polygon_2<ArrTraits> P
The number of curves of the outer boundary is exported followed by the curves themselves in counterclockwise order.

#include <CGAL/General_polygon_with_holes_2.h>

template <class Polygon>
ostream& ostream& out << CGAL::General_polygon_with_holes_2<Polygon> P

The number of curves of the outer boundary is exported followed by the curves themselves in counterclockwise order. Then, the number of holes is exported, and for each hole, the number of curves on its outer boundary is exported 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>>