.. | .. |
---|
921 | 921 | // //GetFileRoot(); |
---|
922 | 922 | |
---|
923 | 923 | // sept 2014: // |
---|
924 | | - GrafreeD.RENDERME = 3; // patch for Merge objects |
---|
| 924 | + Grafreed.RENDERME = 3; // patch for Merge objects |
---|
925 | 925 | float[] thedata = bvh.animation.getBoneData(0); |
---|
926 | 926 | |
---|
927 | 927 | os.x = (float) (path.get(i).toParent[3][0]); // - thedata[frame*6]); |
---|
.. | .. |
---|
1519 | 1519 | // mywave = currentwave++; |
---|
1520 | 1520 | // } |
---|
1521 | 1521 | // sound |
---|
1522 | | - cVector eye = CameraPane.theRenderer.eyeCamera.location; |
---|
| 1522 | + cVector eye = Globals.theRenderer.EyeCamera().location; |
---|
1523 | 1523 | |
---|
1524 | 1524 | // if (sourcenode.parent.parent != null) |
---|
1525 | 1525 | // sourcenode.parent.parent.TransformToWorld(floor, tmp); |
---|
.. | .. |
---|
1564 | 1564 | //GraphreeD. |
---|
1565 | 1565 | wav.play(volume * usedvolume); //, mywave); |
---|
1566 | 1566 | |
---|
1567 | | - lastsoundtime = CameraPane.framecount; |
---|
| 1567 | + lastsoundtime = Globals.framecount; |
---|
1568 | 1568 | |
---|
1569 | | - GrafreeD.hassound = true; |
---|
| 1569 | + Grafreed.hassound = true; |
---|
1570 | 1570 | } |
---|
1571 | 1571 | // else |
---|
1572 | 1572 | // System.out.println("skipped"); |
---|
.. | .. |
---|
2267 | 2267 | } |
---|
2268 | 2268 | |
---|
2269 | 2269 | if (!smoothed) |
---|
2270 | | - for (int i=0; --i>=0;) |
---|
| 2270 | + for (int i=10; --i>=0;) |
---|
2271 | 2271 | SmoothAnimData(); // much reduces shakiness |
---|
2272 | 2272 | |
---|
2273 | 2273 | smoothed = true; |
---|
.. | .. |
---|
3252 | 3252 | |
---|
3253 | 3253 | int step = 1; |
---|
3254 | 3254 | |
---|
| 3255 | + // patch for running hare |
---|
3255 | 3256 | if (speedup) // fev 2014 |
---|
3256 | 3257 | step *= 2; // 4; |
---|
3257 | 3258 | if (rewind) // mars 2014 |
---|
3258 | 3259 | step *= 4; |
---|
3259 | 3260 | |
---|
3260 | | - if (CameraPane.FAST) // && !CameraPane.HOLD) |
---|
| 3261 | + //if (CameraPane.FAST) // && !CameraPane.HOLD) |
---|
3261 | 3262 | step *= CameraPane.STEP; |
---|
3262 | 3263 | |
---|
3263 | 3264 | //System.err.println("Step Mocap frame # " + frame); |
---|
.. | .. |
---|
3289 | 3290 | "; fullname = " + fullname); |
---|
3290 | 3291 | |
---|
3291 | 3292 | //int delta = frame - baseframe; |
---|
3292 | | - if (CameraPane.CROWD) |
---|
| 3293 | + if (Globals.CROWD) |
---|
3293 | 3294 | { |
---|
3294 | 3295 | baseframe = GetFirstFrame(); // 0 initial point |
---|
3295 | 3296 | } |
---|
.. | .. |
---|
3298 | 3299 | // SetPositionDelta(false, true, false); // ?? false); |
---|
3299 | 3300 | { |
---|
3300 | 3301 | if (support == null) |
---|
3301 | | - ObjEditor.LoadBVHFile(fullname, this, false, beginframe, lastframetest); |
---|
| 3302 | + { |
---|
| 3303 | + if (new File(fullname).exists()) |
---|
| 3304 | + ObjEditor.LoadBVHFile(fullname, this, false, beginframe, lastframetest); |
---|
| 3305 | + else |
---|
| 3306 | + { |
---|
| 3307 | + SetGlobalTransform(); |
---|
| 3308 | + Rewind(); |
---|
| 3309 | + Fade(); |
---|
| 3310 | + } |
---|
| 3311 | + } |
---|
3302 | 3312 | else |
---|
3303 | 3313 | { |
---|
3304 | | - try |
---|
3305 | | - { |
---|
| 3314 | +// try |
---|
| 3315 | +// { |
---|
3306 | 3316 | bvh = ((Mocap)support.get(mocapsupport++ % support.Size())).bvh; |
---|
3307 | 3317 | |
---|
3308 | 3318 | // SetPositionDelta(false, true, true, true); |
---|
3309 | 3319 | LoadData(); |
---|
3310 | 3320 | Rewind(); |
---|
3311 | 3321 | Fade(); |
---|
3312 | | - } |
---|
3313 | | - catch (Exception e) |
---|
3314 | | - { |
---|
3315 | | - e.printStackTrace(); |
---|
3316 | | - ObjEditor.LoadBVHFile(fullname, this, false, beginframe, lastframetest); |
---|
3317 | | - } |
---|
| 3322 | +// } |
---|
| 3323 | +// catch (Exception e) |
---|
| 3324 | +// { |
---|
| 3325 | +// System.err.println("An error occured while loading data. Use fallback by loading the file."); |
---|
| 3326 | +// //e.printStackTrace(); |
---|
| 3327 | +// try |
---|
| 3328 | +// { |
---|
| 3329 | +// ObjEditor.LoadBVHFile(fullname, this, false, beginframe, lastframetest); |
---|
| 3330 | +// } |
---|
| 3331 | +// catch (Exception e2) |
---|
| 3332 | +// { |
---|
| 3333 | +// System.err.println("Motion file not found: " + fullname); |
---|
| 3334 | +// } |
---|
| 3335 | +// } |
---|
3318 | 3336 | } |
---|
3319 | 3337 | } |
---|
3320 | 3338 | |
---|
.. | .. |
---|
3496 | 3514 | // filters out bad input data |
---|
3497 | 3515 | void FilterAnimData() |
---|
3498 | 3516 | { |
---|
| 3517 | + new Exception().printStackTrace(); |
---|
3499 | 3518 | System.exit(0); |
---|
3500 | 3519 | |
---|
3501 | 3520 | float[] data; // = bvh.animation.getBoneData(0); |
---|
.. | .. |
---|
3853 | 3872 | |
---|
3854 | 3873 | transient boolean restarted; // CROWD issue? |
---|
3855 | 3874 | |
---|
3856 | | - void drawSelf(CameraPane display, Object3D /*Composite*/ root, boolean selected, boolean blocked) |
---|
| 3875 | + void drawSelf(iCameraPane display, Object3D /*Composite*/ root, boolean selected, boolean blocked) |
---|
3857 | 3876 | { |
---|
3858 | 3877 | //System.err.println("drawSelf Mocap frame # " + frame); |
---|
3859 | 3878 | //System.err.println("drawSelf Mocap baseframe # " + baseframe); |
---|
.. | .. |
---|
3871 | 3890 | // return; |
---|
3872 | 3891 | |
---|
3873 | 3892 | if (!restarted && /*display.restartframe &&*/ |
---|
3874 | | - display.isLIVE() && live && display.drawMode == display.SHADOW) // FUCK |
---|
| 3893 | + Globals.isLIVE() && live && display.DrawMode() == display.SHADOW) // FUCK |
---|
3875 | 3894 | { |
---|
3876 | 3895 | //display.restartframe = false; |
---|
3877 | 3896 | restarted = true; |
---|
.. | .. |
---|
3879 | 3898 | } |
---|
3880 | 3899 | else |
---|
3881 | 3900 | { |
---|
3882 | | - if (display.isLIVE() && live && display.drawMode != display.SHADOW) |
---|
| 3901 | + if (Globals.isLIVE() && live && display.DrawMode() != display.SHADOW) |
---|
3883 | 3902 | restarted = false; |
---|
3884 | 3903 | } |
---|
3885 | 3904 | |
---|