diff options
Diffstat (limited to 'src/compensations.h')
| -rw-r--r-- | src/compensations.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/compensations.h b/src/compensations.h new file mode 100644 index 0000000..f034abc --- /dev/null +++ b/src/compensations.h | |||
| @@ -0,0 +1,42 @@ | |||
| 1 | #ifndef INCLUDED_COMPENSATIONS_H | ||
| 2 | #define INCLUDED_COMPENSATIONS_H | ||
| 3 | |||
| 4 | #include "critical_points.h" | ||
| 5 | |||
| 6 | enum compensation_replace { | ||
| 7 | CR_FROM_BEG_TO_BEG = 0b00, | ||
| 8 | CR_FROM_BEG_TO_END = 0b01, | ||
| 9 | CR_FROM_END_TO_BEG = 0b10, | ||
| 10 | CR_FROM_END_TO_END = 0b11, | ||
| 11 | }; | ||
| 12 | |||
| 13 | enum compensation_type { | ||
| 14 | CT_IN, | ||
| 15 | CT_OUT, | ||
| 16 | CT_TRANSFER, | ||
| 17 | CT_LOOP, | ||
| 18 | }; | ||
| 19 | |||
| 20 | struct polyline { | ||
| 21 | struct vec2 *items; | ||
| 22 | uint32_t count; | ||
| 23 | uint32_t capacity; | ||
| 24 | }; | ||
| 25 | |||
| 26 | struct compensation { | ||
| 27 | struct vec2 initial_position; | ||
| 28 | struct polyline polyline; | ||
| 29 | struct path_element *from; | ||
| 30 | struct path_element *to; | ||
| 31 | enum compensation_replace replace; | ||
| 32 | }; | ||
| 33 | |||
| 34 | struct compensations { | ||
| 35 | struct compensation *items; | ||
| 36 | uint32_t count; | ||
| 37 | uint32_t capacity; | ||
| 38 | }; | ||
| 39 | |||
| 40 | struct compensations synthesize_compensations (const struct critical_points *); | ||
| 41 | |||
| 42 | #endif // INCLUDED_COMPENSATIONS_H | ||
