Name
Delaunay and constrained Delaunay triangulations -- implementation of a dynamic Delaunay triangulation algorithm.
Description
The functions described in this section are useful to build two-dimensional Delaunay and constrained Delaunay triangulations. Only the x and y coordinates of the points are taken into account.
The algorithm is fully dynamic (insertion and deletion) for Delaunay triangulation and semi-dynamic (insertion only of vertices and constraints) for constrained Delaunay triangulation.
The insertion part uses a very simple jump-and-walk location algorithm which can be used on any (even non-Delaunay) 2D triangulation as long as its boundary is convex.
Details
GTS_CONSTRAINT_CLASS()
#define GTS_CONSTRAINT_CLASS(klass) |
Casts klass to GtsConstraintClass.
GTS_CONSTRAINT()
#define GTS_CONSTRAINT(obj) |
Casts obj to GtsConstraint.
GTS_IS_CONSTRAINT()
#define GTS_IS_CONSTRAINT(obj) |
Evaluates to TRUE if obj is a GtsConstraint, FALSE otherwise.
struct GtsConstraintClass
struct GtsConstraintClass; |
The constraint class derived from GtsEdgeClass.
struct GtsConstraint
The constraint object derived from GtsEdge.
gts_point_locate ()
Locates the face of the planar projection of surface containing
p. The planar projection of surface must define a connected set
of triangles without holes and bounded by a convex boundary. The
algorithm is randomized and performs in O(n^1/3) expected time
where n is the number of triangles of surface.
If a good guess is given the point location can be significantly faster.
gts_delaunay_add_vertex ()
Adds vertex v to the Delaunay triangulation defined by
surface. If v is not contained in the convex hull bounding
surface, v is not added to the triangulation.
gts_delaunay_remove_vertex ()
Removes v from the Delaunay triangulation defined by surface and restore
the Delaunay property. Vertex v must not be used by any constrained edge
otherwise the triangulation is not guaranteed to be Delaunay.
gts_delaunay_add_constraint ()
Add constraint c to the constrained Delaunay triangulation defined by
surface.
gts_delaunay_remove_hull ()
void gts_delaunay_remove_hull (GtsSurface *surface); |
Removes all the edges of the boundary of surface which are not
constraints.