readOFF.h 634 B

12345678910111213141516171819202122232425262728293031
  1. //
  2. // IGL Lib - Simple C++ mesh library
  3. //
  4. // Copyright 2011, Daniele Panozzo. All rights reserved.
  5. // History:
  6. // return type changed from void to bool Alec 18 Sept 2011
  7. #ifndef IGL_READOFF_H
  8. #define IGL_READOFF_H
  9. #include "igl_inline.h"
  10. #include <Eigen/Core>
  11. #include <string>
  12. namespace igl
  13. {
  14. // read mesh from a ascii off file
  15. // Inputs:
  16. // str path to .off file
  17. // Outputs:
  18. // V eigen double matrix #V by 3
  19. // F eigen int matrix #F by 3
  20. IGL_INLINE bool readOFF (const std::string meshfile, Eigen::MatrixXd& V, Eigen::MatrixXi& F);
  21. }
  22. #ifdef IGL_HEADER_ONLY
  23. # include "readOFF.cpp"
  24. #endif
  25. #endif