transform.hpp 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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. #ifndef GLM_ENABLE_EXPERIMENTAL
  20. # error "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."
  21. #elif GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
  22. # pragma message("GLM: GLM_GTX_transform extension included")
  23. #endif
  24. namespace glm
  25. {
  26. /// @addtogroup gtx_transform
  27. /// @{
  28. /// Transforms a matrix with a translation 4 * 4 matrix created from 3 scalars.
  29. /// @see gtc_matrix_transform
  30. /// @see gtx_transform
  31. template<typename T, qualifier Q>
  32. GLM_FUNC_DECL mat<4, 4, T, Q> translate(
  33. vec<3, T, Q> const& v);
  34. /// Builds a rotation 4 * 4 matrix created from an axis of 3 scalars and an angle expressed in radians.
  35. /// @see gtc_matrix_transform
  36. /// @see gtx_transform
  37. template<typename T, qualifier Q>
  38. GLM_FUNC_DECL mat<4, 4, T, Q> rotate(
  39. T angle,
  40. vec<3, T, Q> const& v);
  41. /// Transforms a matrix with a scale 4 * 4 matrix created from a vector of 3 components.
  42. /// @see gtc_matrix_transform
  43. /// @see gtx_transform
  44. template<typename T, qualifier Q>
  45. GLM_FUNC_DECL mat<4, 4, T, Q> scale(
  46. vec<3, T, Q> const& v);
  47. /// @}
  48. }// namespace glm
  49. #include "transform.inl"