.. | .. |
---|
359 | 359 | // //GetFileRoot(); |
---|
360 | 360 | |
---|
361 | 361 | // sept 2014: // |
---|
362 | | - GraphreeD.RENDERME = 3; // patch for Merge objects |
---|
| 362 | + GrafreeD.RENDERME = 3; // patch for Merge objects |
---|
363 | 363 | float[] thedata = bvh.animation.getBoneData(0); |
---|
364 | 364 | |
---|
365 | 365 | os.x = (float) (path.get(i).toParent[3][0]); // - thedata[frame*6]); |
---|
.. | .. |
---|
754 | 754 | //long |
---|
755 | 755 | // june 2014 floorid = sourcenode.getFloor(floor); // , sourcenode.parent); |
---|
756 | 756 | |
---|
757 | | - CameraPane.debugpoints[0].name = "Floor = " + floorid; |
---|
| 757 | + CameraPane.debugpoints[0].name = ""; // "Floor = " + 0; // floorid; |
---|
758 | 758 | CameraPane.debugpoints[0].toParent[3][0] = floor.x; |
---|
759 | 759 | CameraPane.debugpoints[0].toParent[3][1] = floor.y; |
---|
760 | 760 | CameraPane.debugpoints[0].toParent[3][2] = floor.z; |
---|
.. | .. |
---|
770 | 770 | |
---|
771 | 771 | this.count--; // currently drawing itself |
---|
772 | 772 | |
---|
773 | | - CameraPane.debugpoints[7].name = "Centroid = " + groundid; // centroid; |
---|
| 773 | + CameraPane.debugpoints[7].name = ""; // Centroid = " + 0; // groundid; // centroid; |
---|
774 | 774 | CameraPane.debugpoints[7].toParent[3][0] = centroid.x; |
---|
775 | 775 | CameraPane.debugpoints[7].toParent[3][1] = centroid.y; |
---|
776 | 776 | CameraPane.debugpoints[7].toParent[3][2] = centroid.z; |
---|
.. | .. |
---|
795 | 795 | |
---|
796 | 796 | // jan 2014 sourcenode.parent.TransformToWorld(tmp); |
---|
797 | 797 | |
---|
798 | | - CameraPane.debugpoints[1].name = "C+"; |
---|
| 798 | + CameraPane.debugpoints[1].name = ""; // "C+"; |
---|
799 | 799 | CameraPane.debugpoints[1].toParent[3][0] = tmp.x; |
---|
800 | 800 | CameraPane.debugpoints[1].toParent[3][1] = tmp.y; |
---|
801 | 801 | CameraPane.debugpoints[1].toParent[3][2] = tmp.z; |
---|
.. | .. |
---|
814 | 814 | tmp.z = pinz; |
---|
815 | 815 | } |
---|
816 | 816 | |
---|
817 | | - CameraPane.debugpoints[2].name = "Pin"; |
---|
| 817 | + CameraPane.debugpoints[2].name = ""; // "Pin"; |
---|
818 | 818 | CameraPane.debugpoints[2].toParent[3][0] = tmp.x; |
---|
819 | 819 | CameraPane.debugpoints[2].toParent[3][1] = tmp.y; |
---|
820 | 820 | CameraPane.debugpoints[2].toParent[3][2] = tmp.z; |
---|
.. | .. |
---|
822 | 822 | //if (sourcenode.parent.parent != null) |
---|
823 | 823 | // jan 2014 sourcenode.parent.TransformToLocal(tmp); //, tmp); |
---|
824 | 824 | |
---|
825 | | - CameraPane.debugpoints[3].name = "C-"; |
---|
| 825 | + CameraPane.debugpoints[3].name = ""; // "C-"; |
---|
826 | 826 | CameraPane.debugpoints[3].toParent[3][0] = tmp.x; |
---|
827 | 827 | CameraPane.debugpoints[3].toParent[3][1] = tmp.y; |
---|
828 | 828 | CameraPane.debugpoints[3].toParent[3][2] = tmp.z; |
---|
.. | .. |
---|
895 | 895 | // if (sourcenode.parent.parent != null) |
---|
896 | 896 | // sourcenode.parent.parent.TransformToWorld(floor); //, floor); |
---|
897 | 897 | |
---|
898 | | - CameraPane.debugpoints[5].name = "F++"; |
---|
| 898 | + CameraPane.debugpoints[5].name = ""; // "F++"; |
---|
899 | 899 | CameraPane.debugpoints[5].toParent[3][0] = floor.x; |
---|
900 | 900 | CameraPane.debugpoints[5].toParent[3][1] = floor.y; |
---|
901 | 901 | CameraPane.debugpoints[5].toParent[3][2] = floor.z; |
---|
902 | 902 | |
---|
903 | 903 | floor.y = tempg; |
---|
904 | 904 | |
---|
905 | | - CameraPane.debugpoints[6].name = "F+-"; |
---|
| 905 | + CameraPane.debugpoints[6].name = ""; // "F+-"; |
---|
906 | 906 | CameraPane.debugpoints[6].toParent[3][0] = floor.x; |
---|
907 | 907 | CameraPane.debugpoints[6].toParent[3][1] = floor.y; |
---|
908 | 908 | CameraPane.debugpoints[6].toParent[3][2] = floor.z; |
---|
.. | .. |
---|
938 | 938 | |
---|
939 | 939 | groundid = floorid; |
---|
940 | 940 | |
---|
| 941 | + // green |
---|
941 | 942 | CameraPane.debugpoint.toParent[3][0] = groundx; |
---|
942 | 943 | CameraPane.debugpoint.toParent[3][1] = floor.y; |
---|
943 | 944 | CameraPane.debugpoint.toParent[3][2] = groundz; |
---|
.. | .. |
---|
998 | 999 | |
---|
999 | 1000 | lastsoundtime = CameraPane.framecount; |
---|
1000 | 1001 | |
---|
1001 | | - GraphreeD.hassound = true; |
---|
| 1002 | + GrafreeD.hassound = true; |
---|
1002 | 1003 | } |
---|
1003 | 1004 | // else |
---|
1004 | 1005 | // System.out.println("skipped"); |
---|
.. | .. |
---|
1016 | 1017 | // floor.z += posz; |
---|
1017 | 1018 | |
---|
1018 | 1019 | // System.out.println("Allo " + sourcenode); |
---|
| 1020 | + // purple |
---|
1019 | 1021 | CameraPane.debugpoint2.toParent[3][0] = floor.x;// + posx; |
---|
1020 | 1022 | CameraPane.debugpoint2.toParent[3][1] = ground; // floor.y;// + sourcenode.parent.toParent[3][1]; |
---|
1021 | 1023 | CameraPane.debugpoint2.toParent[3][2] = floor.z;// + posz; |
---|
.. | .. |
---|
1052 | 1054 | v0.z = groundz - floor.z; |
---|
1053 | 1055 | |
---|
1054 | 1056 | double distance = Math.sqrt(v0.dot(v0)); |
---|
1055 | | - double maxdist = 0.004; |
---|
| 1057 | + double maxdist = 0.04; |
---|
1056 | 1058 | |
---|
1057 | 1059 | if (distance > maxdist) |
---|
1058 | 1060 | { |
---|
.. | .. |
---|
1078 | 1080 | sourcenode.toParent = LA.newMatrix(); |
---|
1079 | 1081 | sourcenode.fromParent = LA.newMatrix(); |
---|
1080 | 1082 | } |
---|
| 1083 | + |
---|
| 1084 | + v0.x = v0.z = 0; |
---|
| 1085 | + |
---|
| 1086 | + this.get(0).TransformToWorld(v0); |
---|
| 1087 | + |
---|
| 1088 | + // cyan |
---|
| 1089 | + CameraPane.debugpoint3.toParent[3][0] = v0.x; |
---|
| 1090 | + CameraPane.debugpoint3.toParent[3][1] = ground; |
---|
| 1091 | + CameraPane.debugpoint3.toParent[3][2] = v0.z; |
---|
| 1092 | + |
---|
1081 | 1093 | LA.matConcat(sourcenode.toParent, transformnode.toParent, sourcenode.toParent); |
---|
1082 | 1094 | LA.matInvert(sourcenode.toParent, sourcenode.fromParent); |
---|
| 1095 | + |
---|
| 1096 | + v0.x = v0.z = 0; |
---|
| 1097 | + |
---|
| 1098 | + this.get(0).TransformToWorld(v0); |
---|
| 1099 | + |
---|
| 1100 | + // red |
---|
| 1101 | + CameraPane.debugpoint4.toParent[3][0] = v0.x; |
---|
| 1102 | + CameraPane.debugpoint4.toParent[3][1] = ground; |
---|
| 1103 | + CameraPane.debugpoint4.toParent[3][2] = v0.z; |
---|
1083 | 1104 | } |
---|
1084 | 1105 | } |
---|
1085 | 1106 | |
---|
.. | .. |
---|
1318 | 1339 | |
---|
1319 | 1340 | rotsourcenode.TransformToWorld(test); |
---|
1320 | 1341 | |
---|
1321 | | - CameraPane.debugpoints[4].name = "ROT = "; // + test; |
---|
| 1342 | + CameraPane.debugpoints[4].name = ""; // "ROT = "; // + test; |
---|
1322 | 1343 | CameraPane.debugpoints[4].toParent[3][0] = test.x; |
---|
1323 | 1344 | CameraPane.debugpoints[4].toParent[3][1] = test.y; |
---|
1324 | 1345 | CameraPane.debugpoints[4].toParent[3][2] = test.z; |
---|
.. | .. |
---|
1835 | 1856 | { |
---|
1836 | 1857 | SetRotation(sourcenode, new cVector(floor), new cVector(centroid)); |
---|
1837 | 1858 | } |
---|
1838 | | - |
---|
| 1859 | + |
---|
1839 | 1860 | if (setposition) |
---|
1840 | 1861 | { |
---|
1841 | 1862 | if (floorobject != null) |
---|
.. | .. |
---|
2833 | 2854 | if (lastframetest == 0) |
---|
2834 | 2855 | lastframetest = bvh.animation.getNumFrames(); |
---|
2835 | 2856 | |
---|
| 2857 | + // WARNING: RESET DESTROYS EVERYTHING |
---|
2836 | 2858 | if (baseframe >= lastframetest) // july 2013 // - GetFirstFrame()) |
---|
2837 | 2859 | { |
---|
2838 | 2860 | System.out.println("MOCAP reset: " + this.GetFileRoot() + |
---|