readme.txt 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. libigl - A simple c++ geometry processing library
  2. http://igl.ethz.ch/projects/libigl/
  3. Copyright 2013 - Alec Jacobson, Daniele Panozzo, Olga Diamanti, Kenshi
  4. Takayama, Leo Sacht, Interactive Geometry Lab - ETH Zurich
  5. This is first and foremost a *header* library. Each header file should contain
  6. a single function. The function may have multiple prototypes. All functions
  7. should use the igl namespace and should adhere to the conventions and styles
  8. listed below.
  9. = Dependencies =
  10. Eigen3 Last tested with Eigen Version 3.1.2
  11. AntTweakBar Last tested 1.14 (see External)
  12. OpenGL
  13. GLUT
  14. GLEW Windows only
  15. = Optional =
  16. OpenMP
  17. libpng libiglpng extra only
  18. Mosek libiglmosek extra only
  19. Matlab libiglmatlab extra only
  20. = Optional (included in external/ =
  21. TetGen libigltetgen extra only
  22. = Header only =
  23. libigl is designed to work "out-of-the-box" as a headers only library. To
  24. include libigl in your project. You need only include the libigl/include/
  25. directory in your include path and define the IGL_HEADER_ONLY macro. To
  26. compile a hello-word example.cpp:
  27. #include <Eigen/Dense>
  28. #include <igl/readOBJ.h>
  29. #include <iostream>
  30. int main(int argc, char * argv[])
  31. {
  32. if(argc>1)
  33. {
  34. Eigen::MatrixXd V;
  35. Eigen::MatrixXi F;
  36. igl::readOBJ(argv[1],V,F);
  37. std::cout<<"Hello, mesh with "<<V.rows()<<" vertices!"<<std::endl;
  38. }else{
  39. std::cout<<"Hello, world!"<<std::endl;
  40. }
  41. return 0;
  42. }
  43. using gcc (replacing appropriate paths):
  44. g++ -DIGL_HEADER_ONLY -I/usr/local/igl/libigl/include \
  45. -I/opt/local/include/eigen3 example.cpp -o example
  46. Then run this example with:
  47. ./example examples/shared/TinyTorus.obj
  48. = Compile =
  49. = Linux/Mac OS X/Cygwin =
  50. libigl may also be compiled to a static library. This is advantageous when
  51. building a project with libigl, since the header only directive can slow down
  52. compile times.
  53. To build the entire libigl library producing lib/libigl.a, issue:
  54. make lib
  55. You may need to edit Makefile.conf accordingly. Best to give yourself an
  56. IGL_USERNAME and add a custom install suite for yourself. Then you can enable
  57. appropriate extras.
  58. = Extras =
  59. Once you've set up an IGL_USERNAME and enabled extras within Makefile.conf.
  60. You can build the extra libraries (into lib/ligiglpng.a, lib/libiglmatlab.a,
  61. lib/libigltetgen.a and lib/libiglmosek.a) by issuing:
  62. make extras
  63. = Examples =
  64. You can make a slew of examples by issuing:
  65. make examples
  66. = External =
  67. Finally there are a number of external libraries that we include in
  68. ./external/ because they are either difficult to obtain or they have been
  69. patched for easier use with libigl. Please see the respective readmes in
  70. those directories.
  71. = Windows (Experimental) =
  72. To build a static library (.lib) on windows, open Visual Studio 2010.
  73. New > Project ...
  74. Visual C++ > Win32
  75. Win32 Console Application
  76. Name: libiglVisualStudio
  77. Uncheck "Create directory for solution"
  78. Then hit OK, and then Next
  79. Check "Static Library"
  80. Uncheck "Precompiled headers"
  81. Add all include/igl/*.cpp to the sources directory
  82. Add all include/igl/*.h to the headers directory
  83. Open Project > libigl Properties...
  84. Add the path to eigen3 to the include paths
  85. Change the target name to libigl
  86. Build and pray (this should create libigl.lib
  87. = Source =
  88. http://msdn.microsoft.com/en-us/library/ms235627(v=vs.80).aspx
  89. = Examples =
  90. To get started, we advise that you take a look at a few examples:
  91. ./examples/hello-world/
  92. ./examples/meshio/
  93. ./examples/basic-topology/
  94. ./examples/ReAntTweakBar/
  95. = Development =
  96. Further documentation for developers is listed in tutorial.html,
  97. style_guidelines.html
  98. = License =
  99. For now, all files are Copyright 2013 - Alec Jacobson, Daniele Panozzo, Olga
  100. Diamanti, Kenshi Takayama, Leo Sacht, Interactive Geometry Lab - ETH Zurich
  101. unless otherwise noted. Soon we hope to upgrade to a more liberal license.
  102. = Zipping =
  103. Zip this directory without .hg litter using:
  104. make clean
  105. zip -9 -r --exclude=@exclude.lst libigl.zip ../libigl
  106. = Contact =
  107. libigl is a group endeavor led by Alec Jacobson and Daniele Panozzo. Please
  108. contact alecjacobson@gmail.com if you have questions or comments. We are happy
  109. to get feedback! Enjoy!