소스 검색

bbw example compiling again, viewer compiling again

Former-commit-id: 221d08d84570ec04c00015b72d0fb9ad7887662a
Alec Jacobson 11 년 전
부모
커밋
218d5330be

+ 1 - 0
include/igl/bbw/bbw.cpp

@@ -106,6 +106,7 @@ IGL_INLINE bool igl::bbw(
       {
         //if(data.verbosity >= 1)
         //{
+          cout<<"BBW: max_iter: "<<data.active_set_params.max_iter<<endl;
           cout<<"BBW: max_iter: "<<eff_params.max_iter<<endl;
         //}
         if(data.verbosity >= 1)

+ 1 - 0
include/igl/viewer/Viewer.h

@@ -26,6 +26,7 @@
 #endif
 
 #include <Eigen/Core>
+#include <Eigen/Geometry>
 #include <igl/viewer/OpenGL_shader.h>
 #include <igl/viewer/ViewerData.h>
 #include <igl/viewer/OpenGL_state.h>

+ 1 - 0
include/igl/viewer/ViewerCore.cpp

@@ -8,6 +8,7 @@
 
 #include "ViewerCore.h"
 #include <igl/quat_to_mat.h>
+#include <Eigen/Geometry>
 
 
 Eigen::Matrix4f lookAt (

+ 0 - 2
tutorial/403_BoundedBiharmonicWeights/CMakeLists.txt

@@ -3,8 +3,6 @@ project(403_BoundedBiharmonicWeights)
 
 include("../CMakeLists.shared")
 
-add_definitions(-DIGL_NO_MOSEK)
-
 set(SOURCES
 ${PROJECT_SOURCE_DIR}/main.cpp
 )

+ 6 - 15
tutorial/403_BoundedBiharmonicWeights/main.cpp

@@ -1,11 +1,12 @@
 // Don't use static library for this example because of Mosek complications
 //#define IGL_NO_MOSEK
-#ifdef IGL_NO_MOSEK
-#undef IGL_STATIC_LIBRARY
-#endif
+//#ifdef IGL_NO_MOSEK
+//#undef IGL_STATIC_LIBRARY
+//#endif
 #include <igl/boundary_conditions.h>
 #include <igl/colon.h>
 #include <igl/column_to_quats.h>
+#include <igl/directed_edge_parents.h>
 #include <igl/forward_kinematics.h>
 #include <igl/jet.h>
 #include <igl/lbs_matrix.h>
@@ -114,18 +115,7 @@ int main(int argc, char *argv[])
   U=V;
   igl::readTGF("../shared/hand.tgf",C,BE);
   // retrieve parents for forward kinematics
-  P.resize(BE.rows(),1);
-  for(int e = 0;e<BE.rows();e++)
-  {
-    P(e) = -1;
-    for(int f = 0;f<BE.rows();f++)
-    {
-      if(BE(e,0) == BE(f,1))
-      {
-        P(e) = f;
-      }
-    }
-  }
+  igl::directed_edge_parents(BE,P);
 
   // Read pose as matrix of quaternions per row
   MatrixXd Q;
@@ -143,6 +133,7 @@ int main(int argc, char *argv[])
   igl::BBWData bbw_data;
   // only a few iterations for sake of demo
   bbw_data.active_set_params.max_iter = 8;
+  bbw_data.verbosity = 2;
   if(!igl::bbw(V,T,b,bc,bbw_data,W))
   {
     return false;

+ 3 - 0
tutorial/CMakeLists.shared

@@ -10,6 +10,9 @@ set(CMAKE_COLOR_MAKEFILE ON)
 find_package(ANTTWEAKBAR REQUIRED)
 find_package(OpenGL REQUIRED)
 find_package(EIGEN REQUIRED)
+# Mosek is not required but must be found before libigl to ensure correct flags
+# are set
+find_package(Mosek)
 find_package(LIBIGL REQUIRED)
 find_package(GLFW REQUIRED)
 

+ 0 - 1
tutorial/cmake/FindLIBIGL.cmake

@@ -52,7 +52,6 @@ if(LIBIGL_USE_STATIC_LIBRARY)
     set(LIBIGL_FOUND FALSE)
   endif(NOT LIBIGLMOSEK_LIBRARY)
   set(LIBIGL_LIBRARIES ${LIBIGL_LIBRARIES}  ${LIBIGLMOSEK_LIBRARY})
-  find_package(Mosek REQUIRED)
   if(MOSEK_FOUND)
     set(LIBIGL_INCLUDE_DIR ${LIBIGL_INCLUDE_DIR}  ${MOSEK_INCLUDE_DIR})
     set(LIBIGL_LIBRARIES ${LIBIGL_LIBRARIES}  ${MOSEK_LIBRARIES})