From ffaa6fe7c0ea22da9df27b0497805587a728f873 Mon Sep 17 00:00:00 2001 From: Jesse Talavera-Greenberg Date: Sun, 13 Mar 2016 20:19:19 -0400 Subject: [PATCH 1/2] Add missing cols/rows constants --- glm/gtx/type_trait.hpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/glm/gtx/type_trait.hpp b/glm/gtx/type_trait.hpp index 1875b1a0..98320f53 100644 --- a/glm/gtx/type_trait.hpp +++ b/glm/gtx/type_trait.hpp @@ -79,6 +79,8 @@ namespace glm static bool const is_mat = false; static bool const is_quat = false; static GLM_RELAXED_CONSTEXPR length_t components = 0; + static GLM_RELAXED_CONSTEXPR length_t cols = 0; + static GLM_RELAXED_CONSTEXPR length_t rows = 0; }; template <> @@ -88,6 +90,8 @@ namespace glm static bool const is_mat = false; static bool const is_quat = false; static GLM_RELAXED_CONSTEXPR length_t components = 1; + static GLM_RELAXED_CONSTEXPR length_t cols = 1; + static GLM_RELAXED_CONSTEXPR length_t rows = 1; }; template <> @@ -124,6 +128,8 @@ namespace glm static bool const is_mat = true; static bool const is_quat = false; static GLM_RELAXED_CONSTEXPR length_t components = 2; + static GLM_RELAXED_CONSTEXPR length_t cols = 2; + static GLM_RELAXED_CONSTEXPR length_t rows = 2; }; template <> @@ -133,6 +139,8 @@ namespace glm static bool const is_mat = true; static bool const is_quat = false; static GLM_RELAXED_CONSTEXPR length_t components = 2; + static GLM_RELAXED_CONSTEXPR length_t cols = 2; + static GLM_RELAXED_CONSTEXPR length_t rows = 3; }; template <> @@ -142,6 +150,8 @@ namespace glm static bool const is_mat = true; static bool const is_quat = false; static GLM_RELAXED_CONSTEXPR length_t components = 2; + static GLM_RELAXED_CONSTEXPR length_t cols = 2; + static GLM_RELAXED_CONSTEXPR length_t rows = 4; }; template <> @@ -162,6 +172,8 @@ namespace glm static bool const is_mat = true; static bool const is_quat = false; static GLM_RELAXED_CONSTEXPR length_t components = 3; + static GLM_RELAXED_CONSTEXPR length_t cols = 3; + static GLM_RELAXED_CONSTEXPR length_t rows = 3; }; template <> @@ -171,6 +183,8 @@ namespace glm static bool const is_mat = true; static bool const is_quat = false; static GLM_RELAXED_CONSTEXPR length_t components = 3; + static GLM_RELAXED_CONSTEXPR length_t cols = 3; + static GLM_RELAXED_CONSTEXPR length_t rows = 4; }; template <> @@ -180,6 +194,8 @@ namespace glm static bool const is_mat = true; static bool const is_quat = false; static GLM_RELAXED_CONSTEXPR length_t components = 4; + static GLM_RELAXED_CONSTEXPR length_t cols = 4; + static GLM_RELAXED_CONSTEXPR length_t rows = 2; }; template <> @@ -189,6 +205,8 @@ namespace glm static bool const is_mat = true; static bool const is_quat = false; static GLM_RELAXED_CONSTEXPR length_t components = 4; + static GLM_RELAXED_CONSTEXPR length_t cols = 4; + static GLM_RELAXED_CONSTEXPR length_t rows = 3; }; template <> @@ -198,6 +216,8 @@ namespace glm static bool const is_mat = true; static bool const is_quat = false; static GLM_RELAXED_CONSTEXPR length_t components = 4; + static GLM_RELAXED_CONSTEXPR length_t cols = 4; + static GLM_RELAXED_CONSTEXPR length_t rows = 4; }; template <> From ae15b8982b8502c6e04f0507e754e3437a3df3d0 Mon Sep 17 00:00:00 2001 From: Jesse Talavera-Greenberg Date: Sun, 13 Mar 2016 20:23:51 -0400 Subject: [PATCH 2/2] Correct type_trait info so it doesn't conflict with the file name --- glm/gtx/type_trait.hpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/glm/gtx/type_trait.hpp b/glm/gtx/type_trait.hpp index 98320f53..11ac72e7 100644 --- a/glm/gtx/type_trait.hpp +++ b/glm/gtx/type_trait.hpp @@ -24,19 +24,19 @@ /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN /// THE SOFTWARE. /// -/// @ref gtx_type_info -/// @file glm/gtx/type_info.hpp +/// @ref gtx_type_trait +/// @file glm/gtx/type_trait.hpp /// @date 2016-03-12 / 2016-03-12 /// @author Christophe Riccio /// /// @see core (dependence) /// -/// @defgroup gtx_type_info GLM_GTX_type_info +/// @defgroup gtx_type_trait GLM_GTX_type_trait /// @ingroup gtx /// -/// @brief Defines aligned types. +/// @brief Defines traits for each type. /// -/// need to be included to use these functionalities. +/// need to be included to use these functionalities. /////////////////////////////////////////////////////////////////////////////////// #pragma once @@ -46,12 +46,12 @@ #include "../detail/setup.hpp" #if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) -# pragma message("GLM: GLM_GTX_type_info extension included") +# pragma message("GLM: GLM_GTX_type_trait extension included") #endif namespace glm { - /// @addtogroup gtx_type_info + /// @addtogroup gtx_type_trait /// @{ template struct tvec1;