--- ray/src/common/triangulate.h 2014/01/23 23:51:41 2.1 +++ ray/src/common/triangulate.h 2014/02/07 18:58:40 2.3 @@ -1,4 +1,4 @@ -/* RCSid $Id: triangulate.h,v 2.1 2014/01/23 23:51:41 greg Exp $ */ +/* RCSid $Id: triangulate.h,v 2.3 2014/02/07 18:58:40 greg Exp $ */ /* * triangulate.h * @@ -48,17 +48,15 @@ extern Vert2_list *polyAlloc(int nv); #define polyFree free /* callback for output triangle */ -typedef void tri_out_t(const Vert2_list *tp, int a, int b, int c); +typedef int tri_out_t(const Vert2_list *tp, int a, int b, int c); -/* triangulate a contour/polygon, places results in STL vector - * as series of triangles. */ +/* triangulate a polygon, send results to the given callback function */ extern int polyTriangulate(const Vert2_list *contour, tri_out_t *cb); /* compute area of a contour/polygon */ extern double polyArea(const Vert2_list *contour); -/* decide if point Px/Py is inside triangle defined by - * (Ax,Ay) (Bx,By) (Cx,Cy) */ +/* decide if point P is inside triangle defined by ABC */ extern int insideTriangle(double Ax, double Ay, double Bx, double By, double Cx, double Cy,