read.h 683 B

1234567891011121314151617181920212223242526272829303132
  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_READ_H
  8. #define IGL_READ_H
  9. #include "igl_inline.h"
  10. #include <Eigen/Core>
  11. #include <string>
  12. namespace igl
  13. {
  14. // read mesh from an ascii file with automatic detection of file format. supported: obj, off)
  15. // Inputs:
  16. // str path to .obj/.off file
  17. // Outputs:
  18. // V eigen double matrix #V by 3
  19. // F eigen int matrix #F by 3
  20. IGL_INLINE bool read(const std::string str, Eigen::MatrixXd& V, Eigen::MatrixXi& F);
  21. }
  22. #ifdef IGL_HEADER_ONLY
  23. # include "read.cpp"
  24. #endif
  25. #endif