polygon

Polygon triangulation
git clone git://git.meso-star.fr/polygon.git
Log | Files | Refs | README | LICENSE

commit 355df1181bfb6748b7023ff8a5b677eeabde31d2
parent 28b8fb3240e77f45ceaa9273523a113cea423b8f
Author: vaplv <vaplv@free.fr>
Date:   Sun, 21 Sep 2014 19:05:51 +0200

Add comments

Diffstat:
Msrc/polygon.h | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/polygon.h b/src/polygon.h @@ -39,7 +39,6 @@ enum polygon_result { }; struct mem_allocator; - struct polygon; BEGIN_DECLS @@ -61,6 +60,8 @@ POLYGON_API enum polygon_result polygon_clear (struct polygon* polygon); +/* Append a vertex to the polygon contour. Note that this vertex may replace + * the previous one if it is aligned with the two last ones */ POLYGON_API enum polygon_result polygon_vertex_add (struct polygon* polygon, @@ -77,6 +78,8 @@ polygon_vertex_get const uint32_t ivertex, float position[3]); +/* This function assumes that the polygon vertices lie on the same plane and + * that they define a unique contour that is not intersected itself */ POLYGON_API enum polygon_result polygon_triangulate (struct polygon* polygon,