Normand Briere
2019-10-05 8768a855af9ccc482a9520ce708ef32e0e6e0e7d
Block multiple download.
5 files modified
76 ■■■■■ changed files
CameraPane.java 25 ●●●● patch | view | raw | blame | history
Grafreed.java 5 ●●●●● patch | view | raw | blame | history
GroupEditor.java 4 ●●●● patch | view | raw | blame | history
ObjEditor.java 18 ●●●● patch | view | raw | blame | history
com/bulletphysics/dynamics/RigidBody.java 24 ●●●● patch | view | raw | blame | history
CameraPane.java
....@@ -14676,21 +14676,22 @@
1467614676 RigidBody.pos.z = 0;
1467714677 if (RigidBody.justclicked)
1467814678 {
14679
-// RigidBody.pos.x = (float)manipCamera.lookAt.x;
14680
-// RigidBody.pos.y = (float)manipCamera.lookAt.y;
14681
-// RigidBody.pos.z = (float)manipCamera.lookAt.z;
14679
+ RigidBody.pos.x = (float)manipCamera.lookAt.x;
14680
+ RigidBody.pos.y = (float)manipCamera.lookAt.y;
14681
+ RigidBody.pos.z = (float)manipCamera.lookAt.z;
1468214682 // System.err.println("selected point = " + Trunk(selectedpoint.toParent[3][0]) + " " + Trunk(selectedpoint.toParent[3][1]) + " " + Trunk(selectedpoint.toParent[3][2]));
1468314683 CreateSelectedPoint();
1468414684
14685
- RigidBody.pos.x = (float)selectedpoint.toParent[3][0];
14686
- RigidBody.pos.y = (float)selectedpoint.toParent[3][1];
14687
- RigidBody.pos.z = (float)selectedpoint.toParent[3][2];
14688
-
14689
- RigidBody.wind.set(RigidBody.pos);
14690
- RigidBody.wind.x -= (float)manipCamera.location.x;
14691
- RigidBody.wind.y -= (float)manipCamera.location.y;
14692
- RigidBody.wind.z -= (float)manipCamera.location.z;
14693
- RigidBody.wind.normalize();
14685
+// RigidBody.pos.x = (float)selectedpoint.toParent[3][0];
14686
+// RigidBody.pos.y = (float)selectedpoint.toParent[3][1];
14687
+// RigidBody.pos.z = (float)selectedpoint.toParent[3][2];
14688
+//
14689
+// RigidBody.wind.set(RigidBody.pos);
14690
+// RigidBody.wind.x -= (float)manipCamera.lookAt.x;
14691
+// RigidBody.wind.y -= (float)manipCamera.lookAt.y;
14692
+// RigidBody.wind.z -= (float)manipCamera.lookAt.z;
14693
+// RigidBody.wind.scale(-1);
14694
+// RigidBody.wind.normalize();
1469414695 }
1469514696
1469614697 if (mute)
Grafreed.java
....@@ -60,6 +60,11 @@
6060 }
6161 }
6262
63
+ static void Beep()
64
+ {
65
+ java.awt.Toolkit.getDefaultToolkit().beep();
66
+ }
67
+
6368 public static String RemovePrefix(String s, String prefix)
6469 {
6570 if (s != null && prefix != null && s.startsWith(prefix))
GroupEditor.java
....@@ -2835,7 +2835,7 @@
28352835 {
28362836 // Go to previous version
28372837 //if (!Undo())
2838
- //java.awt.Toolkit.getDefaultToolkit().beep();
2838
+ //Grafreed.Beep();
28392839 PreviousVersion();
28402840 } else
28412841 if (source == restoreButton)
....@@ -2859,7 +2859,7 @@
28592859 {
28602860 // Save a new version
28612861 if (!DuplicateVersion()) //true))
2862
- java.awt.Toolkit.getDefaultToolkit().beep();
2862
+ Grafreed.Beep();
28632863 } else
28642864 if (source == deleteVersionButton)
28652865 {
ObjEditor.java
....@@ -5090,7 +5090,7 @@
50905090
50915091 if (copy.versionindex == 0)
50925092 {
5093
- java.awt.Toolkit.getDefaultToolkit().beep();
5093
+ Grafreed.Beep();
50945094 return false;
50955095 }
50965096
....@@ -5126,7 +5126,7 @@
51265126
51275127 if (copy.versionindex == -1 || copy.versionlist[copy.versionindex] == null)
51285128 {
5129
- java.awt.Toolkit.getDefaultToolkit().beep();
5129
+ Grafreed.Beep();
51305130 return false;
51315131 }
51325132
....@@ -5149,7 +5149,7 @@
51495149 // < 0 means == -2 || == -1
51505150 if (copy.versionindex < 0 || copy.versionlist[copy.versionindex] == null)
51515151 {
5152
- // No version yet. OK. java.awt.Toolkit.getDefaultToolkit().beep();
5152
+ // No version yet. OK. Grafreed.Beep();
51535153 return false;
51545154 }
51555155
....@@ -5167,7 +5167,7 @@
51675167
51685168 if (copy.versionlist[copy.versionindex + 1] == null)
51695169 {
5170
- java.awt.Toolkit.getDefaultToolkit().beep();
5170
+ Grafreed.Beep();
51715171 return;
51725172 }
51735173
....@@ -6104,6 +6104,8 @@
61046104 //String filename;
61056105 //iCallBack callback;
61066106
6107
+ boolean running;
6108
+
61076109 java.util.Stack stack;
61086110
61096111 LoadGFDThread(/*String fullname, iCallBack cb*/)
....@@ -6133,6 +6135,7 @@
61336135 };
61346136 if (!stack.empty())
61356137 {
6138
+ running = true;
61366139 frame.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
61376140 iCallBack callback = (iCallBack) stack.pop();
61386141 String filename = (String) stack.pop();
....@@ -6140,6 +6143,7 @@
61406143 callback.Callback(ReadGFD(filename));
61416144 System.gc();
61426145 wasbusy = true;
6146
+ running = false;
61436147 } else
61446148 {
61456149 if (wasbusy)
....@@ -6162,6 +6166,12 @@
61626166 loadGFDThread.start();
61636167 }
61646168
6169
+ if (loadGFDThread.running)
6170
+ {
6171
+ Grafreed.Beep();
6172
+ return;
6173
+ }
6174
+
61656175 loadGFDThread.add(fullname, cb);
61666176 }
61676177
com/bulletphysics/dynamics/RigidBody.java
....@@ -237,19 +237,19 @@
237237
238238 justclicked = false;
239239
240
-// wind.set(pos);
241
-// wind.x -= worldTransform.origin.x;
242
-// wind.y -= worldTransform.origin.y;
243
-// wind.z -= worldTransform.origin.z;
240
+ wind.set(pos);
241
+ wind.x -= worldTransform.origin.x;
242
+ wind.y -= worldTransform.origin.y;
243
+ wind.z -= worldTransform.origin.z;
244244
245
- this.collisionShape.getAabb(worldTransform, min, max);
246
-
247
- if (pos.x < min.x || pos.x > max.x)
248
- return;
249
- if (pos.y < min.y || pos.y > max.y)
250
- return;
251
- if (pos.z < min.z || pos.z > max.z)
252
- return;
245
+// this.collisionShape.getAabb(worldTransform, min, max);
246
+//
247
+// if (pos.x < min.x || pos.x > max.x)
248
+// return;
249
+// if (pos.y < min.y || pos.y > max.y)
250
+// return;
251
+// if (pos.z < min.z || pos.z > max.z)
252
+// return;
253253
254254 float dot = pos.x * wind.x + pos.y * wind.y + pos.z * wind.z;
255255