rotate_vectors.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2014 Daniele Panozzo <[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_ROTATE_VECTORS_H
  9. #define IGL_ROTATE_VECTORS_H
  10. #include "igl_inline.h"
  11. #include <Eigen/Core>
  12. namespace igl
  13. {
  14. /// Rotate the vectors V by A radians on the tangent plane spanned by B1 and
  15. /// B2
  16. ///
  17. /// @param[in] V #V by 3 eigen Matrix of vectors
  18. /// @param[in] A #V eigen vector of rotation angles or a single angle to be applied
  19. /// to all vectors
  20. /// @param[in] B1 #V by 3 eigen Matrix of base vector 1
  21. /// @param[in] B2 #V by 3 eigen Matrix of base vector 2
  22. /// @return the rotated vectors
  23. ///
  24. IGL_INLINE Eigen::MatrixXd rotate_vectors(
  25. const Eigen::MatrixXd& V,
  26. const Eigen::VectorXd& A,
  27. const Eigen::MatrixXd& B1,
  28. const Eigen::MatrixXd& B2);
  29. }
  30. #ifndef IGL_STATIC_LIBRARY
  31. # include "rotate_vectors.cpp"
  32. #endif
  33. #endif