From bb87fae3b097ddd5c5039bf1ab48d3718b900b08 Mon Sep 17 00:00:00 2001 From: Normand Briere <nbriere@noware.ca> Date: Sun, 01 Jul 2018 17:00:29 -0400 Subject: [PATCH] Fix camera and hip height. --- CameraPane.java | 25 +++++++++++++++++-------- 1 files changed, 17 insertions(+), 8 deletions(-) diff --git a/CameraPane.java b/CameraPane.java index 8fe82ec..a1b29d7 100644 --- a/CameraPane.java +++ b/CameraPane.java @@ -7693,7 +7693,7 @@ if (renderCamera != lightCamera) for (int count = parentcam.GetTransformCount(); --count>=0;) - LA.matConcat(parentcam.toParent, matrix, matrix); + LA.matConcat(matrix, parentcam.toParent, matrix); // LA.matConcat(renderCamera.toScreen, renderCamera.toParent, matrix); @@ -7709,7 +7709,7 @@ if (renderCamera != lightCamera) for (int count = parentcam.GetTransformCount(); --count>=0;) - LA.matConcat(matrix, parentcam.fromParent, matrix); + LA.matConcat(parentcam.fromParent, matrix, matrix); // LA.matConcat(renderCamera.fromParent, renderCamera.fromScreen, matrix); @@ -8915,7 +8915,7 @@ // if (parentcam != renderCamera) // not a light if (cam != lightCamera) for (int count = parentcam.GetTransformCount(); --count>=0;) - LA.matConcat(parentcam.toParent, matrix, matrix); + LA.matConcat(matrix, parentcam.toParent, matrix); for (int j = 0; j < 4; j++) { @@ -8930,7 +8930,7 @@ // if (parentcam != renderCamera) // not a light if (cam != lightCamera) for (int count = parentcam.GetTransformCount(); --count>=0;) - LA.matConcat(matrix, parentcam.fromParent, matrix); + LA.matConcat(parentcam.fromParent, matrix, matrix); //LA.matConcat(cam.fromScreen, parentcam.fromParent, matrix); @@ -9754,7 +9754,7 @@ selectedpoint.radius = radius; selectedpoint.recalculate(); selectedpoint.material = new cMaterial(); - selectedpoint.material.color = 0.25f; + selectedpoint.material.color = 0.15f; selectedpoint.material.modulation = 0.75f; debugpoint.radius = radius; @@ -12854,7 +12854,9 @@ { mouseMode |= ZOOM; } - if ((modifiers & META) == META) + + boolean capsLocked = Toolkit.getDefaultToolkit().getLockingKeyState(KeyEvent.VK_CAPS_LOCK); + if (capsLocked || (modifiers & META) == META) { mouseMode |= VR; // BACKFORTH; } @@ -12868,6 +12870,7 @@ } if ((modifiers & SHIFT) == SHIFT || forcetranslate) { + mouseMode &= ~VR; mouseMode |= TRANSLATE; } // if ((modifiers & SHIFT_META) == SHIFT_META) @@ -13257,7 +13260,8 @@ FlipTransform(); break; case ENTER: - object.editWindow.ScreenFit(); // Edit(); + // object.editWindow.ScreenFit(); // Edit(); + ToggleLive(); break; case DELETE: ClearSelection(); @@ -14718,6 +14722,11 @@ // System.err.println("view = " + view[8] + " " + view[9] + " " + view[10] + " " + view[11]); // System.err.println("view = " + view[12] + " " + view[13] + " " + view[14] + " " + view[15]); + // Will fit the mesh !!! + selectedpoint.toParent[0][0] = 0.0001; + selectedpoint.toParent[1][1] = 0.0001; + selectedpoint.toParent[2][2] = 0.0001; + glu.gluUnProject(x,y,depth,view,0,tempmat2,0,viewport,0,selectedpoint.toParent[3],0); // if (object.selection != null && object.selection.Size() > 0) @@ -15340,7 +15349,7 @@ int AAbuffersize = 0; //double[] selectedpoint = new double[3]; - static Sphere selectedpoint = new Sphere(); + static Superellipsoid selectedpoint = new Superellipsoid(); static Sphere previousselectedpoint = null; static Sphere debugpoint = new Sphere(); static Sphere debugpoint2 = new Sphere(); -- Gitblit v1.6.2