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

To be used by Triangulation_3<Traits, Tds>

The geometric traits class Triangulation_Traits_3 of the triangulation class Triangulation_3<Traits, Tds> must define the geometric objects (points, segments, triangles and tetrahedra) forming the triangulation together with a few geometric predicates on these objects: equality, coordinate comparison, orientation in space, orientation in case of coplanar points, and collinearity tests.

Types

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

Triangulation_Traits_3::Segment
The type must provide a constructor that takes two points as arguments.

Triangulation_Traits_3::Triangle
The type must provide a constructor that takes three points as arguments.

Triangulation_Traits_3::Tetrahedron
The type must provide a constructor that takes four points as arguments.

Creation

Only a default constructor is required.

Triangulation_Traits_3 traits;
A default constructor.

Predicates

bool traits.equal ( Point p, Point q)
Equality test.

Comparison_result traits.compare_x ( Point p, Point q)
Comparison of x-coordinates. Returns LARGER (resp. EQUAL, SMALLER) when the x coordinate of p is larger than (resp. equal to, smaller than) the x coordinate of q.
Comparison_result traits.compare_y ( Point p, Point q)
Comparison of y-coordinates.
Comparison_result traits.compare_z ( Point p, Point q)
Comparison of z-coordinates.

Orientation
traits.orientation ( Point p0,
Point p1,
Point p2,
Point p3)
Orientation test in three dimensions.

Orientation
traits.orientation_in_plane ( Point q,
Point r,
Point s,
Point test)
Tests whether test is on the same side of (q, r) as s in the common plane of the four points. Returns COLLINEAR if test, q, r are collinear, POSITIVE if (q, r, test) and (q, r, s) have the same orientation, NEGATIVE if (q, r, test) and (q, r, s) have opposite orientations.
Precondition: test, q, r, s are coplanar and q, r, s are not collinear.

bool traits.collinear ( Point p, Point q, Point r)
Collinearity test.

To be used by Delaunay_triangulation_3<Traits, Tds>

In addition to the requirements described before, the geometric traits class of a Delaunay triangulation must fulfill the following requirements:

Predicates

Oriented_side
traits.side_of_oriented_sphere ( Point p,
Point q,
Point r,
Point s,
Point test)
Determines on which side of the oriented sphere circumscribing p, q, r, s the point test lies.

Oriented_side
traits.side_of_oriented_circle ( Point p,
Point q,
Point r,
Point test)
Determines on which side of the oriented circle circumscribing p, q, r the point test lies.
Precondition: p, q, r, test are coplanar and p, q, r are not collinear.

To be used by Delaunay_hierarchic_triangulation_3<Traits, Tds>

Not yet implemented

To be used by Regular_triangulation_3<Traits, Tds>

To be used as the traits class for the regular triangulation provided by CGAL, a class must satisfy additional requirements.

We use here the same notation as in Section reference.

Oriented_side
traits.power_test ( Weighted_point p,
Weighted_point q,
Weighted_point r,
Weighted_point s,
Weighted_point t)
Let z(p,q,r,s)(w) be the power sphere of the weighted points (p,q,r,s). Returns
ON_ORIENTED_BOUNDARY if t is orthogonal to z(p,q,r,s)(w),
ON_NEGATIVE_SIDE if t lies outside the oriented sphere of center z(p,q,r,s) and radius sqrt( wz(p,q,r,s)2 + wt2 ) (which is equivalent to (t(w),z(p,q,r,s)(w) >0)),
ON_POSITIVE_SIDE if t lies inside this oriented sphere.
Precondition: p, q, r, s are not coplanar.

Note that with this definition, if all the points have a weight equal to 0, then power_test(p,q,r,s,t) = side_of_oriented_sphere(p,q,r,s,t).

Oriented_side
traits.power_test ( Weighted_point p,
Weighted_point q,
Weighted_point r,
Weighted_point t)
Analogous definition as the previous method, for coplanar points, with the power circle z(p,q,r)(w).
Precondition: p, q, r are not collinear and p, q, r, t are coplanar.

If all the points have a weight equal to 0, then power_test(p,q,r,s,t) = side_of_oriented_circle(p,q,r,s,t).

Oriented_side
traits.power_test ( Weighted_point p,
Weighted_point q,
Weighted_point t)
Same for collinear points, where z(p,q)(w) is the power segment of p and q.
Precondition: p and q have different Bare_points, and p, q, t are collinear.

If all the points have a weight equal to 0, then power_test(p,q,t) gives the same answer as the kernel predicate s(p,q).has_on(t) would give, where s(p,q) denotes the segment with endpoints p and q.


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