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 12 #pragma once 13 14 // Dependency: 15 #include "../detail/setup.hpp" 16 17 #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) 18 # pragma message("GLM: GLM_GTC_matrix_access extension included") 19 #endif 20 21 namespace glm 22 { 23 /// @addtogroup gtc_matrix_access 24 /// @{ 25 26 /// Get a specific row of a matrix. 27 /// @see gtc_matrix_access 28 template <typename genType> 29 GLM_FUNC_DECL typename genType::row_type row( 30 genType const & m, 31 length_t index); 32 33 /// Set a specific row to a matrix. 34 /// @see gtc_matrix_access 35 template <typename genType> 36 GLM_FUNC_DECL genType row( 37 genType const & m, 38 length_t index, 39 typename genType::row_type const & x); 40 41 /// Get a specific column of a matrix. 42 /// @see gtc_matrix_access 43 template <typename genType> 44 GLM_FUNC_DECL typename genType::col_type column( 45 genType const & m, 46 length_t index); 47 48 /// Set a specific column to a matrix. 49 /// @see gtc_matrix_access 50 template <typename genType> 51 GLM_FUNC_DECL genType column( 52 genType const & m, 53 length_t index, 54 typename genType::col_type const & x); 55 56 /// @} 57 }//namespace glm 58 59 #include "matrix_access.inl" 60