소스 검색

snapping better btu not fixed

Former-commit-id: 7cc115cd879fc9dcab462cfeb71a997e3e19ebd4
Alec Jacobson 11 년 전
부모
커밋
6e02b8705d
2개의 변경된 파일6개의 추가작업 그리고 3개의 파일을 삭제
  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;