hi,
I just found out that setFixed does not immediately stop a mass, but the
mass seems to keep the current speed/directions? only if I also send a
position to the mass it stayes fixed. just want to make sure that this
is intentional.
with setM I see the changes take effect, if I do a printout with infosL,
but it does not have effect on the links. I found a work around and that
is to set the mass to fixed, and immediately to mobile to see the new
mass effect, that I think is a bug?
marius.
#N canvas 554 22 799 745 10;
#N canvas 257 262 759 345 init 0;
#X obj 89 215 t a;
#X obj 89 33 loadbang;
#X obj 89 241 s \$0-in;
#X obj 89 59 t b b b b b;
#X msg 161 80 reset;
#X obj 44 13 inlet;
#X msg 143 100 mass fix 0 10 0 0;
#X msg 89 187 Xmax 4 \, Xmin -4 \, Ymax 4 \, Ymin -4;
#X msg 107 161 link souple fix mob 10 10 \, link souple mob mob 10
10;
#X msg 125 120 mass mob 1 100 0 -2;
#X connect 0 0 2 0;
#X connect 1 0 3 0;
#X connect 3 0 7 0;
#X connect 3 1 8 0;
#X connect 3 2 9 0;
#X connect 3 3 6 0;
#X connect 3 4 4 0;
#X connect 4 0 0 0;
#X connect 5 0 3 0;
#X connect 6 0 0 0;
#X connect 7 0 0 0;
#X connect 8 0 0 0;
#X connect 9 0 0 0;
#X restore 17 156 pd init;
#X obj 124 579 s \$0-out;
#X obj 124 530 r \$0-in;
#X obj 465 214 s \$0-in;
#N canvas 565 515 355 193 compute 0;
#X obj 27 29 inlet;
#X obj 27 127 s \$0-in;
#X msg 27 96 bang \, get massesPos \, get linksPos;
#X obj 27 66 gemhead;
#X obj 160 36 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X connect 0 0 3 0;
#X connect 2 0 1 0;
#X connect 3 0 2 0;
#X connect 4 0 2 0;
#X restore 17 209 pd compute;
#X obj 17 181 tgl 15 0 empty empty ON/OFF 25 10 1 10 -262144 -1 -1
1 1;
#X obj 555 172 r \$0-out;
#X obj 17 126 bng 15 250 50 0 empty empty reset 25 10 1 10 -262144
-1 -1;
#X obj 124 554 msd2D;
#X obj 555 196 route massesPos linksPos;
#N canvas 731 296 450 300 gemmouse 0;
#X obj 189 77 gemmouse;
#X obj 189 184 pack f f;
#X obj 189 218 spigot;
#X obj 109 243 outlet;
#X obj 109 36 inlet;
#X obj 109 98 t b;
#X obj 238 131 + 4;
#X msg 57 182 posX fix \$1;
#X msg 57 203 posY fix \$2;
#X obj 189 108 / 62.5;
#X obj 237 107 / -62.5;
#X obj 189 131 - 4;
#X obj 109 125 list 0 0;
#X connect 0 0 9 0;
#X connect 0 1 10 0;
#X connect 0 2 2 1;
#X connect 1 0 2 0;
#X connect 2 0 12 1;
#X connect 4 0 5 0;
#X connect 5 0 12 0;
#X connect 6 0 1 1;
#X connect 7 0 3 0;
#X connect 8 0 3 0;
#X connect 9 0 11 0;
#X connect 10 0 6 0;
#X connect 11 0 1 0;
#X connect 12 0 7 0;
#X connect 12 0 8 0;
#X restore 465 192 pd gemmouse;
#X obj 465 171 gemhead;
#X obj 336 216 gemwin;
#X msg 336 194 0 \, destroy;
#N canvas 472 258 550 319 gemrender 0;
#X obj 48 203 translateXYZ;
#X obj 48 229 sphere 0.1;
#X obj 127 24 inlet;
#X obj 360 32 inlet;
#X obj 275 232 curve 2;
#X msg 431 81 \$4 \$5 0;
#X msg 359 77 \$2 \$3 0;
#X obj 359 105 t b a;
#X obj 127 62 unpack f f f;
#X obj 166 88 t b f;
#X msg 48 110 0;
#X obj 48 77 loadbang;
#X obj 48 137 gemhead;
#X msg 275 160 0;
#X obj 275 127 loadbang;
#X obj 275 187 gemhead;
#X connect 0 0 1 0;
#X connect 2 0 8 0;
#X connect 3 0 5 0;
#X connect 3 0 6 0;
#X connect 5 0 4 2;
#X connect 6 0 7 0;
#X connect 7 0 15 0;
#X connect 7 1 4 1;
#X connect 8 1 9 0;
#X connect 8 2 0 2;
#X connect 9 0 12 0;
#X connect 9 1 0 1;
#X connect 10 0 12 0;
#X connect 11 0 10 0;
#X connect 12 0 0 0;
#X connect 13 0 15 0;
#X connect 14 0 13 0;
#X connect 15 0 4 0;
#X restore 555 222 pd gemrender;
#X msg 336 129 reset \, create \, 1;
#X msg 330 589 setFixed 1;
#X msg 330 610 setMobile 1;
#X msg 335 336 setM 1 9999;
#X msg 339 365 infosL;
#X obj 151 609 print OUT;
#X msg 339 395 setM 1 100;
#X msg 337 521 setM 1 \$1 \, setFixed 1 \, setMobile 1;
#X floatatom 337 496 5 0 0 0 - - -;
#X obj 340 477 hsl 128 15 50 10000 0 0 empty empty empty -2 -8 0 10
-262144 -1 -1 0 1;
#X obj 421 337 cnv 15 15 15 empty empty empty 20 12 0 14 -258113 -66577
0;
#X text 446 335 click here \, new mass appears in the info \, but mass
still behaves as if M=100;
#X msg 337 452 1000;
#X obj 421 447 cnv 15 15 15 empty empty empty 20 12 0 14 -4034 -66577
0;
#X text 446 445 that is what I would expect \, when I do a simple setM
1000;
#X text 416 588 (just for testing);
#X connect 2 0 8 0;
#X connect 5 0 4 0;
#X connect 6 0 9 0;
#X connect 7 0 0 0;
#X connect 8 0 1 0;
#X connect 8 1 20 0;
#X connect 9 0 14 0;
#X connect 9 1 14 1;
#X connect 10 0 3 0;
#X connect 11 0 10 0;
#X connect 13 0 12 0;
#X connect 15 0 12 0;
#X connect 16 0 8 0;
#X connect 17 0 8 0;
#X connect 18 0 8 0;
#X connect 19 0 8 0;
#X connect 21 0 8 0;
#X connect 22 0 8 0;
#X connect 23 0 22 0;
#X connect 24 0 23 0;
#X connect 27 0 24 0;