Normand Briere
2019-08-01 c49ad213b600f844e9070cb09390c3e6d3d13db4
Object3D.java
....@@ -29,7 +29,10 @@
2929 Object3D saveskeleton;
3030 //
3131
32
- byte[] versions[] = new byte[100][];
32
+ String skyboxname;
33
+ String skyboxext;
34
+
35
+ Object3D versions[];
3336 int versionindex = -1;
3437
3538 ScriptNode scriptnode;
....@@ -426,6 +429,7 @@
426429 }
427430
428431 boolean live = false;
432
+ transient boolean keepdontselect;
429433 boolean dontselect = false;
430434 boolean hide = false;
431435 boolean link2master = false; // performs reset support/master at each frame
....@@ -1010,6 +1014,9 @@
10101014
10111015 if (material == null || material.multiply)
10121016 return true;
1017
+
1018
+ if (projectedVertices != null && projectedVertices.length > 2 && projectedVertices[2].y >= 10000)
1019
+ return false;
10131020
10141021 // Transparent objects are dynamic because we have to sort the triangles.
10151022 return material.opacity > 0.99;
....@@ -2566,7 +2573,8 @@
25662573 private static final int editSelf = 1;
25672574 private static final int editChild = 2;
25682575
2569
- void drawEditHandles(ClickInfo info, int level)
2576
+ void drawEditHandles(//ClickInfo info,
2577
+ int level)
25702578 {
25712579 if (level == 0)
25722580 {
....@@ -2574,7 +2582,8 @@
25742582 return;
25752583
25762584 Object3D selectee;
2577
- for (java.util.Enumeration e = selection.elements(); e.hasMoreElements(); selectee.drawEditHandles(info, level + 1))
2585
+ for (java.util.Enumeration e = selection.elements(); e.hasMoreElements(); selectee.drawEditHandles(//info,
2586
+ level + 1))
25782587 {
25792588 selectee = (Object3D) e.nextElement();
25802589 }
....@@ -2582,19 +2591,22 @@
25822591 } else
25832592 {
25842593 //super.
2585
- drawEditHandles0(info, level + 1);
2594
+ drawEditHandles0(//info,
2595
+ level + 1);
25862596 }
25872597 }
25882598
2589
- boolean doEditClick(ClickInfo info, int level)
2599
+ boolean doEditClick(//ClickInfo info,
2600
+ int level)
25902601 {
25912602 doSomething = 0;
25922603 if (level == 0)
25932604 {
2594
- return doParentClick(info);
2605
+ return doParentClick(); //info);
25952606 }
25962607 if (//super.
2597
- doEditClick0(info, level))
2608
+ doEditClick0(//info,
2609
+ level))
25982610 {
25992611 doSomething = 1;
26002612 return true;
....@@ -2604,7 +2616,7 @@
26042616 }
26052617 }
26062618
2607
- boolean doParentClick(ClickInfo info)
2619
+ boolean doParentClick() //ClickInfo info)
26082620 {
26092621 if (selection == null)
26102622 {
....@@ -2617,7 +2629,8 @@
26172629 for (java.util.Enumeration e = selection.elements(); e.hasMoreElements();)
26182630 {
26192631 Object3D selectee = (Object3D) e.nextElement();
2620
- if (selectee.doEditClick(info, 1))
2632
+ if (selectee.doEditClick(//info,
2633
+ 1))
26212634 {
26222635 childToDrag = selectee;
26232636 doSomething = 2;
....@@ -2629,13 +2642,15 @@
26292642 return retval;
26302643 }
26312644
2632
- void doEditDrag(ClickInfo info, boolean opposite)
2645
+ void doEditDrag(//ClickInfo clickInfo,
2646
+ boolean opposite)
26332647 {
26342648 switch (doSomething)
26352649 {
26362650 case 1: // '\001'
26372651 //super.
2638
- doEditDrag0(info, opposite);
2652
+ doEditDrag0(//clickInfo,
2653
+ opposite);
26392654 break;
26402655
26412656 case 2: // '\002'
....@@ -2648,11 +2663,13 @@
26482663 {
26492664 //sel.hitSomething = childToDrag.hitSomething;
26502665 //childToDrag.doEditDrag(info);
2651
- sel.doEditDrag(info, opposite);
2666
+ sel.doEditDrag(//clickInfo,
2667
+ opposite);
26522668 } else
26532669 {
26542670 //super.
2655
- doEditDrag0(info, opposite);
2671
+ doEditDrag0(//clickInfo,
2672
+ opposite);
26562673 }
26572674 }
26582675 break;
....@@ -2670,6 +2687,9 @@
26702687 {
26712688 deselectAll();
26722689 }
2690
+
2691
+ new Exception().printStackTrace();
2692
+
26732693 ClickInfo newInfo = new ClickInfo();
26742694 newInfo.flags = info.flags;
26752695 newInfo.bounds = info.bounds;
....@@ -3117,7 +3137,7 @@
31173137 {
31183138 if (bRep != null)
31193139 {
3120
- bRep.GenerateNormalsMINE();
3140
+ bRep.MergeNormals(); //.GenerateNormalsMINE();
31213141 Touch();
31223142 }
31233143 }
....@@ -5420,6 +5440,51 @@
54205440 blockloop = false;
54215441 }
54225442
5443
+ void ResetSelectable()
5444
+ {
5445
+ if (blockloop)
5446
+ return;
5447
+
5448
+ blockloop = true;
5449
+
5450
+ keepdontselect = dontselect;
5451
+ dontselect = true;
5452
+
5453
+ Object3D child;
5454
+ int nb = Size();
5455
+ for (int i = 0; i < nb; i++)
5456
+ {
5457
+ child = (Object3D) get(i);
5458
+ if (child == null)
5459
+ continue;
5460
+ child.ResetSelectable();
5461
+ }
5462
+
5463
+ blockloop = false;
5464
+ }
5465
+
5466
+ void RestoreSelectable()
5467
+ {
5468
+ if (blockloop)
5469
+ return;
5470
+
5471
+ blockloop = true;
5472
+
5473
+ dontselect = keepdontselect;
5474
+
5475
+ Object3D child;
5476
+ int nb = Size();
5477
+ for (int i = 0; i < nb; i++)
5478
+ {
5479
+ child = (Object3D) get(i);
5480
+ if (child == null)
5481
+ continue;
5482
+ child.RestoreSelectable();
5483
+ }
5484
+
5485
+ blockloop = false;
5486
+ }
5487
+
54235488 boolean IsSelected()
54245489 {
54255490 if (parent == null)
....@@ -5729,6 +5794,38 @@
57295794 }
57305795 }
57315796
5797
+ void EmbedTextures(boolean embed)
5798
+ {
5799
+ if (blockloop)
5800
+ return;
5801
+
5802
+ //if (GetTextures() != null)
5803
+ if (embed)
5804
+ CameraPane.EmbedTextures(GetTextures());
5805
+ else
5806
+ {
5807
+ GetTextures().pigmentdata = null;
5808
+ GetTextures().bumpdata = null;
5809
+ GetTextures().pw = 0;
5810
+ GetTextures().ph = 0;
5811
+ GetTextures().bw = 0;
5812
+ GetTextures().bh = 0;
5813
+ }
5814
+
5815
+ int nb = Size();
5816
+ for (int i = 0; i < nb; i++)
5817
+ {
5818
+ Object3D child = (Object3D) get(i);
5819
+
5820
+ if (child == null)
5821
+ continue;
5822
+
5823
+ blockloop = true;
5824
+ child.EmbedTextures(embed);
5825
+ blockloop = false;
5826
+ }
5827
+ }
5828
+
57325829 void draw(iCameraPane display, Object3D /*Composite*/ root, boolean selected, boolean blocked)
57335830 {
57345831 Draw(display, root, selected, blocked);
....@@ -5815,8 +5912,10 @@
58155912 if (support != null)
58165913 support = support;
58175914
5818
- //boolean usecalllists = IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null || !link2master); // !(this instanceof cSpring) && !(this instanceof BezierPatch);
5819
- boolean usecalllists = !IsLive(); // IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null) && !link2master; // !(this instanceof cSpring) && !(this instanceof BezierPatch);
5915
+ boolean usecalllists = !IsLive() && IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null || !link2master); // !(this instanceof cSpring) && !(this instanceof BezierPatch);
5916
+ //boolean usecalllists = false; //!IsLive(); // IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null) && !link2master; // !(this instanceof cSpring) && !(this instanceof BezierPatch);
5917
+
5918
+ //usecalllists &= display.DrawMode() == display.DEFAULT; // Don't compute list in shadow pass.
58205919
58215920 if (!usecalllists && bRep != null && bRep.displaylist > 0)
58225921 {
....@@ -5826,8 +5925,9 @@
58265925 // usecalllists &= !(parent instanceof RandomNode);
58275926 // usecalllists = false;
58285927
5829
- if (GetBRep() != null)
5830
- usecalllists = usecalllists;
5928
+ if (display.DrawMode() == display.SHADOW)
5929
+ //GetBRep() != null)
5930
+ usecalllists = !!usecalllists;
58315931 //System.out.println("draw " + this);
58325932 //new Exception().printStackTrace();
58335933
....@@ -5849,7 +5949,7 @@
58495949 if (!(this instanceof Composite))
58505950 touched = false;
58515951 //if (displaylist == -1 && usecalllists)
5852
- if ((bRep != null && bRep.displaylist <= 0) && usecalllists) // june 2013
5952
+ if (bRep.displaylist <= 0 && usecalllists) // && display.DrawMode() == display.DEFAULT) // june 2013
58535953 {
58545954 bRep.displaylist = display.GenList();
58555955 assert(bRep.displaylist != 0);
....@@ -5860,7 +5960,7 @@
58605960
58615961 //System.out.println("\tnew list " + list);
58625962 //gl.glDrawBuffer(gl.GL_NONE);
5863
- if (usecalllists)
5963
+ if (usecalllists && bRep.displaylist > 0)
58645964 {
58655965 // System.err.println("new list " + bRep.displaylist + " for " + this);
58665966 display.NewList(bRep.displaylist);
....@@ -5869,7 +5969,7 @@
58695969 CallList(display, root, selected, blocked);
58705970
58715971 // compiled = true;
5872
- if (usecalllists)
5972
+ if (usecalllists && bRep.displaylist > 0)
58735973 {
58745974 // System.err.println("end list " + bRep.displaylist + " for " + this);
58755975 display.EndList();
....@@ -7220,20 +7320,23 @@
72207320 }
72217321 }
72227322
7223
- protected void calcHotSpot(cVector in, ClickInfo info, Point outPt, Rectangle outRec)
7323
+ static ClickInfo clickInfo = new ClickInfo();
7324
+
7325
+ protected void calcHotSpot(cVector in, //ClickInfo clickInfo,
7326
+ Point outPt, Rectangle outRec)
72247327 {
7225
- int hc = info.bounds.x + info.bounds.width / 2;
7226
- int vc = info.bounds.y + info.bounds.height / 2;
7227
- double[][] toscreen = info.toScreen;
7328
+ int hc = clickInfo.bounds.x + clickInfo.bounds.width / 2;
7329
+ int vc = clickInfo.bounds.y + clickInfo.bounds.height / 2;
7330
+ double[][] toscreen = clickInfo.toScreen;
72287331 if (toscreen == null)
72297332 {
7230
- toscreen = new Camera(info.camera.viewCode).toScreen;
7333
+ toscreen = new Camera(clickInfo.camera.viewCode).toScreen;
72317334 }
72327335 cVector vec = in;
72337336 LA.xformPos(in, toscreen, in);
72347337 //System.out.println("Distance = " + info.camera.Distance());
7235
- vec.x *= 100 * info.camera.SCALE / info.camera.Distance();
7236
- vec.y *= 100 * info.camera.SCALE / info.camera.Distance();
7338
+ vec.x *= 100 * clickInfo.camera.SCALE / clickInfo.camera.Distance();
7339
+ vec.y *= 100 * clickInfo.camera.SCALE / clickInfo.camera.Distance();
72377340 outPt.x = hc + (int) vec.x;
72387341 outPt.y = vc - (int) vec.y;
72397342 outRec.x = outPt.x - 3;
....@@ -7241,15 +7344,18 @@
72417344 outRec.width = outRec.height = 6;
72427345 }
72437346
7244
- protected Rectangle calcHotSpot(cVector in, ClickInfo info)
7347
+ protected Rectangle calcHotSpot(cVector in//, ClickInfo clickInfo
7348
+ )
72457349 {
72467350 Point pt = new Point(0, 0);
72477351 Rectangle rec = new Rectangle();
7248
- calcHotSpot(in, info, pt, rec);
7352
+ calcHotSpot(in, //clickInfo,
7353
+ pt, rec);
72497354 return rec;
72507355 }
72517356
7252
- void drawEditHandles0(ClickInfo info, int level)
7357
+ void drawEditHandles0(//ClickInfo clickInfo,
7358
+ int level)
72537359 {
72547360 if (level == 0)
72557361 {
....@@ -7258,16 +7364,19 @@
72587364 {
72597365 cVector origin = new cVector();
72607366 //LA.xformPos(origin, toParent, origin);
7261
- Rectangle spot = calcHotSpot(origin, info);
7367
+ if (this.clickInfo == null)
7368
+ this.clickInfo = new ClickInfo();
7369
+
7370
+ Rectangle spot = calcHotSpot(origin); //, clickInfo);
72627371 Rectangle boundary = new Rectangle();
72637372 boundary.x = spot.x - 30;
72647373 boundary.y = spot.y - 30;
72657374 boundary.width = spot.width + 60;
72667375 boundary.height = spot.height + 60;
7267
- info.g.setColor(Color.red);
7376
+ clickInfo.g.setColor(Color.red);
72687377 int spotw = spot.x + spot.width;
72697378 int spoth = spot.y + spot.height;
7270
- info.g.fillRect(spot.x, spot.y, spot.width, spot.height);
7379
+ clickInfo.g.fillRect(spot.x, spot.y, spot.width, spot.height);
72717380 // if (CameraPane.Xmin > spot.x)
72727381 // {
72737382 // CameraPane.Xmin = spot.x;
....@@ -7287,8 +7396,8 @@
72877396 spot.translate(32, 32);
72887397 spotw = spot.x + spot.width;
72897398 spoth = spot.y + spot.height;
7290
- info.g.setColor(Color.cyan);
7291
- info.g.fillRect(spot.x, spot.y, spot.width, spot.height);
7399
+ clickInfo.g.setColor(Color.cyan);
7400
+ clickInfo.g.fillRect(spot.x, spot.y, spot.width, spot.height);
72927401 // if (CameraPane.Xmin > spot.x)
72937402 // {
72947403 // CameraPane.Xmin = spot.x;
....@@ -7308,9 +7417,9 @@
73087417 // bonhommes info.g.drawLine(spotw, spoth, spotw, spoth - boundary.height/2); // 15
73097418 //info.g.drawLine(spotw, spoth, spotw - boundary.width/2, spoth); // 15
73107419 spot.translate(0, -32);
7311
- info.g.setColor(Color.yellow);
7312
- info.g.fillRect(spot.x, spot.y, spot.width, spot.height);
7313
- info.g.setColor(Color.green);
7420
+ clickInfo.g.setColor(Color.yellow);
7421
+ clickInfo.g.fillRect(spot.x, spot.y, spot.width, spot.height);
7422
+ clickInfo.g.setColor(Color.green);
73147423 // if (CameraPane.Xmin > spot.x)
73157424 // {
73167425 // CameraPane.Xmin = spot.x;
....@@ -7327,8 +7436,8 @@
73277436 // {
73287437 // CameraPane.Ymax = spoth;
73297438 // }
7330
- info.g.drawArc(boundary.x + info.DX, boundary.y + info.DY,
7331
- (int)(boundary.width * info.W), (int)(boundary.height * info.W), 0, 360);
7439
+ clickInfo.g.drawArc(boundary.x + clickInfo.DX, boundary.y + clickInfo.DY,
7440
+ (int)(boundary.width * clickInfo.W), (int)(boundary.height * clickInfo.W), 0, 360);
73327441 //info.g.drawArc(spot.x, spotw, spot.width/2, boundary.height/2, 0, 360);
73337442 // if (CameraPane.Xmin > boundary.x)
73347443 // {
....@@ -7350,7 +7459,8 @@
73507459 }
73517460 }
73527461
7353
- boolean doEditClick0(ClickInfo info, int level)
7462
+ boolean doEditClick0(//ClickInfo clickInfo,
7463
+ int level)
73547464 {
73557465 if (level == 0)
73567466 {
....@@ -7359,8 +7469,8 @@
73597469
73607470 boolean retval = false;
73617471
7362
- startX = info.x;
7363
- startY = info.y;
7472
+ startX = clickInfo.x;
7473
+ startY = clickInfo.y;
73647474
73657475 hitSomething = -1;
73667476 cVector origin = new cVector();
....@@ -7370,22 +7480,51 @@
73707480 {
73717481 centerPt = new Point(0, 0);
73727482 }
7373
- calcHotSpot(origin, info, centerPt, spot);
7374
- if (spot.contains(info.x, info.y))
7483
+ calcHotSpot(origin, //info,
7484
+ centerPt, spot);
7485
+ if (spot.contains(clickInfo.x, clickInfo.y))
73757486 {
73767487 hitSomething = hitCenter;
73777488 retval = true;
73787489 }
73797490 spot.translate(32, 0);
7380
- if (spot.contains(info.x, info.y))
7491
+ if (spot.contains(clickInfo.x, clickInfo.y))
73817492 {
73827493 hitSomething = hitRotate;
73837494 retval = true;
73847495 }
73857496 spot.translate(0, 32);
7386
- if (spot.contains(info.x, info.y))
7497
+ if (spot.contains(clickInfo.x, clickInfo.y))
73877498 {
73887499 hitSomething = hitScale;
7500
+
7501
+ double scale = 0.005f * clickInfo.camera.Distance();
7502
+ double hScale = (double) (clickInfo.x - centerPt.x) / 32;
7503
+ double sign = 1;
7504
+ if (hScale < 0)
7505
+ {
7506
+ sign = -1;
7507
+ }
7508
+ hScale = sign*Math.pow(sign*hScale, scale * 50);
7509
+ if (hScale < 0.01)
7510
+ {
7511
+ //hScale = 0.01;
7512
+ }
7513
+
7514
+ double vScale = (double) (clickInfo.y - centerPt.y) / 32;
7515
+ sign = 1;
7516
+ if (vScale < 0)
7517
+ {
7518
+ sign = -1;
7519
+ }
7520
+ vScale = sign*Math.pow(sign*vScale, scale * 50);
7521
+ if (vScale < 0.01)
7522
+ {
7523
+ //vScale = 0.01;
7524
+ }
7525
+
7526
+ clickInfo.scale = Math.sqrt(hScale*hScale + vScale*vScale);
7527
+
73897528 retval = true;
73907529 }
73917530
....@@ -7395,7 +7534,7 @@
73957534 }
73967535
73977536 //System.out.println("info.modifiers = " + info.modifiers);
7398
- modified = (info.modifiers & CameraPane.SHIFT) != 0; // Was META
7537
+ modified = (clickInfo.modifiers & CameraPane.SHIFT) != 0; // Was META
73997538 //System.out.println("modified = " + modified);
74007539 //new Exception().printStackTrace();
74017540 //viewCode = info.pane.renderCamera.viewCode;
....@@ -7423,7 +7562,8 @@
74237562 return true;
74247563 }
74257564
7426
- void doEditDrag0(ClickInfo info, boolean opposite)
7565
+ void doEditDrag0(//ClickInfo info,
7566
+ boolean opposite)
74277567 {
74287568 if (hitSomething == 0)
74297569 {
....@@ -7437,7 +7577,7 @@
74377577
74387578 //System.out.println("hitSomething = " + hitSomething);
74397579
7440
- double scale = 0.005f * info.camera.Distance();
7580
+ double scale = 0.005f * clickInfo.camera.Distance();
74417581
74427582 cVector xlate = new cVector();
74437583 //cVector xlate2 = new cVector();
....@@ -7471,8 +7611,8 @@
74717611 toParent[3][i] = xlate.get(i);
74727612 LA.matInvert(toParent, fromParent);
74737613 */
7474
- cVector delta = LA.newVector(0, 0, startY - info.y);
7475
- LA.xformDir(delta, new Camera(info.camera.viewCode).fromScreen, delta);
7614
+ cVector delta = LA.newVector(0, 0, startY - clickInfo.y);
7615
+ LA.xformDir(delta, new Camera(clickInfo.camera.viewCode).fromScreen, delta);
74767616
74777617 LA.matCopy(startMat, toParent);
74787618 LA.matTranslate(toParent, delta.x * scale, delta.y * scale, delta.z * scale);
....@@ -7481,7 +7621,7 @@
74817621 } else
74827622 {
74837623 //LA.xformDir(delta, info.camera.fromScreen, delta);
7484
- cVector up = new cVector(info.camera.up);
7624
+ cVector up = new cVector(clickInfo.camera.up);
74857625 cVector away = new cVector();
74867626 //cVector right2 = new cVector();
74877627 //LA.vecCross(up, cVector.Z, right);
....@@ -7498,19 +7638,19 @@
74987638 LA.xformDir(up, ClickInfo.matbuffer, up);
74997639 // if (!CameraPane.LOCALTRANSFORM)
75007640 LA.xformDir(up, Globals.theRenderer.RenderCamera().toScreen, up);
7501
- LA.xformDir(info.camera.away, ClickInfo.matbuffer, away);
7641
+ LA.xformDir(clickInfo.camera.away, ClickInfo.matbuffer, away);
75027642 // if (!CameraPane.LOCALTRANSFORM)
75037643 LA.xformDir(away, Globals.theRenderer.RenderCamera().toScreen, away);
75047644 //LA.vecCross(up, cVector.Z, right2);
75057645
7506
- cVector delta = LA.newVector(info.x - startX, startY - info.y, 0);
7646
+ cVector delta = LA.newVector(clickInfo.x - startX, startY - clickInfo.y, 0);
75077647
75087648 //System.out.println("DELTA0 = " + delta);
75097649 //System.out.println("AWAY = " + info.camera.away);
75107650 //System.out.println("UP = " + info.camera.up);
75117651 if (away.z > 0)
75127652 {
7513
- if (info.camera.up.x == 0) // LA.vecDot(right, right2)<0)
7653
+ if (clickInfo.camera.up.x == 0) // LA.vecDot(right, right2)<0)
75147654 {
75157655 delta.x = -delta.x;
75167656 } else
....@@ -7525,7 +7665,7 @@
75257665 //System.out.println("DELTA1 = " + delta);
75267666 LA.xformDir(delta, ClickInfo.matbuffer, delta);
75277667 //System.out.println("DELTA2 = " + delta);
7528
- LA.xformDir(delta, new Camera(info.camera.viewCode).fromScreen, delta);
7668
+ LA.xformDir(delta, new Camera(clickInfo.camera.viewCode).fromScreen, delta);
75297669 LA.matCopy(startMat, toParent);
75307670 //System.out.println("DELTA3 = " + delta);
75317671 LA.matTranslate(toParent, delta.x * scale, delta.y * scale, delta.z * scale);
....@@ -7535,8 +7675,8 @@
75357675 break;
75367676
75377677 case hitRotate: // rotate
7538
- int dx = info.x - centerPt.x;
7539
- int dy = -(info.y - centerPt.y);
7678
+ int dx = clickInfo.x - centerPt.x;
7679
+ int dy = -(clickInfo.y - centerPt.y);
75407680 double angle = (double) Math.atan2(dx, dy);
75417681 angle = -(1.570796 - angle);
75427682
....@@ -7559,7 +7699,7 @@
75597699 }
75607700 /**/
75617701
7562
- switch (info.pane.RenderCamera().viewCode)
7702
+ switch (clickInfo.pane.RenderCamera().viewCode)
75637703 {
75647704 case 1: // '\001'
75657705 LA.matZRotate(toParent, angle);
....@@ -7586,7 +7726,7 @@
75867726 break;
75877727
75887728 case hitScale: // scale
7589
- double hScale = (double) (info.x - centerPt.x) / 32;
7729
+ double hScale = (double) (clickInfo.x - centerPt.x) / 32;
75907730 double sign = 1;
75917731 if (hScale < 0)
75927732 {
....@@ -7598,7 +7738,7 @@
75987738 //hScale = 0.01;
75997739 }
76007740
7601
- double vScale = (double) (info.y - centerPt.y) / 32;
7741
+ double vScale = (double) (clickInfo.y - centerPt.y) / 32;
76027742 sign = 1;
76037743 if (vScale < 0)
76047744 {
....@@ -7609,6 +7749,7 @@
76097749 {
76107750 //vScale = 0.01;
76117751 }
7752
+
76127753 LA.matCopy(startMat, toParent);
76137754 /**/
76147755 for (int i = 0; i < 3; i++)
....@@ -7618,14 +7759,14 @@
76187759 }
76197760 /**/
76207761
7621
- double totalScale = Math.sqrt(hScale*hScale + vScale*vScale) / Math.sqrt(2);
7762
+ double totalScale = Math.sqrt(hScale*hScale + vScale*vScale) / clickInfo.scale;
76227763
76237764 if (totalScale < 0.01)
76247765 {
76257766 totalScale = 0.01;
76267767 }
76277768
7628
- switch (info.pane.RenderCamera().viewCode)
7769
+ switch (clickInfo.pane.RenderCamera().viewCode)
76297770 {
76307771 case 3: // '\001'
76317772 if (modified || opposite)
....@@ -7692,7 +7833,7 @@
76927833 } // NEW ...
76937834
76947835
7695
- info.pane.repaint();
7836
+ clickInfo.pane.repaint();
76967837 }
76977838
76987839 boolean overflow = false;