Normand Briere
2019-11-17 cb37a129d1adb403019c96e798e86e2da9667f15
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;
....@@ -501,6 +503,7 @@
501503 centroid.z = matrix[3][2];
502504 // this.getCentroid(centroid, true);
503505
506
+ CameraPane.CreateSelectedPoint();
504507 CameraPane.debugpointG.name = "";
505508 CameraPane.debugpointG.toParent[3][0] = mocaporigin.x;
506509 CameraPane.debugpointG.toParent[3][1] = mocaporigin.y;
....@@ -648,8 +651,8 @@
648651 {
649652 super.ExtractBigData(o);
650653
651
- o.bvh = this.bvh;
652
- o.skeleton = this.skeleton;
654
+ o.savebvh = this.bvh;
655
+ o.saveskeleton = this.skeleton;
653656 this.bvh = null;
654657 this.skeleton = null;
655658 }
....@@ -658,8 +661,8 @@
658661 {
659662 super.RestoreBigData(o);
660663
661
- this.bvh = o.bvh;
662
- this.skeleton = o.skeleton;
664
+ this.bvh = o.savebvh;
665
+ this.skeleton = o.saveskeleton;
663666 }
664667
665668 boolean smoothed;
....@@ -995,7 +998,7 @@
995998
996999 get(0).link2master = path.size() > 1; // hip orientation
9971000
998
- if (get(0).link2master)
1001
+ if (get(0).Link2Support())
9991002 {
10001003 rotateonce = 2;
10011004 }
....@@ -1424,7 +1427,7 @@
14241427 double w = 0.00015;
14251428
14261429 //if (!sourcenode.link2master) // strong pin on floor
1427
- if (parent.link2master) // strong pin on floor
1430
+ if (parent.Link2Support()) // strong pin on floor
14281431 {
14291432 w = 0.005; // .001;
14301433 }
....@@ -1638,7 +1641,7 @@
16381641 // sourcenode.parent.toParent[3][1] = ground - floor.y;
16391642 // sourcenode.parent.toParent[3][2] += groundz - floor.z;
16401643 // sourcenode.parent.toParent[3][1] = K * (ground - floor.y) + (1 - K) * oldposy;
1641
- 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
16421645 {
16431646 v0.x = groundx - floor.x;
16441647 v0.y = 0; // groundx - floor.x;
....@@ -2003,7 +2006,7 @@
20032006 // if (sourcenode.link2master)
20042007 // if (goalx != 0 || goalz != 0)
20052008 // K = 0.02; // .0625;
2006
- if (parent.link2master) // strong pin on floor
2009
+ if (parent.Link2Support()) // strong pin on floor
20072010 {
20082011 K = 0.05; // 0.02;
20092012 }
....@@ -2420,9 +2423,9 @@
24202423 // SetBreakPoint(get(0).toParent[0], 0);
24212424 // }
24222425
2423
- boolean setrotation = get(0).link2master && !firsttimeafterload && frame > 0;
2426
+ boolean setrotation = get(0).Link2Support() && !firsttimeafterload && frame > 0;
24242427 boolean setposition = sourcenode != null && // sourcenode.parent != null && // july 2014
2425
- sourcenode./*parent.*/link2master && !firsttimeafterload && frame > 0;
2428
+ sourcenode./*parent.*/Link2Support() && !firsttimeafterload && frame > 0;
24262429
24272430 // cVector centroid = new cVector();
24282431 // cVector floor = new cVector();
....@@ -2855,7 +2858,7 @@
28552858
28562859 // set translation
28572860 // (currently only possible for root bone! see mocapdata.com data)
2858
- if (bone._isRoot && link2master) // && !GetFileRoot().link2master)
2861
+ if (bone._isRoot && Link2Support()) // && !GetFileRoot().link2master)
28592862 {
28602863 if (hasTranslation) // && _translationEnabled)
28612864 {
....@@ -3921,6 +3924,8 @@
39213924 restarted = true;
39223925 //System.err.println("restarted = true");
39233926 Step();
3927
+
3928
+ Globals.lighttouched = true;
39243929 }
39253930 else
39263931 {
....@@ -3989,6 +3994,11 @@
39893994 // GetObject().release(i);
39903995 }
39913996
3997
+ boolean HasBigData()
3998
+ {
3999
+ return skeleton != null;
4000
+ }
4001
+
39924002 public Object3D get(int i)
39934003 {
39944004 if (i != 0)