view_axis.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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. // Outputs:
  16. // x pointer to x-coordinate in scene coordinates of the un-normalized
  17. // viewing axis
  18. // y pointer to y-coordinate in scene coordinates of the un-normalized
  19. // viewing axis
  20. // z pointer to z-coordinate in scene coordinates of the un-normalized
  21. // viewing axis
  22. // mv pointer to modelview matrix
  23. //
  24. // Note: View axis is returned *UN-normalized*
  25. IGL_INLINE void view_axis(double * x, double * y, double * z);
  26. IGL_INLINE void view_axis(const double * mv, double * x, double * y, double * z);
  27. template <typename DerivedV>
  28. IGL_INLINE void view_axis(Eigen::PlainObjectBase<DerivedV> & V);
  29. };
  30. #ifdef IGL_HEADER_ONLY
  31. # include "view_axis.cpp"
  32. #endif
  33. #endif