Normand Briere
2019-08-12 b1d79b74514041a059b454a9f6fc3970773c0cb8
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,11 @@
24382468 else
24392469 {
24402470 //((ObjEditor)editWindow).SetupUI2(null);
2471
+ if (objectUI != null)
2472
+ ((ObjEditor)objectUI).pinButton.setSelected(pinned);
2473
+ else
2474
+ //new Exception().printStackTrace();
2475
+ System.err.println("objectUI is null");
24412476 }
24422477 }
24432478
....@@ -2567,7 +2602,8 @@
25672602 private static final int editSelf = 1;
25682603 private static final int editChild = 2;
25692604
2570
- void drawEditHandles(ClickInfo info, int level)
2605
+ void drawEditHandles(//ClickInfo info,
2606
+ int level)
25712607 {
25722608 if (level == 0)
25732609 {
....@@ -2575,7 +2611,8 @@
25752611 return;
25762612
25772613 Object3D selectee;
2578
- for (java.util.Enumeration e = selection.elements(); e.hasMoreElements(); selectee.drawEditHandles(info, level + 1))
2614
+ for (java.util.Enumeration e = selection.elements(); e.hasMoreElements(); selectee.drawEditHandles(//info,
2615
+ level + 1))
25792616 {
25802617 selectee = (Object3D) e.nextElement();
25812618 }
....@@ -2583,19 +2620,22 @@
25832620 } else
25842621 {
25852622 //super.
2586
- drawEditHandles0(info, level + 1);
2623
+ drawEditHandles0(//info,
2624
+ level + 1);
25872625 }
25882626 }
25892627
2590
- boolean doEditClick(ClickInfo info, int level)
2628
+ boolean doEditClick(//ClickInfo info,
2629
+ int level)
25912630 {
25922631 doSomething = 0;
25932632 if (level == 0)
25942633 {
2595
- return doParentClick(info);
2634
+ return doParentClick(); //info);
25962635 }
25972636 if (//super.
2598
- doEditClick0(info, level))
2637
+ doEditClick0(//info,
2638
+ level))
25992639 {
26002640 doSomething = 1;
26012641 return true;
....@@ -2605,7 +2645,7 @@
26052645 }
26062646 }
26072647
2608
- boolean doParentClick(ClickInfo info)
2648
+ boolean doParentClick() //ClickInfo info)
26092649 {
26102650 if (selection == null)
26112651 {
....@@ -2618,7 +2658,8 @@
26182658 for (java.util.Enumeration e = selection.elements(); e.hasMoreElements();)
26192659 {
26202660 Object3D selectee = (Object3D) e.nextElement();
2621
- if (selectee.doEditClick(info, 1))
2661
+ if (selectee.doEditClick(//info,
2662
+ 1))
26222663 {
26232664 childToDrag = selectee;
26242665 doSomething = 2;
....@@ -2630,13 +2671,15 @@
26302671 return retval;
26312672 }
26322673
2633
- void doEditDrag(ClickInfo info, boolean opposite)
2674
+ void doEditDrag(//ClickInfo clickInfo,
2675
+ boolean opposite)
26342676 {
26352677 switch (doSomething)
26362678 {
26372679 case 1: // '\001'
26382680 //super.
2639
- doEditDrag0(info, opposite);
2681
+ doEditDrag0(//clickInfo,
2682
+ opposite);
26402683 break;
26412684
26422685 case 2: // '\002'
....@@ -2649,11 +2692,13 @@
26492692 {
26502693 //sel.hitSomething = childToDrag.hitSomething;
26512694 //childToDrag.doEditDrag(info);
2652
- sel.doEditDrag(info, opposite);
2695
+ sel.doEditDrag(//clickInfo,
2696
+ opposite);
26532697 } else
26542698 {
26552699 //super.
2656
- doEditDrag0(info, opposite);
2700
+ doEditDrag0(//clickInfo,
2701
+ opposite);
26572702 }
26582703 }
26592704 break;
....@@ -2671,6 +2716,9 @@
26712716 {
26722717 deselectAll();
26732718 }
2719
+
2720
+ new Exception().printStackTrace();
2721
+
26742722 ClickInfo newInfo = new ClickInfo();
26752723 newInfo.flags = info.flags;
26762724 newInfo.bounds = info.bounds;
....@@ -5775,6 +5823,38 @@
57755823 }
57765824 }
57775825
5826
+ void EmbedTextures(boolean embed)
5827
+ {
5828
+ if (blockloop)
5829
+ return;
5830
+
5831
+ //if (GetTextures() != null)
5832
+ if (embed)
5833
+ CameraPane.EmbedTextures(GetTextures());
5834
+ else
5835
+ {
5836
+ GetTextures().pigmentdata = null;
5837
+ GetTextures().bumpdata = null;
5838
+ GetTextures().pw = 0;
5839
+ GetTextures().ph = 0;
5840
+ GetTextures().bw = 0;
5841
+ GetTextures().bh = 0;
5842
+ }
5843
+
5844
+ int nb = Size();
5845
+ for (int i = 0; i < nb; i++)
5846
+ {
5847
+ Object3D child = (Object3D) get(i);
5848
+
5849
+ if (child == null)
5850
+ continue;
5851
+
5852
+ blockloop = true;
5853
+ child.EmbedTextures(embed);
5854
+ blockloop = false;
5855
+ }
5856
+ }
5857
+
57785858 void draw(iCameraPane display, Object3D /*Composite*/ root, boolean selected, boolean blocked)
57795859 {
57805860 Draw(display, root, selected, blocked);
....@@ -5861,8 +5941,10 @@
58615941 if (support != null)
58625942 support = support;
58635943
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);
5944
+ boolean usecalllists = !IsLive() && IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null || !link2master); // !(this instanceof cSpring) && !(this instanceof BezierPatch);
5945
+ //boolean usecalllists = false; //!IsLive(); // IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null) && !link2master; // !(this instanceof cSpring) && !(this instanceof BezierPatch);
5946
+
5947
+ //usecalllists &= display.DrawMode() == display.DEFAULT; // Don't compute list in shadow pass.
58665948
58675949 if (!usecalllists && bRep != null && bRep.displaylist > 0)
58685950 {
....@@ -5872,8 +5954,9 @@
58725954 // usecalllists &= !(parent instanceof RandomNode);
58735955 // usecalllists = false;
58745956
5875
- if (GetBRep() != null)
5876
- usecalllists = usecalllists;
5957
+ if (display.DrawMode() == display.SHADOW)
5958
+ //GetBRep() != null)
5959
+ usecalllists = !!usecalllists;
58775960 //System.out.println("draw " + this);
58785961 //new Exception().printStackTrace();
58795962
....@@ -5895,7 +5978,7 @@
58955978 if (!(this instanceof Composite))
58965979 touched = false;
58975980 //if (displaylist == -1 && usecalllists)
5898
- if ((bRep != null && bRep.displaylist <= 0) && usecalllists) // june 2013
5981
+ if (bRep.displaylist <= 0 && usecalllists) // && display.DrawMode() == display.DEFAULT) // june 2013
58995982 {
59005983 bRep.displaylist = display.GenList();
59015984 assert(bRep.displaylist != 0);
....@@ -5906,7 +5989,7 @@
59065989
59075990 //System.out.println("\tnew list " + list);
59085991 //gl.glDrawBuffer(gl.GL_NONE);
5909
- if (usecalllists)
5992
+ if (usecalllists && bRep.displaylist > 0)
59105993 {
59115994 // System.err.println("new list " + bRep.displaylist + " for " + this);
59125995 display.NewList(bRep.displaylist);
....@@ -5915,7 +5998,7 @@
59155998 CallList(display, root, selected, blocked);
59165999
59176000 // compiled = true;
5918
- if (usecalllists)
6001
+ if (usecalllists && bRep.displaylist > 0)
59196002 {
59206003 // System.err.println("end list " + bRep.displaylist + " for " + this);
59216004 display.EndList();
....@@ -7266,20 +7349,23 @@
72667349 }
72677350 }
72687351
7269
- protected void calcHotSpot(cVector in, ClickInfo info, Point outPt, Rectangle outRec)
7352
+ static ClickInfo clickInfo = new ClickInfo();
7353
+
7354
+ protected void calcHotSpot(cVector in, //ClickInfo clickInfo,
7355
+ Point outPt, Rectangle outRec)
72707356 {
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;
7357
+ int hc = clickInfo.bounds.x + clickInfo.bounds.width / 2;
7358
+ int vc = clickInfo.bounds.y + clickInfo.bounds.height / 2;
7359
+ double[][] toscreen = clickInfo.toScreen;
72747360 if (toscreen == null)
72757361 {
7276
- toscreen = new Camera(info.camera.viewCode).toScreen;
7362
+ toscreen = new Camera(clickInfo.camera.viewCode).toScreen;
72777363 }
72787364 cVector vec = in;
72797365 LA.xformPos(in, toscreen, in);
72807366 //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();
7367
+ vec.x *= 100 * clickInfo.camera.SCALE / clickInfo.camera.Distance();
7368
+ vec.y *= 100 * clickInfo.camera.SCALE / clickInfo.camera.Distance();
72837369 outPt.x = hc + (int) vec.x;
72847370 outPt.y = vc - (int) vec.y;
72857371 outRec.x = outPt.x - 3;
....@@ -7287,15 +7373,18 @@
72877373 outRec.width = outRec.height = 6;
72887374 }
72897375
7290
- protected Rectangle calcHotSpot(cVector in, ClickInfo info)
7376
+ protected Rectangle calcHotSpot(cVector in//, ClickInfo clickInfo
7377
+ )
72917378 {
72927379 Point pt = new Point(0, 0);
72937380 Rectangle rec = new Rectangle();
7294
- calcHotSpot(in, info, pt, rec);
7381
+ calcHotSpot(in, //clickInfo,
7382
+ pt, rec);
72957383 return rec;
72967384 }
72977385
7298
- void drawEditHandles0(ClickInfo info, int level)
7386
+ void drawEditHandles0(//ClickInfo clickInfo,
7387
+ int level)
72997388 {
73007389 if (level == 0)
73017390 {
....@@ -7304,16 +7393,19 @@
73047393 {
73057394 cVector origin = new cVector();
73067395 //LA.xformPos(origin, toParent, origin);
7307
- Rectangle spot = calcHotSpot(origin, info);
7396
+ if (this.clickInfo == null)
7397
+ this.clickInfo = new ClickInfo();
7398
+
7399
+ Rectangle spot = calcHotSpot(origin); //, clickInfo);
73087400 Rectangle boundary = new Rectangle();
73097401 boundary.x = spot.x - 30;
73107402 boundary.y = spot.y - 30;
73117403 boundary.width = spot.width + 60;
73127404 boundary.height = spot.height + 60;
7313
- info.g.setColor(Color.red);
7405
+ clickInfo.g.setColor(Color.red);
73147406 int spotw = spot.x + spot.width;
73157407 int spoth = spot.y + spot.height;
7316
- info.g.fillRect(spot.x, spot.y, spot.width, spot.height);
7408
+ clickInfo.g.fillRect(spot.x, spot.y, spot.width, spot.height);
73177409 // if (CameraPane.Xmin > spot.x)
73187410 // {
73197411 // CameraPane.Xmin = spot.x;
....@@ -7333,8 +7425,8 @@
73337425 spot.translate(32, 32);
73347426 spotw = spot.x + spot.width;
73357427 spoth = spot.y + spot.height;
7336
- info.g.setColor(Color.cyan);
7337
- info.g.fillRect(spot.x, spot.y, spot.width, spot.height);
7428
+ clickInfo.g.setColor(Color.cyan);
7429
+ clickInfo.g.fillRect(spot.x, spot.y, spot.width, spot.height);
73387430 // if (CameraPane.Xmin > spot.x)
73397431 // {
73407432 // CameraPane.Xmin = spot.x;
....@@ -7354,9 +7446,9 @@
73547446 // bonhommes info.g.drawLine(spotw, spoth, spotw, spoth - boundary.height/2); // 15
73557447 //info.g.drawLine(spotw, spoth, spotw - boundary.width/2, spoth); // 15
73567448 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);
7449
+ clickInfo.g.setColor(Color.yellow);
7450
+ clickInfo.g.fillRect(spot.x, spot.y, spot.width, spot.height);
7451
+ clickInfo.g.setColor(Color.green);
73607452 // if (CameraPane.Xmin > spot.x)
73617453 // {
73627454 // CameraPane.Xmin = spot.x;
....@@ -7373,8 +7465,8 @@
73737465 // {
73747466 // CameraPane.Ymax = spoth;
73757467 // }
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);
7468
+ clickInfo.g.drawArc(boundary.x + clickInfo.DX, boundary.y + clickInfo.DY,
7469
+ (int)(boundary.width * clickInfo.W), (int)(boundary.height * clickInfo.W), 0, 360);
73787470 //info.g.drawArc(spot.x, spotw, spot.width/2, boundary.height/2, 0, 360);
73797471 // if (CameraPane.Xmin > boundary.x)
73807472 // {
....@@ -7396,7 +7488,8 @@
73967488 }
73977489 }
73987490
7399
- boolean doEditClick0(ClickInfo info, int level)
7491
+ boolean doEditClick0(//ClickInfo clickInfo,
7492
+ int level)
74007493 {
74017494 if (level == 0)
74027495 {
....@@ -7405,8 +7498,8 @@
74057498
74067499 boolean retval = false;
74077500
7408
- startX = info.x;
7409
- startY = info.y;
7501
+ startX = clickInfo.x;
7502
+ startY = clickInfo.y;
74107503
74117504 hitSomething = -1;
74127505 cVector origin = new cVector();
....@@ -7416,22 +7509,51 @@
74167509 {
74177510 centerPt = new Point(0, 0);
74187511 }
7419
- calcHotSpot(origin, info, centerPt, spot);
7420
- if (spot.contains(info.x, info.y))
7512
+ calcHotSpot(origin, //info,
7513
+ centerPt, spot);
7514
+ if (spot.contains(clickInfo.x, clickInfo.y))
74217515 {
74227516 hitSomething = hitCenter;
74237517 retval = true;
74247518 }
74257519 spot.translate(32, 0);
7426
- if (spot.contains(info.x, info.y))
7520
+ if (spot.contains(clickInfo.x, clickInfo.y))
74277521 {
74287522 hitSomething = hitRotate;
74297523 retval = true;
74307524 }
74317525 spot.translate(0, 32);
7432
- if (spot.contains(info.x, info.y))
7526
+ if (spot.contains(clickInfo.x, clickInfo.y))
74337527 {
74347528 hitSomething = hitScale;
7529
+
7530
+ double scale = 0.005f * clickInfo.camera.Distance();
7531
+ double hScale = (double) (clickInfo.x - centerPt.x) / 32;
7532
+ double sign = 1;
7533
+ if (hScale < 0)
7534
+ {
7535
+ sign = -1;
7536
+ }
7537
+ hScale = sign*Math.pow(sign*hScale, scale * 50);
7538
+ if (hScale < 0.01)
7539
+ {
7540
+ //hScale = 0.01;
7541
+ }
7542
+
7543
+ double vScale = (double) (clickInfo.y - centerPt.y) / 32;
7544
+ sign = 1;
7545
+ if (vScale < 0)
7546
+ {
7547
+ sign = -1;
7548
+ }
7549
+ vScale = sign*Math.pow(sign*vScale, scale * 50);
7550
+ if (vScale < 0.01)
7551
+ {
7552
+ //vScale = 0.01;
7553
+ }
7554
+
7555
+ clickInfo.scale = Math.sqrt(hScale*hScale + vScale*vScale);
7556
+
74357557 retval = true;
74367558 }
74377559
....@@ -7441,7 +7563,7 @@
74417563 }
74427564
74437565 //System.out.println("info.modifiers = " + info.modifiers);
7444
- modified = (info.modifiers & CameraPane.SHIFT) != 0; // Was META
7566
+ modified = (clickInfo.modifiers & CameraPane.SHIFT) != 0; // Was META
74457567 //System.out.println("modified = " + modified);
74467568 //new Exception().printStackTrace();
74477569 //viewCode = info.pane.renderCamera.viewCode;
....@@ -7469,7 +7591,8 @@
74697591 return true;
74707592 }
74717593
7472
- void doEditDrag0(ClickInfo info, boolean opposite)
7594
+ void doEditDrag0(//ClickInfo info,
7595
+ boolean opposite)
74737596 {
74747597 if (hitSomething == 0)
74757598 {
....@@ -7483,7 +7606,7 @@
74837606
74847607 //System.out.println("hitSomething = " + hitSomething);
74857608
7486
- double scale = 0.005f * info.camera.Distance();
7609
+ double scale = 0.005f * clickInfo.camera.Distance();
74877610
74887611 cVector xlate = new cVector();
74897612 //cVector xlate2 = new cVector();
....@@ -7517,8 +7640,8 @@
75177640 toParent[3][i] = xlate.get(i);
75187641 LA.matInvert(toParent, fromParent);
75197642 */
7520
- cVector delta = LA.newVector(0, 0, startY - info.y);
7521
- LA.xformDir(delta, new Camera(info.camera.viewCode).fromScreen, delta);
7643
+ cVector delta = LA.newVector(0, 0, startY - clickInfo.y);
7644
+ LA.xformDir(delta, new Camera(clickInfo.camera.viewCode).fromScreen, delta);
75227645
75237646 LA.matCopy(startMat, toParent);
75247647 LA.matTranslate(toParent, delta.x * scale, delta.y * scale, delta.z * scale);
....@@ -7527,7 +7650,7 @@
75277650 } else
75287651 {
75297652 //LA.xformDir(delta, info.camera.fromScreen, delta);
7530
- cVector up = new cVector(info.camera.up);
7653
+ cVector up = new cVector(clickInfo.camera.up);
75317654 cVector away = new cVector();
75327655 //cVector right2 = new cVector();
75337656 //LA.vecCross(up, cVector.Z, right);
....@@ -7544,19 +7667,19 @@
75447667 LA.xformDir(up, ClickInfo.matbuffer, up);
75457668 // if (!CameraPane.LOCALTRANSFORM)
75467669 LA.xformDir(up, Globals.theRenderer.RenderCamera().toScreen, up);
7547
- LA.xformDir(info.camera.away, ClickInfo.matbuffer, away);
7670
+ LA.xformDir(clickInfo.camera.away, ClickInfo.matbuffer, away);
75487671 // if (!CameraPane.LOCALTRANSFORM)
75497672 LA.xformDir(away, Globals.theRenderer.RenderCamera().toScreen, away);
75507673 //LA.vecCross(up, cVector.Z, right2);
75517674
7552
- cVector delta = LA.newVector(info.x - startX, startY - info.y, 0);
7675
+ cVector delta = LA.newVector(clickInfo.x - startX, startY - clickInfo.y, 0);
75537676
75547677 //System.out.println("DELTA0 = " + delta);
75557678 //System.out.println("AWAY = " + info.camera.away);
75567679 //System.out.println("UP = " + info.camera.up);
75577680 if (away.z > 0)
75587681 {
7559
- if (info.camera.up.x == 0) // LA.vecDot(right, right2)<0)
7682
+ if (clickInfo.camera.up.x == 0) // LA.vecDot(right, right2)<0)
75607683 {
75617684 delta.x = -delta.x;
75627685 } else
....@@ -7571,7 +7694,7 @@
75717694 //System.out.println("DELTA1 = " + delta);
75727695 LA.xformDir(delta, ClickInfo.matbuffer, delta);
75737696 //System.out.println("DELTA2 = " + delta);
7574
- LA.xformDir(delta, new Camera(info.camera.viewCode).fromScreen, delta);
7697
+ LA.xformDir(delta, new Camera(clickInfo.camera.viewCode).fromScreen, delta);
75757698 LA.matCopy(startMat, toParent);
75767699 //System.out.println("DELTA3 = " + delta);
75777700 LA.matTranslate(toParent, delta.x * scale, delta.y * scale, delta.z * scale);
....@@ -7581,8 +7704,8 @@
75817704 break;
75827705
75837706 case hitRotate: // rotate
7584
- int dx = info.x - centerPt.x;
7585
- int dy = -(info.y - centerPt.y);
7707
+ int dx = clickInfo.x - centerPt.x;
7708
+ int dy = -(clickInfo.y - centerPt.y);
75867709 double angle = (double) Math.atan2(dx, dy);
75877710 angle = -(1.570796 - angle);
75887711
....@@ -7605,7 +7728,7 @@
76057728 }
76067729 /**/
76077730
7608
- switch (info.pane.RenderCamera().viewCode)
7731
+ switch (clickInfo.pane.RenderCamera().viewCode)
76097732 {
76107733 case 1: // '\001'
76117734 LA.matZRotate(toParent, angle);
....@@ -7632,7 +7755,7 @@
76327755 break;
76337756
76347757 case hitScale: // scale
7635
- double hScale = (double) (info.x - centerPt.x) / 32;
7758
+ double hScale = (double) (clickInfo.x - centerPt.x) / 32;
76367759 double sign = 1;
76377760 if (hScale < 0)
76387761 {
....@@ -7644,7 +7767,7 @@
76447767 //hScale = 0.01;
76457768 }
76467769
7647
- double vScale = (double) (info.y - centerPt.y) / 32;
7770
+ double vScale = (double) (clickInfo.y - centerPt.y) / 32;
76487771 sign = 1;
76497772 if (vScale < 0)
76507773 {
....@@ -7655,6 +7778,7 @@
76557778 {
76567779 //vScale = 0.01;
76577780 }
7781
+
76587782 LA.matCopy(startMat, toParent);
76597783 /**/
76607784 for (int i = 0; i < 3; i++)
....@@ -7664,14 +7788,14 @@
76647788 }
76657789 /**/
76667790
7667
- double totalScale = Math.sqrt(hScale*hScale + vScale*vScale) / Math.sqrt(2);
7791
+ double totalScale = Math.sqrt(hScale*hScale + vScale*vScale) / clickInfo.scale;
76687792
76697793 if (totalScale < 0.01)
76707794 {
76717795 totalScale = 0.01;
76727796 }
76737797
7674
- switch (info.pane.RenderCamera().viewCode)
7798
+ switch (clickInfo.pane.RenderCamera().viewCode)
76757799 {
76767800 case 3: // '\001'
76777801 if (modified || opposite)
....@@ -7738,7 +7862,7 @@
77387862 } // NEW ...
77397863
77407864
7741
- info.pane.repaint();
7865
+ clickInfo.pane.repaint();
77427866 }
77437867
77447868 boolean overflow = false;