瀏覽代碼

Merge branch 'master' of https://github.com/libigl/libigl

Alec Jacobson 5 年之前
父節點
當前提交
58a600aebf

+ 2 - 2
cmake/LibiglDownloadExternal.cmake

@@ -103,12 +103,12 @@ endfunction()
 function(igl_download_imgui)
 	igl_download_project(imgui
 		GIT_REPOSITORY https://github.com/ocornut/imgui.git
-		GIT_TAG        v1.69
+		GIT_TAG        v1.76
 		${LIBIGL_BRANCH_OPTIONS}
 	)
 	igl_download_project(libigl-imgui
 		GIT_REPOSITORY https://github.com/libigl/libigl-imgui.git
-		GIT_TAG        07ecd3858acc71e70f0f9b2dea20a139bdddf8ae
+		GIT_TAG        99f0643089b19f6daf5b3efd9544a65c9a851966
 	)
 endfunction()
 

+ 1 - 0
cmake/LibiglFolders.cmake

@@ -112,6 +112,7 @@ igl_folder_targets("Tutorials"
     715_MeshImplicitFunction_bin
     716_HeatGeodesics_bin
     718_IterativeClosestPoint_bin
+    719_ExplodedView_bin
 )
 
 endfunction()

+ 1 - 1
include/igl/file_dialog_open.cpp

@@ -60,7 +60,7 @@ IGL_INLINE std::string igl::file_dialog_open()
   ZeroMemory(&ofn, sizeof(ofn));
   ofn.lStructSize = sizeof(ofn);
   ofn.hwndOwner = NULL;
-  ofn.lpstrFile = new char[100];
+  ofn.lpstrFile = szFile;
   // Set lpstrFile[0] to '\0' so that GetOpenFileName does not
   // use the contents of szFile to initialize itself.
   ofn.lpstrFile[0] = '\0';

+ 1 - 1
include/igl/file_dialog_save.cpp

@@ -60,7 +60,7 @@ IGL_INLINE std::string igl::file_dialog_save()
   ZeroMemory(&ofn, sizeof(ofn));
   ofn.lStructSize = sizeof(ofn);
   ofn.hwndOwner = NULL;//hwnd;
-  ofn.lpstrFile = new char[100];
+  ofn.lpstrFile = szFile;
   // Set lpstrFile[0] to '\0' so that GetOpenFileName does not
   // use the contents of szFile to initialize itself.
   ofn.lpstrFile[0] = '\0';

+ 1 - 0
include/igl/matlab/prepare_lhs.cpp

@@ -122,4 +122,5 @@ template void igl::matlab::prepare_lhs_double<Eigen::Matrix<int, 1, 3, 1, 1, 3>
 template void igl::matlab::prepare_lhs_double<Eigen::Matrix<float, -1, 1, 0, -1, 1> >(Eigen::PlainObjectBase<Eigen::Matrix<float, -1, 1, 0, -1, 1> > const&, mxArray_tag**);
 template void igl::matlab::prepare_lhs_double<Eigen::Matrix<float, -1, 3, 0, -1, 3> >(Eigen::PlainObjectBase<Eigen::Matrix<float, -1, 3, 0, -1, 3> > const&, mxArray_tag**);
 template void igl::matlab::prepare_lhs_double<double>(Eigen::SparseMatrix<double, 0, int> const&, mxArray_tag**);
+template void igl::matlab::prepare_lhs_double<Eigen::Matrix<double, -1, -1, 0, -1, -1> >(std::__1::vector<Eigen::Matrix<double, -1, -1, 0, -1, -1>, std::__1::allocator<Eigen::Matrix<double, -1, -1, 0, -1, -1> > > const&, mxArray_tag**);
 #endif

+ 4 - 4
include/igl/opengl/glfw/imgui/ImGuiMenu.cpp

