#include "triangulation.h"
Functions | |
void | convertToElementsList (Facet3D *f, list< Element2D > &hull) |
void | cleanUp (Facet3D *f, list< Facet3D * > &facets, list< Ridge3D * > &ridges) |
Facet3D * | getImprovableFacet (Facet3D *f) |
Ridge3D * | getRidge (list< Ridge3D * > &Ridges, Point3D *p1, Point3D *p2) |
void | removeVisibleFacets (Facet3D *f, Point3D *ref, Facet3D *link, list< Ridge3D * > &orphanRidges, list< Point3D * > &halfspace, list< Facet3D * > &facetsToDelete, list< Ridge3D * > &ridgesToDelete) |
Facet3D * | buildFirstFacet (list< Point3D * > &points) |
void | quickHull (list< Point3D * > &points, list< Element2D > &hull) |
void | convertToElementsList (Facet4D *f, list< Element3D > &delaunay) |
void | cleanUp (Facet4D *f, list< Facet4D * > &facets, list< Ridge4D * > &ridges) |
Facet4D * | getImprovableFacet (Facet4D *f) |
Ridge4D * | getRidge (list< Ridge4D * > &Ridges, Point4D *p1, Point4D *p2, Point4D *p3) |
void | removeVisibleFacets (Facet4D *f, Point4D *ref, Facet4D *link, list< Ridge4D * > &orphanRidges, list< Point4D * > &halfspace, list< Facet4D * > &facetsToDelete, list< Ridge4D * > &ridgesToDelete) |
Facet4D * | buildFirstFacet (list< Point4D * > &points) |
bool | sortCriterionRidges (Ridge4D *r1, Ridge4D *r2) |
bool | uniqueCriterionRidges (Ridge4D *r1, Ridge4D *r2) |
void | quickHull (list< Point4D * > &points, list< Element3D > &hull) |
Creates the first facet of the set. To approximate properly the hull with one facet, creating a facet with distant points.
points | The set of points. |
Creates the first facet of the set. To approximate properly the hull with one facet, creating a facet with distant points.
points | The set of points. |
Collects the pointers to the facets and ridges to be deleted.
f | 1st 3D facet. The attached ones will be found recursively. | |
facets | List of pointers to facets to be deleted. | |
ridges | List of pointers to ridges to be deleted. |
Collects the pointers to the facets and ridges to be deleted.
f | 1st 3D facet. The attached ones will be found recursively. | |
facets | List of pointers to facets to be deleted. | |
ridges | List of pointers to ridges to be deleted. |
Converts linked 4D facets to the related Delaunay tetraedrisation Dimension reduction (4D to 3D). Only the facets of the lower part of the hull are relevant.
f | 1st 4D facet. The attached ones will be found recursively. | |
hull | Output delaunay tetraedrisation. The elements are added in hull. |
Converts linked 3D facets to the related Delaunay triangulation Dimension reduction (3D to 2D). Only the facets of the lower part of the hull are relevant.
f | 1st 3D facet. The attached ones will be found recursively. | |
hull | Output delaunay triangulation. The elements are added in hull. |
Returns a pointer to a facet that has to be improved (non-empty visibility list). The neighbours are visited randomly: this prevents the function to loop a long time in the same set of neighbours, and increases dramatically the performance. Each neighbour is visited once at most.
f | 1st 4D facet. The attached ones will be found recursively. |
Returns a pointer to a facet that has to be improved (non-empty visibility list). The neighbours are visited randomly: this prevents the function to loop a long time in the same set of neighbours, and increases dramatically the performance. Each neighbour is visited once at most.
f | 1st 3D facet. The attached ones will be found recursively. |
Returns a pointer to a ridge. Creates the ridge if not exisiting. Deletes a ridge when getRidge was called twice on this ridge (1 ridge = 2 and only 2 neighbours). First call with an empty ridge list. The subsequent calls will create or delete ridges in the list. If used properly, after the last call, the ridge list is empty (pairs of ridges were created).
Ridges | The current list of ridges. | |
p1 | First point of the ridge (the order is not significant) | |
p2 | Second point of the ridge (the order is not significant) | |
p3 | Third point of the ridge (the order is not significant) |
Returns a pointer to a ridge. Creates the ridge if not exisiting. Deletes a ridge when getRidge was called twice on this ridge (1 ridge = 2 and only 2 neighbours). First call with an empty ridge list. The subsequent calls will create or delete ridges in the list. If used properly, after the last call, the ridge list is empty (pairs of ridges were created).
Ridges | The current list of ridges. | |
p1 | First point of the ridge (the order is not significant) | |
p2 | Second point of the ridge (the order is not significant) |
Computes the Delaunay triangulation of the (x,y,z) projection of a set of 4D points, using the QuickHull algorithm.
points | The set of 4D points | |
hull | The output list of Element3D (Delaunay trangulation) |
Computes the Delaunay triangulation of the (x,y) projection of a set of 3D points, using the QuickHull algorithm.
points | The set of 3D points | |
hull | The output list of Element2D (Delaunay trangulation) |
void removeVisibleFacets | ( | Facet4D * | f, | |
Point4D * | ref, | |||
Facet4D * | link, | |||
list< Ridge4D * > & | orphanRidges, | |||
list< Point4D * > & | halfspace, | |||
list< Facet4D * > & | facetsToDelete, | |||
list< Ridge4D * > & | ridgesToDelete | |||
) |
Being given a facet and a point visible from this facet, computes the neighbouring facets that "see" the point (and, thus, that will be removed), as well as the set of ridges on which to build the new facets (ridges with only one facet after deletion): those facets will link the ridges to the point.
f | An improvable facet (non-empty visibility list) | |
ref | The reference point, visible from the facet (ideally, the farthest one) | |
link | After calling removeVisibleFacets, this points to a safe facet, that will not be removed. | |
orphanRidges | Ridges on the border of the hole to fill, having only one neighbour. Needs to be sorted and having doubles removed after call. | |
halfspace | List of the points that were visible from the set of removed facets. Needs to be sorted and having doubles removed after call. | |
facetsToDelete | List of pointers to delete. | |
ridgesToDelete | List of pointers to delete. |
void removeVisibleFacets | ( | Facet3D * | f, | |
Point3D * | ref, | |||
Facet3D * | link, | |||
list< Ridge3D * > & | orphanRidges, | |||
list< Point3D * > & | halfspace, | |||
list< Facet3D * > & | facetsToDelete, | |||
list< Ridge3D * > & | ridgesToDelete | |||
) |
Being given a facet and a point visible from this facet, computes the neighbouring facets that "see" the point (and, thus, that will be removed), as well as the set of ridges on which to build the new facets (ridges with only one facet after deletion): those facets will link the ridges to the point.
f | An improvable facet (non-empty visibility list) | |
ref | The reference point, visible from the facet (ideally, the farthest one) | |
link | After calling removeVisibleFacets, this points to a safe facet, that will not be removed. | |
orphanRidges | Ridges on the border of the hole to fill, having only one neighbour. Needs to be sorted and having doubles removed after call. | |
halfspace | List of the points that were visible from the set of removed facets. Needs to be sorted and having doubles removed after call. | |
facetsToDelete | List of pointers to delete. | |
ridgesToDelete | List of pointers to delete. |