Normand Briere
2019-06-26 89b25e7cc97f6fe221dfd41c4d463500f8a31bc1
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];
....@@ -495,6 +501,7 @@
495501 centroid.z = matrix[3][2];
496502 // this.getCentroid(centroid, true);
497503
504
+ CameraPane.CreateSelectedPoint();
498505 CameraPane.debugpointG.name = "";
499506 CameraPane.debugpointG.toParent[3][0] = mocaporigin.x;
500507 CameraPane.debugpointG.toParent[3][1] = mocaporigin.y;
....@@ -638,6 +645,24 @@
638645 // transient // aout 2013
639646 Object3D skeleton;
640647
648
+ void ExtractBigData(Object3D o)
649
+ {
650
+ super.ExtractBigData(o);
651
+
652
+ o.bvh = this.bvh;
653
+ o.skeleton = this.skeleton;
654
+ this.bvh = null;
655
+ this.skeleton = null;
656
+ }
657
+
658
+ void RestoreBigData(Object3D o)
659
+ {
660
+ super.RestoreBigData(o);
661
+
662
+ this.bvh = o.bvh;
663
+ this.skeleton = o.skeleton;
664
+ }
665
+
641666 boolean smoothed;
642667
643668 //boolean touched;
....@@ -664,8 +689,8 @@
664689 double targetdirx;
665690 double targetdirz;
666691
667
- double goalposx = -20;
668
- double goalposz = -10;
692
+ double goalposx = 0; // -20;
693
+ double goalposz = 0; // -10;
669694
670695 boolean followpath;
671696
....@@ -921,7 +946,7 @@
921946 // //GetFileRoot();
922947
923948 // sept 2014: //
924
- GrafreeD.RENDERME = 3; // patch for Merge objects
949
+ Grafreed.RENDERME = 3; // patch for Merge objects
925950 float[] thedata = bvh.animation.getBoneData(0);
926951
927952 os.x = (float) (path.get(i).toParent[3][0]); // - thedata[frame*6]);
....@@ -1566,7 +1591,7 @@
15661591
15671592 lastsoundtime = Globals.framecount;
15681593
1569
- GrafreeD.hassound = true;
1594
+ Grafreed.hassound = true;
15701595 }
15711596 // else
15721597 // System.out.println("skipped");
....@@ -2797,7 +2822,8 @@
27972822 //if (bone._rotationEnabled)
27982823 if (//frame > 0 &&
27992824 !bone.skipmocap &&
2800
- !bone.name.contains("head") // &&
2825
+ !bone.name.contains("head") &&
2826
+ !bone.name.contains("Head") // &&
28012827 // !bone.name.contains("rFoot") &&
28022828 // !bone.name.contains("lFoot") &&
28032829 // !bone.name.contains("Pinky") &&
....@@ -3233,8 +3259,8 @@
32333259
32343260 // aout 2013 endframe = 0; // june 2013
32353261
3236
- //ResetZero();
3237
- setPose(frame);
3262
+ ResetZero();
3263
+ //setPose(frame);
32383264 }
32393265
32403266 static int mocapsupport = 0;
....@@ -3300,7 +3326,7 @@
33003326 {
33013327 if (support == null)
33023328 {
3303
- if (new File(fullname).exists())
3329
+ if (bvh == null && new File(fullname).exists())
33043330 ObjEditor.LoadBVHFile(fullname, this, false, beginframe, lastframetest);
33053331 else
33063332 {
....@@ -3889,17 +3915,22 @@
38893915 // if (firstframe)
38903916 // return;
38913917
3892
- if (!restarted && /*display.restartframe &&*/
3893
- Globals.isLIVE() && live && display.DrawMode() == display.SHADOW) // FUCK
3918
+ if (//!restarted && /*display.restartframe &&*/
3919
+ Globals.isLIVE() && live && (display.DrawMode() == iCameraPane.SHADOW || !Globals.RENDERSHADOW || !Globals.COMPUTESHADOWWHENLIVE))
38943920 {
38953921 //display.restartframe = false;
38963922 restarted = true;
3923
+ //System.err.println("restarted = true");
38973924 Step();
38983925 }
38993926 else
39003927 {
3901
- if (Globals.isLIVE() && live && display.DrawMode() != display.SHADOW)
3928
+ //System.err.println("restarted");
3929
+ if (Globals.isLIVE() && live && display.DrawMode() != iCameraPane.SHADOW)
3930
+ {
39023931 restarted = false;
3932
+ //System.err.println("restarted = false");
3933
+ }
39033934 }
39043935
39053936 super.drawSelf(display, root, selected, blocked);