Normand Briere
2019-08-01 c49ad213b600f844e9070cb09390c3e6d3d13db4
Object3D.java
....@@ -29,6 +29,12 @@
2929 Object3D saveskeleton;
3030 //
3131
32
+ String skyboxname;
33
+ String skyboxext;
34
+
35
+ Object3D versions[];
36
+ int versionindex = -1;
37
+
3238 ScriptNode scriptnode;
3339
3440 void InitOthers()
....@@ -215,6 +221,9 @@
215221 // o.transientrep = this.bRep.support;
216222 // o.bRep.support = null;
217223 // }
224
+ o.selection = this.selection;
225
+ o.versions = this.versions;
226
+ o.versionindex = this.versionindex;
218227
219228 if (this.support != null)
220229 {
....@@ -268,6 +277,11 @@
268277 {
269278 this.support.bRep = o.transientrep;
270279 }
280
+
281
+ this.selection = o.selection;
282
+
283
+ this.versions = o.versions;
284
+ this.versionindex = o.versionindex;
271285 // July 2019 if (this.bRep != null)
272286 // this.bRep.support = o.transientrep;
273287 // this.support = o.support;
....@@ -415,6 +429,7 @@
415429 }
416430
417431 boolean live = false;
432
+ transient boolean keepdontselect;
418433 boolean dontselect = false;
419434 boolean hide = false;
420435 boolean link2master = false; // performs reset support/master at each frame
....@@ -999,6 +1014,9 @@
9991014
10001015 if (material == null || material.multiply)
10011016 return true;
1017
+
1018
+ if (projectedVertices != null && projectedVertices.length > 2 && projectedVertices[2].y >= 10000)
1019
+ return false;
10021020
10031021 // Transparent objects are dynamic because we have to sort the triangles.
10041022 return material.opacity > 0.99;
....@@ -2555,7 +2573,8 @@
25552573 private static final int editSelf = 1;
25562574 private static final int editChild = 2;
25572575
2558
- void drawEditHandles(ClickInfo info, int level)
2576
+ void drawEditHandles(//ClickInfo info,
2577
+ int level)
25592578 {
25602579 if (level == 0)
25612580 {
....@@ -2563,7 +2582,8 @@
25632582 return;
25642583
25652584 Object3D selectee;
2566
- 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))
25672587 {
25682588 selectee = (Object3D) e.nextElement();
25692589 }
....@@ -2571,19 +2591,22 @@
25712591 } else
25722592 {
25732593 //super.
2574
- drawEditHandles0(info, level + 1);
2594
+ drawEditHandles0(//info,
2595
+ level + 1);
25752596 }
25762597 }
25772598
2578
- boolean doEditClick(ClickInfo info, int level)
2599
+ boolean doEditClick(//ClickInfo info,
2600
+ int level)
25792601 {
25802602 doSomething = 0;
25812603 if (level == 0)
25822604 {
2583
- return doParentClick(info);
2605
+ return doParentClick(); //info);
25842606 }
25852607 if (//super.
2586
- doEditClick0(info, level))
2608
+ doEditClick0(//info,
2609
+ level))
25872610 {
25882611 doSomething = 1;
25892612 return true;
....@@ -2593,7 +2616,7 @@
25932616 }
25942617 }
25952618
2596
- boolean doParentClick(ClickInfo info)
2619
+ boolean doParentClick() //ClickInfo info)
25972620 {
25982621 if (selection == null)
25992622 {
....@@ -2606,7 +2629,8 @@
26062629 for (java.util.Enumeration e = selection.elements(); e.hasMoreElements();)
26072630 {
26082631 Object3D selectee = (Object3D) e.nextElement();
2609
- if (selectee.doEditClick(info, 1))
2632
+ if (selectee.doEditClick(//info,
2633
+ 1))
26102634 {
26112635 childToDrag = selectee;
26122636 doSomething = 2;
....@@ -2618,13 +2642,15 @@
26182642 return retval;
26192643 }
26202644
2621
- void doEditDrag(ClickInfo info, boolean opposite)
2645
+ void doEditDrag(//ClickInfo clickInfo,
2646
+ boolean opposite)
26222647 {
26232648 switch (doSomething)
26242649 {
26252650 case 1: // '\001'
26262651 //super.
2627
- doEditDrag0(info, opposite);
2652
+ doEditDrag0(//clickInfo,
2653
+ opposite);
26282654 break;
26292655
26302656 case 2: // '\002'
....@@ -2637,11 +2663,13 @@
26372663 {
26382664 //sel.hitSomething = childToDrag.hitSomething;
26392665 //childToDrag.doEditDrag(info);
2640
- sel.doEditDrag(info, opposite);
2666
+ sel.doEditDrag(//clickInfo,
2667
+ opposite);
26412668 } else
26422669 {
26432670 //super.
2644
- doEditDrag0(info, opposite);
2671
+ doEditDrag0(//clickInfo,
2672
+ opposite);
26452673 }
26462674 }
26472675 break;
....@@ -2659,6 +2687,9 @@
26592687 {
26602688 deselectAll();
26612689 }
2690
+
2691
+ new Exception().printStackTrace();
2692
+
26622693 ClickInfo newInfo = new ClickInfo();
26632694 newInfo.flags = info.flags;
26642695 newInfo.bounds = info.bounds;
....@@ -3106,7 +3137,7 @@
31063137 {
31073138 if (bRep != null)
31083139 {
3109
- bRep.GenerateNormalsMINE();
3140
+ bRep.MergeNormals(); //.GenerateNormalsMINE();
31103141 Touch();
31113142 }
31123143 }
....@@ -5409,6 +5440,51 @@
54095440 blockloop = false;
54105441 }
54115442
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
+
54125488 boolean IsSelected()
54135489 {
54145490 if (parent == null)
....@@ -5718,6 +5794,38 @@
57185794 }
57195795 }
57205796
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
+
57215829 void draw(iCameraPane display, Object3D /*Composite*/ root, boolean selected, boolean blocked)
57225830 {
57235831 Draw(display, root, selected, blocked);
....@@ -5804,8 +5912,10 @@
58045912 if (support != null)
58055913 support = support;
58065914
5807
- //boolean usecalllists = IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null || !link2master); // !(this instanceof cSpring) && !(this instanceof BezierPatch);
5808
- 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.
58095919
58105920 if (!usecalllists && bRep != null && bRep.displaylist > 0)
58115921 {
....@@ -5815,8 +5925,9 @@
58155925 // usecalllists &= !(parent instanceof RandomNode);
58165926 // usecalllists = false;
58175927
5818
- if (GetBRep() != null)
5819
- usecalllists = usecalllists;
5928
+ if (display.DrawMode() == display.SHADOW)
5929
+ //GetBRep() != null)
5930
+ usecalllists = !!usecalllists;
58205931 //System.out.println("draw " + this);
58215932 //new Exception().printStackTrace();
58225933
....@@ -5838,7 +5949,7 @@
58385949 if (!(this instanceof Composite))
58395950 touched = false;
58405951 //if (displaylist == -1 && usecalllists)
5841
- if ((bRep != null && bRep.displaylist <= 0) && usecalllists) // june 2013
5952
+ if (bRep.displaylist <= 0 && usecalllists) // && display.DrawMode() == display.DEFAULT) // june 2013
58425953 {
58435954 bRep.displaylist = display.GenList();
58445955 assert(bRep.displaylist != 0);
....@@ -5849,7 +5960,7 @@
58495960
58505961 //System.out.println("\tnew list " + list);
58515962 //gl.glDrawBuffer(gl.GL_NONE);
5852
- if (usecalllists)
5963
+ if (usecalllists && bRep.displaylist > 0)
58535964 {
58545965 // System.err.println("new list " + bRep.displaylist + " for " + this);
58555966 display.NewList(bRep.displaylist);
....@@ -5858,7 +5969,7 @@
58585969 CallList(display, root, selected, blocked);
58595970
58605971 // compiled = true;
5861
- if (usecalllists)
5972
+ if (usecalllists && bRep.displaylist > 0)
58625973 {
58635974 // System.err.println("end list " + bRep.displaylist + " for " + this);
58645975 display.EndList();
....@@ -7209,20 +7320,23 @@
72097320 }
72107321 }
72117322
7212
- 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)
72137327 {
7214
- int hc = info.bounds.x + info.bounds.width / 2;
7215
- int vc = info.bounds.y + info.bounds.height / 2;
7216
- 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;
72177331 if (toscreen == null)
72187332 {
7219
- toscreen = new Camera(info.camera.viewCode).toScreen;
7333
+ toscreen = new Camera(clickInfo.camera.viewCode).toScreen;
72207334 }
72217335 cVector vec = in;
72227336 LA.xformPos(in, toscreen, in);
72237337 //System.out.println("Distance = " + info.camera.Distance());
7224
- vec.x *= 100 * info.camera.SCALE / info.camera.Distance();
7225
- 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();
72267340 outPt.x = hc + (int) vec.x;
72277341 outPt.y = vc - (int) vec.y;
72287342 outRec.x = outPt.x - 3;
....@@ -7230,15 +7344,18 @@
72307344 outRec.width = outRec.height = 6;
72317345 }
72327346
7233
- protected Rectangle calcHotSpot(cVector in, ClickInfo info)
7347
+ protected Rectangle calcHotSpot(cVector in//, ClickInfo clickInfo
7348
+ )
72347349 {
72357350 Point pt = new Point(0, 0);
72367351 Rectangle rec = new Rectangle();
7237
- calcHotSpot(in, info, pt, rec);
7352
+ calcHotSpot(in, //clickInfo,
7353
+ pt, rec);
72387354 return rec;
72397355 }
72407356
7241
- void drawEditHandles0(ClickInfo info, int level)
7357
+ void drawEditHandles0(//ClickInfo clickInfo,
7358
+ int level)
72427359 {
72437360 if (level == 0)
72447361 {
....@@ -7247,16 +7364,19 @@
72477364 {
72487365 cVector origin = new cVector();
72497366 //LA.xformPos(origin, toParent, origin);
7250
- Rectangle spot = calcHotSpot(origin, info);
7367
+ if (this.clickInfo == null)
7368
+ this.clickInfo = new ClickInfo();
7369
+
7370
+ Rectangle spot = calcHotSpot(origin); //, clickInfo);
72517371 Rectangle boundary = new Rectangle();
72527372 boundary.x = spot.x - 30;
72537373 boundary.y = spot.y - 30;
72547374 boundary.width = spot.width + 60;
72557375 boundary.height = spot.height + 60;
7256
- info.g.setColor(Color.red);
7376
+ clickInfo.g.setColor(Color.red);
72577377 int spotw = spot.x + spot.width;
72587378 int spoth = spot.y + spot.height;
7259
- info.g.fillRect(spot.x, spot.y, spot.width, spot.height);
7379
+ clickInfo.g.fillRect(spot.x, spot.y, spot.width, spot.height);
72607380 // if (CameraPane.Xmin > spot.x)
72617381 // {
72627382 // CameraPane.Xmin = spot.x;
....@@ -7276,8 +7396,8 @@
72767396 spot.translate(32, 32);
72777397 spotw = spot.x + spot.width;
72787398 spoth = spot.y + spot.height;
7279
- info.g.setColor(Color.cyan);
7280
- 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);
72817401 // if (CameraPane.Xmin > spot.x)
72827402 // {
72837403 // CameraPane.Xmin = spot.x;
....@@ -7297,9 +7417,9 @@
72977417 // bonhommes info.g.drawLine(spotw, spoth, spotw, spoth - boundary.height/2); // 15
72987418 //info.g.drawLine(spotw, spoth, spotw - boundary.width/2, spoth); // 15
72997419 spot.translate(0, -32);
7300
- info.g.setColor(Color.yellow);
7301
- info.g.fillRect(spot.x, spot.y, spot.width, spot.height);
7302
- 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);
73037423 // if (CameraPane.Xmin > spot.x)
73047424 // {
73057425 // CameraPane.Xmin = spot.x;
....@@ -7316,8 +7436,8 @@
73167436 // {
73177437 // CameraPane.Ymax = spoth;
73187438 // }
7319
- info.g.drawArc(boundary.x + info.DX, boundary.y + info.DY,
7320
- (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);
73217441 //info.g.drawArc(spot.x, spotw, spot.width/2, boundary.height/2, 0, 360);
73227442 // if (CameraPane.Xmin > boundary.x)
73237443 // {
....@@ -7339,7 +7459,8 @@
73397459 }
73407460 }
73417461
7342
- boolean doEditClick0(ClickInfo info, int level)
7462
+ boolean doEditClick0(//ClickInfo clickInfo,
7463
+ int level)
73437464 {
73447465 if (level == 0)
73457466 {
....@@ -7348,8 +7469,8 @@
73487469
73497470 boolean retval = false;
73507471
7351
- startX = info.x;
7352
- startY = info.y;
7472
+ startX = clickInfo.x;
7473
+ startY = clickInfo.y;
73537474
73547475 hitSomething = -1;
73557476 cVector origin = new cVector();
....@@ -7359,22 +7480,51 @@
73597480 {
73607481 centerPt = new Point(0, 0);
73617482 }
7362
- calcHotSpot(origin, info, centerPt, spot);
7363
- if (spot.contains(info.x, info.y))
7483
+ calcHotSpot(origin, //info,
7484
+ centerPt, spot);
7485
+ if (spot.contains(clickInfo.x, clickInfo.y))
73647486 {
73657487 hitSomething = hitCenter;
73667488 retval = true;
73677489 }
73687490 spot.translate(32, 0);
7369
- if (spot.contains(info.x, info.y))
7491
+ if (spot.contains(clickInfo.x, clickInfo.y))
73707492 {
73717493 hitSomething = hitRotate;
73727494 retval = true;
73737495 }
73747496 spot.translate(0, 32);
7375
- if (spot.contains(info.x, info.y))
7497
+ if (spot.contains(clickInfo.x, clickInfo.y))
73767498 {
73777499 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
+
73787528 retval = true;
73797529 }
73807530
....@@ -7384,7 +7534,7 @@
73847534 }
73857535
73867536 //System.out.println("info.modifiers = " + info.modifiers);
7387
- modified = (info.modifiers & CameraPane.SHIFT) != 0; // Was META
7537
+ modified = (clickInfo.modifiers & CameraPane.SHIFT) != 0; // Was META
73887538 //System.out.println("modified = " + modified);
73897539 //new Exception().printStackTrace();
73907540 //viewCode = info.pane.renderCamera.viewCode;
....@@ -7412,7 +7562,8 @@
74127562 return true;
74137563 }
74147564
7415
- void doEditDrag0(ClickInfo info, boolean opposite)
7565
+ void doEditDrag0(//ClickInfo info,
7566
+ boolean opposite)
74167567 {
74177568 if (hitSomething == 0)
74187569 {
....@@ -7426,7 +7577,7 @@
74267577
74277578 //System.out.println("hitSomething = " + hitSomething);
74287579
7429
- double scale = 0.005f * info.camera.Distance();
7580
+ double scale = 0.005f * clickInfo.camera.Distance();
74307581
74317582 cVector xlate = new cVector();
74327583 //cVector xlate2 = new cVector();
....@@ -7460,8 +7611,8 @@
74607611 toParent[3][i] = xlate.get(i);
74617612 LA.matInvert(toParent, fromParent);
74627613 */
7463
- cVector delta = LA.newVector(0, 0, startY - info.y);
7464
- 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);
74657616
74667617 LA.matCopy(startMat, toParent);
74677618 LA.matTranslate(toParent, delta.x * scale, delta.y * scale, delta.z * scale);
....@@ -7470,7 +7621,7 @@
74707621 } else
74717622 {
74727623 //LA.xformDir(delta, info.camera.fromScreen, delta);
7473
- cVector up = new cVector(info.camera.up);
7624
+ cVector up = new cVector(clickInfo.camera.up);
74747625 cVector away = new cVector();
74757626 //cVector right2 = new cVector();
74767627 //LA.vecCross(up, cVector.Z, right);
....@@ -7487,19 +7638,19 @@
74877638 LA.xformDir(up, ClickInfo.matbuffer, up);
74887639 // if (!CameraPane.LOCALTRANSFORM)
74897640 LA.xformDir(up, Globals.theRenderer.RenderCamera().toScreen, up);
7490
- LA.xformDir(info.camera.away, ClickInfo.matbuffer, away);
7641
+ LA.xformDir(clickInfo.camera.away, ClickInfo.matbuffer, away);
74917642 // if (!CameraPane.LOCALTRANSFORM)
74927643 LA.xformDir(away, Globals.theRenderer.RenderCamera().toScreen, away);
74937644 //LA.vecCross(up, cVector.Z, right2);
74947645
7495
- cVector delta = LA.newVector(info.x - startX, startY - info.y, 0);
7646
+ cVector delta = LA.newVector(clickInfo.x - startX, startY - clickInfo.y, 0);
74967647
74977648 //System.out.println("DELTA0 = " + delta);
74987649 //System.out.println("AWAY = " + info.camera.away);
74997650 //System.out.println("UP = " + info.camera.up);
75007651 if (away.z > 0)
75017652 {
7502
- if (info.camera.up.x == 0) // LA.vecDot(right, right2)<0)
7653
+ if (clickInfo.camera.up.x == 0) // LA.vecDot(right, right2)<0)
75037654 {
75047655 delta.x = -delta.x;
75057656 } else
....@@ -7514,7 +7665,7 @@
75147665 //System.out.println("DELTA1 = " + delta);
75157666 LA.xformDir(delta, ClickInfo.matbuffer, delta);
75167667 //System.out.println("DELTA2 = " + delta);
7517
- LA.xformDir(delta, new Camera(info.camera.viewCode).fromScreen, delta);
7668
+ LA.xformDir(delta, new Camera(clickInfo.camera.viewCode).fromScreen, delta);
75187669 LA.matCopy(startMat, toParent);
75197670 //System.out.println("DELTA3 = " + delta);
75207671 LA.matTranslate(toParent, delta.x * scale, delta.y * scale, delta.z * scale);
....@@ -7524,8 +7675,8 @@
75247675 break;
75257676
75267677 case hitRotate: // rotate
7527
- int dx = info.x - centerPt.x;
7528
- int dy = -(info.y - centerPt.y);
7678
+ int dx = clickInfo.x - centerPt.x;
7679
+ int dy = -(clickInfo.y - centerPt.y);
75297680 double angle = (double) Math.atan2(dx, dy);
75307681 angle = -(1.570796 - angle);
75317682
....@@ -7548,7 +7699,7 @@
75487699 }
75497700 /**/
75507701
7551
- switch (info.pane.RenderCamera().viewCode)
7702
+ switch (clickInfo.pane.RenderCamera().viewCode)
75527703 {
75537704 case 1: // '\001'
75547705 LA.matZRotate(toParent, angle);
....@@ -7575,7 +7726,7 @@
75757726 break;
75767727
75777728 case hitScale: // scale
7578
- double hScale = (double) (info.x - centerPt.x) / 32;
7729
+ double hScale = (double) (clickInfo.x - centerPt.x) / 32;
75797730 double sign = 1;
75807731 if (hScale < 0)
75817732 {
....@@ -7587,7 +7738,7 @@
75877738 //hScale = 0.01;
75887739 }
75897740
7590
- double vScale = (double) (info.y - centerPt.y) / 32;
7741
+ double vScale = (double) (clickInfo.y - centerPt.y) / 32;
75917742 sign = 1;
75927743 if (vScale < 0)
75937744 {
....@@ -7598,6 +7749,7 @@
75987749 {
75997750 //vScale = 0.01;
76007751 }
7752
+
76017753 LA.matCopy(startMat, toParent);
76027754 /**/
76037755 for (int i = 0; i < 3; i++)
....@@ -7607,14 +7759,14 @@
76077759 }
76087760 /**/
76097761
7610
- double totalScale = Math.sqrt(hScale*hScale + vScale*vScale) / Math.sqrt(2);
7762
+ double totalScale = Math.sqrt(hScale*hScale + vScale*vScale) / clickInfo.scale;
76117763
76127764 if (totalScale < 0.01)
76137765 {
76147766 totalScale = 0.01;
76157767 }
76167768
7617
- switch (info.pane.RenderCamera().viewCode)
7769
+ switch (clickInfo.pane.RenderCamera().viewCode)
76187770 {
76197771 case 3: // '\001'
76207772 if (modified || opposite)
....@@ -7681,7 +7833,7 @@
76817833 } // NEW ...
76827834
76837835
7684
- info.pane.repaint();
7836
+ clickInfo.pane.repaint();
76857837 }
76867838
76877839 boolean overflow = false;