Browse Source

snapping better btu not fixed

Former-commit-id: 7cc115cd879fc9dcab462cfeb71a997e3e19ebd4
Alec Jacobson 11 years ago
parent
commit
6e02b8705d
2 changed files with 6 additions and 3 deletions
  1. 2 0
      include/igl/viewer/TODOs.txt
  2. 4 3
      include/igl/viewer/Viewer.cpp

+ 2 - 0
include/igl/viewer/TODOs.txt

@@ -1,3 +1,5 @@
+- snap to canonical recenters origin but trackball does not
++ snap to canonical view key shortcut is not working
 - rewrite in libigl style
 - separate various class into their own .h/.cpp pairs
 - remove use of double underscores (http://stackoverflow.com/a/224420/148668)

+ 4 - 3
include/igl/viewer/Viewer.cpp

@@ -935,13 +935,14 @@ namespace igl
     if (key == 'A')
       mouse_scroll(-1);
 
-    if (key == 'Z')
+    // Why aren't these handled view AntTweakBar?
+    if (key == 'z') // Don't use 'Z' because that clobbers snap_to_canonical_view_quat
       options.trackball_angle << 0.0f, 0.0f, 0.0f, 1.0f;
 
-    if (key == 'Y')
+    if (key == 'y')
       options.trackball_angle << -sqrt(2.0f)/2.0f, 0.0f, 0.0f, sqrt(2.0f)/2.0f;
 
-    if (key == 'X')
+    if (key == 'x')
       options.trackball_angle << -0.5f, -0.5f, -0.5f, 0.5f;