readme.txt 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. libigl - A simple c++ geometry processing library
  2. Copyright 2013 - Alec Jacobson, Daniele Panozzo, Olga Diamanti, Kenshi
  3. Takayama, Leo Sacht, Interactive Geometry Lab - ETH Zurich
  4. This is first and foremost a *header* library. Each header file should contain
  5. a single function. The function may have multiple prototypes. All functions
  6. should use the igl namespace and should adhere to the conventions and styles
  7. listed below.
  8. = Dependencies =
  9. Eigen3 Last tested with Eigen Version 3.1.2
  10. AntTweakBar Last tested 1.14 (see External)
  11. OpenGL
  12. GLUT
  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. = Header only =
  22. libigl is designed to work "out-of-the-box" as a headers only library. To
  23. include libigl in your project. You need only include the libigl/include/
  24. directory in your include path and define the IGL_HEADER_ONLY macro. To
  25. compile a hello-word example.cpp:
  26. #include <Eigen/Dense>
  27. #include <igl/readOBJ.h>
  28. #include <iostream>
  29. int main(int argc, char * argv[])
  30. {
  31. if(argc>1)
  32. {
  33. Eigen::MatrixXd V;
  34. Eigen::MatrixXi F;
  35. igl::readOBJ(argv[1],V,F);
  36. std::cout<<"Hello, mesh with "<<V.rows()<<" vertices!"<<std::endl;
  37. }else{
  38. std::cout<<"Hello, world!"<<std::endl;
  39. }
  40. return 0;
  41. }
  42. using gcc (replacing appropriate paths):
  43. g++ -DIGL_HEADER_ONLY -I/usr/local/igl/igl_lib/include \
  44. -I/opt/local/include/eigen3 example.cpp -o example
  45. Then run this example with:
  46. ./example examples/shared/TinyTorus.obj
  47. = Compile =
  48. libigl may also be compiled to a static library. This is advantageous when
  49. building a project with libigl, since the header only directive can slow down
  50. compile times.
  51. To build the entire libigl library producing lib/libigl.a, issue:
  52. make lib
  53. You may need to edit Makefile.conf accordingly. Best to give yourself an
  54. IGL_USERNAME and add a custom install suite for yourself. Then you can enable
  55. appropriate extras.
  56. = Extras =
  57. Once you've set up an IGL_USERNAME and enabled extras within Makefile.conf.
  58. You can build the extra libraries (into lib/ligiglpng.a, lib/libiglmatlab.a,
  59. lib/libigltetgen.a and lib/libiglmosek.a) by issuing:
  60. make extras
  61. = Examples =
  62. You can make a slew of examples by issuing:
  63. make examples
  64. = External =
  65. Finally there are a number of external libraries that we include in
  66. ./external/ because they are either difficult to obtain or they have been
  67. patched for easier use with libigl. Please see the respective readmes in
  68. those directories.
  69. = Examples =
  70. To get started, we advise that you take a look at a few examples:
  71. ./examples/hello-world/
  72. ./examples/meshio/
  73. ./examples/basic-topology/
  74. ./examples/ReAntTweakBar/
  75. = Development =
  76. Further documentation is listed for developers in tutorial.html,
  77. style_guidelines.html
  78. = License =
  79. For now, all files are Copyright 2013 - Alec Jacobson, Daniele Panozzo, Olga
  80. Diamanti, Kenshi Takayama, Leo Sacht, Interactive Geometry Lab - ETH Zurich
  81. unless otherwise noted. Soon we hope to upgrade to a more liberal license.
  82. = Zipping =
  83. Zip this directory without .hg litter using:
  84. make clean
  85. zip -9 -r --exclude=*.hg* libigl.zip ../libigl
  86. = Contact =
  87. libigl is a group endeavor led by Alec Jacobson and Daniele Panozzo. Please
  88. contact alecjacobson@gmail.com if you have questions or comments. We are happy
  89. to get feedback! Enjoy!