Navigation: Up, Table of Contents, Bibliography, Index, Title Page
The CGAL class Regular_triangulation_2<Gt, Tds> is designed to maintain the regular triangulation of a set of weighted points. The template parameters Gt and Tds stand respectively for a geometric traits class and a triangulation data structure class. Any triangulation data structure that fulfills the requirements of section reference can be used for a regular triangulation. The geometric traits class must provide a weighted point type and a power test on these weighted points. The requirements and defaults for the geometric traits and the power point type are list below.

#include <CGAL/Regular_triangulation_2.h>

Inherits From

Triangulation_2<Gt,Tds>

The functions insert and remove are overwritten to maintain the regular property and the checking function is_valid() is also overwritten to additionally test the local regular property of any pair of neighboring faces.

Types

typedef Gt::Distance
Distance;

typedef Gt::Line Line;
typedef Gt::Direction
Direction;
typedef Gt::Ray Ray;
typedef Gt::Bare_point
Bare_point;
typedef Gt::Weighted_point
Weighted_point;

Creation

Regular_triangulation_2<Gt, Tds> rt ( Gt gt = Gt());
Introduces an empty regular triangulation rt.


Regular_triangulation_2<Gt, Tds> rt ( Regular_triangulation_2 rt);
Copy constructor.

Insertion and Removal

The vertices of the regular triangulation of a set of weighted points PW form only a subset of the set of center points of PW. Therefore the insertion of a weighted point in a regular triangulation does not necessarily imply the creation of a new vertex. If the new inserted point does not appear as a vertex in the regular triangulation, it is said to be hidden by the face in which the corresponding center point is located. Such a weighted point is stored in a list attached to the hiding face, to be used for later tentative of insertions when future removal of some points implies the destruction of the hiding face.

bool
rt.insert ( Weighted_point p,
Face_handle f=Face_handle())
inserts weighted point p. returns true if a new vertex is created. If a weighted point with the same center point but a different weight already exists in the triangulation, it is removed and replaced by the new point.

bool
rt.insert ( Weighted_point p,
Locate_type lt,
Face_handle loc,
int li)
insert a weighted point p whose bare-point is assumed to be located in lt,loc,li.

Vertex_handle rt.push_back ( Point p)
Equivalent to insert(p).

template < class InputIterator >
int rt.insert ( InputIterator first, InputIterator last)
inserts the weighted points in the range [.first, last.). Returns the number of created vertices.
Precondition: The value_type of first and last is Weighted_point.

int rt.remove ( Vertex_handle v)
removes the vertex from the triangulation and returns the number of new vertices created by the insertion of previously hidden points.

Geometric Predicates

Oriented_side rt.power_test ( Face_handle f, Weighted_point p)
Returns the power test of p with respect to the power circle associated with f


begin of advanced section

Miscellaneous

bool rt.is_valid ( bool verbose = false, int level = 0)
Tests the validity of the triangulation as a Triangulation_2 and additionally test the regularity of the triangulation. This method is mainly useful for debugging Delaunay triangulation algorithms designed by the user.

end of advanced section


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