summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorpacien2017-12-24 00:07:53 +0100
committerpacien2017-12-24 00:07:53 +0100
commitcdbae7a5e7515ba50ae21f15929a086fc40fcae3 (patch)
tree492c7451e559beb35b0680cd474adaa5a0d8f0d0 /include
parent39cbe5d0d7db78f0d2808abea5562db84d03a07e (diff)
downloadmorpher-cdbae7a5e7515ba50ae21f15929a086fc40fcae3.tar.gz
Implement Delaunay propagation
Signed-off-by: pacien <pacien.trangirard@pacien.net>
Diffstat (limited to 'include')
-rw-r--r--include/morpher/quadrilateral.h11
-rw-r--r--include/morpher/trianglemap.h10
2 files changed, 21 insertions, 0 deletions
diff --git a/include/morpher/quadrilateral.h b/include/morpher/quadrilateral.h
index c8cf3a1..8691263 100644
--- a/include/morpher/quadrilateral.h
+++ b/include/morpher/quadrilateral.h
@@ -36,4 +36,15 @@ void quadrilateral_flip_diagonal(TriangleMap *t1, TriangleMap *t2);
36 */ 36 */
37bool quadrilateral_is_delaunay(TriangleMap *t1, TriangleMap *t2); 37bool quadrilateral_is_delaunay(TriangleMap *t1, TriangleMap *t2);
38 38
39/**
40 * Function: quadrilateral_propagate_delaunay
41 * Ensures that the quadrilateral spawned by the given triangles fulfills the Delaunay criterion,
42 * flipping the diagonal if necessary and propagating the changes to the neighbouring triangles.
43 *
44 * Parameters:
45 * *start - the starting triangle
46 * *neighbor - a neighboring triangle
47 */
48void quadrilateral_propagate_delaunay(TriangleMap *start, TriangleMap *neighbor);
49
39#endif 50#endif
diff --git a/include/morpher/trianglemap.h b/include/morpher/trianglemap.h
index 05e7b87..0bb6a1d 100644
--- a/include/morpher/trianglemap.h
+++ b/include/morpher/trianglemap.h
@@ -106,6 +106,16 @@ void trianglemap_set_neighbors(TriangleMap *t, TriangleMap *n1, TriangleMap *n2,
106void trianglemap_replace_neighbor(TriangleMap *t, TriangleMap *old, TriangleMap *new); 106void trianglemap_replace_neighbor(TriangleMap *t, TriangleMap *old, TriangleMap *new);
107 107
108/** 108/**
109 * Function: trianglemap_foreach_neighbor
110 * Executes the given function for each existing (non-NULL) neighbour of the supplied triangle.
111 *
112 * Parameters:
113 * *t - the base triangle
114 * *f - the function
115 */
116void trianglemap_foreach_neighbor(TriangleMap *t, void (*f)(TriangleMap *current, TriangleMap *neighbor));
117
118/**
109 * Function: trianglemap_split 119 * Function: trianglemap_split
110 * Splits a triangle into three sub-triangles at the supplied center vertex, updating the surrounding triangles. 120 * Splits a triangle into three sub-triangles at the supplied center vertex, updating the surrounding triangles.
111 * The first triangle resulting from the split is returned, with the two others chained as linear neighbours. 121 * The first triangle resulting from the split is returned, with the two others chained as linear neighbours.