.. | .. |
---|
22 | 22 | //static final long serialVersionUID = -607422624994562685L; |
---|
23 | 23 | static final long serialVersionUID = 5022536242724664900L; |
---|
24 | 24 | |
---|
| 25 | + // Use GetUUID for backward compatibility with null. |
---|
25 | 26 | private UUID uuid = UUID.randomUUID(); |
---|
26 | 27 | |
---|
27 | 28 | // TEMPORARY for mocap undo. No need to be transient. |
---|
.. | .. |
---|
32 | 33 | String skyboxname; |
---|
33 | 34 | String skyboxext; |
---|
34 | 35 | |
---|
35 | | - byte[] versions[]; |
---|
| 36 | + Object3D versionlist[]; |
---|
36 | 37 | int versionindex = -1; |
---|
37 | 38 | |
---|
| 39 | + java.util.Hashtable<java.util.UUID, Object3D> versiontable; // = new java.util.Hashtable<java.util.UUID, Object3D>(); |
---|
| 40 | + |
---|
38 | 41 | ScriptNode scriptnode; |
---|
39 | 42 | |
---|
40 | 43 | void InitOthers() |
---|
.. | .. |
---|
222 | 225 | // o.bRep.support = null; |
---|
223 | 226 | // } |
---|
224 | 227 | o.selection = this.selection; |
---|
225 | | - o.versions = this.versions; |
---|
| 228 | + o.versionlist = this.versionlist; |
---|
226 | 229 | o.versionindex = this.versionindex; |
---|
227 | 230 | |
---|
228 | 231 | if (this.support != null) |
---|
.. | .. |
---|
244 | 247 | // this.bRep.support = null; |
---|
245 | 248 | // this.support = null; |
---|
246 | 249 | // this.fileparent = null; |
---|
| 250 | + } |
---|
| 251 | + |
---|
| 252 | +// Object3D GetObject(java.util.UUID uuid) |
---|
| 253 | +// { |
---|
| 254 | +// if (this.uuid.equals(uuid)) |
---|
| 255 | +// return this; |
---|
| 256 | +// |
---|
| 257 | +// if (blockloop) |
---|
| 258 | +// return null; |
---|
| 259 | +// |
---|
| 260 | +// blockloop = true; |
---|
| 261 | +// |
---|
| 262 | +// for (int i=0; i<Size(); i++) |
---|
| 263 | +// { |
---|
| 264 | +// Object3D o = get(i).GetObject(uuid); |
---|
| 265 | +// |
---|
| 266 | +// if (o != null) |
---|
| 267 | +// return o; |
---|
| 268 | +// } |
---|
| 269 | +// |
---|
| 270 | +// blockloop = false; |
---|
| 271 | +// |
---|
| 272 | +// return null; |
---|
| 273 | +// } |
---|
| 274 | + |
---|
| 275 | + transient boolean tag; |
---|
| 276 | + |
---|
| 277 | + void TagObjects(Object3D o, boolean tag) |
---|
| 278 | + { |
---|
| 279 | + if (blockloop) |
---|
| 280 | + return; |
---|
| 281 | + |
---|
| 282 | + o.tag = tag; |
---|
| 283 | + |
---|
| 284 | + if (o == this) |
---|
| 285 | + return; |
---|
| 286 | + |
---|
| 287 | + blockloop = true; |
---|
| 288 | + |
---|
| 289 | + for (int i=0; i<Size(); i++) |
---|
| 290 | + { |
---|
| 291 | + get(i).TagObjects(o, tag); |
---|
| 292 | + } |
---|
| 293 | + |
---|
| 294 | + blockloop = false; |
---|
| 295 | + } |
---|
| 296 | + |
---|
| 297 | + boolean HasTags() |
---|
| 298 | + { |
---|
| 299 | + if (blockloop) |
---|
| 300 | + return false; |
---|
| 301 | + |
---|
| 302 | + blockloop = true; |
---|
| 303 | + |
---|
| 304 | + boolean hasTags = false; |
---|
| 305 | + |
---|
| 306 | + for (int i=0; i<Size(); i++) |
---|
| 307 | + { |
---|
| 308 | + hasTags |= get(i).tag || get(i).HasTags(); |
---|
| 309 | + |
---|
| 310 | + if (hasTags) |
---|
| 311 | + break; |
---|
| 312 | + } |
---|
| 313 | + |
---|
| 314 | + blockloop = false; |
---|
| 315 | + |
---|
| 316 | + return hasTags; |
---|
247 | 317 | } |
---|
248 | 318 | |
---|
249 | 319 | void RestoreBigData(java.util.Hashtable<java.util.UUID, Object3D> hashtable) |
---|
.. | .. |
---|
280 | 350 | |
---|
281 | 351 | this.selection = o.selection; |
---|
282 | 352 | |
---|
283 | | - this.versions = o.versions; |
---|
| 353 | + this.versionlist = o.versionlist; |
---|
284 | 354 | this.versionindex = o.versionindex; |
---|
285 | 355 | // July 2019 if (this.bRep != null) |
---|
286 | 356 | // this.bRep.support = o.transientrep; |
---|
.. | .. |
---|
1014 | 1084 | |
---|
1015 | 1085 | if (material == null || material.multiply) |
---|
1016 | 1086 | return true; |
---|
| 1087 | + |
---|
| 1088 | + if (projectedVertices != null && projectedVertices.length > 2 && projectedVertices[2].y >= 10000) |
---|
| 1089 | + return false; |
---|
1017 | 1090 | |
---|
1018 | 1091 | // Transparent objects are dynamic because we have to sort the triangles. |
---|
1019 | 1092 | return material.opacity > 0.99; |
---|
.. | .. |
---|
2441 | 2514 | else |
---|
2442 | 2515 | { |
---|
2443 | 2516 | //((ObjEditor)editWindow).SetupUI2(null); |
---|
| 2517 | + if (objectUI != null) |
---|
| 2518 | + ((ObjEditor)objectUI).pinButton.setSelected(pinned); |
---|
| 2519 | + else |
---|
| 2520 | + //new Exception().printStackTrace(); |
---|
| 2521 | + System.err.println("objectUI is null"); |
---|
2444 | 2522 | } |
---|
2445 | 2523 | } |
---|
2446 | 2524 | |
---|
.. | .. |
---|
3544 | 3622 | |
---|
3545 | 3623 | void ClearMaterials() |
---|
3546 | 3624 | { |
---|
| 3625 | + if (blockloop) |
---|
| 3626 | + return; |
---|
| 3627 | + |
---|
| 3628 | + blockloop = true; |
---|
| 3629 | + |
---|
3547 | 3630 | ClearMaterial(); |
---|
3548 | | - for (int i = 0; i < size(); i++) |
---|
| 3631 | + for (int i = 0; i < Size(); i++) |
---|
3549 | 3632 | { |
---|
3550 | | - Object3D child = (Object3D) reserve(i); |
---|
| 3633 | + Object3D child = (Object3D) get(i); |
---|
3551 | 3634 | if (child == null) |
---|
3552 | 3635 | continue; |
---|
3553 | 3636 | child.ClearMaterials(); |
---|
3554 | | - release(i); |
---|
3555 | 3637 | } |
---|
| 3638 | + |
---|
| 3639 | + blockloop = false; |
---|
| 3640 | + } |
---|
| 3641 | + |
---|
| 3642 | + void ClearVersionList() |
---|
| 3643 | + { |
---|
| 3644 | + this.versionlist = null; |
---|
| 3645 | + this.versionindex = -1; |
---|
| 3646 | + this.versiontable = null; |
---|
| 3647 | + } |
---|
| 3648 | + |
---|
| 3649 | + void ClearVersions() |
---|
| 3650 | + { |
---|
| 3651 | + if (blockloop) |
---|
| 3652 | + return; |
---|
| 3653 | + |
---|
| 3654 | + blockloop = true; |
---|
| 3655 | + |
---|
| 3656 | + ClearVersionList(); |
---|
| 3657 | + for (int i = 0; i < Size(); i++) |
---|
| 3658 | + { |
---|
| 3659 | + Object3D child = (Object3D) get(i); |
---|
| 3660 | + if (child == null) |
---|
| 3661 | + continue; |
---|
| 3662 | + child.ClearVersions(); |
---|
| 3663 | + } |
---|
| 3664 | + |
---|
| 3665 | + blockloop = false; |
---|
3556 | 3666 | } |
---|
3557 | 3667 | |
---|
3558 | 3668 | void FlipV(boolean flip) |
---|
.. | .. |
---|
5542 | 5652 | if (fullname == null) |
---|
5543 | 5653 | return ""; |
---|
5544 | 5654 | |
---|
| 5655 | + if (fullname.pigment != null) |
---|
| 5656 | + { |
---|
| 5657 | + return fullname.pigment; |
---|
| 5658 | + } |
---|
| 5659 | + |
---|
5545 | 5660 | // System.out.println("Fullname = " + fullname); |
---|
5546 | 5661 | |
---|
5547 | 5662 | // Does not work on Windows due to C: |
---|
.. | .. |
---|
5554 | 5669 | |
---|
5555 | 5670 | if (split.length == 0) |
---|
5556 | 5671 | { |
---|
5557 | | - return ""; |
---|
| 5672 | + return fullname.pigment = ""; |
---|
5558 | 5673 | } |
---|
5559 | 5674 | |
---|
5560 | 5675 | if (split.length <= 2) |
---|
.. | .. |
---|
5562 | 5677 | if (fullname.name.endsWith(":")) |
---|
5563 | 5678 | { |
---|
5564 | 5679 | // Windows |
---|
5565 | | - return fullname.name.substring(0, fullname.name.length()-1); |
---|
| 5680 | + return fullname.pigment = fullname.name.substring(0, fullname.name.length()-1); |
---|
5566 | 5681 | } |
---|
5567 | 5682 | |
---|
5568 | | - return split[0]; |
---|
| 5683 | + return fullname.pigment = split[0]; |
---|
5569 | 5684 | } |
---|
5570 | 5685 | |
---|
5571 | 5686 | // Windows |
---|
5572 | 5687 | assert(split.length == 4); |
---|
5573 | 5688 | |
---|
5574 | | - return split[0] + ":" + split[1]; |
---|
| 5689 | + return fullname.pigment = split[0] + ":" + split[1]; |
---|
5575 | 5690 | } |
---|
5576 | 5691 | |
---|
5577 | 5692 | static String GetBump(cTexture fullname) |
---|
5578 | 5693 | { |
---|
5579 | 5694 | if (fullname == null) |
---|
5580 | 5695 | return ""; |
---|
| 5696 | + |
---|
| 5697 | + if (fullname.bump != null) |
---|
| 5698 | + { |
---|
| 5699 | + return fullname.bump; |
---|
| 5700 | + } |
---|
5581 | 5701 | |
---|
5582 | 5702 | // System.out.println("Fullname = " + fullname); |
---|
5583 | 5703 | // Does not work on Windows due to C: |
---|
.. | .. |
---|
5589 | 5709 | |
---|
5590 | 5710 | if (split.length == 0) |
---|
5591 | 5711 | { |
---|
5592 | | - return ""; |
---|
| 5712 | + return fullname.bump = ""; |
---|
5593 | 5713 | } |
---|
5594 | 5714 | |
---|
5595 | 5715 | if (split.length == 1) |
---|
5596 | 5716 | { |
---|
5597 | | - return ""; |
---|
| 5717 | + return fullname.bump = ""; |
---|
5598 | 5718 | } |
---|
5599 | 5719 | |
---|
5600 | 5720 | if (split.length == 2) |
---|
.. | .. |
---|
5602 | 5722 | if (fullname.name.endsWith(":")) |
---|
5603 | 5723 | { |
---|
5604 | 5724 | // Windows |
---|
5605 | | - return ""; |
---|
| 5725 | + return fullname.bump = ""; |
---|
5606 | 5726 | } |
---|
5607 | 5727 | |
---|
5608 | | - return split[1]; |
---|
| 5728 | + return fullname.bump = split[1]; |
---|
5609 | 5729 | } |
---|
5610 | 5730 | |
---|
5611 | 5731 | // Windows |
---|
5612 | 5732 | assert(split.length == 4); |
---|
5613 | 5733 | |
---|
5614 | | - return split[2] + ":" + split[3]; |
---|
| 5734 | + return fullname.bump = split[2] + ":" + split[3]; |
---|
5615 | 5735 | } |
---|
5616 | 5736 | |
---|
5617 | 5737 | String GetPigmentTexture() |
---|
.. | .. |
---|
5694 | 5814 | texname = ""; |
---|
5695 | 5815 | |
---|
5696 | 5816 | GetTextures().name = texname + ":" + GetBump(GetTextures()); |
---|
| 5817 | + |
---|
| 5818 | + GetTextures().pigment = null; |
---|
| 5819 | + |
---|
5697 | 5820 | Touch(); |
---|
5698 | 5821 | } |
---|
5699 | 5822 | |
---|
.. | .. |
---|
5766 | 5889 | texname = ""; |
---|
5767 | 5890 | |
---|
5768 | 5891 | GetTextures().name = Object3D.GetPigment(GetTextures()) + ":" + texname; |
---|
| 5892 | + |
---|
| 5893 | + GetTextures().bump = null; |
---|
5769 | 5894 | |
---|
5770 | 5895 | Touch(); |
---|
5771 | 5896 | } |
---|
.. | .. |
---|
5909 | 6034 | if (support != null) |
---|
5910 | 6035 | support = support; |
---|
5911 | 6036 | |
---|
5912 | | - //boolean usecalllists = IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null || !link2master); // !(this instanceof cSpring) && !(this instanceof BezierPatch); |
---|
5913 | | - boolean usecalllists = false; //!IsLive(); // IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null) && !link2master; // !(this instanceof cSpring) && !(this instanceof BezierPatch); |
---|
| 6037 | + boolean usecalllists = !IsLive() && IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null || !link2master); // !(this instanceof cSpring) && !(this instanceof BezierPatch); |
---|
| 6038 | + //boolean usecalllists = false; //!IsLive(); // IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null) && !link2master; // !(this instanceof cSpring) && !(this instanceof BezierPatch); |
---|
| 6039 | + |
---|
| 6040 | + //usecalllists &= display.DrawMode() == display.DEFAULT; // Don't compute list in shadow pass. |
---|
5914 | 6041 | |
---|
5915 | 6042 | if (!usecalllists && bRep != null && bRep.displaylist > 0) |
---|
5916 | 6043 | { |
---|
.. | .. |
---|
5920 | 6047 | // usecalllists &= !(parent instanceof RandomNode); |
---|
5921 | 6048 | // usecalllists = false; |
---|
5922 | 6049 | |
---|
5923 | | - if (GetBRep() != null) |
---|
5924 | | - usecalllists = usecalllists; |
---|
| 6050 | + if (display.DrawMode() == display.SHADOW) |
---|
| 6051 | + //GetBRep() != null) |
---|
| 6052 | + usecalllists = !!usecalllists; |
---|
5925 | 6053 | //System.out.println("draw " + this); |
---|
5926 | 6054 | //new Exception().printStackTrace(); |
---|
5927 | 6055 | |
---|
.. | .. |
---|
5943 | 6071 | if (!(this instanceof Composite)) |
---|
5944 | 6072 | touched = false; |
---|
5945 | 6073 | //if (displaylist == -1 && usecalllists) |
---|
5946 | | - if ((bRep != null && bRep.displaylist <= 0) && usecalllists) // june 2013 |
---|
| 6074 | + if (bRep.displaylist <= 0 && usecalllists) // && display.DrawMode() == display.DEFAULT) // june 2013 |
---|
5947 | 6075 | { |
---|
5948 | 6076 | bRep.displaylist = display.GenList(); |
---|
5949 | 6077 | assert(bRep.displaylist != 0); |
---|
.. | .. |
---|
5954 | 6082 | |
---|
5955 | 6083 | //System.out.println("\tnew list " + list); |
---|
5956 | 6084 | //gl.glDrawBuffer(gl.GL_NONE); |
---|
5957 | | - if (usecalllists) |
---|
| 6085 | + if (usecalllists && bRep.displaylist > 0) |
---|
5958 | 6086 | { |
---|
5959 | 6087 | // System.err.println("new list " + bRep.displaylist + " for " + this); |
---|
5960 | 6088 | display.NewList(bRep.displaylist); |
---|
.. | .. |
---|
5963 | 6091 | CallList(display, root, selected, blocked); |
---|
5964 | 6092 | |
---|
5965 | 6093 | // compiled = true; |
---|
5966 | | - if (usecalllists) |
---|
| 6094 | + if (usecalllists && bRep.displaylist > 0) |
---|
5967 | 6095 | { |
---|
5968 | 6096 | // System.err.println("end list " + bRep.displaylist + " for " + this); |
---|
5969 | 6097 | display.EndList(); |
---|
.. | .. |
---|
7367 | 7495 | boundary.y = spot.y - 30; |
---|
7368 | 7496 | boundary.width = spot.width + 60; |
---|
7369 | 7497 | boundary.height = spot.height + 60; |
---|
7370 | | - clickInfo.g.setColor(Color.red); |
---|
| 7498 | + clickInfo.g.setColor(Color.white); |
---|
7371 | 7499 | int spotw = spot.x + spot.width; |
---|
7372 | 7500 | int spoth = spot.y + spot.height; |
---|
7373 | 7501 | clickInfo.g.fillRect(spot.x, spot.y, spot.width, spot.height); |
---|
.. | .. |
---|
7387 | 7515 | // { |
---|
7388 | 7516 | // CameraPane.Ymax = spoth; |
---|
7389 | 7517 | // } |
---|
7390 | | - spot.translate(32, 32); |
---|
| 7518 | +// if (CameraPane.Xmin > spot.x) |
---|
| 7519 | +// { |
---|
| 7520 | +// CameraPane.Xmin = spot.x; |
---|
| 7521 | +// } |
---|
| 7522 | +// if (CameraPane.Xmax < spotw) |
---|
| 7523 | +// { |
---|
| 7524 | +// CameraPane.Xmax = spotw; |
---|
| 7525 | +// } |
---|
| 7526 | +// if (CameraPane.Ymin > spot.y) |
---|
| 7527 | +// { |
---|
| 7528 | +// CameraPane.Ymin = spot.y; |
---|
| 7529 | +// } |
---|
| 7530 | +// if (CameraPane.Ymax < spoth) |
---|
| 7531 | +// { |
---|
| 7532 | +// CameraPane.Ymax = spoth; |
---|
| 7533 | +// } |
---|
| 7534 | + // bonhommes info.g.drawLine(spotw, spoth, spotw, spoth - boundary.height/2); // 15 |
---|
| 7535 | + //info.g.drawLine(spotw, spoth, spotw - boundary.width/2, spoth); // 15 |
---|
| 7536 | + spot.translate(32, 0); |
---|
| 7537 | + clickInfo.g.setColor(Color.yellow); |
---|
| 7538 | + clickInfo.g.fillRect(spot.x, spot.y, spot.width, spot.height); |
---|
| 7539 | + |
---|
| 7540 | + spot.translate(32, 64); |
---|
7391 | 7541 | spotw = spot.x + spot.width; |
---|
7392 | 7542 | spoth = spot.y + spot.height; |
---|
7393 | 7543 | clickInfo.g.setColor(Color.cyan); |
---|
.. | .. |
---|
7408 | 7558 | // { |
---|
7409 | 7559 | // CameraPane.Ymax = spoth; |
---|
7410 | 7560 | // } |
---|
7411 | | - // bonhommes info.g.drawLine(spotw, spoth, spotw, spoth - boundary.height/2); // 15 |
---|
7412 | | - //info.g.drawLine(spotw, spoth, spotw - boundary.width/2, spoth); // 15 |
---|
7413 | | - spot.translate(0, -32); |
---|
7414 | | - clickInfo.g.setColor(Color.yellow); |
---|
7415 | | - clickInfo.g.fillRect(spot.x, spot.y, spot.width, spot.height); |
---|
7416 | 7561 | clickInfo.g.setColor(Color.green); |
---|
7417 | | -// if (CameraPane.Xmin > spot.x) |
---|
7418 | | -// { |
---|
7419 | | -// CameraPane.Xmin = spot.x; |
---|
7420 | | -// } |
---|
7421 | | -// if (CameraPane.Xmax < spotw) |
---|
7422 | | -// { |
---|
7423 | | -// CameraPane.Xmax = spotw; |
---|
7424 | | -// } |
---|
7425 | | -// if (CameraPane.Ymin > spot.y) |
---|
7426 | | -// { |
---|
7427 | | -// CameraPane.Ymin = spot.y; |
---|
7428 | | -// } |
---|
7429 | | -// if (CameraPane.Ymax < spoth) |
---|
7430 | | -// { |
---|
7431 | | -// CameraPane.Ymax = spoth; |
---|
7432 | | -// } |
---|
7433 | 7562 | clickInfo.g.drawArc(boundary.x + clickInfo.DX, boundary.y + clickInfo.DY, |
---|
7434 | 7563 | (int)(boundary.width * clickInfo.W), (int)(boundary.height * clickInfo.W), 0, 360); |
---|
7435 | 7564 | //info.g.drawArc(spot.x, spotw, spot.width/2, boundary.height/2, 0, 360); |
---|
.. | .. |
---|
7488 | 7617 | retval = true; |
---|
7489 | 7618 | } |
---|
7490 | 7619 | spot.translate(0, 32); |
---|
| 7620 | + spot.translate(32, 0); |
---|
| 7621 | + spot.translate(0, 32); |
---|
7491 | 7622 | if (spot.contains(clickInfo.x, clickInfo.y)) |
---|
7492 | 7623 | { |
---|
7493 | 7624 | hitSomething = hitScale; |
---|
7494 | 7625 | |
---|
7495 | 7626 | double scale = 0.005f * clickInfo.camera.Distance(); |
---|
7496 | | - double hScale = (double) (clickInfo.x - centerPt.x) / 32; |
---|
| 7627 | + double hScale = (double) (clickInfo.x - centerPt.x) / 64; |
---|
7497 | 7628 | double sign = 1; |
---|
7498 | 7629 | if (hScale < 0) |
---|
7499 | 7630 | { |
---|
.. | .. |
---|
7505 | 7636 | //hScale = 0.01; |
---|
7506 | 7637 | } |
---|
7507 | 7638 | |
---|
7508 | | - double vScale = (double) (clickInfo.y - centerPt.y) / 32; |
---|
| 7639 | + double vScale = (double) (clickInfo.y - centerPt.y) / 64; |
---|
7509 | 7640 | sign = 1; |
---|
7510 | 7641 | if (vScale < 0) |
---|
7511 | 7642 | { |
---|
.. | .. |
---|
7720 | 7851 | break; |
---|
7721 | 7852 | |
---|
7722 | 7853 | case hitScale: // scale |
---|
7723 | | - double hScale = (double) (clickInfo.x - centerPt.x) / 32; |
---|
| 7854 | + double hScale = (double) (clickInfo.x - centerPt.x) / 64; |
---|
7724 | 7855 | double sign = 1; |
---|
7725 | 7856 | if (hScale < 0) |
---|
7726 | 7857 | { |
---|
.. | .. |
---|
7732 | 7863 | //hScale = 0.01; |
---|
7733 | 7864 | } |
---|
7734 | 7865 | |
---|
7735 | | - double vScale = (double) (clickInfo.y - centerPt.y) / 32; |
---|
| 7866 | + double vScale = (double) (clickInfo.y - centerPt.y) / 64; |
---|
7736 | 7867 | sign = 1; |
---|
7737 | 7868 | if (vScale < 0) |
---|
7738 | 7869 | { |
---|
.. | .. |
---|
7765 | 7896 | case 3: // '\001' |
---|
7766 | 7897 | if (modified || opposite) |
---|
7767 | 7898 | { |
---|
| 7899 | + if (modified && opposite) |
---|
| 7900 | + LA.matScale(toParent, totalScale, totalScale, totalScale); |
---|
| 7901 | + else |
---|
7768 | 7902 | //LA.matScale(toParent, 1, hScale, vScale); |
---|
7769 | | - LA.matScale(toParent, totalScale, 1, 1); |
---|
| 7903 | + LA.matScale(toParent, totalScale, 1, 1); |
---|
7770 | 7904 | } // vScale, 1); |
---|
7771 | 7905 | else |
---|
7772 | 7906 | { |
---|
7773 | 7907 | // EXCEPTION! |
---|
7774 | | - LA.matScale(toParent, totalScale, totalScale, totalScale); |
---|
| 7908 | + LA.matScale(toParent, 1, totalScale, totalScale); |
---|
7775 | 7909 | } // vScale, 1); |
---|
7776 | 7910 | break; |
---|
7777 | 7911 | |
---|
7778 | 7912 | case 2: // '\002' |
---|
7779 | 7913 | if (modified || opposite) |
---|
7780 | 7914 | { |
---|
7781 | | - //LA.matScale(toParent, hScale, 1, vScale); |
---|
7782 | | - LA.matScale(toParent, 1, totalScale, 1); |
---|
| 7915 | + if (modified && opposite) |
---|
| 7916 | + LA.matScale(toParent, totalScale, totalScale, totalScale); |
---|
| 7917 | + else |
---|
| 7918 | + //LA.matScale(toParent, hScale, 1, vScale); |
---|
| 7919 | + LA.matScale(toParent, 1, totalScale, 1); |
---|
7783 | 7920 | } else |
---|
7784 | 7921 | { |
---|
7785 | 7922 | LA.matScale(toParent, totalScale, 1, totalScale); |
---|
.. | .. |
---|
7789 | 7926 | case 1: // '\003' |
---|
7790 | 7927 | if (modified || opposite) |
---|
7791 | 7928 | { |
---|
7792 | | - //LA.matScale(toParent, hScale, vScale, 1); |
---|
7793 | | - LA.matScale(toParent, 1, 1, totalScale); |
---|
| 7929 | + if (modified && opposite) |
---|
| 7930 | + LA.matScale(toParent, totalScale, totalScale, totalScale); |
---|
| 7931 | + else |
---|
| 7932 | + //LA.matScale(toParent, hScale, vScale, 1); |
---|
| 7933 | + LA.matScale(toParent, 1, 1, totalScale); |
---|
7794 | 7934 | } else |
---|
7795 | 7935 | { |
---|
7796 | 7936 | LA.matScale(toParent, totalScale, totalScale, 1); |
---|