Normand Briere
2019-11-17 cb37a129d1adb403019c96e798e86e2da9667f15
Mocap.java
....@@ -998,7 +998,7 @@
998998
999999 get(0).link2master = path.size() > 1; // hip orientation
10001000
1001
- if (get(0).link2master)
1001
+ if (get(0).Link2Support())
10021002 {
10031003 rotateonce = 2;
10041004 }
....@@ -1427,7 +1427,7 @@
14271427 double w = 0.00015;
14281428
14291429 //if (!sourcenode.link2master) // strong pin on floor
1430
- if (parent.link2master) // strong pin on floor
1430
+ if (parent.Link2Support()) // strong pin on floor
14311431 {
14321432 w = 0.005; // .001;
14331433 }
....@@ -1641,7 +1641,7 @@
16411641 // sourcenode.parent.toParent[3][1] = ground - floor.y;
16421642 // sourcenode.parent.toParent[3][2] += groundz - floor.z;
16431643 // sourcenode.parent.toParent[3][1] = K * (ground - floor.y) + (1 - K) * oldposy;
1644
- if (footcontact && (sourcenode.parent != null && !sourcenode.parent.link2master)) // strong pin on floor
1644
+ if (footcontact && (sourcenode.parent != null && !sourcenode.parent.Link2Support())) // strong pin on floor
16451645 {
16461646 v0.x = groundx - floor.x;
16471647 v0.y = 0; // groundx - floor.x;
....@@ -2006,7 +2006,7 @@
20062006 // if (sourcenode.link2master)
20072007 // if (goalx != 0 || goalz != 0)
20082008 // K = 0.02; // .0625;
2009
- if (parent.link2master) // strong pin on floor
2009
+ if (parent.Link2Support()) // strong pin on floor
20102010 {
20112011 K = 0.05; // 0.02;
20122012 }
....@@ -2423,9 +2423,9 @@
24232423 // SetBreakPoint(get(0).toParent[0], 0);
24242424 // }
24252425
2426
- boolean setrotation = get(0).link2master && !firsttimeafterload && frame > 0;
2426
+ boolean setrotation = get(0).Link2Support() && !firsttimeafterload && frame > 0;
24272427 boolean setposition = sourcenode != null && // sourcenode.parent != null && // july 2014
2428
- sourcenode./*parent.*/link2master && !firsttimeafterload && frame > 0;
2428
+ sourcenode./*parent.*/Link2Support() && !firsttimeafterload && frame > 0;
24292429
24302430 // cVector centroid = new cVector();
24312431 // cVector floor = new cVector();
....@@ -2858,7 +2858,7 @@
28582858
28592859 // set translation
28602860 // (currently only possible for root bone! see mocapdata.com data)
2861
- if (bone._isRoot && link2master) // && !GetFileRoot().link2master)
2861
+ if (bone._isRoot && Link2Support()) // && !GetFileRoot().link2master)
28622862 {
28632863 if (hasTranslation) // && _translationEnabled)
28642864 {
....@@ -3924,6 +3924,8 @@
39243924 restarted = true;
39253925 //System.err.println("restarted = true");
39263926 Step();
3927
+
3928
+ Globals.lighttouched = true;
39273929 }
39283930 else
39293931 {
....@@ -3992,6 +3994,11 @@
39923994 // GetObject().release(i);
39933995 }
39943996
3997
+ boolean HasBigData()
3998
+ {
3999
+ return skeleton != null;
4000
+ }
4001
+
39954002 public Object3D get(int i)
39964003 {
39974004 if (i != 0)