launch_medit.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. #ifndef IGL_LAUNCH_MEDIT_H
  2. #define IGL_LAUNCH_MEDIT_H
  3. #include "igl_inline.h"
  4. #include <Eigen/Dense>
  5. namespace igl
  6. {
  7. // Writes the tetmesh in (V,T,F) to a temporary file, opens it with medit
  8. // (forking with a system call) and returns
  9. //
  10. //
  11. // Templates:
  12. // DerivedV real-value: i.e. from MatrixXd
  13. // DerivedT integer-value: i.e. from MatrixXi
  14. // DerivedF integer-value: i.e. from MatrixXi
  15. // Inputs:
  16. // V double matrix of vertex positions #V by 3
  17. // T #T list of tet indices into vertex positions
  18. // F #F list of face indices into vertex positions
  19. // wait whether to wait for medit process to finish before returning
  20. // Returns returned value of system call (probably not useful if wait=false
  21. // because of the fork)
  22. template <typename DerivedV, typename DerivedT, typename DerivedF>
  23. IGL_INLINE int launch_medit(
  24. const Eigen::MatrixBase<DerivedV> & V,
  25. const Eigen::MatrixBase<DerivedT> & T,
  26. const Eigen::MatrixBase<DerivedF> & F,
  27. const bool wait);
  28. }
  29. #ifdef IGL_HEADER_ONLY
  30. # include "launch_medit.cpp"
  31. #endif
  32. #endif