CGAL 5.0.2 - 2D Regularized Boolean Set-Operations
|
#include <CGAL/General_polygon_2.h>
The class General_polygon_2
models the concept GeneralPolygon_2
.
It represents a simple general-polygon. It is parameterized with the type ArrTraits
that models the concept ArrangementDirectionalXMonotoneTraits_2
. The latter is a refinement of the concept ArrangementXMonotoneTraits_2
. In addition to the requirements of the concept ArrangementXMonotoneTraits_2
, a model of the concept ArrangementDirectionalXMonotoneTraits_2
must support the following functions:
This class supports a few convenient operations in addition to the requirements that the concept GeneralPolygon_2
lists.
Related Functions | |
(Note that these are not member functions.) | |
template<class ArrTraits > | |
std::istream & | operator>> (std::istream &in, CGAL::General_polygon_2< ArrTraits > &P) |
This operator imports a general polygon from the input stream in . More... | |
template<class ArrTraits > | |
std::ostream & | operator<< (std::ostream &out, CGAL::General_polygon_2< ArrTraits > &P) |
This operator exports a general polygon to the output stream out . More... | |
Types | |
typedef unspecified_type | Size |
number of edges size type. | |
Operations | |
Size | size () |
returns the number of edges of the general polygon. | |
Modifiers | |
void | clear () |
clears the polygon. | |
void | reverse_orientation () |
reverses the orientation of the polygon. More... | |
Predicates | |
bool | is_empty () |
returns true if the polygon is empty, and false otherwise. | |
Orientation | orientation () |
returns the orientation of the polygon. More... | |
Orientation CGAL::General_polygon_2< ArrTraits >::orientation | ( | ) |
returns the orientation of the polygon.
is_simple()
. void CGAL::General_polygon_2< ArrTraits >::reverse_orientation | ( | ) |
reverses the orientation of the polygon.
is_simple()
.
|
related |
This operator exports a general polygon to the output stream out
.
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.
The number of curves of the outer boundary is exported followed by the curves themselves in counterclockwise order.
|
related |
This operator imports a general polygon from the input stream in
.
An ASCII and a binary format exist. The stream detects the format automatically and can read both.
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.