diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/morpher/morpher.h | 79 |
1 files changed, 0 insertions, 79 deletions
diff --git a/include/morpher/morpher.h b/include/morpher/morpher.h deleted file mode 100644 index 1a4bd66..0000000 --- a/include/morpher/morpher.h +++ /dev/null | |||
@@ -1,79 +0,0 @@ | |||
1 | #ifndef UPEM_MORPHING_MORPHER | ||
2 | #define UPEM_MORPHING_MORPHER | ||
3 | |||
4 | /** | ||
5 | * File: morpher.h | ||
6 | * Coordinate mapping for morphing transforms. | ||
7 | */ | ||
8 | |||
9 | #include "common/geom.h" | ||
10 | #include "common/time.h" | ||
11 | |||
12 | /** | ||
13 | * Type: Morphing | ||
14 | * Represents an abstract coordinate transform from a source to a destination coordinate matrix, | ||
15 | * constrained by a given set of points. | ||
16 | */ | ||
17 | typedef struct { | ||
18 | CartesianVector dim; | ||
19 | } Morphing; | ||
20 | |||
21 | /** | ||
22 | * Function: morpher_init | ||
23 | * Initialises a morphing. | ||
24 | * | ||
25 | * Parameters: | ||
26 | * *morphing - pointer to the morphing to initialise | ||
27 | * width - coordinate matrix width in pixels | ||
28 | * height - coordinate matrix height in pixels | ||
29 | */ | ||
30 | void morpher_init(Morphing *morphing, IntVector width, IntVector height); | ||
31 | |||
32 | /** | ||
33 | * Function: morpher_free | ||
34 | * Frees any resources allocated to a morphing. | ||
35 | * | ||
36 | * Parameters: | ||
37 | * *morphing - pointer to the morphing to destroy | ||
38 | */ | ||
39 | void morpher_free(Morphing *morphing); | ||
40 | |||
41 | /** | ||
42 | * Function: morpher_add_constraint | ||
43 | * Adds a constraint point to a morphing. | ||
44 | * | ||
45 | * Parameters: | ||
46 | * *morphing - pointer to the morphing to alter | ||
47 | * origin - constraint point coordinates on the origin matrix | ||
48 | * destination - constraint point coordinates on the target matrix | ||
49 | */ | ||
50 | void morpher_add_constraint(Morphing *morphing, CartesianVector origin, CartesianVector destination); | ||
51 | |||
52 | /** | ||
53 | * Function: morpher_get_point_mapping | ||
54 | * Computes and returns the coordinates of a given point at the given transform step | ||
55 | * in the origin and destination matrices. | ||
56 | * | ||
57 | * Parameters: | ||
58 | * *morphing - the base morphing | ||
59 | * point - point to map in cartesian coordinates | ||
60 | * frame - time coefficient corresponding to the transform state, [0;1] | ||
61 | * | ||
62 | * Returns: | ||
63 | * A cartesian coordinate mapping from the origin to the target matrix of the given point | ||
64 | */ | ||
65 | CartesianMapping morpher_get_point_mapping(Morphing *morphing, CartesianVector point, TimeVector frame); | ||
66 | |||
67 | /** | ||
68 | * Function: morpher_get_dim | ||
69 | * Returns the dimension of the morphing. | ||
70 | * | ||
71 | * Parameters: | ||
72 | * *morphing - the morphing | ||
73 | * | ||
74 | * Returns: | ||
75 | * the dimension as a vector | ||
76 | */ | ||
77 | CartesianVector morpher_get_dim(Morphing *morphing); | ||
78 | |||
79 | #endif | ||