projection.hpp 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /// @ref gtx_projection
  2. /// @file glm/gtx/projection.hpp
  3. ///
  4. /// @see core (dependence)
  5. ///
  6. /// @defgroup gtx_projection GLM_GTX_projection
  7. /// @ingroup gtx
  8. ///
  9. /// Include <glm/gtx/projection.hpp> to use the features of this extension.
  10. ///
  11. /// Projection of a vector to other one
  12. #pragma once
  13. // Dependency:
  14. #include "../geometric.hpp"
  15. #ifndef GLM_ENABLE_EXPERIMENTAL
  16. # error "GLM: GLM_GTX_projection is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
  17. #elif GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
  18. # pragma message("GLM: GLM_GTX_projection extension included")
  19. #endif
  20. namespace glm
  21. {
  22. /// @addtogroup gtx_projection
  23. /// @{
  24. /// Projects x on Normal.
  25. ///
  26. /// @param[in] x A vector to project
  27. /// @param[in] Normal A normal that doesn't need to be of unit length.
  28. ///
  29. /// @see gtx_projection
  30. template<typename genType>
  31. GLM_FUNC_DECL genType proj(genType const& x, genType const& Normal);
  32. /// @}
  33. }//namespace glm
  34. #include "projection.inl"