aboutsummaryrefslogtreecommitdiff
path: root/src/pmpd.c
diff options
context:
space:
mode:
authorCyrille Henry <nusmuk@users.sourceforge.net>2006-06-13 17:47:10 +0000
committerCyrille Henry <nusmuk@users.sourceforge.net>2006-06-13 17:47:10 +0000
commitb7ebf0bf8ada854bb04c403927328bf0ca273599 (patch)
tree18552ca762d5ede2994c2f3d35484a6b69d3e758 /src/pmpd.c
parentcfb3f3e8b55e40acf9e1ab4af0f809fe3c0fabb0 (diff)
spliting pmpd lib to single files
svn path=/trunk/externals/pmpd/; revision=5221
Diffstat (limited to 'src/pmpd.c')
-rwxr-xr-xsrc/pmpd.c48
1 files changed, 40 insertions, 8 deletions
diff --git a/src/pmpd.c b/src/pmpd.c
index 690c1d2..78c2f7f 100755
--- a/src/pmpd.c
+++ b/src/pmpd.c
@@ -28,10 +28,11 @@
*/
#ifndef VERSION
-#define VERSION "0.06"
+#define VERSION "0.07"
#endif
-// #include "m_pd.h"
+#include "m_pd.h"
+#include "stdio.h"
#ifndef __DATE__
#define __DATE__ ""
@@ -46,7 +47,8 @@
#define max(a,b) ( ((a) > (b)) ? (a) : (b) )
#define min(a,b) ( ((a) < (b)) ? (a) : (b) )
-
+
+/*
#include "masse.c"
#include "lia.c"
#include "masse2D.c"
@@ -79,9 +81,41 @@
#include "tCylinder3D.c"
#include "tLia3D.c"
-#include "pmpd~.c"
+#include "pmpd~.c"
+*/
static t_class *pmpd_class;
+
+typedef struct _mass {
+ t_int Id;
+ t_float invM;
+ t_float speedX;
+ t_float posX;
+ t_float forceX;
+} foo;
+
+typedef struct _link {
+ t_int Id;
+ struct _mass *mass1;
+ struct _mass *mass2;
+ t_float Ke, K1, D1, K2, D2;
+} foo1 ;
+
+typedef struct _out {
+ // TODO ajouter un type pour diferencier les outlets en forces et celles en position
+ t_int Id;
+ t_int nbr_outlet;
+ struct _mass *mass1;
+ t_float influence;
+} foo2;
+
+typedef struct _in {
+ // TODO ajouter un type pour diferencier les inlets en forces et celles en position
+ t_int Id;
+ t_int nbr_inlet;
+ struct _mass *mass1;
+ t_float influence;
+} foo3;
typedef struct _pmpd
{
@@ -96,9 +130,6 @@ typedef struct _pmpd
int nb_link, nb_mass, nb_outlet, nb_inlet, nb_in, nb_out;
} t_pmpd;
-#define max(a,b) ( ((a) > (b)) ? (a) : (b) )
-#define min(a,b) ( ((a) < (b)) ? (a) : (b) )
-
void pmpd_bang(t_pmpd *x)
///////////////////////////////////////////////////////////////////////////////////
// this part is doing all the job!
@@ -330,7 +361,7 @@ void pmpd_setup(void)
class_addmethod(pmpd_class, (t_method)pmpd_forceX_20, gensym("forceX_20"), A_DEFFLOAT, 0);
class_addmethod(pmpd_class, (t_method)pmpd_reset, gensym("reset"), 0);
-
+/*
post("");
post(" pmpd = Physical Modeling for Pure Data");
post(" version "VERSION);
@@ -371,5 +402,6 @@ tCircle3D_setup();
pmpd_tilde_setup();
+*/
}