summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam NAILI2017-12-27 17:28:24 +0100
committerAdam NAILI2017-12-27 17:28:24 +0100
commit0db8ad1ea2547c0b68b21c2357d71d99f19ce9a9 (patch)
treeca25777ca407b924b5e96b353bec78f42e255e1b
parentf39e6e3be66ff6077dd83094850232a46a21e624 (diff)
parentc502b20bac91ebc9128c2e3a586391fcabd84b6b (diff)
downloadmorpher-0db8ad1ea2547c0b68b21c2357d71d99f19ce9a9.tar.gz
Merge branch 'master' into gui
-rw-r--r--include/morpher/morpher.h79
-rw-r--r--src/morpher/morpher.c23
2 files changed, 0 insertions, 102 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 */
17typedef 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 */
30void 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 */
39void 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 */
50void 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 */
65CartesianMapping 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 */
77CartesianVector morpher_get_dim(Morphing *morphing);
78
79#endif
diff --git a/src/morpher/morpher.c b/src/morpher/morpher.c
deleted file mode 100644
index 8bb5427..0000000
--- a/src/morpher/morpher.c
+++ /dev/null
@@ -1,23 +0,0 @@
1#include "morpher/morpher.h"
2
3void morpher_init(Morphing *morphing, IntVector width, IntVector height) {
4 morphing->dim = (CartesianVector) {width, height};
5}
6
7void morpher_free(Morphing *morphing) {
8
9}
10
11void morpher_add_constraint(Morphing *morphing, CartesianVector origin, CartesianVector destination) {
12
13}
14
15CartesianMapping morpher_get_point_mapping(Morphing *morphing, CartesianVector point, TimeVector frame) {
16 // TODO
17 return (CartesianMapping) {point,
18 point};
19}
20
21CartesianVector morpher_get_dim(Morphing *morphing) {
22 return morphing->dim;
23}