Normand Briere
2019-10-06 ce660a4b6ba367bd162dd2cff26d02c80a34c912
Mocap.java
....@@ -261,6 +261,8 @@
261261
262262 // LA.matConcat(toParent, hip.get(0).toParent, toParent);
263263
264
+ CameraPane.CreateSelectedPoint();
265
+
264266 CameraPane.debugpointG.toParent[3][0] = poship.x;
265267 CameraPane.debugpointG.toParent[3][1] = poship.y;
266268 CameraPane.debugpointG.toParent[3][2] = poship.z;
....@@ -649,8 +651,8 @@
649651 {
650652 super.ExtractBigData(o);
651653
652
- o.bvh = this.bvh;
653
- o.skeleton = this.skeleton;
654
+ o.savebvh = this.bvh;
655
+ o.saveskeleton = this.skeleton;
654656 this.bvh = null;
655657 this.skeleton = null;
656658 }
....@@ -659,8 +661,8 @@
659661 {
660662 super.RestoreBigData(o);
661663
662
- this.bvh = o.bvh;
663
- this.skeleton = o.skeleton;
664
+ this.bvh = o.savebvh;
665
+ this.skeleton = o.saveskeleton;
664666 }
665667
666668 boolean smoothed;
....@@ -996,7 +998,7 @@
996998
997999 get(0).link2master = path.size() > 1; // hip orientation
9981000
999
- if (get(0).link2master)
1001
+ if (get(0).Link2Support())
10001002 {
10011003 rotateonce = 2;
10021004 }
....@@ -1425,7 +1427,7 @@
14251427 double w = 0.00015;
14261428
14271429 //if (!sourcenode.link2master) // strong pin on floor
1428
- if (parent.link2master) // strong pin on floor
1430
+ if (parent.Link2Support()) // strong pin on floor
14291431 {
14301432 w = 0.005; // .001;
14311433 }
....@@ -1639,7 +1641,7 @@
16391641 // sourcenode.parent.toParent[3][1] = ground - floor.y;
16401642 // sourcenode.parent.toParent[3][2] += groundz - floor.z;
16411643 // sourcenode.parent.toParent[3][1] = K * (ground - floor.y) + (1 - K) * oldposy;
1642
- 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
16431645 {
16441646 v0.x = groundx - floor.x;
16451647 v0.y = 0; // groundx - floor.x;
....@@ -2004,7 +2006,7 @@
20042006 // if (sourcenode.link2master)
20052007 // if (goalx != 0 || goalz != 0)
20062008 // K = 0.02; // .0625;
2007
- if (parent.link2master) // strong pin on floor
2009
+ if (parent.Link2Support()) // strong pin on floor
20082010 {
20092011 K = 0.05; // 0.02;
20102012 }
....@@ -2421,9 +2423,9 @@
24212423 // SetBreakPoint(get(0).toParent[0], 0);
24222424 // }
24232425
2424
- boolean setrotation = get(0).link2master && !firsttimeafterload && frame > 0;
2426
+ boolean setrotation = get(0).Link2Support() && !firsttimeafterload && frame > 0;
24252427 boolean setposition = sourcenode != null && // sourcenode.parent != null && // july 2014
2426
- sourcenode./*parent.*/link2master && !firsttimeafterload && frame > 0;
2428
+ sourcenode./*parent.*/Link2Support() && !firsttimeafterload && frame > 0;
24272429
24282430 // cVector centroid = new cVector();
24292431 // cVector floor = new cVector();
....@@ -2856,7 +2858,7 @@
28562858
28572859 // set translation
28582860 // (currently only possible for root bone! see mocapdata.com data)
2859
- if (bone._isRoot && link2master) // && !GetFileRoot().link2master)
2861
+ if (bone._isRoot && Link2Support()) // && !GetFileRoot().link2master)
28602862 {
28612863 if (hasTranslation) // && _translationEnabled)
28622864 {
....@@ -3922,6 +3924,8 @@
39223924 restarted = true;
39233925 //System.err.println("restarted = true");
39243926 Step();
3927
+
3928
+ Globals.lighttouched = true;
39253929 }
39263930 else
39273931 {
....@@ -3990,6 +3994,11 @@
39903994 // GetObject().release(i);
39913995 }
39923996
3997
+ boolean HasBigData()
3998
+ {
3999
+ return skeleton != null;
4000
+ }
4001
+
39934002 public Object3D get(int i)
39944003 {
39954004 if (i != 0)