up_axis.h 1.0 KB

123456789101112131415161718192021222324252627282930313233
  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_UP_AXIS_H
  9. #define IGL_UP_AXIS_H
  10. #include "igl_inline.h"
  11. namespace igl
  12. {
  13. // Determines the up axis or depth axis of the current gl matrix
  14. // Outputs:
  15. // x pointer to x-coordinate in scene coordinates of the un-normalized
  16. // up axis
  17. // y pointer to y-coordinate in scene coordinates of the un-normalized
  18. // up axis
  19. // z pointer to z-coordinate in scene coordinates of the un-normalized
  20. // up axis
  21. // mv pointer to modelview matrix
  22. //
  23. // Note: Up axis is returned *UN-normalized*
  24. IGL_INLINE void up_axis(double * x, double * y, double * z);
  25. IGL_INLINE void up_axis(const double * mv, double * x, double * y, double * z);
  26. };
  27. #ifdef IGL_HEADER_ONLY
  28. # include "up_axis.cpp"
  29. #endif
  30. #endif