writeOBJ.h 709 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 20 Sept 2011
  7. #ifndef IGL_WRITEOBJ_H
  8. #define IGL_WRITEOBJ_H
  9. #include "igl_inline.h"
  10. #include <Eigen/Core>
  11. #include <string>
  12. namespace igl
  13. {
  14. // Write a mesh in an ascii obj file
  15. // Inputs:
  16. // str path to outputfile
  17. // V eigen double matrix #V by 3 (mesh vertices)
  18. // F eigen int matrix #F by 3 (mesh indices)
  19. // Returns true on success, false on error
  20. IGL_INLINE bool writeOBJ(const std::string str, const Eigen::MatrixXd& V, const Eigen::MatrixXi& F);
  21. }
  22. #ifdef IGL_HEADER_ONLY
  23. # include "writeOBJ.cpp"
  24. #endif
  25. #endif