|
@@ -84,7 +84,7 @@ static int global_KMod = 0;
|
|
|
|
|
|
static void glfw_mouse_press(GLFWwindow* window, int button, int action, int modifier)
|
|
|
{
|
|
|
- bool tw_used =
|
|
|
+ bool tw_used =
|
|
|
#ifdef IGL_VIEWER_WITH_NANOGUI
|
|
|
__viewer->screen->mouseButtonCallbackEvent(button,action,modifier);
|
|
|
#else
|
|
@@ -283,7 +283,7 @@ namespace viewer
|
|
|
std::cout<<"igl_with_nanogui_defined_at_compile: "<< igl_with_nanogui_defined_at_compile() <<std::endl;
|
|
|
std::cout<<"igl_with_nanogui_defined_at_include: "<< igl_with_nanogui_defined_at_include() <<std::endl;
|
|
|
// First try to first assert
|
|
|
- assert(igl_with_nanogui_defined_consistently() &&
|
|
|
+ assert(igl_with_nanogui_defined_consistently() &&
|
|
|
"Must compile and include with IGL_VIEWER_WITH_NANOGUI defined consistently");
|
|
|
#ifdef NDEBUG
|
|
|
// Second print warning since it's hopeless that this will run if wrong.
|
|
@@ -629,11 +629,11 @@ namespace viewer
|
|
|
center = data.V.colwise().sum()/data.V.rows();
|
|
|
}
|
|
|
|
|
|
- Eigen::Vector3f coord =
|
|
|
+ Eigen::Vector3f coord =
|
|
|
igl::project(
|
|
|
- Eigen::Vector3f(center(0),center(1),center(2)),
|
|
|
- (core.view * core.model).eval(),
|
|
|
- core.proj,
|
|
|
+ Eigen::Vector3f(center(0),center(1),center(2)),
|
|
|
+ (core.view * core.model).eval(),
|
|
|
+ core.proj,
|
|
|
core.viewport);
|
|
|
down_mouse_z = coord[2];
|
|
|
down_rotation = core.trackball_angle;
|
|
@@ -1044,20 +1044,5 @@ namespace viewer
|
|
|
launch_shut();
|
|
|
return EXIT_SUCCESS;
|
|
|
}
|
|
|
- IGL_INLINE bool Viewer::igl_with_nanogui_defined_at_compile()
|
|
|
- {
|
|
|
-#ifdef IGL_VIEWER_WITH_NANOGUI
|
|
|
- return true;
|
|
|
-#else
|
|
|
- return false;
|
|
|
-#endif
|
|
|
- }
|
|
|
- IGL_INLINE bool Viewer::igl_with_nanogui_defined_consistently()
|
|
|
- {
|
|
|
- return
|
|
|
- igl_with_nanogui_defined_at_compile() ==
|
|
|
- igl_with_nanogui_defined_at_include();
|
|
|
- }
|
|
|
} // end namespace
|
|
|
}
|
|
|
-
|