map_vertices_to_circle.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2014 Stefan Brugger <stefanbrugger@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_MAPVERTICESTOCIRCLE_H
  9. #define IGL_MAPVERTICESTOCIRCLE_H
  10. #include <igl/igl_inline.h>
  11. #include <Eigen/Dense>
  12. #include <vector>
  13. namespace igl
  14. {
  15. // Map the vertices whose indices are in b on the unit circle.
  16. //
  17. // Inputs:
  18. // V #V by dim list of mesh vertex positions
  19. // F #V by dim list of mesh faces
  20. // b #W list of vertex ids
  21. // Outputs:
  22. // UV #W by 2 list of 2D position on the unit circle for the vertices in b
  23. IGL_INLINE void map_vertices_to_circle(
  24. const Eigen::MatrixXd& V,
  25. const Eigen::MatrixXi& F,
  26. const Eigen::VectorXi& b,
  27. Eigen::MatrixXd& UV);
  28. }
  29. #ifdef IGL_HEADER_ONLY
  30. # include "map_vertices_to_circle.cpp"
  31. #endif
  32. #endif