Browse Source

Merge commit 'f73b87a415824de2f115955bc3047b70b3fd275e [formerly 162bbe0eb3e6a8fa49b85c7e1e861fc1f2aa282f]'

Former-commit-id: 01a18e9d53e76de62e10aae4b507ec65ebae86d4
Daniele Panozzo 10 years ago
parent
commit
af9f2faa7c

+ 1 - 0
.gitmodules

@@ -1,3 +1,4 @@
 [submodule "external/nanogui"]
 [submodule "external/nanogui"]
 	path = external/nanogui
 	path = external/nanogui
 	url = https://github.com/schuellc/nanogui.git
 	url = https://github.com/schuellc/nanogui.git
+        fetchRecursiveSubmodules = true

+ 9 - 1
README.md

@@ -84,6 +84,14 @@ libigl depends only on the [Eigen](http://eigen.tuxfamily.org) library.
 
 
 For more information see our [tutorial](tutorial/tutorial.html).
 For more information see our [tutorial](tutorial/tutorial.html).
 
 
+### Optional dependencies ###
+
+Libigl compartmentalizes its **optional** dependences via its directory
+organization in the `include/` folder. All header files located _directly_ in
+the `include/igl/` folder have only stl and Eigen as dependencies. For example,
+all of the headers that depend on CGAL are located in `include/igl/cgal`. For a
+full list of _optional_ dependencies check `optional/CMakeLists.txt`.
+
 ### GCC and the optional CGAL dependency
 ### GCC and the optional CGAL dependency
 The `include/igl/cgal/*.h` headers depend on CGAL. It has come to our attention
 The `include/igl/cgal/*.h` headers depend on CGAL. It has come to our attention
 that CGAL does not work properly with GCC 4.8. To the best of our knowledge,
 that CGAL does not work properly with GCC 4.8. To the best of our knowledge,
@@ -100,7 +108,7 @@ You can keep up to date by cloning a read-only copy of our GitHub
 [repository](https://github.com/libigl).
 [repository](https://github.com/libigl).
 
 
 ## Known Issues
 ## Known Issues
-We really heavily on Eigen. Nearly all inputs and outputs are Eigen matrices of
+We rely heavily on Eigen. Nearly all inputs and outputs are Eigen matrices of
 some kind. However, we currently _only_ officially support Eigen's default
 some kind. However, we currently _only_ officially support Eigen's default
 column-major ordering. That means, we **do not** expect our code to work for
 column-major ordering. That means, we **do not** expect our code to work for
 matrices using the `Eigen::RowMajor` flag. If you can, change definitions like:
 matrices using the `Eigen::RowMajor` flag. If you can, change definitions like:

+ 13 - 0
RELEASE_HISTORY.md

@@ -49,6 +49,19 @@ deprecated/repeated functions. The 3x3 svd code and dependent functions
 (including ARAP) were absorbed into the main library. Similarly, the boost
 (including ARAP) were absorbed into the main library. Similarly, the boost
 dependency extra was absorbed.
 dependency extra was absorbed.
 
 
+
+### External libraries as git subrepos ###
+The core functionality of libigl (still) just depends on stl, c++11 and Eigen.
+There are additional _optional_ dependencies (e.g. CGAL, embree, glfw, tetgen,
+triangle). Libigl functions using these are located (still) in sub-folders of
+the include directory (e.g.  `include/igl/cgal/`, `include/igl/embree/`). Prior
+to version 1.2 we included copies of the code for some of these dependencies in the
+`external/` directory. As of
+version 1.2, these have been replaced with git sub-repos. If you have cloned
+libigl _before version 1.2_ then you should issue 
+
+    git submodule update --init --recursive
+
 ### Deprecated/repeated functions ###
 ### Deprecated/repeated functions ###
 
 
 Old                                     | New
 Old                                     | New

+ 22 - 97
optional/README.md

@@ -20,9 +20,19 @@ from _this current directory_: issue:
 
 
     mkdir -p ../lib
     mkdir -p ../lib
     cd ../lib
     cd ../lib
-    cmake -DCMAKE_BUILD_TYPE=Release ..
+    cmake -DCMAKE_BUILD_TYPE=Release ../optional
     make
     make
 
 
+#### Warnings ####
+
+You should expect to see a few linker warnings of the form:
+
+    /opt/local/bin/ranlib: file: libigl.a(*.cpp.o) has no symbols
+
+These are (admittedly unpopular) functions that have never been used by us
+statically so we haven't explicit instantiations (yet).
+
+
 #### Examples ####
 #### Examples ####
 You can make a slew of examples by issuing:
 You can make a slew of examples by issuing:
 
 
@@ -31,38 +41,12 @@ You can make a slew of examples by issuing:
 
 
 #### External ####
 #### External ####
 
 
-> **Deprecation notice** All external libraries will be absorbed by libigl or
-> moved to separate git sub-repositories in the near future. The following
-> instructions are subject to immediate change.
 
 
 Finally there are a number of external libraries that we include in
 Finally there are a number of external libraries that we include in
 `./external/` because they are either difficult to obtain or they have been
 `./external/` because they are either difficult to obtain or they have been
 patched for easier use with libigl. Please see the respective readmes in those
 patched for easier use with libigl. Please see the respective readmes in those
-directories.
-
-
-##### Installing AntTweakBar #####
-To build a static AntTweakBar library on Mac OS X issue:
-
-    cd external/AntTweakBar/src
-    make -f Makefile.osx.igl
-
-##### Installing Tetgen #####
-To build the tetgen library and executable on Mac OS X issue:
-
-    cd external/tetgen
-    make clean
-    rm -f obj/*.o
-    make -f Makefile.igl tetgen
-    rm -f obj/*.o
-    make -f Makefile.igl tetlib
-
-##### Installing medit #####
-To build the igl version of the medit executable on Mac OS X issue:
-
-    cd external/medit
-    make -C libmesh
-    make -f Makefile.igl medit
+directories or build the tutorial using cmake, which will recursively build all
+dependencies.
 
 
 ##### Installing Embree 2.0 #####
 ##### Installing Embree 2.0 #####
 To build the embree library and executables on Mac OS X issue:
 To build the embree library and executables on Mac OS X issue:
@@ -78,72 +62,16 @@ To build the embree library and executables on Mac OS X issue:
     # this
     # this
     #sudo make install
     #sudo make install
 
 
-##### Installing tinyxml2 #####
-To build the a static tinyxml2 library on Mac OS X issue:
-
-    cd external/tinyxml2
-    cmake .
-    make
-
-
-##### Installing YImg #####
-To build the a static YImg library on Mac OS X issue:
-
-    cd external/yimg
-    make
-
-You may need to install libpng. Systems with X11 might find this already
-installed at `/usr/X11/lib`.
-
-
-### Windows (Experimental) ###
-
-> **Deprecation notice** Windows users should run cmake on the `CMakeLists.txt`
-> file in the current directory.
-
-To build a static library (.lib) on windows, open Visual Studio 2010.
-
-- New > Project ...
-- Visual C++ > Win32
-- Win32 Console Application
-- Name: libiglVisualStudio
-- Uncheck "Create directory for solution"
-- Then hit OK, and then Next
-- Check "Static Library"
-- Uncheck "Precompiled headers"
-- Add all include/igl/*.cpp to the sources directory
-- Add all include/igl/*.h to the headers directory
-- Open Project > libigl Properties...
-- Add the path to eigen3 to the include paths
-- Change the target name to libigl
-- Build and pray (this should create libigl.lib
-
-[Source](http://msdn.microsoft.com/en-us/library/ms235627(v=vs.80).aspx)
-
-## Examples ##
-To get started, we advise that you take a look at a few examples:
-
-    ./examples/hello-world/
-
-    ./examples/meshio/
-
-    ./examples/basic-topology/
-
-    ./examples/ReAntTweakBar/
-
 ## Extras ##
 ## Extras ##
-Libigl compartmentalizes dependences via its organization into a _main_ libigl
-library and "extras."
-
 
 
 ### bbw ###
 ### bbw ###
 This library extra contains functions for computing Bounded Biharmonic Weights, can
 This library extra contains functions for computing Bounded Biharmonic Weights, can
 be used with and without the [mosek](#mosek) extra via the `IGL_NO_MOSEK`
 be used with and without the [mosek](#mosek) extra via the `IGL_NO_MOSEK`
 macro.
 macro.
 
 
-### boost ###
-This library extra utilizes the graph functions in the boost library for find
-connected components and performing breadth-first traversals.
+### boolean ##
+This library extra contains functions for computing mesh-mesh booleans,
+depending on CGAL and optionally Cork.
 
 
 ### cgal ###
 ### cgal ###
 This library extra utilizes CGAL's efficient and exact intersection and
 This library extra utilizes CGAL's efficient and exact intersection and
@@ -163,16 +91,13 @@ quadratic programs.
 ### png ###
 ### png ###
 This library extra uses `libpng` and `YImage` to read and write `.png` files.
 This library extra uses `libpng` and `YImage` to read and write `.png` files.
 
 
-### svd3x3 ###
-This library extra implements "as-rigid-as-possible" (ARAP) deformation
-techniques using the fast singular value decomposition routines
-written specifically for 3x3 matrices to use `SSE` intrinsics. This extra can
-still be compiled without sse support and support should be determined
-automatically at compile time via the `__SSE__` macro.
-
 ### tetgen ###
 ### tetgen ###
-This library extra provides a simplified wrapper to the tetgen 3d tetrahedral meshing
-library.
+This library extra provides a simplified wrapper to the tetgen 3d tetrahedral
+meshing library.
+
+### Triangle ###
+This library extra provides a simplified wrapper to the triangle 2d triangle
+meshing library.
 
 
 ### viewer ###
 ### viewer ###
 This library extra utilizes glfw and glew to open an opengl context and launch
 This library extra utilizes glfw and glew to open an opengl context and launch

+ 6 - 0
tutorial/103_Events/main.cpp

@@ -1,5 +1,6 @@
 #include <igl/readOFF.h>
 #include <igl/readOFF.h>
 #include <igl/viewer/Viewer.h>
 #include <igl/viewer/Viewer.h>
+#include <iostream>
 
 
 Eigen::MatrixXd V1,V2;
 Eigen::MatrixXd V1,V2;
 Eigen::MatrixXi F1,F2;
 Eigen::MatrixXi F1,F2;
@@ -7,6 +8,7 @@ Eigen::MatrixXi F1,F2;
 // This function is called every time a keyboard button is pressed
 // This function is called every time a keyboard button is pressed
 bool key_down(igl::viewer::Viewer& viewer, unsigned char key, int modifier)
 bool key_down(igl::viewer::Viewer& viewer, unsigned char key, int modifier)
 {
 {
+  std::cout<<"Key: "<<key<<" "<<(unsigned int)key<<std::endl;
   if (key == '1')
   if (key == '1')
   {
   {
     // Clear should be called before drawing the mesh
     // Clear should be called before drawing the mesh
@@ -33,6 +35,10 @@ int main(int argc, char *argv[])
   // Load two meshes
   // Load two meshes
   igl::readOFF("../shared/bumpy.off", V1, F1);
   igl::readOFF("../shared/bumpy.off", V1, F1);
   igl::readOFF("../shared/fertility.off", V2, F2);
   igl::readOFF("../shared/fertility.off", V2, F2);
+  std::cout<<R"(
+1 Switch to bump mesh
+2 Switch to fertility mesh
+    )";
 
 
   igl::viewer::Viewer viewer;
   igl::viewer::Viewer viewer;
   // Register a keyboard callback that allows to switch between
   // Register a keyboard callback that allows to switch between

+ 3 - 1
tutorial/609_Boolean/CMakeLists.txt

@@ -5,7 +5,9 @@ find_package(CGAL REQUIRED)
 include(${CGAL_USE_FILE})
 include(${CGAL_USE_FILE})
 # CGAL's monkeying with all of the flags. Rather than change the CGAL_USE_FILE
 # CGAL's monkeying with all of the flags. Rather than change the CGAL_USE_FILE
 # just get ride of this flag.
 # just get ride of this flag.
-remove_cxx_flag("-stdlib=libc++")
+if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
+  remove_cxx_flag("-stdlib=libc++")
+endif()
 
 
 # This is absolutely necessary for Exact Construction
 # This is absolutely necessary for Exact Construction
 
 

+ 4 - 2
tutorial/cmake/FindGLEW.cmake

@@ -6,8 +6,10 @@
 #  GLEW_SOURCES - the GLEW source file list
 #  GLEW_SOURCES - the GLEW source file list
 
 
 FIND_PATH(GLEW_INCLUDE_DIR GL/glew.h
 FIND_PATH(GLEW_INCLUDE_DIR GL/glew.h
-   ${PROJECT_SOURCE_DIR}/../../external/glew/include
-   ${PROJECT_SOURCE_DIR}/../external/glew/include
+   ${PROJECT_SOURCE_DIR}/../../../external/nanogui/ext/glew/include
+   ${PROJECT_SOURCE_DIR}/../../external/nanogui/ext/glew/include
+   ${PROJECT_SOURCE_DIR}/../external/nanogui/ext/glew/include
+   ${PROJECT_SOURCE_DIR}/external/nanogui/ext/glew/include
    ${PROJECT_SOURCE_DIR}/../../../libigl/external/nanogui/ext/glew/include
    ${PROJECT_SOURCE_DIR}/../../../libigl/external/nanogui/ext/glew/include
    ${PROJECT_SOURCE_DIR}/../../libigl/external/nanogui/ext/glew/include
    ${PROJECT_SOURCE_DIR}/../../libigl/external/nanogui/ext/glew/include
    ${PROJECT_SOURCE_DIR}/../libigl/external/nanogui/ext/glew/include
    ${PROJECT_SOURCE_DIR}/../libigl/external/nanogui/ext/glew/include