matrix_access.hpp 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /// @ref gtc_matrix_access
  2. /// @file glm/gtc/matrix_access.hpp
  3. ///
  4. /// @see core (dependence)
  5. ///
  6. /// @defgroup gtc_matrix_access GLM_GTC_matrix_access
  7. /// @ingroup gtc
  8. ///
  9. /// Defines functions to access rows or columns of a matrix easily.
  10. /// <glm/gtc/matrix_access.hpp> need to be included to use these functionalities.
  11. #pragma once
  12. // Dependency:
  13. #include "../detail/setup.hpp"
  14. #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
  15. # pragma message("GLM: GLM_GTC_matrix_access extension included")
  16. #endif
  17. namespace glm
  18. {
  19. /// @addtogroup gtc_matrix_access
  20. /// @{
  21. /// Get a specific row of a matrix.
  22. /// @see gtc_matrix_access
  23. template <typename genType>
  24. GLM_FUNC_DECL typename genType::row_type row(
  25. genType const & m,
  26. length_t index);
  27. /// Set a specific row to a matrix.
  28. /// @see gtc_matrix_access
  29. template <typename genType>
  30. GLM_FUNC_DECL genType row(
  31. genType const & m,
  32. length_t index,
  33. typename genType::row_type const & x);
  34. /// Get a specific column of a matrix.
  35. /// @see gtc_matrix_access
  36. template <typename genType>
  37. GLM_FUNC_DECL typename genType::col_type column(
  38. genType const & m,
  39. length_t index);
  40. /// Set a specific column to a matrix.
  41. /// @see gtc_matrix_access
  42. template <typename genType>
  43. GLM_FUNC_DECL genType column(
  44. genType const & m,
  45. length_t index,
  46. typename genType::col_type const & x);
  47. /// @}
  48. }//namespace glm
  49. #include "matrix_access.inl"