From 88e13a1e1613d2d0cfae69b13c539f48eb8664aa Mon Sep 17 00:00:00 2001 From: Dave Reid Date: Sat, 22 Dec 2012 14:42:33 +1000 Subject: [PATCH] Add zero and one constants to tvec2, tvec3 and tvec4. --- glm/core/type_vec2.hpp | 3 +++ glm/core/type_vec2.inl | 3 +++ glm/core/type_vec3.hpp | 3 +++ glm/core/type_vec3.inl | 3 +++ glm/core/type_vec4.hpp | 3 +++ glm/core/type_vec4.inl | 3 +++ 6 files changed, 18 insertions(+) diff --git a/glm/core/type_vec2.hpp b/glm/core/type_vec2.hpp index 3efb090b..9b16fe1e 100644 --- a/glm/core/type_vec2.hpp +++ b/glm/core/type_vec2.hpp @@ -224,6 +224,9 @@ namespace detail ////////////////////////////////////// // Static constants + static const tvec2 zero; + static const tvec2 one; + static const tvec2 xpos; static const tvec2 xneg; static const tvec2 ypos; diff --git a/glm/core/type_vec2.inl b/glm/core/type_vec2.inl index 1a1f501c..2d0e104f 100644 --- a/glm/core/type_vec2.inl +++ b/glm/core/type_vec2.inl @@ -1029,6 +1029,9 @@ namespace detail ////////////////////////////////////// // Static constants + template const tvec2 tvec2::zero = tvec2(T( 0), T( 0)); + template const tvec2 tvec2::one = tvec2(T( 1), T( 1)); + template const tvec2 tvec2::xpos = tvec2(T( 1), T( 0)); template const tvec2 tvec2::xneg = tvec2(T(-1), T( 0)); template const tvec2 tvec2::ypos = tvec2(T( 0), T( 1)); diff --git a/glm/core/type_vec3.hpp b/glm/core/type_vec3.hpp index 8e38b6b4..006ff3cc 100644 --- a/glm/core/type_vec3.hpp +++ b/glm/core/type_vec3.hpp @@ -249,6 +249,9 @@ namespace detail ////////////////////////////////////// // Static constants + static const tvec3 zero; + static const tvec3 one; + static const tvec3 xpos; static const tvec3 xneg; static const tvec3 ypos; diff --git a/glm/core/type_vec3.inl b/glm/core/type_vec3.inl index 11b182d2..1a269d1f 100644 --- a/glm/core/type_vec3.inl +++ b/glm/core/type_vec3.inl @@ -1153,6 +1153,9 @@ namespace detail ////////////////////////////////////// // Static constants + template const tvec3 tvec3::zero = tvec3(T( 0), T( 0), T( 0)); + template const tvec3 tvec3::one = tvec3(T( 1), T( 1), T( 1)); + template const tvec3 tvec3::xpos = tvec3(T( 1), T( 0), T( 0)); template const tvec3 tvec3::xneg = tvec3(T(-1), T( 0), T( 0)); template const tvec3 tvec3::ypos = tvec3(T( 0), T( 1), T( 0)); diff --git a/glm/core/type_vec4.hpp b/glm/core/type_vec4.hpp index da8a5a56..88118794 100644 --- a/glm/core/type_vec4.hpp +++ b/glm/core/type_vec4.hpp @@ -305,6 +305,9 @@ namespace detail ////////////////////////////////////// // Static constants + static const tvec4 zero; + static const tvec4 one; + static const tvec4 xpos; static const tvec4 xneg; static const tvec4 ypos; diff --git a/glm/core/type_vec4.inl b/glm/core/type_vec4.inl index b7cb8118..e1464716 100644 --- a/glm/core/type_vec4.inl +++ b/glm/core/type_vec4.inl @@ -1379,6 +1379,9 @@ namespace detail ////////////////////////////////////// // Static constants + template const tvec4 tvec4::zero = tvec4(T( 0), T( 0), T( 0), T( 0)); + template const tvec4 tvec4::one = tvec4(T( 1), T( 1), T( 1), T( 1)); + template const tvec4 tvec4::xpos = tvec4(T( 1), T( 0), T( 0), T( 0)); template const tvec4 tvec4::xneg = tvec4(T(-1), T( 0), T( 0), T( 0)); template const tvec4 tvec4::ypos = tvec4(T( 0), T( 1), T( 0), T( 0));