readme.txt 4.2 KB

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