mesh_to_tetgenio.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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_COPYLEFT_TETGEN_MESH_TO_TETGENIO_H
  9. #define IGL_COPYLEFT_TETGEN_MESH_TO_TETGENIO_H
  10. #include "../../igl_inline.h"
  11. #ifndef TETLIBRARY
  12. # define TETLIBRARY
  13. #endif
  14. #include "tetgen.h" // Defined tetgenio, REAL
  15. #include <vector>
  16. #include <Eigen/Core>
  17. namespace igl
  18. {
  19. namespace copyleft
  20. {
  21. namespace tetgen
  22. {
  23. /// Load a vertex list and face list into a tetgenio object
  24. ///
  25. /// @param[in] V #V by 3 vertex position list
  26. /// @param[in] F #F list of polygon face indices into V (0-indexed)
  27. /// @param[out] in tetgenio input object
  28. /// @param[out] H #H list of seed point inside each hole
  29. /// @param[out] R #R list of seed point inside each region
  30. template <
  31. typename DerivedV,
  32. typename DerivedF,
  33. typename DerivedH,
  34. typename DerivedVM,
  35. typename DerivedFM,
  36. typename DerivedR>
  37. IGL_INLINE void mesh_to_tetgenio(
  38. const Eigen::MatrixBase<DerivedV>& V,
  39. const Eigen::MatrixBase<DerivedF>& F,
  40. const Eigen::MatrixBase<DerivedH>& H,
  41. const Eigen::MatrixBase<DerivedVM>& VM,
  42. const Eigen::MatrixBase<DerivedFM>& FM,
  43. const Eigen::MatrixBase<DerivedR>& R,
  44. tetgenio & in);
  45. }
  46. }
  47. }
  48. #ifndef IGL_STATIC_LIBRARY
  49. # include "mesh_to_tetgenio.cpp"
  50. #endif
  51. #endif