map_vertices_to_circle.h 1.1 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_MAP_VERTICES_TO_CIRCLE_H
  9. #define IGL_MAP_VERTICES_TO_CIRCLE_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 a given boundary loop (bnd) on the
  16. // unit circle with spacing proportional to the original boundary edge
  17. // lengths.
  18. //
  19. // Inputs:
  20. // V #V by dim list of mesh vertex positions
  21. // b #W list of vertex ids
  22. // Outputs:
  23. // UV #W by 2 list of 2D position on the unit circle for the vertices in b
  24. IGL_INLINE void map_vertices_to_circle(
  25. const Eigen::MatrixXd& V,
  26. const Eigen::VectorXi& bnd,
  27. Eigen::MatrixXd& UV);
  28. }
  29. #ifndef IGL_STATIC_LIBRARY
  30. # include "map_vertices_to_circle.cpp"
  31. #endif
  32. #endif