from_cork_mesh.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2015 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_FROM_CORK_MESH_H
  9. #define IGL_FROM_CORK_MESH_H
  10. #ifndef IGL_NO_CORK
  11. #include <igl/igl_inline.h>
  12. #include <cork.h>
  13. #include <Eigen/Core>
  14. namespace igl
  15. {
  16. // Convert cork's triangle mesh representation to a (V,F) mesh.
  17. //
  18. // Inputs:
  19. // mesh cork representation of mesh
  20. // Outputs:
  21. // V #V by 3 list of vertex positions
  22. // F #F by 3 list of triangle indices into V
  23. template <
  24. typename DerivedV,
  25. typename DerivedF>
  26. IGL_INLINE void from_cork_mesh(
  27. const CorkTriMesh & mesh,
  28. Eigen::PlainObjectBase<DerivedV > & V,
  29. Eigen::PlainObjectBase<DerivedF > & F);
  30. }
  31. #ifndef IGL_STATIC_LIBRARY
  32. # include "from_cork_mesh.cpp"
  33. #endif
  34. #endif
  35. #endif