diff options
| author | 2026-11-11 22:28:13 +0000 | |
|---|---|---|
| committer | 2026-11-11 22:47:34 +0000 | |
| commit | cb070b2d3f2b6e241e3be1b7e0eeb90fc755255f (patch) | |
| tree | c7d90c0abe9533c87d51b5196871846855efa1ba /src/critical_points.h | |
| download | thesis-cb070b2d3f2b6e241e3be1b7e0eeb90fc755255f.tar.gz | |
Diffstat (limited to 'src/critical_points.h')
| -rw-r--r-- | src/critical_points.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/critical_points.h b/src/critical_points.h new file mode 100644 index 0000000..b7e8cbb --- /dev/null +++ b/src/critical_points.h | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | #ifndef INCLUDED_CRITICAL_POINTS_H | ||
| 2 | #define INCLUDED_CRITICAL_POINTS_H | ||
| 3 | |||
| 4 | #include "path.h" | ||
| 5 | #include "vec2.h" | ||
| 6 | |||
| 7 | enum critical_point_type { | ||
| 8 | CPT_IN, | ||
| 9 | CPT_OUT, | ||
| 10 | CPT_LOOP, | ||
| 11 | CPT_BEG, | ||
| 12 | CPT_END, | ||
| 13 | }; | ||
| 14 | |||
| 15 | struct critical_point { | ||
| 16 | enum critical_point_type type; | ||
| 17 | |||
| 18 | struct path_element *left; | ||
| 19 | struct path_element *right; | ||
| 20 | |||
| 21 | struct vec2 s; | ||
| 22 | struct vec2 r; | ||
| 23 | struct vec2 t_left; | ||
| 24 | struct vec2 t_right; | ||
| 25 | }; | ||
| 26 | |||
| 27 | struct critical_points { | ||
| 28 | struct critical_point *items; | ||
| 29 | uint32_t count; | ||
| 30 | uint32_t capacity; | ||
| 31 | }; | ||
| 32 | |||
| 33 | struct critical_points find_critical_points (const struct path *); | ||
| 34 | |||
| 35 | #endif // INCLUDED_CRITICAL_POINTS_H | ||
