aboutsummaryrefslogtreecommitdiff
path: root/src/RotatingThread.java
diff options
context:
space:
mode:
authorJoshua Rahm <joshua.rahm@colorado.edu>2015-01-30 17:11:48 -0700
committerJoshua Rahm <joshua.rahm@colorado.edu>2015-01-30 17:11:48 -0700
commit1c5e38fe69ac8a6decbdd8abe93112f4e3369315 (patch)
tree926cef8cb76d46862ed2c4ec7028720611e47476 /src/RotatingThread.java
downloadModulus3D-1c5e38fe69ac8a6decbdd8abe93112f4e3369315.tar.gz
Modulus3D-1c5e38fe69ac8a6decbdd8abe93112f4e3369315.tar.bz2
Modulus3D-1c5e38fe69ac8a6decbdd8abe93112f4e3369315.zip
added source
Diffstat (limited to 'src/RotatingThread.java')
-rw-r--r--src/RotatingThread.java46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/RotatingThread.java b/src/RotatingThread.java
new file mode 100644
index 0000000..afe4a6e
--- /dev/null
+++ b/src/RotatingThread.java
@@ -0,0 +1,46 @@
+/* */ public class RotatingThread extends Thread
+/* */ {
+/* */ private boolean stop;
+/* */ private Graph3D graph;
+/* */ private String axies;
+/* */
+/* */ public RotatingThread(Graph3D graph, String axies)
+/* */ {
+/* 14 */ this.graph = graph;
+/* 15 */ this.axies = axies;
+/* 16 */ this.stop = false;
+/* */ }
+/* */ public void interrupt() {
+/* 19 */ super.interrupt();
+/* 20 */ this.stop = true;
+/* */ }
+/* */ public void run() {
+/* 23 */ boolean x = this.axies.contains("x");
+/* 24 */ boolean y = this.axies.contains("y");
+/* 25 */ boolean z = this.axies.contains("z");
+/* 26 */ while (!this.stop)
+/* */ {
+/* 28 */ if (x) {
+/* 29 */ this.graph.setXRotation(this.graph.getXRotation() + 1.0D);
+/* */ }
+/* 31 */ if (y) {
+/* 32 */ this.graph.setYRotation(this.graph.getYRotation() + 1.0D);
+/* */ }
+/* 34 */ if (z) {
+/* 35 */ this.graph.setZRotation(this.graph.getZRotation() + 1.0D);
+/* */ }
+/* 37 */ this.graph.repaint();
+/* */ try {
+/* 39 */ Thread.sleep(33L);
+/* */ }
+/* */ catch (Exception localException)
+/* */ {
+/* */ }
+/* */ }
+/* */ }
+/* */ }
+
+/* Location: Modulus.jar
+ * Qualified Name: RotatingThread
+ * JD-Core Version: 0.6.2
+ */ \ No newline at end of file