9
3

transform.hpp 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /// @ref gtx_transform
  2. /// @file glm/gtx/transform.hpp
  3. ///
  4. /// @see core (dependence)
  5. /// @see gtc_matrix_transform (dependence)
  6. /// @see gtx_transform
  7. /// @see gtx_transform2
  8. ///
  9. /// @defgroup gtx_transform GLM_GTX_transform
  10. /// @ingroup gtx
  11. ///
  12. /// Include <glm/gtx/transform.hpp> to use the features of this extension.
  13. ///
  14. /// Add transformation matrices
  15. #pragma once
  16. // Dependency:
  17. #include "../glm.hpp"
  18. #include "../gtc/matrix_transform.hpp"
  19. #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
  20. # ifndef GLM_ENABLE_EXPERIMENTAL
  21. # pragma message("GLM: GLM_GTX_transform 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.")
  22. # else
  23. # pragma message("GLM: GLM_GTX_transform extension included")
  24. # endif
  25. #endif
  26. namespace glm
  27. {
  28. /// @addtogroup gtx_transform
  29. /// @{
  30. /// Transforms a matrix with a translation 4 * 4 matrix created from 3 scalars.
  31. /// @see gtc_matrix_transform
  32. /// @see gtx_transform
  33. template<typename T, qualifier Q>
  34. GLM_FUNC_DECL mat<4, 4, T, Q> translate(
  35. vec<3, T, Q> const& v);
  36. /// Builds a rotation 4 * 4 matrix created from an axis of 3 scalars and an angle expressed in radians.
  37. /// @see gtc_matrix_transform
  38. /// @see gtx_transform
  39. template<typename T, qualifier Q>
  40. GLM_FUNC_DECL mat<4, 4, T, Q> rotate(
  41. T angle,
  42. vec<3, T, Q> const& v);
  43. /// Transforms a matrix with a scale 4 * 4 matrix created from a vector of 3 components.
  44. /// @see gtc_matrix_transform
  45. /// @see gtx_transform
  46. template<typename T, qualifier Q>
  47. GLM_FUNC_DECL mat<4, 4, T, Q> scale(
  48. vec<3, T, Q> const& v);
  49. /// @}
  50. }// namespace glm
  51. #include "transform.inl"