.. | .. |
---|
7693 | 7693 | |
---|
7694 | 7694 | if (renderCamera != lightCamera) |
---|
7695 | 7695 | for (int count = parentcam.GetTransformCount(); --count>=0;) |
---|
7696 | | - LA.matConcat(parentcam.toParent, matrix, matrix); |
---|
| 7696 | + LA.matConcat(matrix, parentcam.toParent, matrix); |
---|
7697 | 7697 | |
---|
7698 | 7698 | // LA.matConcat(renderCamera.toScreen, renderCamera.toParent, matrix); |
---|
7699 | 7699 | |
---|
.. | .. |
---|
7709 | 7709 | |
---|
7710 | 7710 | if (renderCamera != lightCamera) |
---|
7711 | 7711 | for (int count = parentcam.GetTransformCount(); --count>=0;) |
---|
7712 | | - LA.matConcat(matrix, parentcam.fromParent, matrix); |
---|
| 7712 | + LA.matConcat(parentcam.fromParent, matrix, matrix); |
---|
7713 | 7713 | |
---|
7714 | 7714 | // LA.matConcat(renderCamera.fromParent, renderCamera.fromScreen, matrix); |
---|
7715 | 7715 | |
---|
.. | .. |
---|
8915 | 8915 | // if (parentcam != renderCamera) // not a light |
---|
8916 | 8916 | if (cam != lightCamera) |
---|
8917 | 8917 | for (int count = parentcam.GetTransformCount(); --count>=0;) |
---|
8918 | | - LA.matConcat(parentcam.toParent, matrix, matrix); |
---|
| 8918 | + LA.matConcat(matrix, parentcam.toParent, matrix); |
---|
8919 | 8919 | |
---|
8920 | 8920 | for (int j = 0; j < 4; j++) |
---|
8921 | 8921 | { |
---|
.. | .. |
---|
8930 | 8930 | // if (parentcam != renderCamera) // not a light |
---|
8931 | 8931 | if (cam != lightCamera) |
---|
8932 | 8932 | for (int count = parentcam.GetTransformCount(); --count>=0;) |
---|
8933 | | - LA.matConcat(matrix, parentcam.fromParent, matrix); |
---|
| 8933 | + LA.matConcat(parentcam.fromParent, matrix, matrix); |
---|
8934 | 8934 | |
---|
8935 | 8935 | //LA.matConcat(cam.fromScreen, parentcam.fromParent, matrix); |
---|
8936 | 8936 | |
---|
.. | .. |
---|
9754 | 9754 | selectedpoint.radius = radius; |
---|
9755 | 9755 | selectedpoint.recalculate(); |
---|
9756 | 9756 | selectedpoint.material = new cMaterial(); |
---|
9757 | | - selectedpoint.material.color = 0.25f; |
---|
| 9757 | + selectedpoint.material.color = 0.15f; |
---|
9758 | 9758 | selectedpoint.material.modulation = 0.75f; |
---|
9759 | 9759 | |
---|
9760 | 9760 | debugpoint.radius = radius; |
---|
.. | .. |
---|
12854 | 12854 | { |
---|
12855 | 12855 | mouseMode |= ZOOM; |
---|
12856 | 12856 | } |
---|
12857 | | - if ((modifiers & META) == META) |
---|
| 12857 | + |
---|
| 12858 | + boolean capsLocked = Toolkit.getDefaultToolkit().getLockingKeyState(KeyEvent.VK_CAPS_LOCK); |
---|
| 12859 | + if (capsLocked || (modifiers & META) == META) |
---|
12858 | 12860 | { |
---|
12859 | 12861 | mouseMode |= VR; // BACKFORTH; |
---|
12860 | 12862 | } |
---|
.. | .. |
---|
12868 | 12870 | } |
---|
12869 | 12871 | if ((modifiers & SHIFT) == SHIFT || forcetranslate) |
---|
12870 | 12872 | { |
---|
| 12873 | + mouseMode &= ~VR; |
---|
12871 | 12874 | mouseMode |= TRANSLATE; |
---|
12872 | 12875 | } |
---|
12873 | 12876 | // if ((modifiers & SHIFT_META) == SHIFT_META) |
---|
.. | .. |
---|
13257 | 13260 | FlipTransform(); |
---|
13258 | 13261 | break; |
---|
13259 | 13262 | case ENTER: |
---|
13260 | | - object.editWindow.ScreenFit(); // Edit(); |
---|
| 13263 | + // object.editWindow.ScreenFit(); // Edit(); |
---|
| 13264 | + ToggleLive(); |
---|
13261 | 13265 | break; |
---|
13262 | 13266 | case DELETE: |
---|
13263 | 13267 | ClearSelection(); |
---|
.. | .. |
---|
14718 | 14722 | // System.err.println("view = " + view[8] + " " + view[9] + " " + view[10] + " " + view[11]); |
---|
14719 | 14723 | // System.err.println("view = " + view[12] + " " + view[13] + " " + view[14] + " " + view[15]); |
---|
14720 | 14724 | |
---|
| 14725 | + // Will fit the mesh !!! |
---|
| 14726 | + selectedpoint.toParent[0][0] = 0.0001; |
---|
| 14727 | + selectedpoint.toParent[1][1] = 0.0001; |
---|
| 14728 | + selectedpoint.toParent[2][2] = 0.0001; |
---|
| 14729 | + |
---|
14721 | 14730 | glu.gluUnProject(x,y,depth,view,0,tempmat2,0,viewport,0,selectedpoint.toParent[3],0); |
---|
14722 | 14731 | |
---|
14723 | 14732 | // if (object.selection != null && object.selection.Size() > 0) |
---|
.. | .. |
---|
15340 | 15349 | int AAbuffersize = 0; |
---|
15341 | 15350 | |
---|
15342 | 15351 | //double[] selectedpoint = new double[3]; |
---|
15343 | | - static Sphere selectedpoint = new Sphere(); |
---|
| 15352 | + static Superellipsoid selectedpoint = new Superellipsoid(); |
---|
15344 | 15353 | static Sphere previousselectedpoint = null; |
---|
15345 | 15354 | static Sphere debugpoint = new Sphere(); |
---|
15346 | 15355 | static Sphere debugpoint2 = new Sphere(); |
---|