.. | .. |
---|
100 | 100 | other.softtouched = softtouched; |
---|
101 | 101 | |
---|
102 | 102 | other.random = random; |
---|
103 | | - other.link2master = link2master; |
---|
| 103 | + other.link2master = Link2Support(); |
---|
104 | 104 | other.transformcount = transformcount; |
---|
105 | 105 | other.marked = marked; |
---|
106 | 106 | other.skip = skip; |
---|
.. | .. |
---|
220 | 220 | return; |
---|
221 | 221 | |
---|
222 | 222 | transientsupport = support; |
---|
223 | | - transientlink2master = link2master; |
---|
| 223 | + transientlink2master = Link2Support(); |
---|
224 | 224 | |
---|
225 | 225 | support = null; |
---|
226 | 226 | link2master = false; |
---|
.. | .. |
---|
633 | 633 | transient boolean keepdontselect; |
---|
634 | 634 | boolean dontselect = false; |
---|
635 | 635 | boolean hide = false; |
---|
| 636 | + |
---|
636 | 637 | boolean link2master = false; // performs reset support/master at each frame (cannot rename due to serialization) |
---|
| 638 | + boolean link2support = false; // (cannot rename due to serialization) |
---|
| 639 | + |
---|
637 | 640 | boolean marked = false; // animation node |
---|
638 | 641 | boolean skip = false; // centroid issue |
---|
639 | 642 | boolean skipmocap = false; // mocap data |
---|
.. | .. |
---|
6154 | 6157 | boolean NeedSupport() |
---|
6155 | 6158 | { |
---|
6156 | 6159 | return |
---|
6157 | | - CameraPane.SUPPORT && (!CameraPane.movingcamera || (!Globals.FREEZEONMOVE && Globals.isLIVE())) && link2master && /*live &&*/ support != null |
---|
| 6160 | + CameraPane.SUPPORT && (!CameraPane.movingcamera || (!Globals.FREEZEONMOVE && Globals.isLIVE())) && Link2Support() && /*live &&*/ support != null |
---|
6158 | 6161 | // PROBLEM with CROWD!! |
---|
6159 | 6162 | && (Globals.DrawMode() == iCameraPane.SHADOW || !Globals.RENDERSHADOW || Globals.CROWD); |
---|
6160 | 6163 | } |
---|
.. | .. |
---|
6177 | 6180 | return live && bRep != null; |
---|
6178 | 6181 | } |
---|
6179 | 6182 | |
---|
| 6183 | + boolean Link2Support() |
---|
| 6184 | + { |
---|
| 6185 | + return link2master || link2support; |
---|
| 6186 | + } |
---|
| 6187 | + |
---|
6180 | 6188 | static cVector minima = new cVector(); |
---|
6181 | 6189 | static cVector maxima = new cVector(); |
---|
6182 | 6190 | static javax.vecmath.Point3d center = new javax.vecmath.Point3d(); |
---|
.. | .. |
---|
6190 | 6198 | // System.err.println("Draw " + this + " Frame # " + ((Mocap)((Merge)support).object).frame); |
---|
6191 | 6199 | } |
---|
6192 | 6200 | |
---|
6193 | | - if (live && link2master && support == null && !this.marked) // project on ground |
---|
| 6201 | + if (live && Link2Support() && support == null && !this.marked) // project on ground |
---|
6194 | 6202 | { |
---|
6195 | 6203 | getBounds(minima, maxima, true); |
---|
6196 | 6204 | center.x = (minima.x + maxima.x) / 2; |
---|
.. | .. |
---|
6265 | 6273 | support = support; |
---|
6266 | 6274 | |
---|
6267 | 6275 | boolean usecalllists = !IsDynamic() && |
---|
6268 | | - IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null || !link2master); // !(this instanceof cSpring) && !(this instanceof BezierPatch); |
---|
| 6276 | + IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null || !Link2Support()); // !(this instanceof cSpring) && !(this instanceof BezierPatch); |
---|
6269 | 6277 | //boolean usecalllists = false; //!IsLive(); // IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null) && !link2master; // !(this instanceof cSpring) && !(this instanceof BezierPatch); |
---|
6270 | 6278 | |
---|
6271 | 6279 | //usecalllists &= display.DrawMode() == display.DEFAULT; // Don't compute list in shadow pass. |
---|
.. | .. |
---|
6373 | 6381 | { |
---|
6374 | 6382 | if (display.DrawMode() == iCameraPane.SHADOW) |
---|
6375 | 6383 | { |
---|
6376 | | - if (!link2master // tricky to cull in shadow mode. |
---|
| 6384 | + if (!Link2Support() // tricky to cull in shadow mode. |
---|
6377 | 6385 | && GetBRep().FrustumCull(this, null, display.LightCamera(), true)) |
---|
6378 | 6386 | { |
---|
6379 | 6387 | //System.out.print("CULLED"); |
---|
.. | .. |
---|
6846 | 6854 | |
---|
6847 | 6855 | //javax.media.opengl.GL gl = display.GetGL(); |
---|
6848 | 6856 | |
---|
6849 | | - if (CameraPane.BOXMODE && !selected) // || CameraPane.movingcamera) |
---|
| 6857 | + if (CameraPane.BOXMODE && !Link2Support()) //selected) // || CameraPane.movingcamera) |
---|
6850 | 6858 | { |
---|
6851 | 6859 | int fc = bRep.FaceCount(); |
---|
6852 | 6860 | int vc = bRep.VertexCount(); |
---|
.. | .. |
---|
8917 | 8925 | |
---|
8918 | 8926 | boolean touch = false; |
---|
8919 | 8927 | |
---|
8920 | | - if (bRep != null && link2master) |
---|
| 8928 | + if (bRep != null && Link2Support()) |
---|
8921 | 8929 | { |
---|
8922 | 8930 | if (bbox == null) |
---|
8923 | 8931 | { |
---|