CGAL 4.5 - Geometric Object Generators
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
RandomPolygonTraits_2 Concept Reference

Definition

The concept RandomPolygonTraits_2 describes the requirements for the traits class used by the function random_polygon_2().

Has Models:
CGAL kernels.

Operations

The following two member functions returning instances of the above predicate object types are required.

Types

typedef unspecified_type FT
 The coordinate type of the points of the polygon.
 
typedef unspecified_type Point_2
 The point type of the polygon.
 
typedef unspecified_type Orientation_2
 Predicate object type that determines the orientation of three points. More...
 
typedef unspecified_type Less_xy_2
 Binary predicate object type comparing Point_2s lexicographically. More...
 

Operations

Less_xy_2 less_xy_2_object ()
 
Orienation_2 orientation_2_object ()
 

Member Typedef Documentation

Binary predicate object type comparing Point_2s lexicographically.

It must provide bool operator()(Point_2 p, Point_2 q) that returns true iff p<xyq. We have p<xyq, iff px<qx or px=qx and py<qy, where px and py denote the x and y coordinates of point p, resp.

Predicate object type that determines the orientation of three points.

It must provide Orientation operator()(Point_2 p, Point_2 q, Point_2 r) that returns LEFT_TURN, if r lies to the left of the oriented line l defined by p and q, returns RIGHT_TURN if r lies to the right of l, and returns COLLINEAR if r lies on l.