Normand Briere
2019-06-23 f1382bc839a74ef1d1534c61ea94e53cf54716df
Mocap.java
....@@ -484,6 +484,12 @@
484484 {
485485 Object3D hip = get(0);
486486
487
+ if (toParent == null)
488
+ {
489
+ toParent = LA.newMatrix();
490
+ fromParent = LA.newMatrix();
491
+ }
492
+
487493 LA.matConcat(toParent, hip.get(0).toParent, matrix);
488494
489495 mocaporigin.x = matrix[3][0];
....@@ -638,6 +644,24 @@
638644 // transient // aout 2013
639645 Object3D skeleton;
640646
647
+ void ExtractBigData(Object3D o)
648
+ {
649
+ super.ExtractBigData(o);
650
+
651
+ o.bvh = this.bvh;
652
+ o.skeleton = this.skeleton;
653
+ this.bvh = null;
654
+ this.skeleton = null;
655
+ }
656
+
657
+ void RestoreBigData(Object3D o)
658
+ {
659
+ super.RestoreBigData(o);
660
+
661
+ this.bvh = o.bvh;
662
+ this.skeleton = o.skeleton;
663
+ }
664
+
641665 boolean smoothed;
642666
643667 //boolean touched;
....@@ -664,8 +688,8 @@
664688 double targetdirx;
665689 double targetdirz;
666690
667
- double goalposx = -20;
668
- double goalposz = -10;
691
+ double goalposx = 0; // -20;
692
+ double goalposz = 0; // -10;
669693
670694 boolean followpath;
671695
....@@ -2797,7 +2821,8 @@
27972821 //if (bone._rotationEnabled)
27982822 if (//frame > 0 &&
27992823 !bone.skipmocap &&
2800
- !bone.name.contains("head") // &&
2824
+ !bone.name.contains("head") &&
2825
+ !bone.name.contains("Head") // &&
28012826 // !bone.name.contains("rFoot") &&
28022827 // !bone.name.contains("lFoot") &&
28032828 // !bone.name.contains("Pinky") &&
....@@ -3233,8 +3258,8 @@
32333258
32343259 // aout 2013 endframe = 0; // june 2013
32353260
3236
- //ResetZero();
3237
- setPose(frame);
3261
+ ResetZero();
3262
+ //setPose(frame);
32383263 }
32393264
32403265 static int mocapsupport = 0;
....@@ -3300,7 +3325,7 @@
33003325 {
33013326 if (support == null)
33023327 {
3303
- if (new File(fullname).exists())
3328
+ if (bvh == null && new File(fullname).exists())
33043329 ObjEditor.LoadBVHFile(fullname, this, false, beginframe, lastframetest);
33053330 else
33063331 {
....@@ -3889,17 +3914,22 @@
38893914 // if (firstframe)
38903915 // return;
38913916
3892
- if (!restarted && /*display.restartframe &&*/
3893
- Globals.isLIVE() && live && display.DrawMode() == display.SHADOW) // FUCK
3917
+ if (//!restarted && /*display.restartframe &&*/
3918
+ Globals.isLIVE() && live && (display.DrawMode() == iCameraPane.SHADOW || !Globals.RENDERSHADOW))
38943919 {
38953920 //display.restartframe = false;
38963921 restarted = true;
3922
+ //System.err.println("restarted = true");
38973923 Step();
38983924 }
38993925 else
39003926 {
3901
- if (Globals.isLIVE() && live && display.DrawMode() != display.SHADOW)
3927
+ //System.err.println("restarted");
3928
+ if (Globals.isLIVE() && live && display.DrawMode() != iCameraPane.SHADOW)
3929
+ {
39023930 restarted = false;
3931
+ //System.err.println("restarted = false");
3932
+ }
39033933 }
39043934
39053935 super.drawSelf(display, root, selected, blocked);