.. | .. |
---|
261 | 261 | |
---|
262 | 262 | // LA.matConcat(toParent, hip.get(0).toParent, toParent); |
---|
263 | 263 | |
---|
| 264 | + CameraPane.CreateSelectedPoint(); |
---|
| 265 | + |
---|
264 | 266 | CameraPane.debugpointG.toParent[3][0] = poship.x; |
---|
265 | 267 | CameraPane.debugpointG.toParent[3][1] = poship.y; |
---|
266 | 268 | CameraPane.debugpointG.toParent[3][2] = poship.z; |
---|
.. | .. |
---|
484 | 486 | { |
---|
485 | 487 | Object3D hip = get(0); |
---|
486 | 488 | |
---|
| 489 | + if (toParent == null) |
---|
| 490 | + { |
---|
| 491 | + toParent = LA.newMatrix(); |
---|
| 492 | + fromParent = LA.newMatrix(); |
---|
| 493 | + } |
---|
| 494 | + |
---|
487 | 495 | LA.matConcat(toParent, hip.get(0).toParent, matrix); |
---|
488 | 496 | |
---|
489 | 497 | mocaporigin.x = matrix[3][0]; |
---|
.. | .. |
---|
495 | 503 | centroid.z = matrix[3][2]; |
---|
496 | 504 | // this.getCentroid(centroid, true); |
---|
497 | 505 | |
---|
| 506 | + CameraPane.CreateSelectedPoint(); |
---|
498 | 507 | CameraPane.debugpointG.name = ""; |
---|
499 | 508 | CameraPane.debugpointG.toParent[3][0] = mocaporigin.x; |
---|
500 | 509 | CameraPane.debugpointG.toParent[3][1] = mocaporigin.y; |
---|
.. | .. |
---|
638 | 647 | // transient // aout 2013 |
---|
639 | 648 | Object3D skeleton; |
---|
640 | 649 | |
---|
| 650 | + void ExtractBigData(Object3D o) |
---|
| 651 | + { |
---|
| 652 | + super.ExtractBigData(o); |
---|
| 653 | + |
---|
| 654 | + o.savebvh = this.bvh; |
---|
| 655 | + o.saveskeleton = this.skeleton; |
---|
| 656 | + this.bvh = null; |
---|
| 657 | + this.skeleton = null; |
---|
| 658 | + } |
---|
| 659 | + |
---|
| 660 | + void RestoreBigData(Object3D o) |
---|
| 661 | + { |
---|
| 662 | + super.RestoreBigData(o); |
---|
| 663 | + |
---|
| 664 | + this.bvh = o.savebvh; |
---|
| 665 | + this.skeleton = o.saveskeleton; |
---|
| 666 | + } |
---|
| 667 | + |
---|
641 | 668 | boolean smoothed; |
---|
642 | 669 | |
---|
643 | 670 | //boolean touched; |
---|
.. | .. |
---|
664 | 691 | double targetdirx; |
---|
665 | 692 | double targetdirz; |
---|
666 | 693 | |
---|
667 | | - double goalposx = -20; |
---|
668 | | - double goalposz = -10; |
---|
| 694 | + double goalposx = 0; // -20; |
---|
| 695 | + double goalposz = 0; // -10; |
---|
669 | 696 | |
---|
670 | 697 | boolean followpath; |
---|
671 | 698 | |
---|
.. | .. |
---|
921 | 948 | // //GetFileRoot(); |
---|
922 | 949 | |
---|
923 | 950 | // sept 2014: // |
---|
924 | | - GrafreeD.RENDERME = 3; // patch for Merge objects |
---|
| 951 | + Grafreed.RENDERME = 3; // patch for Merge objects |
---|
925 | 952 | float[] thedata = bvh.animation.getBoneData(0); |
---|
926 | 953 | |
---|
927 | 954 | os.x = (float) (path.get(i).toParent[3][0]); // - thedata[frame*6]); |
---|
.. | .. |
---|
1566 | 1593 | |
---|
1567 | 1594 | lastsoundtime = Globals.framecount; |
---|
1568 | 1595 | |
---|
1569 | | - GrafreeD.hassound = true; |
---|
| 1596 | + Grafreed.hassound = true; |
---|
1570 | 1597 | } |
---|
1571 | 1598 | // else |
---|
1572 | 1599 | // System.out.println("skipped"); |
---|
.. | .. |
---|
2797 | 2824 | //if (bone._rotationEnabled) |
---|
2798 | 2825 | if (//frame > 0 && |
---|
2799 | 2826 | !bone.skipmocap && |
---|
2800 | | - !bone.name.contains("head") // && |
---|
| 2827 | + !bone.name.contains("head") && |
---|
| 2828 | + !bone.name.contains("Head") // && |
---|
2801 | 2829 | // !bone.name.contains("rFoot") && |
---|
2802 | 2830 | // !bone.name.contains("lFoot") && |
---|
2803 | 2831 | // !bone.name.contains("Pinky") && |
---|
.. | .. |
---|
3233 | 3261 | |
---|
3234 | 3262 | // aout 2013 endframe = 0; // june 2013 |
---|
3235 | 3263 | |
---|
3236 | | - //ResetZero(); |
---|
3237 | | - setPose(frame); |
---|
| 3264 | + ResetZero(); |
---|
| 3265 | + //setPose(frame); |
---|
3238 | 3266 | } |
---|
3239 | 3267 | |
---|
3240 | 3268 | static int mocapsupport = 0; |
---|
.. | .. |
---|
3300 | 3328 | { |
---|
3301 | 3329 | if (support == null) |
---|
3302 | 3330 | { |
---|
3303 | | - if (new File(fullname).exists()) |
---|
| 3331 | + if (bvh == null && new File(fullname).exists()) |
---|
3304 | 3332 | ObjEditor.LoadBVHFile(fullname, this, false, beginframe, lastframetest); |
---|
3305 | 3333 | else |
---|
3306 | 3334 | { |
---|
.. | .. |
---|
3889 | 3917 | // if (firstframe) |
---|
3890 | 3918 | // return; |
---|
3891 | 3919 | |
---|
3892 | | - if (!restarted && /*display.restartframe &&*/ |
---|
3893 | | - Globals.isLIVE() && live && display.DrawMode() == display.SHADOW) // FUCK |
---|
| 3920 | + if (//!restarted && /*display.restartframe &&*/ |
---|
| 3921 | + Globals.isLIVE() && live && (display.DrawMode() == iCameraPane.SHADOW || !Globals.RENDERSHADOW || !Globals.COMPUTESHADOWWHENLIVE)) |
---|
3894 | 3922 | { |
---|
3895 | 3923 | //display.restartframe = false; |
---|
3896 | 3924 | restarted = true; |
---|
| 3925 | + //System.err.println("restarted = true"); |
---|
3897 | 3926 | Step(); |
---|
3898 | 3927 | } |
---|
3899 | 3928 | else |
---|
3900 | 3929 | { |
---|
3901 | | - if (Globals.isLIVE() && live && display.DrawMode() != display.SHADOW) |
---|
| 3930 | + //System.err.println("restarted"); |
---|
| 3931 | + if (Globals.isLIVE() && live && display.DrawMode() != iCameraPane.SHADOW) |
---|
| 3932 | + { |
---|
3902 | 3933 | restarted = false; |
---|
| 3934 | + //System.err.println("restarted = false"); |
---|
| 3935 | + } |
---|
3903 | 3936 | } |
---|
3904 | 3937 | |
---|
3905 | 3938 | super.drawSelf(display, root, selected, blocked); |
---|