diff options
| author | Joshua Rahm <joshua.rahm@colorado.edu> | 2015-01-30 17:11:48 -0700 |
|---|---|---|
| committer | Joshua Rahm <joshua.rahm@colorado.edu> | 2015-01-30 17:11:48 -0700 |
| commit | 1c5e38fe69ac8a6decbdd8abe93112f4e3369315 (patch) | |
| tree | 926cef8cb76d46862ed2c4ec7028720611e47476 /src/RotatingThread.java | |
| download | Modulus3D-1c5e38fe69ac8a6decbdd8abe93112f4e3369315.tar.gz Modulus3D-1c5e38fe69ac8a6decbdd8abe93112f4e3369315.tar.bz2 Modulus3D-1c5e38fe69ac8a6decbdd8abe93112f4e3369315.zip | |
added source
Diffstat (limited to 'src/RotatingThread.java')
| -rw-r--r-- | src/RotatingThread.java | 46 |
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 |