view_axis.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2013 Alec Jacobson <alecjacobson@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_VIEW_AXIS_H
  9. #define IGL_VIEW_AXIS_H
  10. #include "igl_inline.h"
  11. #include <Eigen/Core>
  12. namespace igl
  13. {
  14. // Determines the view axis or depth axis of the current gl matrix
  15. // Inputs:
  16. // mv pointer to modelview matrix
  17. // Outputs:
  18. // x pointer to x-coordinate in scene coordinates of the un-normalized
  19. // viewing axis
  20. // y pointer to y-coordinate in scene coordinates of the un-normalized
  21. // viewing axis
  22. // z pointer to z-coordinate in scene coordinates of the un-normalized
  23. // viewing axis
  24. //
  25. // Note: View axis is returned *UN-normalized*
  26. IGL_INLINE void view_axis(const double * mv, double * x, double * y, double * z);
  27. // Extract mv from current GL state.
  28. IGL_INLINE void view_axis(double * x, double * y, double * z);
  29. template <typename DerivedV>
  30. IGL_INLINE void view_axis(Eigen::PlainObjectBase<DerivedV> & V);
  31. };
  32. #ifndef IGL_STATIC_LIBRARY
  33. # include "view_axis.cpp"
  34. #endif
  35. #endif