readme.txt 4.2 KB

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