@@ -167,8 +167,8 @@ IGL_INLINE void ImGuiMenu::draw_menu()
 IGL_INLINE void ImGuiMenu::draw_viewer_window()
 {
   float menu_width = 180.f * menu_scaling();
-  ImGui::SetNextWindowPos(ImVec2(0.0f, 0.0f), ImGuiSetCond_FirstUseEver);
-  ImGui::SetNextWindowSize(ImVec2(0.0f, 0.0f), ImGuiSetCond_FirstUseEver);
+  ImGui::SetNextWindowPos(ImVec2(0.0f, 0.0f), ImGuiCond_FirstUseEver);
+  ImGui::SetNextWindowSize(ImVec2(0.0f, 0.0f), ImGuiCond_FirstUseEver);
   ImGui::SetNextWindowSizeConstraints(ImVec2(menu_width, -1.0f), ImVec2(menu_width, -1.0f));
   bool _viewer_menu_visible = true;
   ImGui::Begin(
@@ -310,8 +310,8 @@ IGL_INLINE void ImGuiMenu::draw_viewer_menu()
 IGL_INLINE void ImGuiMenu::draw_labels_window()
 {
   // Text labels
-  ImGui::SetNextWindowPos(ImVec2(0,0), ImGuiSetCond_Always);
-  ImGui::SetNextWindowSize(ImGui::GetIO().DisplaySize, ImGuiSetCond_Always);
+  ImGui::SetNextWindowPos(ImVec2(0,0), ImGuiCond_Always);
+  ImGui::SetNextWindowSize(ImGui::GetIO().DisplaySize, ImGuiCond_Always);
   bool visible = true;
   ImGui::PushStyleColor(ImGuiCol_WindowBg, ImVec4(0,0,0,0));
   ImGui::PushStyleVar(ImGuiStyleVar_WindowBorderSize, 0);

+ 6 - 6
include/igl/sort.cpp

@@ -242,12 +242,12 @@ IGL_INLINE void igl::sort3(
 
   const auto & inner = [&IX,&Y,&dim,&ascending](const Index & i)
   {
-    YScalar & a = (dim==1 ? Y(0,i) : Y(i,0));
-    YScalar & b = (dim==1 ? Y(1,i) : Y(i,1));
-    YScalar & c = (dim==1 ? Y(2,i) : Y(i,2));
-    Index & ai = (dim==1 ? IX(0,i) : IX(i,0));
-    Index & bi = (dim==1 ? IX(1,i) : IX(i,1));
-    Index & ci = (dim==1 ? IX(2,i) : IX(i,2));
+    YScalar & a = (dim==1 ? Y.coeffRef(0,i) : Y.coeffRef(i,0));
+    YScalar & b = (dim==1 ? Y.coeffRef(1,i) : Y.coeffRef(i,1));
+    YScalar & c = (dim==1 ? Y.coeffRef(2,i) : Y.coeffRef(i,2));
+    Index & ai = (dim==1 ? IX.coeffRef(0,i) : IX.coeffRef(i,0));
+    Index & bi = (dim==1 ? IX.coeffRef(1,i) : IX.coeffRef(i,1));
+    Index & ci = (dim==1 ? IX.coeffRef(2,i) : IX.coeffRef(i,2));
     if(ascending)
     {
       // 123 132 213 231 312 321

+ 2 - 2
tutorial/106_ViewerMenu/main.cpp

@@ -79,8 +79,8 @@ int main(int argc, char *argv[])
   menu.callback_draw_custom_window = [&]()
   {
     // Define next window position + size
-    ImGui::SetNextWindowPos(ImVec2(180.f * menu.menu_scaling(), 10), ImGuiSetCond_FirstUseEver);
-    ImGui::SetNextWindowSize(ImVec2(200, 160), ImGuiSetCond_FirstUseEver);
+    ImGui::SetNextWindowPos(ImVec2(180.f * menu.menu_scaling(), 10), ImGuiCond_FirstUseEver);
+    ImGui::SetNextWindowSize(ImVec2(200, 160), ImGuiCond_FirstUseEver);
     ImGui::Begin(
         "New Window", nullptr,
         ImGuiWindowFlags_NoSavedSettings