Navigation: Up, Table of Contents, Bibliography, Index, Title Page

Types

Polygon_traits::FT
The coordinate type of the points of the polygon (i.e. a field type).

Polygon_traits::Point_2
The point type on which the polygon algorithms operate.

Polygon_traits::Segment_2
The segment type on which the polygon algorithms operate.

Polygon_traits::Vector_2
The vector type on which the polygon algorithms operate.

Polygon_traits::Less_xy
Binary predicate object type comparing Point_2s lexicographically. Must provide bool operator()(Point_2 p, Point_2 q) where true is returned iff p <xy q. We have p<xyq, iff px < qx or px = qx and py < qy, where px and py denote x and y coordinate of point p resp.

Polygon_traits::Less_yx
Same as Less_xy with the roles of x and y interchanged.

Creation

Polygon_traits traits;
Default constructor.

Polygon_traits traits ( t);
Copy constructor.

Operations

bool
traits.lexicographically_xy_smaller ( Point_2 p,
Point_2 q)
Returns true iff px < qx or px = qx and py < qy.

bool
traits.lexicographically_yx_smaller_or_equal ( Point_2 p,
Point_2 q)
Returns true iff py qy or py = qy and px qx.

FT traits.cross_product_2 ( Vector_2 p, Vector_2 q)
Returns px qy - py qx.

FT
traits.determinant_2 ( Point_2 p,
Point_2 q,
Point_2 r)
Returns (px-qx)(qy-ry) - (py-qy)(qx-rx).

int traits.sign ( FT x)
Returns -1 if x < 0, 0 if x = 0 and 1 if x > 0

bool traits.is_negative ( FT x)
Returns true iff x<0.

bool
traits.do_intersect ( Point_2 p1,
Point_2 q1,
Point_2 p2,
Point_2 q2)
Returns true iff the segments [p1,q1] and [p2,q2] intersect.

Orientation traits.orientation ( Point_2 p, Point_2 q, Point_2 r)
Returns LEFTTURN, if r lies to the left of the oriented line l defined by p and q, returns RIGHTTURN if r lies to the right of l, and returns COLLINEAR if r lies on l.

Comparison_result traits.compare_x ( Point_2 p, Point_2 q)
Returns SMALLER if p_x < q_x, EQUAL if p_x = q_x and LARGER if p_x > q_x

Comparison_result traits.compare_y ( Point_2 p, Point_2 q)
Returns SMALLER if p_y < q_y, EQUAL if p_y = q_y and LARGER if p_y > q_y

bool
traits.have_equal_direction ( Vector_2 v1,
Vector_2 v2)
Returns true iff the vectors v1 and v2 have the same direction.


Next: Class declaration of Polygon_traits_2<R>
Navigation: Up, Table of Contents, Bibliography, Index, Title Page
The GALIA project. Jan 18, 2000.