Normand Briere
2019-08-08 8294241adc5fe698b70e13ebd6780af46ab83f7e
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;
....@@ -2438,6 +2468,7 @@
24382468 else
24392469 {
24402470 //((ObjEditor)editWindow).SetupUI2(null);
2471
+ ((ObjEditor)objectUI).pinButton.setSelected(pinned);
24412472 }
24422473 }
24432474
....@@ -2567,7 +2598,8 @@
25672598 private static final int editSelf = 1;
25682599 private static final int editChild = 2;
25692600
2570
- void drawEditHandles(ClickInfo info, int level)
2601
+ void drawEditHandles(//ClickInfo info,
2602
+ int level)
25712603 {
25722604 if (level == 0)
25732605 {
....@@ -2575,7 +2607,8 @@
25752607 return;
25762608
25772609 Object3D selectee;
2578
- for (java.util.Enumeration e = selection.elements(); e.hasMoreElements(); selectee.drawEditHandles(info, level + 1))
2610
+ for (java.util.Enumeration e = selection.elements(); e.hasMoreElements(); selectee.drawEditHandles(//info,
2611
+ level + 1))
25792612 {
25802613 selectee = (Object3D) e.nextElement();
25812614 }
....@@ -2583,19 +2616,22 @@
25832616 } else
25842617 {
25852618 //super.
2586
- drawEditHandles0(info, level + 1);
2619
+ drawEditHandles0(//info,
2620
+ level + 1);
25872621 }
25882622 }
25892623
2590
- boolean doEditClick(ClickInfo info, int level)
2624
+ boolean doEditClick(//ClickInfo info,
2625
+ int level)
25912626 {
25922627 doSomething = 0;
25932628 if (level == 0)
25942629 {
2595
- return doParentClick(info);
2630
+ return doParentClick(); //info);
25962631 }
25972632 if (//super.
2598
- doEditClick0(info, level))
2633
+ doEditClick0(//info,
2634
+ level))
25992635 {
26002636 doSomething = 1;
26012637 return true;
....@@ -2605,7 +2641,7 @@
26052641 }
26062642 }
26072643
2608
- boolean doParentClick(ClickInfo info)
2644
+ boolean doParentClick() //ClickInfo info)
26092645 {
26102646 if (selection == null)
26112647 {
....@@ -2618,7 +2654,8 @@
26182654 for (java.util.Enumeration e = selection.elements(); e.hasMoreElements();)
26192655 {
26202656 Object3D selectee = (Object3D) e.nextElement();
2621
- if (selectee.doEditClick(info, 1))
2657
+ if (selectee.doEditClick(//info,
2658
+ 1))
26222659 {
26232660 childToDrag = selectee;
26242661 doSomething = 2;
....@@ -2630,13 +2667,15 @@
26302667 return retval;
26312668 }
26322669
2633
- void doEditDrag(ClickInfo info, boolean opposite)
2670
+ void doEditDrag(//ClickInfo clickInfo,
2671
+ boolean opposite)
26342672 {
26352673 switch (doSomething)
26362674 {
26372675 case 1: // '\001'
26382676 //super.
2639
- doEditDrag0(info, opposite);
2677
+ doEditDrag0(//clickInfo,
2678
+ opposite);
26402679 break;
26412680
26422681 case 2: // '\002'
....@@ -2649,11 +2688,13 @@
26492688 {
26502689 //sel.hitSomething = childToDrag.hitSomething;
26512690 //childToDrag.doEditDrag(info);
2652
- sel.doEditDrag(info, opposite);
2691
+ sel.doEditDrag(//clickInfo,
2692
+ opposite);
26532693 } else
26542694 {
26552695 //super.
2656
- doEditDrag0(info, opposite);
2696
+ doEditDrag0(//clickInfo,
2697
+ opposite);
26572698 }
26582699 }
26592700 break;
....@@ -2671,6 +2712,9 @@
26712712 {
26722713 deselectAll();
26732714 }
2715
+
2716
+ new Exception().printStackTrace();
2717
+
26742718 ClickInfo newInfo = new ClickInfo();
26752719 newInfo.flags = info.flags;
26762720 newInfo.bounds = info.bounds;
....@@ -5775,12 +5819,23 @@
57755819 }
57765820 }
57775821
5778
- void EmbedTextures()
5822
+ void EmbedTextures(boolean embed)
57795823 {
57805824 if (blockloop)
57815825 return;
57825826
5783
- CameraPane.EmbedTextures(texture);
5827
+ //if (GetTextures() != null)
5828
+ if (embed)
5829
+ CameraPane.EmbedTextures(GetTextures());
5830
+ else
5831
+ {
5832
+ GetTextures().pigmentdata = null;
5833
+ GetTextures().bumpdata = null;
5834
+ GetTextures().pw = 0;
5835
+ GetTextures().ph = 0;
5836
+ GetTextures().bw = 0;
5837
+ GetTextures().bh = 0;
5838
+ }
57845839
57855840 int nb = Size();
57865841 for (int i = 0; i < nb; i++)
....@@ -5791,7 +5846,7 @@
57915846 continue;
57925847
57935848 blockloop = true;
5794
- child.EmbedTextures();
5849
+ child.EmbedTextures(embed);
57955850 blockloop = false;
57965851 }
57975852 }
....@@ -5882,8 +5937,10 @@
58825937 if (support != null)
58835938 support = support;
58845939
5885
- //boolean usecalllists = IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null || !link2master); // !(this instanceof cSpring) && !(this instanceof BezierPatch);
5886
- boolean usecalllists = !IsLive(); // IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null) && !link2master; // !(this instanceof cSpring) && !(this instanceof BezierPatch);
5940
+ boolean usecalllists = !IsLive() && IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null || !link2master); // !(this instanceof cSpring) && !(this instanceof BezierPatch);
5941
+ //boolean usecalllists = false; //!IsLive(); // IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null) && !link2master; // !(this instanceof cSpring) && !(this instanceof BezierPatch);
5942
+
5943
+ //usecalllists &= display.DrawMode() == display.DEFAULT; // Don't compute list in shadow pass.
58875944
58885945 if (!usecalllists && bRep != null && bRep.displaylist > 0)
58895946 {
....@@ -5893,8 +5950,9 @@
58935950 // usecalllists &= !(parent instanceof RandomNode);
58945951 // usecalllists = false;
58955952
5896
- if (GetBRep() != null)
5897
- usecalllists = usecalllists;
5953
+ if (display.DrawMode() == display.SHADOW)
5954
+ //GetBRep() != null)
5955
+ usecalllists = !!usecalllists;
58985956 //System.out.println("draw " + this);
58995957 //new Exception().printStackTrace();
59005958
....@@ -5916,7 +5974,7 @@
59165974 if (!(this instanceof Composite))
59175975 touched = false;
59185976 //if (displaylist == -1 && usecalllists)
5919
- if ((bRep != null && bRep.displaylist <= 0) && usecalllists) // june 2013
5977
+ if (bRep.displaylist <= 0 && usecalllists) // && display.DrawMode() == display.DEFAULT) // june 2013
59205978 {
59215979 bRep.displaylist = display.GenList();
59225980 assert(bRep.displaylist != 0);
....@@ -5927,7 +5985,7 @@
59275985
59285986 //System.out.println("\tnew list " + list);
59295987 //gl.glDrawBuffer(gl.GL_NONE);
5930
- if (usecalllists)
5988
+ if (usecalllists && bRep.displaylist > 0)
59315989 {
59325990 // System.err.println("new list " + bRep.displaylist + " for " + this);
59335991 display.NewList(bRep.displaylist);
....@@ -5936,7 +5994,7 @@
59365994 CallList(display, root, selected, blocked);
59375995
59385996 // compiled = true;
5939
- if (usecalllists)
5997
+ if (usecalllists && bRep.displaylist > 0)
59405998 {
59415999 // System.err.println("end list " + bRep.displaylist + " for " + this);
59426000 display.EndList();
....@@ -7287,20 +7345,23 @@
72877345 }
72887346 }
72897347
7290
- protected void calcHotSpot(cVector in, ClickInfo info, Point outPt, Rectangle outRec)
7348
+ static ClickInfo clickInfo = new ClickInfo();
7349
+
7350
+ protected void calcHotSpot(cVector in, //ClickInfo clickInfo,
7351
+ Point outPt, Rectangle outRec)
72917352 {
7292
- int hc = info.bounds.x + info.bounds.width / 2;
7293
- int vc = info.bounds.y + info.bounds.height / 2;
7294
- double[][] toscreen = info.toScreen;
7353
+ int hc = clickInfo.bounds.x + clickInfo.bounds.width / 2;
7354
+ int vc = clickInfo.bounds.y + clickInfo.bounds.height / 2;
7355
+ double[][] toscreen = clickInfo.toScreen;
72957356 if (toscreen == null)
72967357 {
7297
- toscreen = new Camera(info.camera.viewCode).toScreen;
7358
+ toscreen = new Camera(clickInfo.camera.viewCode).toScreen;
72987359 }
72997360 cVector vec = in;
73007361 LA.xformPos(in, toscreen, in);
73017362 //System.out.println("Distance = " + info.camera.Distance());
7302
- vec.x *= 100 * info.camera.SCALE / info.camera.Distance();
7303
- vec.y *= 100 * info.camera.SCALE / info.camera.Distance();
7363
+ vec.x *= 100 * clickInfo.camera.SCALE / clickInfo.camera.Distance();
7364
+ vec.y *= 100 * clickInfo.camera.SCALE / clickInfo.camera.Distance();
73047365 outPt.x = hc + (int) vec.x;
73057366 outPt.y = vc - (int) vec.y;
73067367 outRec.x = outPt.x - 3;
....@@ -7308,15 +7369,18 @@
73087369 outRec.width = outRec.height = 6;
73097370 }
73107371
7311
- protected Rectangle calcHotSpot(cVector in, ClickInfo info)
7372
+ protected Rectangle calcHotSpot(cVector in//, ClickInfo clickInfo
7373
+ )
73127374 {
73137375 Point pt = new Point(0, 0);
73147376 Rectangle rec = new Rectangle();
7315
- calcHotSpot(in, info, pt, rec);
7377
+ calcHotSpot(in, //clickInfo,
7378
+ pt, rec);
73167379 return rec;
73177380 }
73187381
7319
- void drawEditHandles0(ClickInfo info, int level)
7382
+ void drawEditHandles0(//ClickInfo clickInfo,
7383
+ int level)
73207384 {
73217385 if (level == 0)
73227386 {
....@@ -7325,16 +7389,19 @@
73257389 {
73267390 cVector origin = new cVector();
73277391 //LA.xformPos(origin, toParent, origin);
7328
- Rectangle spot = calcHotSpot(origin, info);
7392
+ if (this.clickInfo == null)
7393
+ this.clickInfo = new ClickInfo();
7394
+
7395
+ Rectangle spot = calcHotSpot(origin); //, clickInfo);
73297396 Rectangle boundary = new Rectangle();
73307397 boundary.x = spot.x - 30;
73317398 boundary.y = spot.y - 30;
73327399 boundary.width = spot.width + 60;
73337400 boundary.height = spot.height + 60;
7334
- info.g.setColor(Color.red);
7401
+ clickInfo.g.setColor(Color.red);
73357402 int spotw = spot.x + spot.width;
73367403 int spoth = spot.y + spot.height;
7337
- info.g.fillRect(spot.x, spot.y, spot.width, spot.height);
7404
+ clickInfo.g.fillRect(spot.x, spot.y, spot.width, spot.height);
73387405 // if (CameraPane.Xmin > spot.x)
73397406 // {
73407407 // CameraPane.Xmin = spot.x;
....@@ -7354,8 +7421,8 @@
73547421 spot.translate(32, 32);
73557422 spotw = spot.x + spot.width;
73567423 spoth = spot.y + spot.height;
7357
- info.g.setColor(Color.cyan);
7358
- info.g.fillRect(spot.x, spot.y, spot.width, spot.height);
7424
+ clickInfo.g.setColor(Color.cyan);
7425
+ clickInfo.g.fillRect(spot.x, spot.y, spot.width, spot.height);
73597426 // if (CameraPane.Xmin > spot.x)
73607427 // {
73617428 // CameraPane.Xmin = spot.x;
....@@ -7375,9 +7442,9 @@
73757442 // bonhommes info.g.drawLine(spotw, spoth, spotw, spoth - boundary.height/2); // 15
73767443 //info.g.drawLine(spotw, spoth, spotw - boundary.width/2, spoth); // 15
73777444 spot.translate(0, -32);
7378
- info.g.setColor(Color.yellow);
7379
- info.g.fillRect(spot.x, spot.y, spot.width, spot.height);
7380
- info.g.setColor(Color.green);
7445
+ clickInfo.g.setColor(Color.yellow);
7446
+ clickInfo.g.fillRect(spot.x, spot.y, spot.width, spot.height);
7447
+ clickInfo.g.setColor(Color.green);
73817448 // if (CameraPane.Xmin > spot.x)
73827449 // {
73837450 // CameraPane.Xmin = spot.x;
....@@ -7394,8 +7461,8 @@
73947461 // {
73957462 // CameraPane.Ymax = spoth;
73967463 // }
7397
- info.g.drawArc(boundary.x + info.DX, boundary.y + info.DY,
7398
- (int)(boundary.width * info.W), (int)(boundary.height * info.W), 0, 360);
7464
+ clickInfo.g.drawArc(boundary.x + clickInfo.DX, boundary.y + clickInfo.DY,
7465
+ (int)(boundary.width * clickInfo.W), (int)(boundary.height * clickInfo.W), 0, 360);
73997466 //info.g.drawArc(spot.x, spotw, spot.width/2, boundary.height/2, 0, 360);
74007467 // if (CameraPane.Xmin > boundary.x)
74017468 // {
....@@ -7417,7 +7484,8 @@
74177484 }
74187485 }
74197486
7420
- boolean doEditClick0(ClickInfo info, int level)
7487
+ boolean doEditClick0(//ClickInfo clickInfo,
7488
+ int level)
74217489 {
74227490 if (level == 0)
74237491 {
....@@ -7426,8 +7494,8 @@
74267494
74277495 boolean retval = false;
74287496
7429
- startX = info.x;
7430
- startY = info.y;
7497
+ startX = clickInfo.x;
7498
+ startY = clickInfo.y;
74317499
74327500 hitSomething = -1;
74337501 cVector origin = new cVector();
....@@ -7437,22 +7505,51 @@
74377505 {
74387506 centerPt = new Point(0, 0);
74397507 }
7440
- calcHotSpot(origin, info, centerPt, spot);
7441
- if (spot.contains(info.x, info.y))
7508
+ calcHotSpot(origin, //info,
7509
+ centerPt, spot);
7510
+ if (spot.contains(clickInfo.x, clickInfo.y))
74427511 {
74437512 hitSomething = hitCenter;
74447513 retval = true;
74457514 }
74467515 spot.translate(32, 0);
7447
- if (spot.contains(info.x, info.y))
7516
+ if (spot.contains(clickInfo.x, clickInfo.y))
74487517 {
74497518 hitSomething = hitRotate;
74507519 retval = true;
74517520 }
74527521 spot.translate(0, 32);
7453
- if (spot.contains(info.x, info.y))
7522
+ if (spot.contains(clickInfo.x, clickInfo.y))
74547523 {
74557524 hitSomething = hitScale;
7525
+
7526
+ double scale = 0.005f * clickInfo.camera.Distance();
7527
+ double hScale = (double) (clickInfo.x - centerPt.x) / 32;
7528
+ double sign = 1;
7529
+ if (hScale < 0)
7530
+ {
7531
+ sign = -1;
7532
+ }
7533
+ hScale = sign*Math.pow(sign*hScale, scale * 50);
7534
+ if (hScale < 0.01)
7535
+ {
7536
+ //hScale = 0.01;
7537
+ }
7538
+
7539
+ double vScale = (double) (clickInfo.y - centerPt.y) / 32;
7540
+ sign = 1;
7541
+ if (vScale < 0)
7542
+ {
7543
+ sign = -1;
7544
+ }
7545
+ vScale = sign*Math.pow(sign*vScale, scale * 50);
7546
+ if (vScale < 0.01)
7547
+ {
7548
+ //vScale = 0.01;
7549
+ }
7550
+
7551
+ clickInfo.scale = Math.sqrt(hScale*hScale + vScale*vScale);
7552
+
74567553 retval = true;
74577554 }
74587555
....@@ -7462,7 +7559,7 @@
74627559 }
74637560
74647561 //System.out.println("info.modifiers = " + info.modifiers);
7465
- modified = (info.modifiers & CameraPane.SHIFT) != 0; // Was META
7562
+ modified = (clickInfo.modifiers & CameraPane.SHIFT) != 0; // Was META
74667563 //System.out.println("modified = " + modified);
74677564 //new Exception().printStackTrace();
74687565 //viewCode = info.pane.renderCamera.viewCode;
....@@ -7490,7 +7587,8 @@
74907587 return true;
74917588 }
74927589
7493
- void doEditDrag0(ClickInfo info, boolean opposite)
7590
+ void doEditDrag0(//ClickInfo info,
7591
+ boolean opposite)
74947592 {
74957593 if (hitSomething == 0)
74967594 {
....@@ -7504,7 +7602,7 @@
75047602
75057603 //System.out.println("hitSomething = " + hitSomething);
75067604
7507
- double scale = 0.005f * info.camera.Distance();
7605
+ double scale = 0.005f * clickInfo.camera.Distance();
75087606
75097607 cVector xlate = new cVector();
75107608 //cVector xlate2 = new cVector();
....@@ -7538,8 +7636,8 @@
75387636 toParent[3][i] = xlate.get(i);
75397637 LA.matInvert(toParent, fromParent);
75407638 */
7541
- cVector delta = LA.newVector(0, 0, startY - info.y);
7542
- LA.xformDir(delta, new Camera(info.camera.viewCode).fromScreen, delta);
7639
+ cVector delta = LA.newVector(0, 0, startY - clickInfo.y);
7640
+ LA.xformDir(delta, new Camera(clickInfo.camera.viewCode).fromScreen, delta);
75437641
75447642 LA.matCopy(startMat, toParent);
75457643 LA.matTranslate(toParent, delta.x * scale, delta.y * scale, delta.z * scale);
....@@ -7548,7 +7646,7 @@
75487646 } else
75497647 {
75507648 //LA.xformDir(delta, info.camera.fromScreen, delta);
7551
- cVector up = new cVector(info.camera.up);
7649
+ cVector up = new cVector(clickInfo.camera.up);
75527650 cVector away = new cVector();
75537651 //cVector right2 = new cVector();
75547652 //LA.vecCross(up, cVector.Z, right);
....@@ -7565,19 +7663,19 @@
75657663 LA.xformDir(up, ClickInfo.matbuffer, up);
75667664 // if (!CameraPane.LOCALTRANSFORM)
75677665 LA.xformDir(up, Globals.theRenderer.RenderCamera().toScreen, up);
7568
- LA.xformDir(info.camera.away, ClickInfo.matbuffer, away);
7666
+ LA.xformDir(clickInfo.camera.away, ClickInfo.matbuffer, away);
75697667 // if (!CameraPane.LOCALTRANSFORM)
75707668 LA.xformDir(away, Globals.theRenderer.RenderCamera().toScreen, away);
75717669 //LA.vecCross(up, cVector.Z, right2);
75727670
7573
- cVector delta = LA.newVector(info.x - startX, startY - info.y, 0);
7671
+ cVector delta = LA.newVector(clickInfo.x - startX, startY - clickInfo.y, 0);
75747672
75757673 //System.out.println("DELTA0 = " + delta);
75767674 //System.out.println("AWAY = " + info.camera.away);
75777675 //System.out.println("UP = " + info.camera.up);
75787676 if (away.z > 0)
75797677 {
7580
- if (info.camera.up.x == 0) // LA.vecDot(right, right2)<0)
7678
+ if (clickInfo.camera.up.x == 0) // LA.vecDot(right, right2)<0)
75817679 {
75827680 delta.x = -delta.x;
75837681 } else
....@@ -7592,7 +7690,7 @@
75927690 //System.out.println("DELTA1 = " + delta);
75937691 LA.xformDir(delta, ClickInfo.matbuffer, delta);
75947692 //System.out.println("DELTA2 = " + delta);
7595
- LA.xformDir(delta, new Camera(info.camera.viewCode).fromScreen, delta);
7693
+ LA.xformDir(delta, new Camera(clickInfo.camera.viewCode).fromScreen, delta);
75967694 LA.matCopy(startMat, toParent);
75977695 //System.out.println("DELTA3 = " + delta);
75987696 LA.matTranslate(toParent, delta.x * scale, delta.y * scale, delta.z * scale);
....@@ -7602,8 +7700,8 @@
76027700 break;
76037701
76047702 case hitRotate: // rotate
7605
- int dx = info.x - centerPt.x;
7606
- int dy = -(info.y - centerPt.y);
7703
+ int dx = clickInfo.x - centerPt.x;
7704
+ int dy = -(clickInfo.y - centerPt.y);
76077705 double angle = (double) Math.atan2(dx, dy);
76087706 angle = -(1.570796 - angle);
76097707
....@@ -7626,7 +7724,7 @@
76267724 }
76277725 /**/
76287726
7629
- switch (info.pane.RenderCamera().viewCode)
7727
+ switch (clickInfo.pane.RenderCamera().viewCode)
76307728 {
76317729 case 1: // '\001'
76327730 LA.matZRotate(toParent, angle);
....@@ -7653,7 +7751,7 @@
76537751 break;
76547752
76557753 case hitScale: // scale
7656
- double hScale = (double) (info.x - centerPt.x) / 32;
7754
+ double hScale = (double) (clickInfo.x - centerPt.x) / 32;
76577755 double sign = 1;
76587756 if (hScale < 0)
76597757 {
....@@ -7665,7 +7763,7 @@
76657763 //hScale = 0.01;
76667764 }
76677765
7668
- double vScale = (double) (info.y - centerPt.y) / 32;
7766
+ double vScale = (double) (clickInfo.y - centerPt.y) / 32;
76697767 sign = 1;
76707768 if (vScale < 0)
76717769 {
....@@ -7676,6 +7774,7 @@
76767774 {
76777775 //vScale = 0.01;
76787776 }
7777
+
76797778 LA.matCopy(startMat, toParent);
76807779 /**/
76817780 for (int i = 0; i < 3; i++)
....@@ -7685,14 +7784,14 @@
76857784 }
76867785 /**/
76877786
7688
- double totalScale = Math.sqrt(hScale*hScale + vScale*vScale) / Math.sqrt(2);
7787
+ double totalScale = Math.sqrt(hScale*hScale + vScale*vScale) / clickInfo.scale;
76897788
76907789 if (totalScale < 0.01)
76917790 {
76927791 totalScale = 0.01;
76937792 }
76947793
7695
- switch (info.pane.RenderCamera().viewCode)
7794
+ switch (clickInfo.pane.RenderCamera().viewCode)
76967795 {
76977796 case 3: // '\001'
76987797 if (modified || opposite)
....@@ -7759,7 +7858,7 @@
77597858 } // NEW ...
77607859
77617860
7762
- info.pane.repaint();
7861
+ clickInfo.pane.repaint();
77637862 }
77647863
77657864 boolean overflow = false;