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

The requirements for the geometric traits class of the basic triangulation class Triangulation_2<Gt, Tds> are kept rather light. Essentially, a geometric traits class Geom_traits has to provide some type for points, segments and triangles, and a few geometric predicates: coordinate comparison and orientation tests.

Types

Geom_traits::Point
The type must provide a copy constructor and assignment operator.

Geom_traits::Segment
The type must provide a constructor that takes two points as argument.

Geom_traits::Triangle
The type must provide a constructor that takes three points as argument.

Creation

Only a default constructor and an assignement operator are required. Note that further constructors can be provided.

Geom_traits gt;
A default constructor.

Geom_traits gt = gtr Assignment operator.

Predicates

Comparison_result gt.compare_x ( Point p0, Point p1)
Compares the x-coordinates.
Comparison_result gt.compare_y ( Point p0, Point p1)
Compares the y-coordinates.
bool gt.compare ( Point p0, Point p1)
True if compare_x(p0,p1) and compare_y(p0,p1) return EQUAL.
Orientation gt.orientation ( Point p0, Point p1, Point p2)
Orientation test.
Oriented_side
gt.side_of_oriented_circle ( Point p,
Point q,
Point r,
Point s)
Returns the oriented side of the query point s with respect to the oriented circle going through p,q,r in that order. This predicates is required only if the function oriented_side(const Face_handle& f, const Point &p) is explicitely called by the user.

Construction

Point gt.circumcenter ( Point p, Point q, Point r)
Returns the center of the circle through (p,q,r) This method is required only if the function circumcenter(Face_handle f) is called by the user.

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