rotate_vectors.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2014 Daniele Panozzo <daniele.panozzo@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_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 radiants on the tangent plane spanned by B1 and
  15. // B2
  16. //
  17. // Inputs:
  18. // V #V by 3 eigen Matrix of vectors
  19. // A #V eigen vector of rotation angles or a single angle to be applied
  20. // to all vectors
  21. // B1 #V by 3 eigen Matrix of base vector 1
  22. // B2 #V by 3 eigen Matrix of base vector 2
  23. //
  24. // Output:
  25. // Returns the rotated vectors
  26. //
  27. IGL_INLINE Eigen::MatrixXd rotate_vectors(
  28. const Eigen::MatrixXd& V,
  29. const Eigen::VectorXd& A,
  30. const Eigen::MatrixXd& B1,
  31. const Eigen::MatrixXd& B2);
  32. }
  33. #ifndef IGL_STATIC_LIBRARY
  34. # include "rotate_vectors.cpp"
  35. #endif
  36. #endif