map_vertices_to_circle.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2014 Stefan Brugger <[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_MAP_VERTICES_TO_CIRCLE_H
  9. #define IGL_MAP_VERTICES_TO_CIRCLE_H
  10. #include "igl_inline.h"
  11. #include "PI.h"
  12. #include <Eigen/Dense>
  13. #include <vector>
  14. namespace igl
  15. {
  16. /// Map the vertices whose indices are in a given boundary loop (bnd) on the
  17. /// unit circle with spacing proportional to the original boundary edge
  18. /// lengths.
  19. ///
  20. /// @param[in] V #V by dim list of mesh vertex positions
  21. /// @param[in] b #W list of vertex ids
  22. /// @param[out] 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::VectorXi& bnd,
  26. Eigen::MatrixXd& UV);
  27. }
  28. #ifndef IGL_STATIC_LIBRARY
  29. # include "map_vertices_to_circle.cpp"
  30. #endif
  31. #endif