.. | .. |
---|
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; |
---|
.. | .. |
---|
648 | 651 | { |
---|
649 | 652 | super.ExtractBigData(o); |
---|
650 | 653 | |
---|
651 | | - o.bvh = this.bvh; |
---|
652 | | - o.skeleton = this.skeleton; |
---|
| 654 | + o.savebvh = this.bvh; |
---|
| 655 | + o.saveskeleton = this.skeleton; |
---|
653 | 656 | this.bvh = null; |
---|
654 | 657 | this.skeleton = null; |
---|
655 | 658 | } |
---|
.. | .. |
---|
658 | 661 | { |
---|
659 | 662 | super.RestoreBigData(o); |
---|
660 | 663 | |
---|
661 | | - this.bvh = o.bvh; |
---|
662 | | - this.skeleton = o.skeleton; |
---|
| 664 | + this.bvh = o.savebvh; |
---|
| 665 | + this.skeleton = o.saveskeleton; |
---|
663 | 666 | } |
---|
664 | 667 | |
---|
665 | 668 | boolean smoothed; |
---|
.. | .. |
---|
995 | 998 | |
---|
996 | 999 | get(0).link2master = path.size() > 1; // hip orientation |
---|
997 | 1000 | |
---|
998 | | - if (get(0).link2master) |
---|
| 1001 | + if (get(0).Link2Support()) |
---|
999 | 1002 | { |
---|
1000 | 1003 | rotateonce = 2; |
---|
1001 | 1004 | } |
---|
.. | .. |
---|
1424 | 1427 | double w = 0.00015; |
---|
1425 | 1428 | |
---|
1426 | 1429 | //if (!sourcenode.link2master) // strong pin on floor |
---|
1427 | | - if (parent.link2master) // strong pin on floor |
---|
| 1430 | + if (parent.Link2Support()) // strong pin on floor |
---|
1428 | 1431 | { |
---|
1429 | 1432 | w = 0.005; // .001; |
---|
1430 | 1433 | } |
---|
.. | .. |
---|
1638 | 1641 | // sourcenode.parent.toParent[3][1] = ground - floor.y; |
---|
1639 | 1642 | // sourcenode.parent.toParent[3][2] += groundz - floor.z; |
---|
1640 | 1643 | // sourcenode.parent.toParent[3][1] = K * (ground - floor.y) + (1 - K) * oldposy; |
---|
1641 | | - 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 |
---|
1642 | 1645 | { |
---|
1643 | 1646 | v0.x = groundx - floor.x; |
---|
1644 | 1647 | v0.y = 0; // groundx - floor.x; |
---|
.. | .. |
---|
2003 | 2006 | // if (sourcenode.link2master) |
---|
2004 | 2007 | // if (goalx != 0 || goalz != 0) |
---|
2005 | 2008 | // K = 0.02; // .0625; |
---|
2006 | | - if (parent.link2master) // strong pin on floor |
---|
| 2009 | + if (parent.Link2Support()) // strong pin on floor |
---|
2007 | 2010 | { |
---|
2008 | 2011 | K = 0.05; // 0.02; |
---|
2009 | 2012 | } |
---|
.. | .. |
---|
2420 | 2423 | // SetBreakPoint(get(0).toParent[0], 0); |
---|
2421 | 2424 | // } |
---|
2422 | 2425 | |
---|
2423 | | - boolean setrotation = get(0).link2master && !firsttimeafterload && frame > 0; |
---|
| 2426 | + boolean setrotation = get(0).Link2Support() && !firsttimeafterload && frame > 0; |
---|
2424 | 2427 | boolean setposition = sourcenode != null && // sourcenode.parent != null && // july 2014 |
---|
2425 | | - sourcenode./*parent.*/link2master && !firsttimeafterload && frame > 0; |
---|
| 2428 | + sourcenode./*parent.*/Link2Support() && !firsttimeafterload && frame > 0; |
---|
2426 | 2429 | |
---|
2427 | 2430 | // cVector centroid = new cVector(); |
---|
2428 | 2431 | // cVector floor = new cVector(); |
---|
.. | .. |
---|
2855 | 2858 | |
---|
2856 | 2859 | // set translation |
---|
2857 | 2860 | // (currently only possible for root bone! see mocapdata.com data) |
---|
2858 | | - if (bone._isRoot && link2master) // && !GetFileRoot().link2master) |
---|
| 2861 | + if (bone._isRoot && Link2Support()) // && !GetFileRoot().link2master) |
---|
2859 | 2862 | { |
---|
2860 | 2863 | if (hasTranslation) // && _translationEnabled) |
---|
2861 | 2864 | { |
---|
.. | .. |
---|
3921 | 3924 | restarted = true; |
---|
3922 | 3925 | //System.err.println("restarted = true"); |
---|
3923 | 3926 | Step(); |
---|
| 3927 | + |
---|
| 3928 | + Globals.lighttouched = true; |
---|
3924 | 3929 | } |
---|
3925 | 3930 | else |
---|
3926 | 3931 | { |
---|
.. | .. |
---|
3989 | 3994 | // GetObject().release(i); |
---|
3990 | 3995 | } |
---|
3991 | 3996 | |
---|
| 3997 | + boolean HasBigData() |
---|
| 3998 | + { |
---|
| 3999 | + return skeleton != null; |
---|
| 4000 | + } |
---|
| 4001 | + |
---|
3992 | 4002 | public Object3D get(int i) |
---|
3993 | 4003 | { |
---|
3994 | 4004 | if (i != 0) |
---|