aboutsummaryrefslogtreecommitdiff
path: root/pmpd.h
diff options
context:
space:
mode:
authorCyrille Henry <nusmuk@users.sourceforge.net>2013-05-01 15:03:05 +0000
committerCyrille Henry <nusmuk@users.sourceforge.net>2013-05-01 15:03:05 +0000
commit563967c7bb1b1b4eb0c09b757c4b2595d3aab97c (patch)
treebe443fcebfebe666f6b08b681ae36637b233112b /pmpd.h
parenta81fa35c46071ea95f49056eb159a0dc1fe3ed12 (diff)
pmpd code refactorisation
svn path=/trunk/externals/pmpd/; revision=17105
Diffstat (limited to 'pmpd.h')
-rw-r--r--pmpd.h55
1 files changed, 55 insertions, 0 deletions
diff --git a/pmpd.h b/pmpd.h
new file mode 100644
index 0000000..69c4999
--- /dev/null
+++ b/pmpd.h
@@ -0,0 +1,55 @@
+/*
+ * pmpd.h
+ *
+ */
+
+#define nb_max_link 100000
+#define nb_max_mass 100000
+
+#define max(a,b) ( ((a) > (b)) ? (a) : (b) )
+#define min(a,b) ( ((a) < (b)) ? (a) : (b) )
+
+static t_class *pmpd_class;
+
+typedef struct _mass {
+ t_symbol *Id;
+ int mobile;
+ t_float invM;
+ t_float speedX;
+ t_float posX;
+ t_float forceX;
+ t_float D2;
+ int num;
+} foo;
+
+typedef struct _link {
+ t_symbol *Id;
+ int lType;
+ struct _mass *mass1;
+ struct _mass *mass2;
+ t_float K;
+ t_float D;
+ t_float L;
+ t_float Pow;
+ t_float Lmin;
+ t_float Lmax;
+ t_float distance;
+ t_symbol *arrayK;
+ t_symbol *arrayD;
+ t_float K_L; // longeur du tabeau K
+ t_float D_L; // longeur du tabeau D
+} foo1 ;
+
+typedef struct _pmpd {
+ t_object x_obj;
+ struct _link link[nb_max_link];
+ struct _mass mass[nb_max_mass];
+ t_outlet *main_outlet;
+ t_outlet *info_outlet;
+ int nb_link;
+ int nb_mass;
+ t_float minX, maxX;
+ t_int grab; // si on grab une mass ou pas
+ t_int grab_nb; // la masse grabé
+} t_pmpd;
+