Normand Briere
2019-05-02 a7277e6c6381e55761f7fa87276260fac1c94d5e
Object3D.java
....@@ -5,6 +5,7 @@
55 import java.util.Vector;
66
77 import javax.media.j3d.Transform3D;
8
+import javax.media.opengl.GL;
89 import javax.vecmath.Vector3d;
910
1011 import javax.imageio.ImageIO;
....@@ -430,16 +431,16 @@
430431 {
431432 Object3D copy = this;
432433
433
- Camera parentcam = CameraPane.theRenderer.manipCamera;
434
+ Camera parentcam = Globals.theRenderer.ManipCamera();
434435
435
- if (CameraPane.theRenderer.manipCamera == CameraPane.theRenderer.cameras[0])
436
+ if (Globals.theRenderer.ManipCamera() == Globals.theRenderer.Cameras()[0])
436437 {
437
- parentcam = CameraPane.theRenderer.cameras[1];
438
+ parentcam = Globals.theRenderer.Cameras()[1];
438439 }
439440
440
- if (CameraPane.theRenderer.manipCamera == CameraPane.theRenderer.cameras[1])
441
+ if (Globals.theRenderer.ManipCamera() == Globals.theRenderer.Cameras()[1])
441442 {
442
- parentcam = CameraPane.theRenderer.cameras[0];
443
+ parentcam = Globals.theRenderer.Cameras()[0];
443444 }
444445
445446 if (this == parentcam)
....@@ -447,7 +448,7 @@
447448 //assert(this instanceof Camera);
448449
449450 for (int count = parentcam.GetTransformCount(); --count>=0;)
450
- LA.xformPos(CameraPane.theRenderer.targetLookAt, parentcam.toParent, CameraPane.theRenderer.targetLookAt);
451
+ LA.xformPos(Globals.theRenderer.TargetLookAt(), parentcam.toParent, Globals.theRenderer.TargetLookAt());
451452 }
452453
453454 copy.marked ^= true;
....@@ -467,7 +468,7 @@
467468 //assert(this instanceof Camera);
468469
469470 for (int count = parentcam.GetTransformCount(); --count>=0;)
470
- LA.xformPos(CameraPane.theRenderer.targetLookAt, parentcam.fromParent, CameraPane.theRenderer.targetLookAt);
471
+ LA.xformPos(Globals.theRenderer.TargetLookAt(), parentcam.fromParent, Globals.theRenderer.TargetLookAt());
471472 }
472473
473474 copy.Touch(); // display list issue
....@@ -602,7 +603,7 @@
602603 return;
603604 }
604605
605
- if (CameraPane.fromscript)
606
+ if (Globals.fromscript)
606607 {
607608 transformcount = 0;
608609 return;
....@@ -2299,6 +2300,7 @@
22992300 {
23002301 if (newWindow)
23012302 {
2303
+ new Exception().printStackTrace();
23022304 System.exit(0);
23032305 if (parent != null)
23042306 {
....@@ -2905,7 +2907,8 @@
29052907 {
29062908 if (bRep != null)
29072909 {
2908
- bRep.GenUV();
2910
+ bRep.GenUV(); //1);
2911
+ //bRep.UnfoldUV();
29092912 Touch();
29102913 }
29112914 }
....@@ -4854,7 +4857,7 @@
48544857 return globalTransform;
48554858 }
48564859
4857
- void PreprocessOcclusion(CameraPane cp)
4860
+ void PreprocessOcclusion(iCameraPane cp)
48584861 {
48594862 /*
48604863 if (AOdone)
....@@ -5327,6 +5330,7 @@
53275330 && (Globals.DrawMode() == iCameraPane.SHADOW || Globals.CROWD);
53285331 }
53295332
5333
+ static boolean DEBUG_SELECTION = false;
53305334
53315335 void Draw(iCameraPane display, Object3D /*Composite*/ root, boolean selected, boolean blocked)
53325336 {
....@@ -5365,12 +5369,12 @@
53655369 }
53665370
53675371 if ((//display.DrawMode() == CameraPane.SHADOW ||
5368
- display.DrawMode() == CameraPane.SELECTION || CameraPane.DEBUG_SELECTION) && HasTransparency())
5372
+ display.DrawMode() == iCameraPane.SELECTION || display.IsDebugSelection()) && HasTransparency())
53695373 {
53705374 return;
53715375 }
53725376
5373
- javax.media.opengl.GL gl = display.GetGL();
5377
+ //javax.media.opengl.GL gl = display.GetGL();
53745378
53755379 /*
53765380 if (touched)
....@@ -5406,7 +5410,7 @@
54065410
54075411 boolean compiled = false;
54085412
5409
- boolean selectmode = display.DrawMode() == display.SELECTION || CameraPane.DEBUG_SELECTION;
5413
+ boolean selectmode = display.DrawMode() == display.SELECTION || display.IsDebugSelection();
54105414
54115415 if (!selectmode && //display.DrawMode() != display.SELECTION &&
54125416 (touched || (bRep != null && bRep.displaylist <= 0)))
....@@ -5422,7 +5426,7 @@
54225426 //if (displaylist == -1 && usecalllists)
54235427 if ((bRep != null && bRep.displaylist <= 0) && usecalllists) // june 2013
54245428 {
5425
- bRep.displaylist = gl.glGenLists(1);
5429
+ bRep.displaylist = display.GenList();
54265430 assert(bRep.displaylist != 0);
54275431 // System.err.println("glGenLists: " + bRep.displaylist + " for " + this);
54285432 //System.out.println("\tgen list " + list);
....@@ -5434,14 +5438,16 @@
54345438 if (usecalllists)
54355439 {
54365440 // System.err.println("new list " + bRep.displaylist + " for " + this);
5437
- gl.glNewList(bRep.displaylist, gl.GL_COMPILE); //_AND_EXECUTE);
5441
+ display.NewList(bRep.displaylist);
54385442 }
5443
+
54395444 CallList(display, root, selected, blocked);
5445
+
54405446 // compiled = true;
54415447 if (usecalllists)
54425448 {
54435449 // System.err.println("end list " + bRep.displaylist + " for " + this);
5444
- gl.glEndList();
5450
+ display.EndList();
54455451 }
54465452 //gl.glDrawBuffer(gl.GL_BACK);
54475453 // XXX touched = false;
....@@ -5484,12 +5490,12 @@
54845490
54855491 // frustum culling
54865492 if (CameraPane.FRUSTUM && !blocked && !IsInfinite() && GetBRep() != null // && GetBRep().VertexCount() != 1260 // default grid
5487
- && display.DrawMode() != CameraPane.SELECTION)
5493
+ && display.DrawMode() != iCameraPane.SELECTION)
54885494 {
5489
- if (display.DrawMode() == CameraPane.SHADOW)
5495
+ if (display.DrawMode() == iCameraPane.SHADOW)
54905496 {
54915497 if (!link2master // tricky to cull in shadow mode.
5492
- && GetBRep().FrustumCull(this, gl, display.LightCamera(), true))
5498
+ && GetBRep().FrustumCull(this, null, display.LightCamera(), true))
54935499 {
54945500 //System.out.print("CULLED");
54955501 culled = true;
....@@ -5497,7 +5503,7 @@
54975503 }
54985504 else
54995505 //GetBRep().getBounds(v0, v1, this);
5500
- if (GetBRep().FrustumCull(this, gl, display.RenderCamera(), false))
5506
+ if (GetBRep().FrustumCull(this, null, display.RenderCamera(), false))
55015507 culled = true;
55025508
55035509 // LA.xformPos(v0, display.renderCamera.toScreen, v0);
....@@ -5533,11 +5539,11 @@
55335539
55345540
55355541 if (!culled)
5536
- if (display.DrawMode() == display.SELECTION || CameraPane.DEBUG_SELECTION)
5542
+ if (display.DrawMode() == display.SELECTION || display.IsDebugSelection())
55375543 {
55385544 if (GetBRep() != null)
55395545 {
5540
- CameraPane.NextIndex(this, gl);
5546
+ display.NextIndex();
55415547 // vertex color conflict : gl.glCallList(list);
55425548 DrawNode(display, root, selected);
55435549 if (this instanceof BezierPatch)
....@@ -5594,7 +5600,7 @@
55945600
55955601 // System.err.println("glCallList: " + bRep.displaylist + " for " + this);
55965602 assert(bRep.displaylist != 0);
5597
- gl.glCallList(bRep.displaylist);
5603
+ display.CallList(bRep.displaylist);
55985604 // june 2013 drawSelf(display, root, selected);
55995605 }
56005606 }
....@@ -5894,9 +5900,10 @@
58945900 return;
58955901 }
58965902
5903
+ //bRep.GenUV(1/material.diffuseness);
58975904 // bRep.lock = true;
58985905
5899
- javax.media.opengl.GL gl = display.GetGL();
5906
+ //javax.media.opengl.GL gl = display.GetGL();
59005907
59015908 if (CameraPane.BOXMODE && !selected) // || CameraPane.movingcamera)
59025909 {
....@@ -5913,23 +5920,7 @@
59135920
59145921 bRep.getMinMax(min, max, 100);
59155922
5916
- gl.glBegin(gl.GL_LINES);
5917
-
5918
- gl.glVertex3d(min.x, min.y, min.z);
5919
- gl.glVertex3d(min.x, min.y, max.z);
5920
- gl.glVertex3d(min.x, min.y, min.z);
5921
- gl.glVertex3d(min.x, max.y, min.z);
5922
- gl.glVertex3d(min.x, min.y, min.z);
5923
- gl.glVertex3d(max.x, min.y, min.z);
5924
-
5925
- gl.glVertex3d(max.x, max.y, max.z);
5926
- gl.glVertex3d(min.x, max.y, max.z);
5927
- gl.glVertex3d(max.x, max.y, max.z);
5928
- gl.glVertex3d(max.x, min.y, max.z);
5929
- gl.glVertex3d(max.x, max.y, max.z);
5930
- gl.glVertex3d(max.x, max.y, min.z);
5931
-
5932
- gl.glEnd();
5923
+ display.DrawBox(min, max);
59335924
59345925 return;
59355926 }
....@@ -5973,7 +5964,7 @@
59735964 {
59745965 //throw new Error();
59755966
5976
- boolean selectmode = display.DrawMode() == display.SELECTION || CameraPane.DEBUG_SELECTION;
5967
+ boolean selectmode = display.DrawMode() == display.SELECTION || display.IsDebugSelection();
59775968
59785969 int[] strips = bRep.getRawIndices();
59795970
....@@ -5983,178 +5974,14 @@
59835974 new Exception().printStackTrace();
59845975 return;
59855976 }
5986
-
5987
- // TRIANGLE STRIP ARRAY
5988
- if (bRep.trimmed)
5989
- {
5990
- float[] v = bRep.getRawVertices();
5991
- float[] n = bRep.getRawNormals();
5992
- float[] c = bRep.getRawColors();
5993
- float[] uv = bRep.getRawUVMap();
5994
-
5995
- int count2 = 0;
5996
- int count3 = 0;
5997
-
5998
- if (n.length > 0)
5999
- {
6000
- for (int i = 0; i < strips.length; i++)
6001
- {
6002
- gl.glBegin(gl.GL_TRIANGLE_STRIP);
6003
-
6004
- /*
6005
- boolean locked = false;
6006
- float eps = 0.1f;
6007
- boolean wrap = CameraPane.UVWRAP; // true; // UV WRAP TEXTURE ISSUE: true = artifacts, false = nice
6008
-
6009
- int dot = 0;
6010
-
6011
- if ((dot&1) == 0)
6012
- dot |= (Math.abs(qv.s - pv.s) < eps && Math.abs(qv.t - pv.t) < eps) ? 3 : 1;
6013
-
6014
- if (wrap || (dot&2) != 0) // Math.abs(qv.s - pv.s) < eps && Math.abs(qv.t - pv.t) < eps)
6015
- gl.glTexCoord2f((float) qv.s, (float) qv.t);
6016
- else
6017
- {
6018
- locked = true;
6019
- gl.glTexCoord2f((float) pv.s, (float) pv.t);
6020
- }
6021
- //System.out.println("vertexq = " + qv.x + ", " + qv.y + ", " + qv.z);
6022
- gl.glVertex3f((float) qv.x, (float) qv.y, (float) qv.z);
6023
- if (hasnorm)
6024
- {
6025
- //System.out.println("normalr = " + rv.norm.x + ", " + rv.norm.y + ", " + rv.norm.z);
6026
- gl.glNormal3f((float) rv.norm.x, (float) rv.norm.y, (float) rv.norm.z);
6027
- }
6028
-
6029
- if ((dot&4) == 0)
6030
- dot |= (Math.abs(rv.s - pv.s) < eps && Math.abs(rv.t - pv.t) < eps) ? 12 : 4;
6031
-
6032
- if (wrap || !locked && (dot&8) != 0)
6033
- gl.glTexCoord2f((float) rv.s, (float) rv.t);
6034
- else
6035
- gl.glTexCoord2f((float) pv.s, (float) pv.t);
6036
-
6037
- f.dot = dot;
6038
- */
6039
-
6040
- if (!selectmode)
6041
- {
6042
- if (n[count3] != 0 || n[count3 + 1] != 0 || n[count3 + 2] != 0)
6043
- {
6044
- gl.glNormal3f(n[count3], n[count3 + 1], n[count3 + 2]);
6045
- } else
6046
- {
6047
- gl.glNormal3f(0, 0, 1);
6048
- }
6049
-
6050
- if (c != null)
6051
- //System.out.println("glcolor = " + c[count3] + ", " + c[count3+1] + ", " + c[count3+2]);
6052
- {
6053
- gl.glColor4f(c[count3/3], c[count3/3 /* + 1*/], c[count3/3 /* + 2*/], 1);
6054
- }
6055
- }
6056
- if (flipV)
6057
- gl.glTexCoord2f(uv[count2], 1-uv[count2 + 1]);
6058
- else
6059
- gl.glTexCoord2f(uv[count2], uv[count2 + 1]);
6060
- //System.out.println("vertex1 = " + v[count3] + ", " + v[count3+1] + ", " + v[count3+2]);
6061
- gl.glVertex3f(v[count3], v[count3 + 1], v[count3 + 2]);
6062
-
6063
- count2 += 2;
6064
- count3 += 3;
6065
- if (!selectmode)
6066
- {
6067
- if (n[count3] != 0 || n[count3 + 1] != 0 || n[count3 + 2] != 0)
6068
- {
6069
- gl.glNormal3f(n[count3], n[count3 + 1], n[count3 + 2]);
6070
- } else
6071
- {
6072
- gl.glNormal3f(0, 0, 1);
6073
- }
6074
- if (c != null)
6075
- {
6076
- gl.glColor4f(c[count3/3], c[count3/3 /* + 1*/], c[count3/3 /* + 2*/], 1);
6077
- }
6078
- }
6079
- if (flipV)
6080
- gl.glTexCoord2f(uv[count2], 1-uv[count2 + 1]);
6081
- else
6082
- gl.glTexCoord2f(uv[count2], uv[count2 + 1]);
6083
- //System.out.println("vertex2 = " + v[count3] + ", " + v[count3+1] + ", " + v[count3+2]);
6084
- gl.glVertex3f(v[count3], v[count3 + 1], v[count3 + 2]);
6085
-
6086
- count2 += 2;
6087
- count3 += 3;
6088
- for (int j = 0; j < strips[i] - 2; j++)
6089
- {
6090
- //gl.glTexCoord2d(...);
6091
- if (!selectmode)
6092
- {
6093
- if (n[count3] != 0 || n[count3 + 1] != 0 || n[count3 + 2] != 0)
6094
- {
6095
- gl.glNormal3f(n[count3], n[count3 + 1], n[count3 + 2]);
6096
- } else
6097
- {
6098
- gl.glNormal3f(0, 0, 1);
6099
- }
6100
- if (c != null)
6101
- {
6102
- gl.glColor4f(c[count3/3], c[count3/3 /* + 1*/], c[count3/3 /* + 2*/], 1);
6103
- }
6104
- }
6105
-
6106
- if (flipV)
6107
- gl.glTexCoord2f(uv[count2], 1-uv[count2 + 1]);
6108
- else
6109
- gl.glTexCoord2f(uv[count2], uv[count2 + 1]);
6110
- //System.out.println("coord3 = " + uv[count2] + ", " + uv[count2+1]);
6111
- gl.glVertex3f(v[count3], v[count3 + 1], v[count3 + 2]);
6112
- count2 += 2;
6113
- count3 += 3;
6114
- }
6115
-
6116
- gl.glEnd();
6117
- }
6118
- }
6119
-
6120
- assert count3 == v.length;
6121
- }
6122
- else // !trimmed
6123
- {
6124
- int count = 0;
6125
- for (int i = 0; i < strips.length; i++)
6126
- {
6127
- gl.glBegin(gl.GL_TRIANGLE_STRIP);
6128
-
6129
- Vertex p = bRep.GetVertex(bRep.indices[count++]);
6130
- Vertex q = bRep.GetVertex(bRep.indices[count++]);
6131
-
6132
- drawVertex(gl, p, selectmode);
6133
- drawVertex(gl, q, selectmode);
6134
-
6135
- for (int j = 0; j < strips[i] - 2; j++)
6136
- {
6137
- Vertex r = bRep.GetVertex(bRep.indices[count++]);
6138
-
6139
-// if (j%2 == 0)
6140
-// drawFace(p, q, r, display, null);
6141
-// else
6142
-// drawFace(p, r, q, display, null);
6143
-
6144
-// p = q;
6145
-// q = r;
6146
- drawVertex(gl, r, selectmode);
6147
- }
6148
-
6149
- gl.glEnd();
6150
- }
6151
- }
5977
+
5978
+ display.DrawGeometry(bRep, flipV, selectmode);
61525979 } else // catch (Error e)
61535980 {
61545981 // TRIANGLE ARRAY
61555982 if (IsOpaque()) // Static())
61565983 {
6157
- gl.glBegin(gl.GL_TRIANGLES);
5984
+ display.StartTriangles();
61585985 int facecount = bRep.FaceCount();
61595986 for (int i = 0; i < facecount; i++)
61605987 {
....@@ -6219,7 +6046,7 @@
62196046
62206047 display.DrawFace(this, p, q, r, face);
62216048 }
6222
- gl.glEnd();
6049
+ display.EndTriangles();
62236050 }
62246051 else
62256052 {
....@@ -6248,8 +6075,8 @@
62486075 //System.out.println("SORT");
62496076
62506077 java.util.Arrays.sort(facescompare);
6251
-
6252
- gl.glBegin(gl.GL_TRIANGLES);
6078
+
6079
+ display.StartTriangles();
62536080 for (int i = 0; i < facecount; i++)
62546081 {
62556082 Face face = bRep.GetFace(facescompare[i].index);
....@@ -6263,11 +6090,12 @@
62636090
62646091 display.DrawFace(this, p, q, r, face);
62656092 }
6266
- gl.glEnd();
6093
+ display.EndTriangles();
62676094 }
62686095
62696096 if (false) // live && support != null && support.bRep != null) // debug weights
62706097 {
6098
+ /*
62716099 gl.glDisable(gl.GL_LIGHTING);
62726100 float[] colorV = new float[3];
62736101
....@@ -6346,6 +6174,7 @@
63466174 // gl.glEnd();
63476175 }
63486176 }
6177
+ */
63496178 }
63506179 }
63516180
....@@ -6390,7 +6219,7 @@
63906219 center.add(r);
63916220 center.mul(1.0/3);
63926221
6393
- center.sub(CameraPane.theRenderer.eyeCamera.location);
6222
+ center.sub(Globals.theRenderer.EyeCamera().location);
63946223
63956224 distance = center.dot(center);
63966225 }
....@@ -6404,22 +6233,6 @@
64046233 void Print(Vertex v)
64056234 {
64066235 //System.err.println("(" + v.x + ", " + v.y + ", " + v.z + ")");
6407
- }
6408
-
6409
- void drawVertex(javax.media.opengl.GL gl, Vertex pv, boolean selectmode)
6410
- {
6411
- if (!selectmode)
6412
- {
6413
- gl.glNormal3f((float) pv.norm.x, (float) pv.norm.y, (float) pv.norm.z);
6414
- gl.glColor4f(pv.AO, pv.AO, pv.AO, 1);
6415
-
6416
- if (flipV)
6417
- gl.glTexCoord2f((float) pv.s, 1-(float) pv.t);
6418
- else
6419
- gl.glTexCoord2f((float) pv.s, (float) pv.t);
6420
- }
6421
-
6422
- gl.glVertex3f((float) pv.x, (float) pv.y, (float) pv.z);
64236236 }
64246237
64256238 void drawSelf(ClickInfo info, int level, boolean select)
....@@ -6993,83 +6806,83 @@
69936806 int spotw = spot.x + spot.width;
69946807 int spoth = spot.y + spot.height;
69956808 info.g.fillRect(spot.x, spot.y, spot.width, spot.height);
6996
- if (CameraPane.Xmin > spot.x)
6997
- {
6998
- CameraPane.Xmin = spot.x;
6999
- }
7000
- if (CameraPane.Xmax < spotw)
7001
- {
7002
- CameraPane.Xmax = spotw;
7003
- }
7004
- if (CameraPane.Ymin > spot.y)
7005
- {
7006
- CameraPane.Ymin = spot.y;
7007
- }
7008
- if (CameraPane.Ymax < spoth)
7009
- {
7010
- CameraPane.Ymax = spoth;
7011
- }
6809
+// if (CameraPane.Xmin > spot.x)
6810
+// {
6811
+// CameraPane.Xmin = spot.x;
6812
+// }
6813
+// if (CameraPane.Xmax < spotw)
6814
+// {
6815
+// CameraPane.Xmax = spotw;
6816
+// }
6817
+// if (CameraPane.Ymin > spot.y)
6818
+// {
6819
+// CameraPane.Ymin = spot.y;
6820
+// }
6821
+// if (CameraPane.Ymax < spoth)
6822
+// {
6823
+// CameraPane.Ymax = spoth;
6824
+// }
70126825 spot.translate(32, 32);
70136826 spotw = spot.x + spot.width;
70146827 spoth = spot.y + spot.height;
70156828 info.g.setColor(Color.blue);
70166829 info.g.fillRect(spot.x, spot.y, spot.width, spot.height);
7017
- if (CameraPane.Xmin > spot.x)
7018
- {
7019
- CameraPane.Xmin = spot.x;
7020
- }
7021
- if (CameraPane.Xmax < spotw)
7022
- {
7023
- CameraPane.Xmax = spotw;
7024
- }
7025
- if (CameraPane.Ymin > spot.y)
7026
- {
7027
- CameraPane.Ymin = spot.y;
7028
- }
7029
- if (CameraPane.Ymax < spoth)
7030
- {
7031
- CameraPane.Ymax = spoth;
7032
- }
6830
+// if (CameraPane.Xmin > spot.x)
6831
+// {
6832
+// CameraPane.Xmin = spot.x;
6833
+// }
6834
+// if (CameraPane.Xmax < spotw)
6835
+// {
6836
+// CameraPane.Xmax = spotw;
6837
+// }
6838
+// if (CameraPane.Ymin > spot.y)
6839
+// {
6840
+// CameraPane.Ymin = spot.y;
6841
+// }
6842
+// if (CameraPane.Ymax < spoth)
6843
+// {
6844
+// CameraPane.Ymax = spoth;
6845
+// }
70336846 info.g.drawLine(spotw, spoth, spotw, spoth - 15);
70346847 info.g.drawLine(spotw, spoth, spotw - 15, spoth);
70356848 spot.translate(0, -32);
70366849 info.g.setColor(Color.green);
70376850 info.g.fillRect(spot.x, spot.y, spot.width, spot.height);
7038
- if (CameraPane.Xmin > spot.x)
7039
- {
7040
- CameraPane.Xmin = spot.x;
7041
- }
7042
- if (CameraPane.Xmax < spotw)
7043
- {
7044
- CameraPane.Xmax = spotw;
7045
- }
7046
- if (CameraPane.Ymin > spot.y)
7047
- {
7048
- CameraPane.Ymin = spot.y;
7049
- }
7050
- if (CameraPane.Ymax < spoth)
7051
- {
7052
- CameraPane.Ymax = spoth;
7053
- }
6851
+// if (CameraPane.Xmin > spot.x)
6852
+// {
6853
+// CameraPane.Xmin = spot.x;
6854
+// }
6855
+// if (CameraPane.Xmax < spotw)
6856
+// {
6857
+// CameraPane.Xmax = spotw;
6858
+// }
6859
+// if (CameraPane.Ymin > spot.y)
6860
+// {
6861
+// CameraPane.Ymin = spot.y;
6862
+// }
6863
+// if (CameraPane.Ymax < spoth)
6864
+// {
6865
+// CameraPane.Ymax = spoth;
6866
+// }
70546867 info.g.drawArc(boundary.x, boundary.y,
70556868 boundary.width, boundary.height, 0, 360);
70566869 //info.g.drawArc(spot.x, spotw, spot.width/2, boundary.height/2, 0, 360);
7057
- if (CameraPane.Xmin > boundary.x)
7058
- {
7059
- CameraPane.Xmin = boundary.x;
7060
- }
7061
- if (CameraPane.Xmax < boundary.x + boundary.width)
7062
- {
7063
- CameraPane.Xmax = boundary.x + boundary.width;
7064
- }
7065
- if (CameraPane.Ymin > boundary.y)
7066
- {
7067
- CameraPane.Ymin = boundary.y;
7068
- }
7069
- if (CameraPane.Ymax < boundary.y + boundary.height)
7070
- {
7071
- CameraPane.Ymax = boundary.y + boundary.height;
7072
- }
6870
+// if (CameraPane.Xmin > boundary.x)
6871
+// {
6872
+// CameraPane.Xmin = boundary.x;
6873
+// }
6874
+// if (CameraPane.Xmax < boundary.x + boundary.width)
6875
+// {
6876
+// CameraPane.Xmax = boundary.x + boundary.width;
6877
+// }
6878
+// if (CameraPane.Ymin > boundary.y)
6879
+// {
6880
+// CameraPane.Ymin = boundary.y;
6881
+// }
6882
+// if (CameraPane.Ymax < boundary.y + boundary.height)
6883
+// {
6884
+// CameraPane.Ymax = boundary.y + boundary.height;
6885
+// }
70736886 return;
70746887 }
70756888 }
....@@ -7172,7 +6985,7 @@
71726985
71736986 case hitCenter: // Translate
71746987
7175
- scale *= 0.05f * info.pane.theRenderer.renderCamera.Distance();
6988
+ scale *= 0.05f * Globals.theRenderer.RenderCamera().Distance();
71766989
71776990 if (modified)
71786991 {
....@@ -7220,10 +7033,10 @@
72207033 }
72217034 LA.xformDir(up, ClickInfo.matbuffer, up);
72227035 // if (!CameraPane.LOCALTRANSFORM)
7223
- LA.xformDir(up, info.pane.theRenderer.renderCamera.toScreen, up);
7036
+ LA.xformDir(up, Globals.theRenderer.RenderCamera().toScreen, up);
72247037 LA.xformDir(info.camera.away, ClickInfo.matbuffer, away);
72257038 // if (!CameraPane.LOCALTRANSFORM)
7226
- LA.xformDir(away, info.pane.theRenderer.renderCamera.toScreen, away);
7039
+ LA.xformDir(away, Globals.theRenderer.RenderCamera().toScreen, away);
72277040 //LA.vecCross(up, cVector.Z, right2);
72287041
72297042 cVector delta = LA.newVector(info.x - startX, startY - info.y, 0);
....@@ -7281,7 +7094,7 @@
72817094 }
72827095 /**/
72837096
7284
- switch (info.pane.renderCamera.viewCode)
7097
+ switch (info.pane.RenderCamera().viewCode)
72857098 {
72867099 case 1: // '\001'
72877100 LA.matZRotate(toParent, angle);
....@@ -7337,7 +7150,7 @@
73377150 }
73387151 /**/
73397152
7340
- switch (info.pane.renderCamera.viewCode)
7153
+ switch (info.pane.RenderCamera().viewCode)
73417154 {
73427155 case 3: // '\001'
73437156 if (modified)
....@@ -7565,6 +7378,7 @@
75657378 objectUI.closeUI();
75667379 if (editWindow != null)
75677380 {
7381
+ editWindow.ctrlPanel.FlushUI();
75687382 editWindow.refreshContents();
75697383 } // ? new
75707384 objectUI = null;