launch_medit.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2013 Alec Jacobson <alecjacobson@gmail.com>
  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. //
  18. // Templates:
  19. // DerivedV real-value: i.e. from MatrixXd
  20. // DerivedT integer-value: i.e. from MatrixXi
  21. // DerivedF integer-value: i.e. from MatrixXi
  22. // Inputs:
  23. // V double matrix of vertex positions #V by 3
  24. // T #T list of tet indices into vertex positions
  25. // F #F list of face indices into vertex positions
  26. // wait whether to wait for medit process to finish before returning
  27. // Returns returned value of system call (probably not useful if wait=false
  28. // because of the fork)
  29. template <typename DerivedV, typename DerivedT, typename DerivedF>
  30. IGL_INLINE int launch_medit(
  31. const Eigen::PlainObjectBase<DerivedV> & V,
  32. const Eigen::PlainObjectBase<DerivedT> & T,
  33. const Eigen::PlainObjectBase<DerivedF> & F,
  34. const bool wait);
  35. }
  36. #ifndef IGL_STATIC_LIBRARY
  37. # include "launch_medit.cpp"
  38. #endif
  39. #endif