.. | .. |
---|
22 | 22 | //static final long serialVersionUID = -607422624994562685L; |
---|
23 | 23 | static final long serialVersionUID = 5022536242724664900L; |
---|
24 | 24 | |
---|
| 25 | + // Use GetUUID for backward compatibility with null. |
---|
25 | 26 | private UUID uuid = UUID.randomUUID(); |
---|
26 | 27 | |
---|
27 | 28 | // TEMPORARY for mocap undo. No need to be transient. |
---|
.. | .. |
---|
29 | 30 | Object3D saveskeleton; |
---|
30 | 31 | // |
---|
31 | 32 | |
---|
32 | | - byte[] versions[]; |
---|
| 33 | + String skyboxname; |
---|
| 34 | + String skyboxext; |
---|
| 35 | + |
---|
| 36 | + Object3D versionlist[]; |
---|
33 | 37 | int versionindex = -1; |
---|
34 | 38 | |
---|
35 | 39 | ScriptNode scriptnode; |
---|
.. | .. |
---|
219 | 223 | // o.bRep.support = null; |
---|
220 | 224 | // } |
---|
221 | 225 | o.selection = this.selection; |
---|
222 | | - o.versions = this.versions; |
---|
| 226 | + o.versionlist = this.versionlist; |
---|
223 | 227 | o.versionindex = this.versionindex; |
---|
224 | 228 | |
---|
225 | 229 | if (this.support != null) |
---|
.. | .. |
---|
242 | 246 | // this.support = null; |
---|
243 | 247 | // this.fileparent = null; |
---|
244 | 248 | } |
---|
| 249 | + |
---|
| 250 | +// Object3D GetObject(java.util.UUID uuid) |
---|
| 251 | +// { |
---|
| 252 | +// if (this.uuid.equals(uuid)) |
---|
| 253 | +// return this; |
---|
| 254 | +// |
---|
| 255 | +// if (blockloop) |
---|
| 256 | +// return null; |
---|
| 257 | +// |
---|
| 258 | +// blockloop = true; |
---|
| 259 | +// |
---|
| 260 | +// for (int i=0; i<Size(); i++) |
---|
| 261 | +// { |
---|
| 262 | +// Object3D o = get(i).GetObject(uuid); |
---|
| 263 | +// |
---|
| 264 | +// if (o != null) |
---|
| 265 | +// return o; |
---|
| 266 | +// } |
---|
| 267 | +// |
---|
| 268 | +// blockloop = false; |
---|
| 269 | +// |
---|
| 270 | +// return null; |
---|
| 271 | +// } |
---|
245 | 272 | |
---|
246 | 273 | void RestoreBigData(java.util.Hashtable<java.util.UUID, Object3D> hashtable) |
---|
247 | 274 | { |
---|
.. | .. |
---|
277 | 304 | |
---|
278 | 305 | this.selection = o.selection; |
---|
279 | 306 | |
---|
280 | | - this.versions = o.versions; |
---|
| 307 | + this.versionlist = o.versionlist; |
---|
281 | 308 | this.versionindex = o.versionindex; |
---|
282 | 309 | // July 2019 if (this.bRep != null) |
---|
283 | 310 | // this.bRep.support = o.transientrep; |
---|
.. | .. |
---|
1011 | 1038 | |
---|
1012 | 1039 | if (material == null || material.multiply) |
---|
1013 | 1040 | return true; |
---|
| 1041 | + |
---|
| 1042 | + if (projectedVertices != null && projectedVertices.length > 2 && projectedVertices[2].y >= 10000) |
---|
| 1043 | + return false; |
---|
1014 | 1044 | |
---|
1015 | 1045 | // Transparent objects are dynamic because we have to sort the triangles. |
---|
1016 | 1046 | return material.opacity > 0.99; |
---|
.. | .. |
---|
5906 | 5936 | if (support != null) |
---|
5907 | 5937 | support = support; |
---|
5908 | 5938 | |
---|
5909 | | - //boolean usecalllists = IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null || !link2master); // !(this instanceof cSpring) && !(this instanceof BezierPatch); |
---|
5910 | | - boolean usecalllists = !IsLive(); // IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null) && !link2master; // !(this instanceof cSpring) && !(this instanceof BezierPatch); |
---|
| 5939 | + boolean usecalllists = !IsLive() && IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null || !link2master); // !(this instanceof cSpring) && !(this instanceof BezierPatch); |
---|
| 5940 | + //boolean usecalllists = false; //!IsLive(); // IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null) && !link2master; // !(this instanceof cSpring) && !(this instanceof BezierPatch); |
---|
| 5941 | + |
---|
| 5942 | + //usecalllists &= display.DrawMode() == display.DEFAULT; // Don't compute list in shadow pass. |
---|
5911 | 5943 | |
---|
5912 | 5944 | if (!usecalllists && bRep != null && bRep.displaylist > 0) |
---|
5913 | 5945 | { |
---|
.. | .. |
---|
5917 | 5949 | // usecalllists &= !(parent instanceof RandomNode); |
---|
5918 | 5950 | // usecalllists = false; |
---|
5919 | 5951 | |
---|
5920 | | - if (GetBRep() != null) |
---|
5921 | | - usecalllists = usecalllists; |
---|
| 5952 | + if (display.DrawMode() == display.SHADOW) |
---|
| 5953 | + //GetBRep() != null) |
---|
| 5954 | + usecalllists = !!usecalllists; |
---|
5922 | 5955 | //System.out.println("draw " + this); |
---|
5923 | 5956 | //new Exception().printStackTrace(); |
---|
5924 | 5957 | |
---|
.. | .. |
---|
5940 | 5973 | if (!(this instanceof Composite)) |
---|
5941 | 5974 | touched = false; |
---|
5942 | 5975 | //if (displaylist == -1 && usecalllists) |
---|
5943 | | - if ((bRep != null && bRep.displaylist <= 0) && usecalllists) // june 2013 |
---|
| 5976 | + if (bRep.displaylist <= 0 && usecalllists) // && display.DrawMode() == display.DEFAULT) // june 2013 |
---|
5944 | 5977 | { |
---|
5945 | 5978 | bRep.displaylist = display.GenList(); |
---|
5946 | 5979 | assert(bRep.displaylist != 0); |
---|
.. | .. |
---|
5951 | 5984 | |
---|
5952 | 5985 | //System.out.println("\tnew list " + list); |
---|
5953 | 5986 | //gl.glDrawBuffer(gl.GL_NONE); |
---|
5954 | | - if (usecalllists) |
---|
| 5987 | + if (usecalllists && bRep.displaylist > 0) |
---|
5955 | 5988 | { |
---|
5956 | 5989 | // System.err.println("new list " + bRep.displaylist + " for " + this); |
---|
5957 | 5990 | display.NewList(bRep.displaylist); |
---|
.. | .. |
---|
5960 | 5993 | CallList(display, root, selected, blocked); |
---|
5961 | 5994 | |
---|
5962 | 5995 | // compiled = true; |
---|
5963 | | - if (usecalllists) |
---|
| 5996 | + if (usecalllists && bRep.displaylist > 0) |
---|
5964 | 5997 | { |
---|
5965 | 5998 | // System.err.println("end list " + bRep.displaylist + " for " + this); |
---|
5966 | 5999 | display.EndList(); |
---|
.. | .. |
---|
7490 | 7523 | hitSomething = hitScale; |
---|
7491 | 7524 | |
---|
7492 | 7525 | double scale = 0.005f * clickInfo.camera.Distance(); |
---|
7493 | | - double hScale = (double) (clickInfo.x /*- centerPt.x*/) / 32; |
---|
| 7526 | + double hScale = (double) (clickInfo.x - centerPt.x) / 32; |
---|
7494 | 7527 | double sign = 1; |
---|
7495 | 7528 | if (hScale < 0) |
---|
7496 | 7529 | { |
---|
.. | .. |
---|
7502 | 7535 | //hScale = 0.01; |
---|
7503 | 7536 | } |
---|
7504 | 7537 | |
---|
7505 | | - double vScale = (double) (clickInfo.y /*- centerPt.y*/) / 32; |
---|
| 7538 | + double vScale = (double) (clickInfo.y - centerPt.y) / 32; |
---|
7506 | 7539 | sign = 1; |
---|
7507 | 7540 | if (vScale < 0) |
---|
7508 | 7541 | { |
---|
.. | .. |
---|
7717 | 7750 | break; |
---|
7718 | 7751 | |
---|
7719 | 7752 | case hitScale: // scale |
---|
7720 | | - double hScale = (double) (clickInfo.x /*- centerPt.x*/) / 32; |
---|
| 7753 | + double hScale = (double) (clickInfo.x - centerPt.x) / 32; |
---|
7721 | 7754 | double sign = 1; |
---|
7722 | 7755 | if (hScale < 0) |
---|
7723 | 7756 | { |
---|
.. | .. |
---|
7729 | 7762 | //hScale = 0.01; |
---|
7730 | 7763 | } |
---|
7731 | 7764 | |
---|
7732 | | - double vScale = (double) (clickInfo.y /*- centerPt.y*/) / 32; |
---|
| 7765 | + double vScale = (double) (clickInfo.y - centerPt.y) / 32; |
---|
7733 | 7766 | sign = 1; |
---|
7734 | 7767 | if (vScale < 0) |
---|
7735 | 7768 | { |
---|