diff options
Diffstat (limited to 'include/common/geom.h')
-rw-r--r-- | include/common/geom.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/include/common/geom.h b/include/common/geom.h new file mode 100644 index 0000000..15a1d57 --- /dev/null +++ b/include/common/geom.h | |||
@@ -0,0 +1,32 @@ | |||
1 | #ifndef UPEM_MORPHING_GEOM | ||
2 | #define UPEM_MORPHING_GEOM | ||
3 | |||
4 | /** | ||
5 | * File: geom.h | ||
6 | */ | ||
7 | |||
8 | #include <inttypes.h> | ||
9 | |||
10 | /** | ||
11 | * Type: IntVector | ||
12 | * An abstract 1-D vector. | ||
13 | */ | ||
14 | typedef int32_t IntVector; | ||
15 | |||
16 | /** | ||
17 | * Type: CartesianVector | ||
18 | * An abstract 2-D vector in cartesian coordinates. | ||
19 | */ | ||
20 | typedef struct { | ||
21 | IntVector x, y; | ||
22 | } CartesianVector; | ||
23 | |||
24 | /** | ||
25 | * Type: CartesianMapping | ||
26 | * A tuple of cartesian vectors representing a mapping. | ||
27 | */ | ||
28 | typedef struct { | ||
29 | CartesianVector origin, target; | ||
30 | } CartesianMapping; | ||
31 | |||
32 | #endif | ||