extend.hpp 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /// @ref gtx_extend
  2. /// @file glm/gtx/extend.hpp
  3. ///
  4. /// @see core (dependence)
  5. ///
  6. /// @defgroup gtx_extend GLM_GTX_extend
  7. /// @ingroup gtx
  8. ///
  9. /// Include <glm/gtx/extend.hpp> to use the features of this extension.
  10. ///
  11. /// Extend a position from a source to a position at a defined length.
  12. #pragma once
  13. // Dependency:
  14. #include "../glm.hpp"
  15. #ifndef GLM_ENABLE_EXPERIMENTAL
  16. # error "GLM: GLM_GTX_extend 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. #endif
  18. #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
  19. # pragma message("GLM: GLM_GTX_extend extension included")
  20. #endif
  21. namespace glm
  22. {
  23. /// @addtogroup gtx_extend
  24. /// @{
  25. /// Extends of Length the Origin position using the (Source - Origin) direction.
  26. /// @see gtx_extend
  27. template<typename genType>
  28. GLM_FUNC_DECL genType extend(
  29. genType const& Origin,
  30. genType const& Source,
  31. typename genType::value_type const Length);
  32. /// @}
  33. }//namespace glm
  34. #include "extend.inl"