launch_medit.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2013 Alec Jacobson <[email protected]>
  4. //
  5. // This Source Code Form is subject to the terms of the Mozilla Public License
  6. // v. 2.0. If a copy of the MPL was not distributed with this file, You can
  7. // obtain one at http://mozilla.org/MPL/2.0/.
  8. #ifndef IGL_LAUNCH_MEDIT_H
  9. #define IGL_LAUNCH_MEDIT_H
  10. #include "igl_inline.h"
  11. #include <Eigen/Core>
  12. namespace igl
  13. {
  14. /// Writes the tetmesh in (V,T,F) to a temporary file, opens it with medit
  15. /// (forking with a system call) and returns
  16. ///
  17. /// @tparam DerivedV real-value: i.e. from MatrixXd
  18. /// @tparam DerivedT integer-value: i.e. from MatrixXi
  19. /// @tparam DerivedF integer-value: i.e. from MatrixXi
  20. /// @param[in] V double matrix of vertex positions #V by 3
  21. /// @param[in] T #T list of tet indices into vertex positions
  22. /// @param[in] F #F list of face indices into vertex positions
  23. /// @param[in] wait whether to wait for medit process to finish before returning
  24. /// @return returned value of system call (probably not useful if wait=false
  25. /// because of the fork)
  26. template <typename DerivedV, typename DerivedT, typename DerivedF>
  27. IGL_INLINE int launch_medit(
  28. const Eigen::PlainObjectBase<DerivedV> & V,
  29. const Eigen::PlainObjectBase<DerivedT> & T,
  30. const Eigen::PlainObjectBase<DerivedF> & F,
  31. const bool wait);
  32. }
  33. #ifndef IGL_STATIC_LIBRARY
  34. # include "launch_medit.cpp"
  35. #endif
  36. #endif