write.h 723 B

1234567891011121314151617181920212223242526272829
  1. //
  2. // IGL Lib - Simple C++ mesh library
  3. //
  4. // Copyright 2011, Daniele Panozzo. All rights reserved.
  5. #ifndef IGL_WRITE_H
  6. #define IGL_WRITE_H
  7. #include "igl_inline.h"
  8. #include <Eigen/Core>
  9. #include <string>
  10. namespace igl
  11. {
  12. // write mesh to an ascii file with automatic detection of file format. supported: obj, off)
  13. // Known Bugs:
  14. // Does not correctly find file extensions: myfile.foo.off
  15. template <typename DerivedV, typename DerivedF>
  16. IGL_INLINE bool write(
  17. const std::string str,
  18. const Eigen::PlainObjectBase<DerivedV>& V,
  19. const Eigen::PlainObjectBase<DerivedF>& F);
  20. }
  21. #ifdef IGL_HEADER_ONLY
  22. # include "write.cpp"
  23. #endif
  24. #endif