transform.hpp 1.7 KB

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