From e50baf1bcea86bd969b7d87e9dd643607ef7f161 Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Sat, 5 May 2012 17:39:11 +0200 Subject: digital/avr/modules/math/geometry: intersection with a polygon --- digital/avr/modules/math/geometry/intersection.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'digital/avr/modules/math/geometry/intersection.h') diff --git a/digital/avr/modules/math/geometry/intersection.h b/digital/avr/modules/math/geometry/intersection.h index 9f9cf161..faff928c 100644 --- a/digital/avr/modules/math/geometry/intersection.h +++ b/digital/avr/modules/math/geometry/intersection.h @@ -36,4 +36,13 @@ uint8_t intersection_segment_segment (const vect_t *a, const vect_t *b, const vect_t *c, const vect_t *d); +/** Test intersection between a line segment and any line segment defining a + * polygon. Return non zero if they intersect. + * - a, b: line segment vertices. + * - poly: array of polygon vertices. + * - poly_size: number of polygon vertices. */ +uint8_t +intersection_segment_poly (const vect_t *a, const vect_t *b, + const vect_t *poly, uint8_t poly_size); + #endif /* intersection_h */ -- cgit v1.2.3