false_barycentric_subdivision.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  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_ADD_BARYCENTER_H
  9. #define IGL_ADD_BARYCENTER_H
  10. #include "igl_inline.h"
  11. #include <Eigen/Dense>
  12. namespace igl
  13. {
  14. /// Refine the mesh by adding the barycenter of each face
  15. ///
  16. /// @param[in] V #V by 3 coordinates of the vertices
  17. /// @param[in] F #F by 3 list of mesh faces (must be triangles)
  18. /// @param[out] VD #V + #F by 3 coordinate of the vertices of the dual mesh
  19. /// The added vertices are added at the end of VD (should not be
  20. /// same references as (V,F)
  21. /// @param[out] FD #F*3 by 3 faces of the dual mesh
  22. template <typename DerivedV, typename DerivedF, typename DerivedVD, typename DerivedFD>
  23. IGL_INLINE void false_barycentric_subdivision(
  24. const Eigen::MatrixBase<DerivedV> & V,
  25. const Eigen::MatrixBase<DerivedF> & F,
  26. Eigen::PlainObjectBase<DerivedVD> & VD,
  27. Eigen::PlainObjectBase<DerivedFD> & FD);
  28. }
  29. #ifndef IGL_STATIC_LIBRARY
  30. # include "false_barycentric_subdivision.cpp"
  31. #endif
  32. #endif