diff options
author | Mattias Andrée <maandree@kth.se> | 2021-09-16 18:43:03 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2021-09-16 18:43:03 +0200 |
commit | 15545f41f0a2d4cd287a62a896920cc4a9fc5b27 (patch) | |
tree | 9bdceaadc3050deae42d6f9a396b0cf964e1728c | |
parent | fix x key bug (diff) | |
download | rotation3d-15545f41f0a2d4cd287a62a896920cc4a9fc5b27.tar.gz rotation3d-15545f41f0a2d4cd287a62a896920cc4a9fc5b27.tar.bz2 rotation3d-15545f41f0a2d4cd287a62a896920cc4a9fc5b27.tar.xz |
Improve makefile + m
Signed-off-by: Mattias Andrée <maandree@kth.se>
-rw-r--r-- | Makefile | 15 | ||||
-rw-r--r-- | src/v/D3.java | 12 |
2 files changed, 21 insertions, 6 deletions
@@ -1,12 +1,17 @@ +.POSIX: + JAVAC = javac -.PHONY: all -all: +SRC =\ + srv/v/D3.java\ + srv/v/VMaths.java + + +all: $(SRC) @mkdir -p bin $(JAVAC) -cp src -s src -d bin src/v/D3.java - -.PHONY: clean clean: - -rm -r bin + -rm -r -- bin +.PHONY: all clean diff --git a/src/v/D3.java b/src/v/D3.java index 7292cd0..5873b85 100644 --- a/src/v/D3.java +++ b/src/v/D3.java @@ -64,6 +64,7 @@ public class D3 static float[][] Pm = UNIT; static float[][] Qm = UNIT; + static boolean rreset = false; static boolean sreset = false; static boolean zreset = false; static boolean camera_to_rotation = false; @@ -294,7 +295,10 @@ public class D3 break; case KeyEvent.VK_R: - rotation_speed = 0; + if (ctrl) + rreset = true; + else + rotation_speed = 0; break; } else if (shift && (alt == false)) @@ -371,6 +375,12 @@ public class D3 rotation_to_camera = false; } + if (rreset) + { + resetRotation(); + rreset = false; + } + if (rx * rx == 1) { float[] v = mul(rx * SPEED, createRotation("x", Pm)); |