Normand Briere
2019-10-01 65bdec7ae2c99ca2102c55f92bd62b48c9f14847
Object3D.java
....@@ -41,6 +41,8 @@
4141
4242 java.util.Hashtable<java.util.UUID, Object3D> versiontable; // = new java.util.Hashtable<java.util.UUID, Object3D>();
4343
44
+ int tabIndex;
45
+
4446 ScriptNode scriptnode;
4547
4648 void deepCopyNode(Object3D other)
....@@ -100,7 +102,7 @@
100102 other.softtouched = softtouched;
101103
102104 other.random = random;
103
- other.link2master = link2master;
105
+ other.link2master = Link2Support();
104106 other.transformcount = transformcount;
105107 other.marked = marked;
106108 other.skip = skip;
....@@ -220,7 +222,7 @@
220222 return;
221223
222224 transientsupport = support;
223
- transientlink2master = link2master;
225
+ transientlink2master = Link2Support();
224226
225227 support = null;
226228 link2master = false;
....@@ -633,7 +635,10 @@
633635 transient boolean keepdontselect;
634636 boolean dontselect = false;
635637 boolean hide = false;
638
+
636639 boolean link2master = false; // performs reset support/master at each frame (cannot rename due to serialization)
640
+ boolean link2support = false; // (cannot rename due to serialization)
641
+
637642 boolean marked = false; // animation node
638643 boolean skip = false; // centroid issue
639644 boolean skipmocap = false; // mocap data
....@@ -6154,7 +6159,7 @@
61546159 boolean NeedSupport()
61556160 {
61566161 return
6157
- CameraPane.SUPPORT && (!CameraPane.movingcamera || (!Globals.FREEZEONMOVE && Globals.isLIVE())) && link2master && /*live &&*/ support != null
6162
+ CameraPane.SUPPORT && (!CameraPane.movingcamera || (!Globals.FREEZEONMOVE && Globals.isLIVE())) && Link2Support() && /*live &&*/ support != null
61586163 // PROBLEM with CROWD!!
61596164 && (Globals.DrawMode() == iCameraPane.SHADOW || !Globals.RENDERSHADOW || Globals.CROWD);
61606165 }
....@@ -6177,6 +6182,11 @@
61776182 return live && bRep != null;
61786183 }
61796184
6185
+ boolean Link2Support()
6186
+ {
6187
+ return link2master || link2support;
6188
+ }
6189
+
61806190 static cVector minima = new cVector();
61816191 static cVector maxima = new cVector();
61826192 static javax.vecmath.Point3d center = new javax.vecmath.Point3d();
....@@ -6190,7 +6200,7 @@
61906200 // System.err.println("Draw " + this + " Frame # " + ((Mocap)((Merge)support).object).frame);
61916201 }
61926202
6193
- if (live && link2master && support == null && !this.marked) // project on ground
6203
+ if (false) // live && Link2Support() && support == null && !this.marked) // project on ground
61946204 {
61956205 getBounds(minima, maxima, true);
61966206 center.x = (minima.x + maxima.x) / 2;
....@@ -6265,7 +6275,7 @@
62656275 support = support;
62666276
62676277 boolean usecalllists = !IsDynamic() &&
6268
- IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null || !link2master); // !(this instanceof cSpring) && !(this instanceof BezierPatch);
6278
+ IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null || !Link2Support()); // !(this instanceof cSpring) && !(this instanceof BezierPatch);
62696279 //boolean usecalllists = false; //!IsLive(); // IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null) && !link2master; // !(this instanceof cSpring) && !(this instanceof BezierPatch);
62706280
62716281 //usecalllists &= display.DrawMode() == display.DEFAULT; // Don't compute list in shadow pass.
....@@ -6276,7 +6286,8 @@
62766286 bRep.displaylist = 0;
62776287 }
62786288 // usecalllists &= !(parent instanceof RandomNode);
6279
- // usecalllists = false;
6289
+ if (CameraPane.BOXMODE) // Too dynamic
6290
+ usecalllists = false;
62806291
62816292 if (display.DrawMode() == display.SHADOW)
62826293 //GetBRep() != null)
....@@ -6372,7 +6383,7 @@
63726383 {
63736384 if (display.DrawMode() == iCameraPane.SHADOW)
63746385 {
6375
- if (!link2master // tricky to cull in shadow mode.
6386
+ if (!Link2Support() // tricky to cull in shadow mode.
63766387 && GetBRep().FrustumCull(this, null, display.LightCamera(), true))
63776388 {
63786389 //System.out.print("CULLED");
....@@ -6845,7 +6856,7 @@
68456856
68466857 //javax.media.opengl.GL gl = display.GetGL();
68476858
6848
- if (CameraPane.BOXMODE && !selected) // || CameraPane.movingcamera)
6859
+ if (CameraPane.BOXMODE && !Link2Support()) //selected) // || CameraPane.movingcamera)
68496860 {
68506861 int fc = bRep.FaceCount();
68516862 int vc = bRep.VertexCount();
....@@ -8916,7 +8927,7 @@
89168927
89178928 boolean touch = false;
89188929
8919
- if (bRep != null && link2master)
8930
+ if (bRep != null && Link2Support())
89208931 {
89218932 if (bbox == null)
89228933 {