Normand Briere
2019-08-06 4ec7130da08861dc4aff0232dbce38f3471696a4
Object3D.java
....@@ -22,6 +22,7 @@
2222 //static final long serialVersionUID = -607422624994562685L;
2323 static final long serialVersionUID = 5022536242724664900L;
2424
25
+ // Use GetUUID for backward compatibility with null.
2526 private UUID uuid = UUID.randomUUID();
2627
2728 // TEMPORARY for mocap undo. No need to be transient.
....@@ -29,7 +30,10 @@
2930 Object3D saveskeleton;
3031 //
3132
32
- byte[] versions[];
33
+ String skyboxname;
34
+ String skyboxext;
35
+
36
+ Object3D versionlist[];
3337 int versionindex = -1;
3438
3539 ScriptNode scriptnode;
....@@ -219,7 +223,7 @@
219223 // o.bRep.support = null;
220224 // }
221225 o.selection = this.selection;
222
- o.versions = this.versions;
226
+ o.versionlist = this.versionlist;
223227 o.versionindex = this.versionindex;
224228
225229 if (this.support != null)
....@@ -242,6 +246,29 @@
242246 // this.support = null;
243247 // this.fileparent = null;
244248 }
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
+// }
245272
246273 void RestoreBigData(java.util.Hashtable<java.util.UUID, Object3D> hashtable)
247274 {
....@@ -277,7 +304,7 @@
277304
278305 this.selection = o.selection;
279306
280
- this.versions = o.versions;
307
+ this.versionlist = o.versionlist;
281308 this.versionindex = o.versionindex;
282309 // July 2019 if (this.bRep != null)
283310 // this.bRep.support = o.transientrep;
....@@ -1011,6 +1038,9 @@
10111038
10121039 if (material == null || material.multiply)
10131040 return true;
1041
+
1042
+ if (projectedVertices != null && projectedVertices.length > 2 && projectedVertices[2].y >= 10000)
1043
+ return false;
10141044
10151045 // Transparent objects are dynamic because we have to sort the triangles.
10161046 return material.opacity > 0.99;
....@@ -2567,7 +2597,8 @@
25672597 private static final int editSelf = 1;
25682598 private static final int editChild = 2;
25692599
2570
- void drawEditHandles(ClickInfo info, int level)
2600
+ void drawEditHandles(//ClickInfo info,
2601
+ int level)
25712602 {
25722603 if (level == 0)
25732604 {
....@@ -2575,7 +2606,8 @@
25752606 return;
25762607
25772608 Object3D selectee;
2578
- for (java.util.Enumeration e = selection.elements(); e.hasMoreElements(); selectee.drawEditHandles(info, level + 1))
2609
+ for (java.util.Enumeration e = selection.elements(); e.hasMoreElements(); selectee.drawEditHandles(//info,
2610
+ level + 1))
25792611 {
25802612 selectee = (Object3D) e.nextElement();
25812613 }
....@@ -2583,19 +2615,22 @@
25832615 } else
25842616 {
25852617 //super.
2586
- drawEditHandles0(info, level + 1);
2618
+ drawEditHandles0(//info,
2619
+ level + 1);
25872620 }
25882621 }
25892622
2590
- boolean doEditClick(ClickInfo info, int level)
2623
+ boolean doEditClick(//ClickInfo info,
2624
+ int level)
25912625 {
25922626 doSomething = 0;
25932627 if (level == 0)
25942628 {
2595
- return doParentClick(info);
2629
+ return doParentClick(); //info);
25962630 }
25972631 if (//super.
2598
- doEditClick0(info, level))
2632
+ doEditClick0(//info,
2633
+ level))
25992634 {
26002635 doSomething = 1;
26012636 return true;
....@@ -2605,7 +2640,7 @@
26052640 }
26062641 }
26072642
2608
- boolean doParentClick(ClickInfo info)
2643
+ boolean doParentClick() //ClickInfo info)
26092644 {
26102645 if (selection == null)
26112646 {
....@@ -2618,7 +2653,8 @@
26182653 for (java.util.Enumeration e = selection.elements(); e.hasMoreElements();)
26192654 {
26202655 Object3D selectee = (Object3D) e.nextElement();
2621
- if (selectee.doEditClick(info, 1))
2656
+ if (selectee.doEditClick(//info,
2657
+ 1))
26222658 {
26232659 childToDrag = selectee;
26242660 doSomething = 2;
....@@ -2630,13 +2666,15 @@
26302666 return retval;
26312667 }
26322668
2633
- void doEditDrag(ClickInfo info, boolean opposite)
2669
+ void doEditDrag(//ClickInfo clickInfo,
2670
+ boolean opposite)
26342671 {
26352672 switch (doSomething)
26362673 {
26372674 case 1: // '\001'
26382675 //super.
2639
- doEditDrag0(info, opposite);
2676
+ doEditDrag0(//clickInfo,
2677
+ opposite);
26402678 break;
26412679
26422680 case 2: // '\002'
....@@ -2649,11 +2687,13 @@
26492687 {
26502688 //sel.hitSomething = childToDrag.hitSomething;
26512689 //childToDrag.doEditDrag(info);
2652
- sel.doEditDrag(info, opposite);
2690
+ sel.doEditDrag(//clickInfo,
2691
+ opposite);
26532692 } else
26542693 {
26552694 //super.
2656
- doEditDrag0(info, opposite);
2695
+ doEditDrag0(//clickInfo,
2696
+ opposite);
26572697 }
26582698 }
26592699 break;
....@@ -2671,6 +2711,9 @@
26712711 {
26722712 deselectAll();
26732713 }
2714
+
2715
+ new Exception().printStackTrace();
2716
+
26742717 ClickInfo newInfo = new ClickInfo();
26752718 newInfo.flags = info.flags;
26762719 newInfo.bounds = info.bounds;
....@@ -5775,6 +5818,38 @@
57755818 }
57765819 }
57775820
5821
+ void EmbedTextures(boolean embed)
5822
+ {
5823
+ if (blockloop)
5824
+ return;
5825
+
5826
+ //if (GetTextures() != null)
5827
+ if (embed)
5828
+ CameraPane.EmbedTextures(GetTextures());
5829
+ else
5830
+ {
5831
+ GetTextures().pigmentdata = null;
5832
+ GetTextures().bumpdata = null;
5833
+ GetTextures().pw = 0;
5834
+ GetTextures().ph = 0;
5835
+ GetTextures().bw = 0;
5836
+ GetTextures().bh = 0;
5837
+ }
5838
+
5839
+ int nb = Size();
5840
+ for (int i = 0; i < nb; i++)
5841
+ {
5842
+ Object3D child = (Object3D) get(i);
5843
+
5844
+ if (child == null)
5845
+ continue;
5846
+
5847
+ blockloop = true;
5848
+ child.EmbedTextures(embed);
5849
+ blockloop = false;
5850
+ }
5851
+ }
5852
+
57785853 void draw(iCameraPane display, Object3D /*Composite*/ root, boolean selected, boolean blocked)
57795854 {
57805855 Draw(display, root, selected, blocked);
....@@ -5861,8 +5936,10 @@
58615936 if (support != null)
58625937 support = support;
58635938
5864
- //boolean usecalllists = IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null || !link2master); // !(this instanceof cSpring) && !(this instanceof BezierPatch);
5865
- 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.
58665943
58675944 if (!usecalllists && bRep != null && bRep.displaylist > 0)
58685945 {
....@@ -5872,8 +5949,9 @@
58725949 // usecalllists &= !(parent instanceof RandomNode);
58735950 // usecalllists = false;
58745951
5875
- if (GetBRep() != null)
5876
- usecalllists = usecalllists;
5952
+ if (display.DrawMode() == display.SHADOW)
5953
+ //GetBRep() != null)
5954
+ usecalllists = !!usecalllists;
58775955 //System.out.println("draw " + this);
58785956 //new Exception().printStackTrace();
58795957
....@@ -5895,7 +5973,7 @@
58955973 if (!(this instanceof Composite))
58965974 touched = false;
58975975 //if (displaylist == -1 && usecalllists)
5898
- if ((bRep != null && bRep.displaylist <= 0) && usecalllists) // june 2013
5976
+ if (bRep.displaylist <= 0 && usecalllists) // && display.DrawMode() == display.DEFAULT) // june 2013
58995977 {
59005978 bRep.displaylist = display.GenList();
59015979 assert(bRep.displaylist != 0);
....@@ -5906,7 +5984,7 @@
59065984
59075985 //System.out.println("\tnew list " + list);
59085986 //gl.glDrawBuffer(gl.GL_NONE);
5909
- if (usecalllists)
5987
+ if (usecalllists && bRep.displaylist > 0)
59105988 {
59115989 // System.err.println("new list " + bRep.displaylist + " for " + this);
59125990 display.NewList(bRep.displaylist);
....@@ -5915,7 +5993,7 @@
59155993 CallList(display, root, selected, blocked);
59165994
59175995 // compiled = true;
5918
- if (usecalllists)
5996
+ if (usecalllists && bRep.displaylist > 0)
59195997 {
59205998 // System.err.println("end list " + bRep.displaylist + " for " + this);
59215999 display.EndList();
....@@ -7266,20 +7344,23 @@
72667344 }
72677345 }
72687346
7269
- protected void calcHotSpot(cVector in, ClickInfo info, Point outPt, Rectangle outRec)
7347
+ static ClickInfo clickInfo = new ClickInfo();
7348
+
7349
+ protected void calcHotSpot(cVector in, //ClickInfo clickInfo,
7350
+ Point outPt, Rectangle outRec)
72707351 {
7271
- int hc = info.bounds.x + info.bounds.width / 2;
7272
- int vc = info.bounds.y + info.bounds.height / 2;
7273
- double[][] toscreen = info.toScreen;
7352
+ int hc = clickInfo.bounds.x + clickInfo.bounds.width / 2;
7353
+ int vc = clickInfo.bounds.y + clickInfo.bounds.height / 2;
7354
+ double[][] toscreen = clickInfo.toScreen;
72747355 if (toscreen == null)
72757356 {
7276
- toscreen = new Camera(info.camera.viewCode).toScreen;
7357
+ toscreen = new Camera(clickInfo.camera.viewCode).toScreen;
72777358 }
72787359 cVector vec = in;
72797360 LA.xformPos(in, toscreen, in);
72807361 //System.out.println("Distance = " + info.camera.Distance());
7281
- vec.x *= 100 * info.camera.SCALE / info.camera.Distance();
7282
- vec.y *= 100 * info.camera.SCALE / info.camera.Distance();
7362
+ vec.x *= 100 * clickInfo.camera.SCALE / clickInfo.camera.Distance();
7363
+ vec.y *= 100 * clickInfo.camera.SCALE / clickInfo.camera.Distance();
72837364 outPt.x = hc + (int) vec.x;
72847365 outPt.y = vc - (int) vec.y;
72857366 outRec.x = outPt.x - 3;
....@@ -7287,15 +7368,18 @@
72877368 outRec.width = outRec.height = 6;
72887369 }
72897370
7290
- protected Rectangle calcHotSpot(cVector in, ClickInfo info)
7371
+ protected Rectangle calcHotSpot(cVector in//, ClickInfo clickInfo
7372
+ )
72917373 {
72927374 Point pt = new Point(0, 0);
72937375 Rectangle rec = new Rectangle();
7294
- calcHotSpot(in, info, pt, rec);
7376
+ calcHotSpot(in, //clickInfo,
7377
+ pt, rec);
72957378 return rec;
72967379 }
72977380
7298
- void drawEditHandles0(ClickInfo info, int level)
7381
+ void drawEditHandles0(//ClickInfo clickInfo,
7382
+ int level)
72997383 {
73007384 if (level == 0)
73017385 {
....@@ -7304,16 +7388,19 @@
73047388 {
73057389 cVector origin = new cVector();
73067390 //LA.xformPos(origin, toParent, origin);
7307
- Rectangle spot = calcHotSpot(origin, info);
7391
+ if (this.clickInfo == null)
7392
+ this.clickInfo = new ClickInfo();
7393
+
7394
+ Rectangle spot = calcHotSpot(origin); //, clickInfo);
73087395 Rectangle boundary = new Rectangle();
73097396 boundary.x = spot.x - 30;
73107397 boundary.y = spot.y - 30;
73117398 boundary.width = spot.width + 60;
73127399 boundary.height = spot.height + 60;
7313
- info.g.setColor(Color.red);
7400
+ clickInfo.g.setColor(Color.red);
73147401 int spotw = spot.x + spot.width;
73157402 int spoth = spot.y + spot.height;
7316
- info.g.fillRect(spot.x, spot.y, spot.width, spot.height);
7403
+ clickInfo.g.fillRect(spot.x, spot.y, spot.width, spot.height);
73177404 // if (CameraPane.Xmin > spot.x)
73187405 // {
73197406 // CameraPane.Xmin = spot.x;
....@@ -7333,8 +7420,8 @@
73337420 spot.translate(32, 32);
73347421 spotw = spot.x + spot.width;
73357422 spoth = spot.y + spot.height;
7336
- info.g.setColor(Color.cyan);
7337
- info.g.fillRect(spot.x, spot.y, spot.width, spot.height);
7423
+ clickInfo.g.setColor(Color.cyan);
7424
+ clickInfo.g.fillRect(spot.x, spot.y, spot.width, spot.height);
73387425 // if (CameraPane.Xmin > spot.x)
73397426 // {
73407427 // CameraPane.Xmin = spot.x;
....@@ -7354,9 +7441,9 @@
73547441 // bonhommes info.g.drawLine(spotw, spoth, spotw, spoth - boundary.height/2); // 15
73557442 //info.g.drawLine(spotw, spoth, spotw - boundary.width/2, spoth); // 15
73567443 spot.translate(0, -32);
7357
- info.g.setColor(Color.yellow);
7358
- info.g.fillRect(spot.x, spot.y, spot.width, spot.height);
7359
- info.g.setColor(Color.green);
7444
+ clickInfo.g.setColor(Color.yellow);
7445
+ clickInfo.g.fillRect(spot.x, spot.y, spot.width, spot.height);
7446
+ clickInfo.g.setColor(Color.green);
73607447 // if (CameraPane.Xmin > spot.x)
73617448 // {
73627449 // CameraPane.Xmin = spot.x;
....@@ -7373,8 +7460,8 @@
73737460 // {
73747461 // CameraPane.Ymax = spoth;
73757462 // }
7376
- info.g.drawArc(boundary.x + info.DX, boundary.y + info.DY,
7377
- (int)(boundary.width * info.W), (int)(boundary.height * info.W), 0, 360);
7463
+ clickInfo.g.drawArc(boundary.x + clickInfo.DX, boundary.y + clickInfo.DY,
7464
+ (int)(boundary.width * clickInfo.W), (int)(boundary.height * clickInfo.W), 0, 360);
73787465 //info.g.drawArc(spot.x, spotw, spot.width/2, boundary.height/2, 0, 360);
73797466 // if (CameraPane.Xmin > boundary.x)
73807467 // {
....@@ -7396,7 +7483,8 @@
73967483 }
73977484 }
73987485
7399
- boolean doEditClick0(ClickInfo info, int level)
7486
+ boolean doEditClick0(//ClickInfo clickInfo,
7487
+ int level)
74007488 {
74017489 if (level == 0)
74027490 {
....@@ -7405,8 +7493,8 @@
74057493
74067494 boolean retval = false;
74077495
7408
- startX = info.x;
7409
- startY = info.y;
7496
+ startX = clickInfo.x;
7497
+ startY = clickInfo.y;
74107498
74117499 hitSomething = -1;
74127500 cVector origin = new cVector();
....@@ -7416,22 +7504,51 @@
74167504 {
74177505 centerPt = new Point(0, 0);
74187506 }
7419
- calcHotSpot(origin, info, centerPt, spot);
7420
- if (spot.contains(info.x, info.y))
7507
+ calcHotSpot(origin, //info,
7508
+ centerPt, spot);
7509
+ if (spot.contains(clickInfo.x, clickInfo.y))
74217510 {
74227511 hitSomething = hitCenter;
74237512 retval = true;
74247513 }
74257514 spot.translate(32, 0);
7426
- if (spot.contains(info.x, info.y))
7515
+ if (spot.contains(clickInfo.x, clickInfo.y))
74277516 {
74287517 hitSomething = hitRotate;
74297518 retval = true;
74307519 }
74317520 spot.translate(0, 32);
7432
- if (spot.contains(info.x, info.y))
7521
+ if (spot.contains(clickInfo.x, clickInfo.y))
74337522 {
74347523 hitSomething = hitScale;
7524
+
7525
+ double scale = 0.005f * clickInfo.camera.Distance();
7526
+ double hScale = (double) (clickInfo.x - centerPt.x) / 32;
7527
+ double sign = 1;
7528
+ if (hScale < 0)
7529
+ {
7530
+ sign = -1;
7531
+ }
7532
+ hScale = sign*Math.pow(sign*hScale, scale * 50);
7533
+ if (hScale < 0.01)
7534
+ {
7535
+ //hScale = 0.01;
7536
+ }
7537
+
7538
+ double vScale = (double) (clickInfo.y - centerPt.y) / 32;
7539
+ sign = 1;
7540
+ if (vScale < 0)
7541
+ {
7542
+ sign = -1;
7543
+ }
7544
+ vScale = sign*Math.pow(sign*vScale, scale * 50);
7545
+ if (vScale < 0.01)
7546
+ {
7547
+ //vScale = 0.01;
7548
+ }
7549
+
7550
+ clickInfo.scale = Math.sqrt(hScale*hScale + vScale*vScale);
7551
+
74357552 retval = true;
74367553 }
74377554
....@@ -7441,7 +7558,7 @@
74417558 }
74427559
74437560 //System.out.println("info.modifiers = " + info.modifiers);
7444
- modified = (info.modifiers & CameraPane.SHIFT) != 0; // Was META
7561
+ modified = (clickInfo.modifiers & CameraPane.SHIFT) != 0; // Was META
74457562 //System.out.println("modified = " + modified);
74467563 //new Exception().printStackTrace();
74477564 //viewCode = info.pane.renderCamera.viewCode;
....@@ -7469,7 +7586,8 @@
74697586 return true;
74707587 }
74717588
7472
- void doEditDrag0(ClickInfo info, boolean opposite)
7589
+ void doEditDrag0(//ClickInfo info,
7590
+ boolean opposite)
74737591 {
74747592 if (hitSomething == 0)
74757593 {
....@@ -7483,7 +7601,7 @@
74837601
74847602 //System.out.println("hitSomething = " + hitSomething);
74857603
7486
- double scale = 0.005f * info.camera.Distance();
7604
+ double scale = 0.005f * clickInfo.camera.Distance();
74877605
74887606 cVector xlate = new cVector();
74897607 //cVector xlate2 = new cVector();
....@@ -7517,8 +7635,8 @@
75177635 toParent[3][i] = xlate.get(i);
75187636 LA.matInvert(toParent, fromParent);
75197637 */
7520
- cVector delta = LA.newVector(0, 0, startY - info.y);
7521
- LA.xformDir(delta, new Camera(info.camera.viewCode).fromScreen, delta);
7638
+ cVector delta = LA.newVector(0, 0, startY - clickInfo.y);
7639
+ LA.xformDir(delta, new Camera(clickInfo.camera.viewCode).fromScreen, delta);
75227640
75237641 LA.matCopy(startMat, toParent);
75247642 LA.matTranslate(toParent, delta.x * scale, delta.y * scale, delta.z * scale);
....@@ -7527,7 +7645,7 @@
75277645 } else
75287646 {
75297647 //LA.xformDir(delta, info.camera.fromScreen, delta);
7530
- cVector up = new cVector(info.camera.up);
7648
+ cVector up = new cVector(clickInfo.camera.up);
75317649 cVector away = new cVector();
75327650 //cVector right2 = new cVector();
75337651 //LA.vecCross(up, cVector.Z, right);
....@@ -7544,19 +7662,19 @@
75447662 LA.xformDir(up, ClickInfo.matbuffer, up);
75457663 // if (!CameraPane.LOCALTRANSFORM)
75467664 LA.xformDir(up, Globals.theRenderer.RenderCamera().toScreen, up);
7547
- LA.xformDir(info.camera.away, ClickInfo.matbuffer, away);
7665
+ LA.xformDir(clickInfo.camera.away, ClickInfo.matbuffer, away);
75487666 // if (!CameraPane.LOCALTRANSFORM)
75497667 LA.xformDir(away, Globals.theRenderer.RenderCamera().toScreen, away);
75507668 //LA.vecCross(up, cVector.Z, right2);
75517669
7552
- cVector delta = LA.newVector(info.x - startX, startY - info.y, 0);
7670
+ cVector delta = LA.newVector(clickInfo.x - startX, startY - clickInfo.y, 0);
75537671
75547672 //System.out.println("DELTA0 = " + delta);
75557673 //System.out.println("AWAY = " + info.camera.away);
75567674 //System.out.println("UP = " + info.camera.up);
75577675 if (away.z > 0)
75587676 {
7559
- if (info.camera.up.x == 0) // LA.vecDot(right, right2)<0)
7677
+ if (clickInfo.camera.up.x == 0) // LA.vecDot(right, right2)<0)
75607678 {
75617679 delta.x = -delta.x;
75627680 } else
....@@ -7571,7 +7689,7 @@
75717689 //System.out.println("DELTA1 = " + delta);
75727690 LA.xformDir(delta, ClickInfo.matbuffer, delta);
75737691 //System.out.println("DELTA2 = " + delta);
7574
- LA.xformDir(delta, new Camera(info.camera.viewCode).fromScreen, delta);
7692
+ LA.xformDir(delta, new Camera(clickInfo.camera.viewCode).fromScreen, delta);
75757693 LA.matCopy(startMat, toParent);
75767694 //System.out.println("DELTA3 = " + delta);
75777695 LA.matTranslate(toParent, delta.x * scale, delta.y * scale, delta.z * scale);
....@@ -7581,8 +7699,8 @@
75817699 break;
75827700
75837701 case hitRotate: // rotate
7584
- int dx = info.x - centerPt.x;
7585
- int dy = -(info.y - centerPt.y);
7702
+ int dx = clickInfo.x - centerPt.x;
7703
+ int dy = -(clickInfo.y - centerPt.y);
75867704 double angle = (double) Math.atan2(dx, dy);
75877705 angle = -(1.570796 - angle);
75887706
....@@ -7605,7 +7723,7 @@
76057723 }
76067724 /**/
76077725
7608
- switch (info.pane.RenderCamera().viewCode)
7726
+ switch (clickInfo.pane.RenderCamera().viewCode)
76097727 {
76107728 case 1: // '\001'
76117729 LA.matZRotate(toParent, angle);
....@@ -7632,7 +7750,7 @@
76327750 break;
76337751
76347752 case hitScale: // scale
7635
- double hScale = (double) (info.x - centerPt.x) / 32;
7753
+ double hScale = (double) (clickInfo.x - centerPt.x) / 32;
76367754 double sign = 1;
76377755 if (hScale < 0)
76387756 {
....@@ -7644,7 +7762,7 @@
76447762 //hScale = 0.01;
76457763 }
76467764
7647
- double vScale = (double) (info.y - centerPt.y) / 32;
7765
+ double vScale = (double) (clickInfo.y - centerPt.y) / 32;
76487766 sign = 1;
76497767 if (vScale < 0)
76507768 {
....@@ -7655,6 +7773,7 @@
76557773 {
76567774 //vScale = 0.01;
76577775 }
7776
+
76587777 LA.matCopy(startMat, toParent);
76597778 /**/
76607779 for (int i = 0; i < 3; i++)
....@@ -7664,14 +7783,14 @@
76647783 }
76657784 /**/
76667785
7667
- double totalScale = Math.sqrt(hScale*hScale + vScale*vScale) / Math.sqrt(2);
7786
+ double totalScale = Math.sqrt(hScale*hScale + vScale*vScale) / clickInfo.scale;
76687787
76697788 if (totalScale < 0.01)
76707789 {
76717790 totalScale = 0.01;
76727791 }
76737792
7674
- switch (info.pane.RenderCamera().viewCode)
7793
+ switch (clickInfo.pane.RenderCamera().viewCode)
76757794 {
76767795 case 3: // '\001'
76777796 if (modified || opposite)
....@@ -7738,7 +7857,7 @@
77387857 } // NEW ...
77397858
77407859
7741
- info.pane.repaint();
7860
+ clickInfo.pane.repaint();
77427861 }
77437862
77447863 boolean overflow = false;