BoundaryRep.java | ●●●●● patch | view | raw | blame | history | |
CameraPane.java | ●●●●● patch | view | raw | blame | history | |
Cone.java | ●●●●● patch | view | raw | blame | history | |
Globals.java | ●●●●● patch | view | raw | blame | history | |
GroupEditor.java | ●●●●● patch | view | raw | blame | history | |
Mocap.java | ●●●●● patch | view | raw | blame | history | |
ObjEditor.java | ●●●●● patch | view | raw | blame | history | |
Object3D.java | ●●●●● patch | view | raw | blame | history | |
PhysicsNode.java | ●●●●● patch | view | raw | blame | history | |
SwitchEditor.java | ●●●●● patch | view | raw | blame | history | |
SwitchNode.java | ●●●●● patch | view | raw | blame | history |
BoundaryRep.java
.. .. @@ -2004,8 +2004,8 @@ 2004 2004 2005 2005 // Warning: faster but dangerous 2006 2006 if (v.weights != null && v.weights[j] 2007 - == 0)2008 - //< 0.001 * v.totalweight)2007 + == 0)2008 + // < 0.001 * v.totalweight)2009 2009 { 2010 2010 //testweight += v.weights[j-1]; 2011 2011 continue; CameraPane.java
.. .. @@ -124,7 +124,7 @@ 124 124 static boolean LOCALTRANSFORM = false; 125 125 static boolean FULLSCREEN = false; 126 126 static boolean SUPPORT = true; 127 -static boolean INERTIA = true;127 +static boolean INERTIA = false; // true;128 128 static boolean FAST = false; 129 129 static boolean SLOWPOSE = false; 130 130 static boolean FOOTCONTACT = true; Cone.java
.. .. @@ -17,7 +17,7 @@ 17 17 retile(); 18 18 base = LA.newVector(0, 0, 0); // -1); 19 19 apex = LA.newVector(0, 1, 0); // 1); 20 - baseRadius = apexRadius = 0.5; // 0.125;20 + baseRadius = apexRadius = 0.6369; // == 0.5 * 4/3.14 // 0.5; // 0.125;21 21 //fromStandard = new double[4][4]; 22 22 //toStandard = new double[4][4]; 23 23 //LA.matIdentity(fromStandard); .. .. @@ -196,7 +196,7 @@ 196 196 197 197 double uStretch() 198 198 { 199 - return 3; // Actually 3.14 (I think)199 + return 4; // 3; // Actually 3.14 (I think)200 200 } 201 201 202 202 double vFlip(double v) Globals.java
.. .. @@ -19,7 +19,7 @@ 19 19 // Option to set saturation to 1 when choosing a color first 20 20 public static boolean AUTOSATURATE = true; 21 21 public static boolean MINSHADER = false; 22 - public static boolean COMPUTESHADOWWHENLIVE = true;22 + public static boolean COMPUTESHADOWWHENLIVE = false; // true;23 23 public static boolean RENDERSHADOW = true; 24 24 25 25 public static boolean REPLACEONMAKE = false; // false; GroupEditor.java
.. .. @@ -1082,7 +1082,7 @@ 1082 1082 // }); 1083 1083 1084 1084 oe.toolbarPanel.add(fullScreenButton = GetButton("icons/fullscreen.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); 1085 - fullScreenButton.setToolTipText("Full-screen window");1085 + fullScreenButton.setToolTipText("Full-screen window (ESC to exit)");1086 1086 fullScreenButton.addActionListener(this); 1087 1087 1088 1088 oe.toolbarPanel.add(collapseButton = GetButton("icons/collapse.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); .. .. @@ -1411,10 +1411,10 @@ 1411 1411 1412 1412 panel.Return(); 1413 1413 1414 - if (Globals.ADVANCED)1414 + //if (Globals.ADVANCED)1415 1415 { 1416 1416 panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints); 1417 - crowdCB.setToolTipText("Used for crowds");1417 + crowdCB.setToolTipText("Use for crowds");1418 1418 crowdCB.addItemListener(this); 1419 1419 } 1420 1420 .. .. @@ -1444,11 +1444,11 @@ 1444 1444 panel.Return(); 1445 1445 } 1446 1446 1447 + panel.Return();1448 +1447 1449 panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS)); //, constraints); 1448 1450 smoothfocusCB.addItemListener(this); 1449 1451 1450 - panel.Return();1451 -1452 1452 //panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints); 1453 1453 // debugCB.addItemListener(this); 1454 1454 .. .. @@ -1460,9 +1460,12 @@ 1460 1460 oeilCB.setToolTipText("Move camera when tracking"); 1461 1461 oeilCB.addItemListener(this); 1462 1462 1463 + if (Globals.ADVANCED)1464 + {1463 1465 panel.add(shadowCB = new cCheckBox("Shadow", Globals.COMPUTESHADOWWHENLIVE)); //, constraints); 1464 1466 shadowCB.setToolTipText("When live compute shadows"); 1465 1467 shadowCB.addItemListener(this); 1468 + }1466 1469 1467 1470 panel.Return(); 1468 1471 panel.add(toggleTextureCB = new cCheckBox("Textures", CameraPane.textureon)); //, constraints); Mocap.java
.. .. @@ -3924,6 +3924,8 @@ 3924 3924 restarted = true; 3925 3925 //System.err.println("restarted = true"); 3926 3926 Step(); 3927 +3928 + Globals.lighttouched = true;3927 3929 } 3928 3930 else 3929 3931 { ObjEditor.java
.. .. @@ -833,6 +833,11 @@ 833 833 ScriptNode sn = (ScriptNode) sel; 834 834 si.SendInfo(" Script name: " + sn.filename, "regular"); 835 835 } 836 + if (sel instanceof SwitchNode)837 + {838 + SwitchNode sn = (SwitchNode) sel;839 + si.SendInfo(" Switch Object: " + sn.switchobject, "regular");840 + }836 841 837 842 si.SendInfo((debug ? " Path: " : " ") + sel.GetPath(), "regular"); 838 843 .. .. @@ -1864,6 +1869,52 @@ 1864 1869 1865 1870 cButton fullsceneButton; 1866 1871 1872 + fullscenePanel.add(fullsceneButton = GetButton("fullscenes/tom.png", !Globals.NIMBUSLAF));1873 + fullsceneButton.setToolTipText("Tom!");1874 + fullsceneButton.addActionListener(new ActionListener()1875 + {1876 + @Override1877 + public void actionPerformed(ActionEvent e)1878 + {1879 + ReadGFD("https://www.noaofarc.ca/akeeba/categories/Applications/tom.gfd", new iCallBack()1880 + {1881 +1882 + public void Callback(Object obj)1883 + {1884 + LoadIt(obj);1885 + }1886 +1887 + public void DragGesture()1888 + {1889 + }1890 + });1891 + }1892 + });1893 +1894 + fullscenePanel.add(fullsceneButton = GetButton("fullscenes/adameve.png", !Globals.NIMBUSLAF));1895 + fullsceneButton.setToolTipText("Adam and Eve!");1896 + fullsceneButton.addActionListener(new ActionListener()1897 + {1898 + @Override1899 + public void actionPerformed(ActionEvent e)1900 + {1901 + ReadGFD("https://www.noaofarc.ca/akeeba/categories/Applications/adameve.gfd", new iCallBack()1902 + {1903 +1904 + public void Callback(Object obj)1905 + {1906 + LoadIt(obj);1907 + }1908 +1909 + public void DragGesture()1910 + {1911 + }1912 + });1913 + }1914 + });1915 +1916 + fullscenePanel.Return();1917 +1867 1918 fullscenePanel.add(fullsceneButton = GetButton("fullscenes/alsace.png", !Globals.NIMBUSLAF)); 1868 1919 fullsceneButton.setToolTipText("Alsace!"); 1869 1920 fullsceneButton.addActionListener(new ActionListener() .. .. @@ -2093,86 +2144,17 @@ 2093 2144 }); 2094 2145 2095 2146 fullscenePanel.Return(); 2096 -2097 - fullscenePanel.add(fullsceneButton = GetButton("fullscenes/tom.png", !Globals.NIMBUSLAF));2098 - fullsceneButton.setToolTipText("Tom!");2099 - fullsceneButton.addActionListener(new ActionListener()2100 - {2101 - @Override2102 - public void actionPerformed(ActionEvent e)2103 - {2104 - ReadGFD("https://www.noaofarc.ca/akeeba/categories/Applications/tom.gfd", new iCallBack()2105 - {2106 -2107 - public void Callback(Object obj)2108 - {2109 - LoadIt(obj);2110 - }2111 -2112 - public void DragGesture()2113 - {2114 - }2115 - });2116 - }2117 - });2118 -2119 - fullscenePanel.add(fullsceneButton = GetButton("fullscenes/adameve.png", !Globals.NIMBUSLAF));2120 - fullsceneButton.setToolTipText("Adam and Eve!");2121 - fullsceneButton.addActionListener(new ActionListener()2122 - {2123 - @Override2124 - public void actionPerformed(ActionEvent e)2125 - {2126 - ReadGFD("https://www.noaofarc.ca/akeeba/categories/Applications/adameve.gfd", new iCallBack()2127 - {2128 -2129 - public void Callback(Object obj)2130 - {2131 - LoadIt(obj);2132 - }2133 -2134 - public void DragGesture()2135 - {2136 - }2137 - });2138 - }2139 - });2140 -2141 - fullscenePanel.Return();2142 -2143 - fullscenePanel.add(new cGridBag());2144 - fullscenePanel.add(new cGridBag());2145 -2147 +2146 2148 sceneTabbedPane.add(optionsPanel); 2147 2149 2148 2150 scenePanel.add(sceneTabbedPane); 2149 2151 2152 + cButton creditButton;2153 +2150 2154 cGridBag creditsPanel = new cGridBag().setVertical(true); 2151 2155 creditsPanel.setName("Credits"); 2152 2156 2153 - cLabel ogaLabel = new cLabel(" Skyboxes courtesy of OpenGameArt!", !Globals.NIMBUSLAF);2154 - creditsPanel.add(ogaLabel);2155 -2156 - cButton creditButton;2157 - creditsPanel.add(creditButton = GetButton("icons/sara-logo.png", !Globals.NIMBUSLAF));2158 - creditButton.setToolTipText("https://opengameart.org");2159 -2160 - creditButton.addMouseListener(new MouseAdapter()2161 - {2162 - public void mouseClicked(MouseEvent e)2163 - {2164 - try2165 - {2166 - Desktop.getDesktop().browse(new java.net.URI("https://opengameart.org/"));2167 - } catch (Exception e1)2168 -// } catch (java.io.IOException | java.net.URISyntaxException e1)2169 - {2170 - e1.printStackTrace();2171 - }2172 - }2173 - });2174 -2175 - ogaLabel = new cLabel(" Download 3D models! (.3ds and .obj only)", !Globals.NIMBUSLAF);2157 + cLabel ogaLabel = new cLabel(" Download 3D models! (.3ds and .obj only)", !Globals.NIMBUSLAF);2176 2158 creditsPanel.add(ogaLabel); 2177 2159 2178 2160 creditsPanel.add(creditButton = GetButton("icons/3delicious.png", !Globals.NIMBUSLAF)); .. .. @@ -2229,6 +2211,27 @@ 2229 2211 } 2230 2212 }); 2231 2213 2214 + ogaLabel = new cLabel(" Skyboxes courtesy of OpenGameArt!", !Globals.NIMBUSLAF);2215 + creditsPanel.add(ogaLabel);2216 +2217 + creditsPanel.add(creditButton = GetButton("icons/sara-logo.png", !Globals.NIMBUSLAF));2218 + creditButton.setToolTipText("https://opengameart.org");2219 +2220 + creditButton.addMouseListener(new MouseAdapter()2221 + {2222 + public void mouseClicked(MouseEvent e)2223 + {2224 + try2225 + {2226 + Desktop.getDesktop().browse(new java.net.URI("https://opengameart.org/"));2227 + } catch (Exception e1)2228 +// } catch (java.io.IOException | java.net.URISyntaxException e1)2229 + {2230 + e1.printStackTrace();2231 + }2232 + }2233 + });2234 +2232 2235 for (int i=6; --i>=0;) 2233 2236 { 2234 2237 creditsPanel.add(new cGridBag()); Object3D.java
.. .. @@ -41,7 +41,7 @@ 41 41 42 42 java.util.Hashtable<java.util.UUID, Object3D> versiontable; // = new java.util.Hashtable<java.util.UUID, Object3D>(); 43 43 44 - int tabIndex;44 + transient int tabIndex; // Tabs can change between sessions.45 45 46 46 ScriptNode scriptnode; 47 47 .. .. @@ -1142,6 +1142,8 @@ 1142 1142 (Globals.DrawMode() == iCameraPane.SHADOW || !Globals.RENDERSHADOW || !Globals.COMPUTESHADOWWHENLIVE) && 1143 1143 currentframe != Globals.framecount) 1144 1144 { 1145 + Globals.lighttouched = true;1146 +1145 1147 currentframe = Globals.framecount; 1146 1148 1147 1149 // System.err.println("transformcount = " + transformcount); .. .. @@ -6301,7 +6303,7 @@ 6301 6303 6302 6304 if (!selectmode && //display.DrawMode() != display.SELECTION && 6303 6305 //(touched || (bRep != null && bRep.displaylist <= 0))) 6304 - (Globals.isLIVE() && Globals.COMPUTESHADOWWHENLIVE || touched && Globals.COMPUTESHADOWWHENLIVE)) // || (bRep != null && bRep.displaylist <= 0)))6306 + (Globals.isLIVE() || touched) && Globals.COMPUTESHADOWWHENLIVE) // || (bRep != null && bRep.displaylist <= 0)))6305 6307 { 6306 6308 Globals.lighttouched = true; 6307 6309 } // all panes... .. .. @@ -6856,7 +6858,8 @@ 6856 6858 6857 6859 //javax.media.opengl.GL gl = display.GetGL(); 6858 6860 6859 - if (CameraPane.BOXMODE && !Link2Support()) //selected) // || CameraPane.movingcamera)6861 + if (CameraPane.BOXMODE && //!Link2Support()) //6862 + !selected) // || CameraPane.movingcamera)6860 6863 { 6861 6864 int fc = bRep.FaceCount(); 6862 6865 int vc = bRep.VertexCount(); PhysicsNode.java
.. .. @@ -113,8 +113,10 @@ 113 113 114 114 void drawSelf(iCameraPane display, Object3D /*Composite*/ root, boolean selected, boolean blocked) 115 115 { 116 - if (Globals.isLIVE() && live && display.DrawMode() == display.SHADOW) // SHADOW116 + if (Globals.isLIVE() && live && (Globals.DrawMode() == iCameraPane.SHADOW || !Globals.RENDERSHADOW || !Globals.COMPUTESHADOWWHENLIVE)) // SHADOW117 117 { 118 + Globals.lighttouched = true;119 +118 120 float ms = getDeltaTimeMicroseconds(); 119 121 float minFPS = 1000000f / 60f; 120 122 if (ms > minFPS) SwitchEditor.java
.. .. @@ -214,6 +214,8 @@ 214 214 switchnode.speed = speedField.getInteger(); // biparam.minUDivs, 99); 215 215 //biparam.name = nameField.getText(); 216 216 217 + Globals.lighttouched = true;218 +217 219 // june 2013 super.applySelf(); 218 220 if (switchnode.speed != s) 219 221 System.out.println("Damp = " + switchnode.speed); SwitchNode.java
.. .. @@ -57,7 +57,7 @@ 57 57 parent = super.parent; 58 58 59 59 } 60 - if (live && Globals.isLIVE() && display.DrawMode() == display.SHADOW)60 + if (live && Globals.isLIVE() && (display.DrawMode() == display.SHADOW || !Globals.RENDERSHADOW))61 61 { 62 62 if (countspeed <= 0) 63 63 { .. .. @@ -106,7 +106,7 @@ 106 106 bRep = (BoundaryRep)Grafreed.clone(switchobject.get(0).bRep); 107 107 } 108 108 109 - if (CameraPane.SUPPORT && display.DrawMode() == display.SHADOW)109 + if (CameraPane.SUPPORT && (display.DrawMode() == display.SHADOW || !Globals.RENDERSHADOW))110 110 { 111 111 Update(); 112 112 }