readme.txt 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  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. libigl may also be compiled to a static library. This is advantageous when
  50. building a project with libigl, since the header only directive can slow down
  51. compile times.
  52. To build the entire libigl library producing lib/libigl.a, issue:
  53. make lib
  54. You may need to edit Makefile.conf accordingly. Best to give yourself an
  55. IGL_USERNAME and add a custom install suite for yourself. Then you can enable
  56. appropriate extras.
  57. = Extras =
  58. Once you've set up an IGL_USERNAME and enabled extras within Makefile.conf.
  59. You can build the extra libraries (into lib/ligiglpng.a, lib/libiglmatlab.a,
  60. lib/libigltetgen.a and lib/libiglmosek.a) by issuing:
  61. make extras
  62. = Examples =
  63. You can make a slew of examples by issuing:
  64. make examples
  65. = External =
  66. Finally there are a number of external libraries that we include in
  67. ./external/ because they are either difficult to obtain or they have been
  68. patched for easier use with libigl. Please see the respective readmes in
  69. those directories.
  70. = Examples =
  71. To get started, we advise that you take a look at a few examples:
  72. ./examples/hello-world/
  73. ./examples/meshio/
  74. ./examples/basic-topology/
  75. ./examples/ReAntTweakBar/
  76. = Development =
  77. Further documentation for developers is listed in tutorial.html,
  78. style_guidelines.html
  79. = License =
  80. For now, all files are Copyright 2013 - Alec Jacobson, Daniele Panozzo, Olga
  81. Diamanti, Kenshi Takayama, Leo Sacht, Interactive Geometry Lab - ETH Zurich
  82. unless otherwise noted. Soon we hope to upgrade to a more liberal license.
  83. = Zipping =
  84. Zip this directory without .hg litter using:
  85. make clean
  86. zip -9 -r --exclude=*.hg* libigl.zip ../libigl
  87. = Contact =
  88. libigl is a group endeavor led by Alec Jacobson and Daniele Panozzo. Please
  89. contact alecjacobson@gmail.com if you have questions or comments. We are happy
  90. to get feedback! Enjoy!