Jelajahi Sumber

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

Former-commit-id: e0f4b963aef67c1b6ff630b3daf325fc7409e7c3
Alec Jacobson 11 tahun lalu
induk
melakukan
ba7c876314

+ 1 - 1
tutorial/607_LIM/main.cpp

@@ -36,7 +36,7 @@ bool key_down(igl::Viewer& viewer,unsigned char key,int modifier)
       igl::compute_lim(V1,V0,F,bv,g,C,b,energy,1e-8,100,true);
 
     // set mesh
-    viewer.set_mesh(V1,F);
+    viewer.set_vertices(V1);
   }
 
 

+ 0 - 3
tutorial/CMakeLists.shared

@@ -10,9 +10,6 @@ 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)
 

+ 3 - 3
tutorial/CMakeLists.txt

@@ -38,9 +38,9 @@ add_subdirectory("304_LinearEqualityConstraints")
 add_subdirectory("305_QuadraticProgramming")
 
 # Chapter 4
-#add_subdirectory("401_BiharmonicDeformation")
-#add_subdirectory("402_PolyharmonicDeformation")
-#add_subdirectory("403_BoundedBiharmonicWeights")
+add_subdirectory("401_BiharmonicDeformation")
+add_subdirectory("402_PolyharmonicDeformation")
+add_subdirectory("403_BoundedBiharmonicWeights")
 
 # Chapter 5
 add_subdirectory("501_HarmonicParam")

+ 9 - 1
tutorial/cmake/FindLIBIGL.cmake

@@ -5,6 +5,10 @@
 #  LIBIGL_INCLUDE_DIR - the LIBIGL include directory
 #  LIBIGL_SOURCES - the LIBIGL source files
 
+# Mosek is not required but must be found before libigl to ensure correct flags
+# are set
+find_package(Mosek QUIET)
+
 FIND_PATH(LIBIGL_INCLUDE_DIR igl/readOBJ.h
    /usr/include
    /usr/local/include
@@ -25,9 +29,13 @@ if(LIBIGL_INCLUDE_DIR)
    #)
 endif(LIBIGL_INCLUDE_DIR)
 
+if (NOT MOSEK_FOUND)
+  add_definitions(-DIGL_NO_MOSEK)
+endif (NOT MOSEK_FOUND)
+
 if(LIBIGL_USE_STATIC_LIBRARY)
   add_definitions(-DIGL_STATIC_LIBRARY)
-  set(LIBIGL_LIB_DIRS 
+  set(LIBIGL_LIB_DIRS
    /usr/lib
    /usr/local/lib
    $ENV{LIBIGLROOT}/lib

+ 5 - 5
tutorial/readme.md

@@ -16,7 +16,7 @@ with the performance and versatility of C++.  The tutorial is a self-contained,
 hands-on introduction to libigl.  Via live coding and interactive examples, we
 demonstrate how to accomplish various common geometry processing tasks such as
 computation of differential quantities and operators, real-time deformation,
-global parametrization, numerical optimization and mesh repair.  Each section
+global parametrization, numerical optimization and mesh repair. Each section
 of these lecture notes links to a cross-platform example application.
 
 # Table of Contents
@@ -792,13 +792,13 @@ deformation.
 ### Biharmonic deformation fields
 Now we know that one useful property for a deformation technique is "rest pose
 reproduction": applying no deformation to the handles should apply no
-deformation to the shape. 
+deformation to the shape.
 
 To guarantee this by construction we can work with _deformation fields_ (ie.
 displacements)
-$\mathbf{d}$ rather 
+$\mathbf{d}$ rather
 than directly with positions $\mathbf{x}. Then the deformed positions can be
-recovered as 
+recovered as
 
  $\mathbf{x}' = \mathbf{x}+\mathbf{d}.$
 
@@ -907,7 +907,7 @@ as a constrained optimization problem [#jacobson_2011][]. The weights enforce
 smoothness by minimizing a smoothness energy: the familiar Laplacian energy:
 
  $\sum\limits_{i = 1}^m \int_S (\Delta w_i)^2 dA$
-  
+
 subject to constraints which enforce interpolation of handle constraints:
 
  $w_i(\mathbf{x}) = \begin{cases} 1 & \text{ if } \mathbf{x} \in H_i\\ 0 & \text{ otherwise }