ortho.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2015 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_ORTHO_H
  9. #define IGL_ORTHO_H
  10. #include "igl_inline.h"
  11. #include <Eigen/Dense>
  12. namespace igl
  13. {
  14. // Implementation of the deprecated glOrtho function.
  15. //
  16. // Inputs:
  17. // left coordinate of left vertical clipping plane
  18. // right coordinate of right vertical clipping plane
  19. // bottom coordinate of bottom vertical clipping plane
  20. // top coordinate of top vertical clipping plane
  21. // nearVal distance to near plane
  22. // farVal distance to far plane
  23. // Outputs:
  24. // P 4x4 perspective matrix
  25. template < typename DerivedP>
  26. IGL_INLINE void ortho(
  27. const typename DerivedP::Scalar left,
  28. const typename DerivedP::Scalar right,
  29. const typename DerivedP::Scalar bottom,
  30. const typename DerivedP::Scalar top,
  31. const typename DerivedP::Scalar nearVal,
  32. const typename DerivedP::Scalar farVal,
  33. Eigen::PlainObjectBase<DerivedP> & P);
  34. }
  35. #ifndef IGL_STATIC_LIBRARY
  36. # include "ortho.cpp"
  37. #endif
  38. #endif