.. | .. |
---|
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; |
---|
.. | .. |
---|
501 | 503 | centroid.z = matrix[3][2]; |
---|
502 | 504 | // this.getCentroid(centroid, true); |
---|
503 | 505 | |
---|
| 506 | + CameraPane.CreateSelectedPoint(); |
---|
504 | 507 | CameraPane.debugpointG.name = ""; |
---|
505 | 508 | CameraPane.debugpointG.toParent[3][0] = mocaporigin.x; |
---|
506 | 509 | CameraPane.debugpointG.toParent[3][1] = mocaporigin.y; |
---|
.. | .. |
---|
643 | 646 | |
---|
644 | 647 | // transient // aout 2013 |
---|
645 | 648 | Object3D skeleton; |
---|
| 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 | + } |
---|
646 | 667 | |
---|
647 | 668 | boolean smoothed; |
---|
648 | 669 | |
---|
.. | .. |
---|
977 | 998 | |
---|
978 | 999 | get(0).link2master = path.size() > 1; // hip orientation |
---|
979 | 1000 | |
---|
980 | | - if (get(0).link2master) |
---|
| 1001 | + if (get(0).Link2Support()) |
---|
981 | 1002 | { |
---|
982 | 1003 | rotateonce = 2; |
---|
983 | 1004 | } |
---|
.. | .. |
---|
1406 | 1427 | double w = 0.00015; |
---|
1407 | 1428 | |
---|
1408 | 1429 | //if (!sourcenode.link2master) // strong pin on floor |
---|
1409 | | - if (parent.link2master) // strong pin on floor |
---|
| 1430 | + if (parent.Link2Support()) // strong pin on floor |
---|
1410 | 1431 | { |
---|
1411 | 1432 | w = 0.005; // .001; |
---|
1412 | 1433 | } |
---|
.. | .. |
---|
1620 | 1641 | // sourcenode.parent.toParent[3][1] = ground - floor.y; |
---|
1621 | 1642 | // sourcenode.parent.toParent[3][2] += groundz - floor.z; |
---|
1622 | 1643 | // sourcenode.parent.toParent[3][1] = K * (ground - floor.y) + (1 - K) * oldposy; |
---|
1623 | | - if (footcontact && (sourcenode.parent != null && !sourcenode.parent.link2master)) // strong pin on floor |
---|
| 1644 | + if (footcontact && (sourcenode.parent != null && !sourcenode.parent.Link2Support())) // strong pin on floor |
---|
1624 | 1645 | { |
---|
1625 | 1646 | v0.x = groundx - floor.x; |
---|
1626 | 1647 | v0.y = 0; // groundx - floor.x; |
---|
.. | .. |
---|
1985 | 2006 | // if (sourcenode.link2master) |
---|
1986 | 2007 | // if (goalx != 0 || goalz != 0) |
---|
1987 | 2008 | // K = 0.02; // .0625; |
---|
1988 | | - if (parent.link2master) // strong pin on floor |
---|
| 2009 | + if (parent.Link2Support()) // strong pin on floor |
---|
1989 | 2010 | { |
---|
1990 | 2011 | K = 0.05; // 0.02; |
---|
1991 | 2012 | } |
---|
.. | .. |
---|
2402 | 2423 | // SetBreakPoint(get(0).toParent[0], 0); |
---|
2403 | 2424 | // } |
---|
2404 | 2425 | |
---|
2405 | | - boolean setrotation = get(0).link2master && !firsttimeafterload && frame > 0; |
---|
| 2426 | + boolean setrotation = get(0).Link2Support() && !firsttimeafterload && frame > 0; |
---|
2406 | 2427 | boolean setposition = sourcenode != null && // sourcenode.parent != null && // july 2014 |
---|
2407 | | - sourcenode./*parent.*/link2master && !firsttimeafterload && frame > 0; |
---|
| 2428 | + sourcenode./*parent.*/Link2Support() && !firsttimeafterload && frame > 0; |
---|
2408 | 2429 | |
---|
2409 | 2430 | // cVector centroid = new cVector(); |
---|
2410 | 2431 | // cVector floor = new cVector(); |
---|
.. | .. |
---|
2837 | 2858 | |
---|
2838 | 2859 | // set translation |
---|
2839 | 2860 | // (currently only possible for root bone! see mocapdata.com data) |
---|
2840 | | - if (bone._isRoot && link2master) // && !GetFileRoot().link2master) |
---|
| 2861 | + if (bone._isRoot && Link2Support()) // && !GetFileRoot().link2master) |
---|
2841 | 2862 | { |
---|
2842 | 2863 | if (hasTranslation) // && _translationEnabled) |
---|
2843 | 2864 | { |
---|
.. | .. |
---|
3897 | 3918 | // return; |
---|
3898 | 3919 | |
---|
3899 | 3920 | if (//!restarted && /*display.restartframe &&*/ |
---|
3900 | | - Globals.isLIVE() && live && (display.DrawMode() == iCameraPane.SHADOW || !Globals.RENDERSHADOW)) |
---|
| 3921 | + Globals.isLIVE() && live && (display.DrawMode() == iCameraPane.SHADOW || !Globals.RENDERSHADOW || !Globals.COMPUTESHADOWWHENLIVE)) |
---|
3901 | 3922 | { |
---|
3902 | 3923 | //display.restartframe = false; |
---|
3903 | 3924 | restarted = true; |
---|
3904 | 3925 | //System.err.println("restarted = true"); |
---|
3905 | 3926 | Step(); |
---|
| 3927 | + |
---|
| 3928 | + Globals.lighttouched = true; |
---|
3906 | 3929 | } |
---|
3907 | 3930 | else |
---|
3908 | 3931 | { |
---|
.. | .. |
---|
3971 | 3994 | // GetObject().release(i); |
---|
3972 | 3995 | } |
---|
3973 | 3996 | |
---|
| 3997 | + boolean HasBigData() |
---|
| 3998 | + { |
---|
| 3999 | + return skeleton != null; |
---|
| 4000 | + } |
---|
| 4001 | + |
---|
3974 | 4002 | public Object3D get(int i) |
---|
3975 | 4003 | { |
---|
3976 | 4004 | if (i != 0) |
---|