BoundaryRep.java | ●●●●● patch | view | raw | blame | history | |
Camera.java | patch | view | raw | blame | history | |
CameraPane.java | ●●●●● patch | view | raw | blame | history | |
GroupLeaf.java | ●●●●● patch | view | raw | blame | history | |
Torus.java | ●●●●● patch | view | raw | blame | history |
BoundaryRep.java
.. .. @@ -4932,7 +4932,7 @@ 4932 4932 //colors[i3 + 1] = cp.vertexOcclusion.g; 4933 4933 //colors[i3 + 2] = cp.vertexOcclusion.b; 4934 4934 4935 - if ((i % 1000) == 0 && i != 0)4935 + if ((i % 100) == 0 && i != 0)4936 4936 { 4937 4937 CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR)); 4938 4938 //System.out.println("Color = " + cp.vertexOcclusion.r + ", " + cp.vertexOcclusion.g + ", " + cp.vertexOcclusion.b + "; " + (int)(100.0*i/(positions.length/3)) + "% done"); .. .. @@ -4964,7 +4964,7 @@ 4964 4964 4965 4965 v.AO = cp.vertexOcclusion.r; 4966 4966 4967 - if ((i % 1000) == 0 && i != 0)4967 + if ((i % 100) == 0 && i != 0)4968 4968 { 4969 4969 CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR)); 4970 4970 //System.out.println("Color = " + cp.vertexOcclusion.r + ", " + cp.vertexOcclusion.g + ", " + cp.vertexOcclusion.b + "; " + (int)(100.0*i/(positions.length/3)) + "% done"); .. .. @@ -7230,7 +7230,8 @@ 7230 7230 { 7231 7231 if (f3.p == f0.p) 7232 7232 { 7233 - assert(false);7233 +// assert(false);7234 + new Exception().printStackTrace();7234 7235 f0.r = f3.q; 7235 7236 } 7236 7237 else RTCamera.javasimilarity index 100%rename from RTCamera.javarename to Camera.java
CameraPane.java
.. .. @@ -12854,7 +12854,9 @@ 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,6 +12870,7 @@ 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) .. .. @@ -14719,6 +14722,11 @@ 14719 14722 // System.err.println("view = " + view[8] + " " + view[9] + " " + view[10] + " " + view[11]); 14720 14723 // System.err.println("view = " + view[12] + " " + view[13] + " " + view[14] + " " + view[15]); 14721 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 +14722 14730 glu.gluUnProject(x,y,depth,view,0,tempmat2,0,viewport,0,selectedpoint.toParent[3],0); 14723 14731 14724 14732 // if (object.selection != null && object.selection.Size() > 0) .. .. @@ -15341,7 +15349,7 @@ 15341 15349 int AAbuffersize = 0; 15342 15350 15343 15351 //double[] selectedpoint = new double[3]; 15344 - static Sphere selectedpoint = new Sphere();15352 + static Superellipsoid selectedpoint = new Superellipsoid();15345 15353 static Sphere previousselectedpoint = null; 15346 15354 static Sphere debugpoint = new Sphere(); 15347 15355 static Sphere debugpoint2 = new Sphere(); GroupLeaf.java
.. .. @@ -9,7 +9,8 @@ 9 9 */ 10 10 public class GroupLeaf extends Composite 11 11 { 12 - static final long serialVersionUID = -1647706059469889079L;12 + static final long serialVersionUID = // for wader: -6036608125951558970L;13 + -1647706059469889079L;13 14 14 15 GroupLeaf() 15 16 { Torus.java
.. .. @@ -61,16 +61,25 @@ 61 61 if (v == 1) 62 62 v = 0; 63 63 64 - double uAng = LA.toRadians((1-u) * 360);65 - double vAng = LA.toRadians(v * 360);66 - double x = (double)Math.cos(uAng) * (major + (double)Math.cos(vAng) * minor);67 - double y = (double)Math.sin(vAng) * minor;64 + double uAng = u * 2 * Math.PI;65 + double vAng = v * 2 * Math.PI;66 + double cosua = Math.cos(uAng);67 + double sinua = Math.sin(uAng);68 + double cosva = Math.cos(vAng);69 + double sinva = Math.sin(vAng);70 +71 + double radius = (major + cosva * minor);72 + double x = cosua * radius;73 + double y = sinva * minor;68 74 if (Math.abs(y) < 1E-10) 69 75 y = 0; // hashtable issue 70 - double z = (double)Math.sin(uAng) * (major + (double)Math.cos(vAng) * minor);76 +77 + double z = sinua * radius;71 78 cVector tPos = LA.newVector(x, y, z); 72 - double xx = (double)(Math.cos(uAng) * Math.cos(vAng)) * minor;73 - double zz = (double)(Math.sin(uAng) * Math.cos(vAng)) * minor;79 +80 + double xx = cosua * cosva * minor;81 + double zz = sinua * cosva * minor;82 +74 83 cVector tNorm = LA.newVector(xx, y, zz); 75 84 Vertex temp = new Vertex(tPos); 76 85 //temp.pos = tPos; // useless new