.. | .. |
---|
29 | 29 | Object3D saveskeleton; |
---|
30 | 30 | // |
---|
31 | 31 | |
---|
| 32 | + String skyboxname; |
---|
| 33 | + String skyboxext; |
---|
| 34 | + |
---|
32 | 35 | byte[] versions[]; |
---|
33 | 36 | int versionindex = -1; |
---|
34 | 37 | |
---|
.. | .. |
---|
2567 | 2570 | private static final int editSelf = 1; |
---|
2568 | 2571 | private static final int editChild = 2; |
---|
2569 | 2572 | |
---|
2570 | | - void drawEditHandles(ClickInfo info, int level) |
---|
| 2573 | + void drawEditHandles(//ClickInfo info, |
---|
| 2574 | + int level) |
---|
2571 | 2575 | { |
---|
2572 | 2576 | if (level == 0) |
---|
2573 | 2577 | { |
---|
.. | .. |
---|
2575 | 2579 | return; |
---|
2576 | 2580 | |
---|
2577 | 2581 | Object3D selectee; |
---|
2578 | | - for (java.util.Enumeration e = selection.elements(); e.hasMoreElements(); selectee.drawEditHandles(info, level + 1)) |
---|
| 2582 | + for (java.util.Enumeration e = selection.elements(); e.hasMoreElements(); selectee.drawEditHandles(//info, |
---|
| 2583 | + level + 1)) |
---|
2579 | 2584 | { |
---|
2580 | 2585 | selectee = (Object3D) e.nextElement(); |
---|
2581 | 2586 | } |
---|
.. | .. |
---|
2583 | 2588 | } else |
---|
2584 | 2589 | { |
---|
2585 | 2590 | //super. |
---|
2586 | | - drawEditHandles0(info, level + 1); |
---|
| 2591 | + drawEditHandles0(//info, |
---|
| 2592 | + level + 1); |
---|
2587 | 2593 | } |
---|
2588 | 2594 | } |
---|
2589 | 2595 | |
---|
2590 | | - boolean doEditClick(ClickInfo info, int level) |
---|
| 2596 | + boolean doEditClick(//ClickInfo info, |
---|
| 2597 | + int level) |
---|
2591 | 2598 | { |
---|
2592 | 2599 | doSomething = 0; |
---|
2593 | 2600 | if (level == 0) |
---|
2594 | 2601 | { |
---|
2595 | | - return doParentClick(info); |
---|
| 2602 | + return doParentClick(); //info); |
---|
2596 | 2603 | } |
---|
2597 | 2604 | if (//super. |
---|
2598 | | - doEditClick0(info, level)) |
---|
| 2605 | + doEditClick0(//info, |
---|
| 2606 | + level)) |
---|
2599 | 2607 | { |
---|
2600 | 2608 | doSomething = 1; |
---|
2601 | 2609 | return true; |
---|
.. | .. |
---|
2605 | 2613 | } |
---|
2606 | 2614 | } |
---|
2607 | 2615 | |
---|
2608 | | - boolean doParentClick(ClickInfo info) |
---|
| 2616 | + boolean doParentClick() //ClickInfo info) |
---|
2609 | 2617 | { |
---|
2610 | 2618 | if (selection == null) |
---|
2611 | 2619 | { |
---|
.. | .. |
---|
2618 | 2626 | for (java.util.Enumeration e = selection.elements(); e.hasMoreElements();) |
---|
2619 | 2627 | { |
---|
2620 | 2628 | Object3D selectee = (Object3D) e.nextElement(); |
---|
2621 | | - if (selectee.doEditClick(info, 1)) |
---|
| 2629 | + if (selectee.doEditClick(//info, |
---|
| 2630 | + 1)) |
---|
2622 | 2631 | { |
---|
2623 | 2632 | childToDrag = selectee; |
---|
2624 | 2633 | doSomething = 2; |
---|
.. | .. |
---|
2630 | 2639 | return retval; |
---|
2631 | 2640 | } |
---|
2632 | 2641 | |
---|
2633 | | - void doEditDrag(ClickInfo info, boolean opposite) |
---|
| 2642 | + void doEditDrag(//ClickInfo clickInfo, |
---|
| 2643 | + boolean opposite) |
---|
2634 | 2644 | { |
---|
2635 | 2645 | switch (doSomething) |
---|
2636 | 2646 | { |
---|
2637 | 2647 | case 1: // '\001' |
---|
2638 | 2648 | //super. |
---|
2639 | | - doEditDrag0(info, opposite); |
---|
| 2649 | + doEditDrag0(//clickInfo, |
---|
| 2650 | + opposite); |
---|
2640 | 2651 | break; |
---|
2641 | 2652 | |
---|
2642 | 2653 | case 2: // '\002' |
---|
.. | .. |
---|
2649 | 2660 | { |
---|
2650 | 2661 | //sel.hitSomething = childToDrag.hitSomething; |
---|
2651 | 2662 | //childToDrag.doEditDrag(info); |
---|
2652 | | - sel.doEditDrag(info, opposite); |
---|
| 2663 | + sel.doEditDrag(//clickInfo, |
---|
| 2664 | + opposite); |
---|
2653 | 2665 | } else |
---|
2654 | 2666 | { |
---|
2655 | 2667 | //super. |
---|
2656 | | - doEditDrag0(info, opposite); |
---|
| 2668 | + doEditDrag0(//clickInfo, |
---|
| 2669 | + opposite); |
---|
2657 | 2670 | } |
---|
2658 | 2671 | } |
---|
2659 | 2672 | break; |
---|
.. | .. |
---|
2671 | 2684 | { |
---|
2672 | 2685 | deselectAll(); |
---|
2673 | 2686 | } |
---|
| 2687 | + |
---|
| 2688 | + new Exception().printStackTrace(); |
---|
| 2689 | + |
---|
2674 | 2690 | ClickInfo newInfo = new ClickInfo(); |
---|
2675 | 2691 | newInfo.flags = info.flags; |
---|
2676 | 2692 | newInfo.bounds = info.bounds; |
---|
.. | .. |
---|
5894 | 5910 | support = support; |
---|
5895 | 5911 | |
---|
5896 | 5912 | //boolean usecalllists = IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null || !link2master); // !(this instanceof cSpring) && !(this instanceof BezierPatch); |
---|
5897 | | - boolean usecalllists = !IsLive(); // 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); |
---|
5898 | 5914 | |
---|
5899 | 5915 | if (!usecalllists && bRep != null && bRep.displaylist > 0) |
---|
5900 | 5916 | { |
---|
.. | .. |
---|
7298 | 7314 | } |
---|
7299 | 7315 | } |
---|
7300 | 7316 | |
---|
7301 | | - protected void calcHotSpot(cVector in, ClickInfo info, Point outPt, Rectangle outRec) |
---|
| 7317 | + static ClickInfo clickInfo = new ClickInfo(); |
---|
| 7318 | + |
---|
| 7319 | + protected void calcHotSpot(cVector in, //ClickInfo clickInfo, |
---|
| 7320 | + Point outPt, Rectangle outRec) |
---|
7302 | 7321 | { |
---|
7303 | | - int hc = info.bounds.x + info.bounds.width / 2; |
---|
7304 | | - int vc = info.bounds.y + info.bounds.height / 2; |
---|
7305 | | - double[][] toscreen = info.toScreen; |
---|
| 7322 | + int hc = clickInfo.bounds.x + clickInfo.bounds.width / 2; |
---|
| 7323 | + int vc = clickInfo.bounds.y + clickInfo.bounds.height / 2; |
---|
| 7324 | + double[][] toscreen = clickInfo.toScreen; |
---|
7306 | 7325 | if (toscreen == null) |
---|
7307 | 7326 | { |
---|
7308 | | - toscreen = new Camera(info.camera.viewCode).toScreen; |
---|
| 7327 | + toscreen = new Camera(clickInfo.camera.viewCode).toScreen; |
---|
7309 | 7328 | } |
---|
7310 | 7329 | cVector vec = in; |
---|
7311 | 7330 | LA.xformPos(in, toscreen, in); |
---|
7312 | 7331 | //System.out.println("Distance = " + info.camera.Distance()); |
---|
7313 | | - vec.x *= 100 * info.camera.SCALE / info.camera.Distance(); |
---|
7314 | | - vec.y *= 100 * info.camera.SCALE / info.camera.Distance(); |
---|
| 7332 | + vec.x *= 100 * clickInfo.camera.SCALE / clickInfo.camera.Distance(); |
---|
| 7333 | + vec.y *= 100 * clickInfo.camera.SCALE / clickInfo.camera.Distance(); |
---|
7315 | 7334 | outPt.x = hc + (int) vec.x; |
---|
7316 | 7335 | outPt.y = vc - (int) vec.y; |
---|
7317 | 7336 | outRec.x = outPt.x - 3; |
---|
.. | .. |
---|
7319 | 7338 | outRec.width = outRec.height = 6; |
---|
7320 | 7339 | } |
---|
7321 | 7340 | |
---|
7322 | | - protected Rectangle calcHotSpot(cVector in, ClickInfo info) |
---|
| 7341 | + protected Rectangle calcHotSpot(cVector in//, ClickInfo clickInfo |
---|
| 7342 | + ) |
---|
7323 | 7343 | { |
---|
7324 | 7344 | Point pt = new Point(0, 0); |
---|
7325 | 7345 | Rectangle rec = new Rectangle(); |
---|
7326 | | - calcHotSpot(in, info, pt, rec); |
---|
| 7346 | + calcHotSpot(in, //clickInfo, |
---|
| 7347 | + pt, rec); |
---|
7327 | 7348 | return rec; |
---|
7328 | 7349 | } |
---|
7329 | 7350 | |
---|
7330 | | - void drawEditHandles0(ClickInfo info, int level) |
---|
| 7351 | + void drawEditHandles0(//ClickInfo clickInfo, |
---|
| 7352 | + int level) |
---|
7331 | 7353 | { |
---|
7332 | 7354 | if (level == 0) |
---|
7333 | 7355 | { |
---|
.. | .. |
---|
7336 | 7358 | { |
---|
7337 | 7359 | cVector origin = new cVector(); |
---|
7338 | 7360 | //LA.xformPos(origin, toParent, origin); |
---|
7339 | | - Rectangle spot = calcHotSpot(origin, info); |
---|
| 7361 | + if (this.clickInfo == null) |
---|
| 7362 | + this.clickInfo = new ClickInfo(); |
---|
| 7363 | + |
---|
| 7364 | + Rectangle spot = calcHotSpot(origin); //, clickInfo); |
---|
7340 | 7365 | Rectangle boundary = new Rectangle(); |
---|
7341 | 7366 | boundary.x = spot.x - 30; |
---|
7342 | 7367 | boundary.y = spot.y - 30; |
---|
7343 | 7368 | boundary.width = spot.width + 60; |
---|
7344 | 7369 | boundary.height = spot.height + 60; |
---|
7345 | | - info.g.setColor(Color.red); |
---|
| 7370 | + clickInfo.g.setColor(Color.red); |
---|
7346 | 7371 | int spotw = spot.x + spot.width; |
---|
7347 | 7372 | int spoth = spot.y + spot.height; |
---|
7348 | | - info.g.fillRect(spot.x, spot.y, spot.width, spot.height); |
---|
| 7373 | + clickInfo.g.fillRect(spot.x, spot.y, spot.width, spot.height); |
---|
7349 | 7374 | // if (CameraPane.Xmin > spot.x) |
---|
7350 | 7375 | // { |
---|
7351 | 7376 | // CameraPane.Xmin = spot.x; |
---|
.. | .. |
---|
7365 | 7390 | spot.translate(32, 32); |
---|
7366 | 7391 | spotw = spot.x + spot.width; |
---|
7367 | 7392 | spoth = spot.y + spot.height; |
---|
7368 | | - info.g.setColor(Color.cyan); |
---|
7369 | | - info.g.fillRect(spot.x, spot.y, spot.width, spot.height); |
---|
| 7393 | + clickInfo.g.setColor(Color.cyan); |
---|
| 7394 | + clickInfo.g.fillRect(spot.x, spot.y, spot.width, spot.height); |
---|
7370 | 7395 | // if (CameraPane.Xmin > spot.x) |
---|
7371 | 7396 | // { |
---|
7372 | 7397 | // CameraPane.Xmin = spot.x; |
---|
.. | .. |
---|
7386 | 7411 | // bonhommes info.g.drawLine(spotw, spoth, spotw, spoth - boundary.height/2); // 15 |
---|
7387 | 7412 | //info.g.drawLine(spotw, spoth, spotw - boundary.width/2, spoth); // 15 |
---|
7388 | 7413 | spot.translate(0, -32); |
---|
7389 | | - info.g.setColor(Color.yellow); |
---|
7390 | | - info.g.fillRect(spot.x, spot.y, spot.width, spot.height); |
---|
7391 | | - info.g.setColor(Color.green); |
---|
| 7414 | + clickInfo.g.setColor(Color.yellow); |
---|
| 7415 | + clickInfo.g.fillRect(spot.x, spot.y, spot.width, spot.height); |
---|
| 7416 | + clickInfo.g.setColor(Color.green); |
---|
7392 | 7417 | // if (CameraPane.Xmin > spot.x) |
---|
7393 | 7418 | // { |
---|
7394 | 7419 | // CameraPane.Xmin = spot.x; |
---|
.. | .. |
---|
7405 | 7430 | // { |
---|
7406 | 7431 | // CameraPane.Ymax = spoth; |
---|
7407 | 7432 | // } |
---|
7408 | | - info.g.drawArc(boundary.x + info.DX, boundary.y + info.DY, |
---|
7409 | | - (int)(boundary.width * info.W), (int)(boundary.height * info.W), 0, 360); |
---|
| 7433 | + clickInfo.g.drawArc(boundary.x + clickInfo.DX, boundary.y + clickInfo.DY, |
---|
| 7434 | + (int)(boundary.width * clickInfo.W), (int)(boundary.height * clickInfo.W), 0, 360); |
---|
7410 | 7435 | //info.g.drawArc(spot.x, spotw, spot.width/2, boundary.height/2, 0, 360); |
---|
7411 | 7436 | // if (CameraPane.Xmin > boundary.x) |
---|
7412 | 7437 | // { |
---|
.. | .. |
---|
7428 | 7453 | } |
---|
7429 | 7454 | } |
---|
7430 | 7455 | |
---|
7431 | | - boolean doEditClick0(ClickInfo info, int level) |
---|
| 7456 | + boolean doEditClick0(//ClickInfo clickInfo, |
---|
| 7457 | + int level) |
---|
7432 | 7458 | { |
---|
7433 | 7459 | if (level == 0) |
---|
7434 | 7460 | { |
---|
.. | .. |
---|
7437 | 7463 | |
---|
7438 | 7464 | boolean retval = false; |
---|
7439 | 7465 | |
---|
7440 | | - startX = info.x; |
---|
7441 | | - startY = info.y; |
---|
| 7466 | + startX = clickInfo.x; |
---|
| 7467 | + startY = clickInfo.y; |
---|
7442 | 7468 | |
---|
7443 | 7469 | hitSomething = -1; |
---|
7444 | 7470 | cVector origin = new cVector(); |
---|
.. | .. |
---|
7448 | 7474 | { |
---|
7449 | 7475 | centerPt = new Point(0, 0); |
---|
7450 | 7476 | } |
---|
7451 | | - calcHotSpot(origin, info, centerPt, spot); |
---|
7452 | | - if (spot.contains(info.x, info.y)) |
---|
| 7477 | + calcHotSpot(origin, //info, |
---|
| 7478 | + centerPt, spot); |
---|
| 7479 | + if (spot.contains(clickInfo.x, clickInfo.y)) |
---|
7453 | 7480 | { |
---|
7454 | 7481 | hitSomething = hitCenter; |
---|
7455 | 7482 | retval = true; |
---|
7456 | 7483 | } |
---|
7457 | 7484 | spot.translate(32, 0); |
---|
7458 | | - if (spot.contains(info.x, info.y)) |
---|
| 7485 | + if (spot.contains(clickInfo.x, clickInfo.y)) |
---|
7459 | 7486 | { |
---|
7460 | 7487 | hitSomething = hitRotate; |
---|
7461 | 7488 | retval = true; |
---|
7462 | 7489 | } |
---|
7463 | 7490 | spot.translate(0, 32); |
---|
7464 | | - if (spot.contains(info.x, info.y)) |
---|
| 7491 | + if (spot.contains(clickInfo.x, clickInfo.y)) |
---|
7465 | 7492 | { |
---|
7466 | 7493 | hitSomething = hitScale; |
---|
| 7494 | + |
---|
| 7495 | + double scale = 0.005f * clickInfo.camera.Distance(); |
---|
| 7496 | + double hScale = (double) (clickInfo.x - centerPt.x) / 32; |
---|
| 7497 | + double sign = 1; |
---|
| 7498 | + if (hScale < 0) |
---|
| 7499 | + { |
---|
| 7500 | + sign = -1; |
---|
| 7501 | + } |
---|
| 7502 | + hScale = sign*Math.pow(sign*hScale, scale * 50); |
---|
| 7503 | + if (hScale < 0.01) |
---|
| 7504 | + { |
---|
| 7505 | + //hScale = 0.01; |
---|
| 7506 | + } |
---|
| 7507 | + |
---|
| 7508 | + double vScale = (double) (clickInfo.y - centerPt.y) / 32; |
---|
| 7509 | + sign = 1; |
---|
| 7510 | + if (vScale < 0) |
---|
| 7511 | + { |
---|
| 7512 | + sign = -1; |
---|
| 7513 | + } |
---|
| 7514 | + vScale = sign*Math.pow(sign*vScale, scale * 50); |
---|
| 7515 | + if (vScale < 0.01) |
---|
| 7516 | + { |
---|
| 7517 | + //vScale = 0.01; |
---|
| 7518 | + } |
---|
| 7519 | + |
---|
| 7520 | + clickInfo.scale = Math.sqrt(hScale*hScale + vScale*vScale); |
---|
| 7521 | + |
---|
7467 | 7522 | retval = true; |
---|
7468 | 7523 | } |
---|
7469 | 7524 | |
---|
.. | .. |
---|
7473 | 7528 | } |
---|
7474 | 7529 | |
---|
7475 | 7530 | //System.out.println("info.modifiers = " + info.modifiers); |
---|
7476 | | - modified = (info.modifiers & CameraPane.SHIFT) != 0; // Was META |
---|
| 7531 | + modified = (clickInfo.modifiers & CameraPane.SHIFT) != 0; // Was META |
---|
7477 | 7532 | //System.out.println("modified = " + modified); |
---|
7478 | 7533 | //new Exception().printStackTrace(); |
---|
7479 | 7534 | //viewCode = info.pane.renderCamera.viewCode; |
---|
.. | .. |
---|
7501 | 7556 | return true; |
---|
7502 | 7557 | } |
---|
7503 | 7558 | |
---|
7504 | | - void doEditDrag0(ClickInfo info, boolean opposite) |
---|
| 7559 | + void doEditDrag0(//ClickInfo info, |
---|
| 7560 | + boolean opposite) |
---|
7505 | 7561 | { |
---|
7506 | 7562 | if (hitSomething == 0) |
---|
7507 | 7563 | { |
---|
.. | .. |
---|
7515 | 7571 | |
---|
7516 | 7572 | //System.out.println("hitSomething = " + hitSomething); |
---|
7517 | 7573 | |
---|
7518 | | - double scale = 0.005f * info.camera.Distance(); |
---|
| 7574 | + double scale = 0.005f * clickInfo.camera.Distance(); |
---|
7519 | 7575 | |
---|
7520 | 7576 | cVector xlate = new cVector(); |
---|
7521 | 7577 | //cVector xlate2 = new cVector(); |
---|
.. | .. |
---|
7549 | 7605 | toParent[3][i] = xlate.get(i); |
---|
7550 | 7606 | LA.matInvert(toParent, fromParent); |
---|
7551 | 7607 | */ |
---|
7552 | | - cVector delta = LA.newVector(0, 0, startY - info.y); |
---|
7553 | | - LA.xformDir(delta, new Camera(info.camera.viewCode).fromScreen, delta); |
---|
| 7608 | + cVector delta = LA.newVector(0, 0, startY - clickInfo.y); |
---|
| 7609 | + LA.xformDir(delta, new Camera(clickInfo.camera.viewCode).fromScreen, delta); |
---|
7554 | 7610 | |
---|
7555 | 7611 | LA.matCopy(startMat, toParent); |
---|
7556 | 7612 | LA.matTranslate(toParent, delta.x * scale, delta.y * scale, delta.z * scale); |
---|
.. | .. |
---|
7559 | 7615 | } else |
---|
7560 | 7616 | { |
---|
7561 | 7617 | //LA.xformDir(delta, info.camera.fromScreen, delta); |
---|
7562 | | - cVector up = new cVector(info.camera.up); |
---|
| 7618 | + cVector up = new cVector(clickInfo.camera.up); |
---|
7563 | 7619 | cVector away = new cVector(); |
---|
7564 | 7620 | //cVector right2 = new cVector(); |
---|
7565 | 7621 | //LA.vecCross(up, cVector.Z, right); |
---|
.. | .. |
---|
7576 | 7632 | LA.xformDir(up, ClickInfo.matbuffer, up); |
---|
7577 | 7633 | // if (!CameraPane.LOCALTRANSFORM) |
---|
7578 | 7634 | LA.xformDir(up, Globals.theRenderer.RenderCamera().toScreen, up); |
---|
7579 | | - LA.xformDir(info.camera.away, ClickInfo.matbuffer, away); |
---|
| 7635 | + LA.xformDir(clickInfo.camera.away, ClickInfo.matbuffer, away); |
---|
7580 | 7636 | // if (!CameraPane.LOCALTRANSFORM) |
---|
7581 | 7637 | LA.xformDir(away, Globals.theRenderer.RenderCamera().toScreen, away); |
---|
7582 | 7638 | //LA.vecCross(up, cVector.Z, right2); |
---|
7583 | 7639 | |
---|
7584 | | - cVector delta = LA.newVector(info.x - startX, startY - info.y, 0); |
---|
| 7640 | + cVector delta = LA.newVector(clickInfo.x - startX, startY - clickInfo.y, 0); |
---|
7585 | 7641 | |
---|
7586 | 7642 | //System.out.println("DELTA0 = " + delta); |
---|
7587 | 7643 | //System.out.println("AWAY = " + info.camera.away); |
---|
7588 | 7644 | //System.out.println("UP = " + info.camera.up); |
---|
7589 | 7645 | if (away.z > 0) |
---|
7590 | 7646 | { |
---|
7591 | | - if (info.camera.up.x == 0) // LA.vecDot(right, right2)<0) |
---|
| 7647 | + if (clickInfo.camera.up.x == 0) // LA.vecDot(right, right2)<0) |
---|
7592 | 7648 | { |
---|
7593 | 7649 | delta.x = -delta.x; |
---|
7594 | 7650 | } else |
---|
.. | .. |
---|
7603 | 7659 | //System.out.println("DELTA1 = " + delta); |
---|
7604 | 7660 | LA.xformDir(delta, ClickInfo.matbuffer, delta); |
---|
7605 | 7661 | //System.out.println("DELTA2 = " + delta); |
---|
7606 | | - LA.xformDir(delta, new Camera(info.camera.viewCode).fromScreen, delta); |
---|
| 7662 | + LA.xformDir(delta, new Camera(clickInfo.camera.viewCode).fromScreen, delta); |
---|
7607 | 7663 | LA.matCopy(startMat, toParent); |
---|
7608 | 7664 | //System.out.println("DELTA3 = " + delta); |
---|
7609 | 7665 | LA.matTranslate(toParent, delta.x * scale, delta.y * scale, delta.z * scale); |
---|
.. | .. |
---|
7613 | 7669 | break; |
---|
7614 | 7670 | |
---|
7615 | 7671 | case hitRotate: // rotate |
---|
7616 | | - int dx = info.x - centerPt.x; |
---|
7617 | | - int dy = -(info.y - centerPt.y); |
---|
| 7672 | + int dx = clickInfo.x - centerPt.x; |
---|
| 7673 | + int dy = -(clickInfo.y - centerPt.y); |
---|
7618 | 7674 | double angle = (double) Math.atan2(dx, dy); |
---|
7619 | 7675 | angle = -(1.570796 - angle); |
---|
7620 | 7676 | |
---|
.. | .. |
---|
7637 | 7693 | } |
---|
7638 | 7694 | /**/ |
---|
7639 | 7695 | |
---|
7640 | | - switch (info.pane.RenderCamera().viewCode) |
---|
| 7696 | + switch (clickInfo.pane.RenderCamera().viewCode) |
---|
7641 | 7697 | { |
---|
7642 | 7698 | case 1: // '\001' |
---|
7643 | 7699 | LA.matZRotate(toParent, angle); |
---|
.. | .. |
---|
7664 | 7720 | break; |
---|
7665 | 7721 | |
---|
7666 | 7722 | case hitScale: // scale |
---|
7667 | | - double hScale = (double) (info.x - centerPt.x) / 32; |
---|
| 7723 | + double hScale = (double) (clickInfo.x - centerPt.x) / 32; |
---|
7668 | 7724 | double sign = 1; |
---|
7669 | 7725 | if (hScale < 0) |
---|
7670 | 7726 | { |
---|
.. | .. |
---|
7676 | 7732 | //hScale = 0.01; |
---|
7677 | 7733 | } |
---|
7678 | 7734 | |
---|
7679 | | - double vScale = (double) (info.y - centerPt.y) / 32; |
---|
| 7735 | + double vScale = (double) (clickInfo.y - centerPt.y) / 32; |
---|
7680 | 7736 | sign = 1; |
---|
7681 | 7737 | if (vScale < 0) |
---|
7682 | 7738 | { |
---|
.. | .. |
---|
7687 | 7743 | { |
---|
7688 | 7744 | //vScale = 0.01; |
---|
7689 | 7745 | } |
---|
| 7746 | + |
---|
7690 | 7747 | LA.matCopy(startMat, toParent); |
---|
7691 | 7748 | /**/ |
---|
7692 | 7749 | for (int i = 0; i < 3; i++) |
---|
.. | .. |
---|
7696 | 7753 | } |
---|
7697 | 7754 | /**/ |
---|
7698 | 7755 | |
---|
7699 | | - double totalScale = Math.sqrt(hScale*hScale + vScale*vScale) / Math.sqrt(2); |
---|
| 7756 | + double totalScale = Math.sqrt(hScale*hScale + vScale*vScale) / clickInfo.scale; |
---|
7700 | 7757 | |
---|
7701 | 7758 | if (totalScale < 0.01) |
---|
7702 | 7759 | { |
---|
7703 | 7760 | totalScale = 0.01; |
---|
7704 | 7761 | } |
---|
7705 | 7762 | |
---|
7706 | | - switch (info.pane.RenderCamera().viewCode) |
---|
| 7763 | + switch (clickInfo.pane.RenderCamera().viewCode) |
---|
7707 | 7764 | { |
---|
7708 | 7765 | case 3: // '\001' |
---|
7709 | 7766 | if (modified || opposite) |
---|
.. | .. |
---|
7770 | 7827 | } // NEW ... |
---|
7771 | 7828 | |
---|
7772 | 7829 | |
---|
7773 | | - info.pane.repaint(); |
---|
| 7830 | + clickInfo.pane.repaint(); |
---|
7774 | 7831 | } |
---|
7775 | 7832 | |
---|
7776 | 7833 | boolean overflow = false; |
---|