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

Types

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

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

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

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

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.

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

Creation

Traits traits;
Default constructor.

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.
CGAL_Orientation traits.orientation ( Point_2 p, Point_2 q, Point_2 r)
Returns CGAL_LEFTTURN, if r lies to the left of the oriented line l defined by p and q, returns CGAL_RIGHTTURN if r lies to the right of l, and returns CGAL_COLLINEAR if r lies on l.
CGAL_Comparison_result
traits.compare_x ( Point_2 p, Point_2 q)

Returns CGAL_SMALLER if p_x < q_x, CGAL_EQUAL if p_x = q_x and CGAL_LARGER if p_x > q_x

CGAL_Comparison_result
traits.compare_y ( Point_2 p, Point_2 q)

Returns CGAL_SMALLER if p_y < q_y, CGAL_EQUAL if p_y = q_y and CGAL_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 CGAL_Polygon_traits_2<R>
Navigation: Up, Table of Contents, Bibliography, Index, Title Page
The CGAL Project. 22 January, 1999.