writeOBJ.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #ifndef IGL_WRITEOBJ_H
  2. #define IGL_WRITEOBJ_H
  3. #include "igl_inline.h"
  4. // History:
  5. // return type changed from void to bool Alec 20 Sept 2011
  6. #include <Eigen/Core>
  7. #include <string>
  8. namespace igl
  9. {
  10. // Write a mesh in an ascii obj file
  11. // Inputs:
  12. // str path to outputfile
  13. // V eigen double matrix #V by 3 (mesh vertices)
  14. // F eigen int matrix #F by 3 (mesh indices)
  15. // Returns true on success, false on error
  16. template <typename DerivedV, typename DerivedF>
  17. IGL_INLINE bool writeOBJ(
  18. const std::string str,
  19. const Eigen::PlainObjectBase<DerivedV>& V,
  20. const Eigen::PlainObjectBase<DerivedF>& F);
  21. template <typename DerivedV, typename DerivedF, typename DerivedT>
  22. IGL_INLINE bool writeOBJ(
  23. const std::string str,
  24. const Eigen::PlainObjectBase<DerivedV>& V,
  25. const Eigen::PlainObjectBase<DerivedF>& F,
  26. const Eigen::PlainObjectBase<DerivedV>& CN,
  27. const Eigen::PlainObjectBase<DerivedF>& FN,
  28. const Eigen::PlainObjectBase<DerivedT>& TC,
  29. const Eigen::PlainObjectBase<DerivedF>& FTC);
  30. }
  31. #ifdef IGL_HEADER_ONLY
  32. # include "writeOBJ.cpp"
  33. #endif
  34. #endif