diff --git a/glm/core/type_vec3.inl b/glm/core/type_vec3.inl index ed41f9ab..11b182d2 100644 --- a/glm/core/type_vec3.inl +++ b/glm/core/type_vec3.inl @@ -1153,7 +1153,7 @@ namespace detail ////////////////////////////////////// // Static constants - template const tvec3 tvec3::xpos = tvec3(T( 1), T( 0), T (0)); + 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)); template const tvec3 tvec3::yneg = tvec3(T( 0), T(-1), T( 0)); diff --git a/glm/core/type_vec4.hpp b/glm/core/type_vec4.hpp index 23450a22..da8a5a56 100644 --- a/glm/core/type_vec4.hpp +++ b/glm/core/type_vec4.hpp @@ -300,6 +300,26 @@ namespace detail GLM_FUNC_DECL tref2 swizzle(comp X, comp Y); GLM_FUNC_DECL tref3 swizzle(comp X, comp Y, comp Z); GLM_FUNC_DECL tref4 swizzle(comp X, comp Y, comp Z, comp W); + + + ////////////////////////////////////// + // Static constants + + static const tvec4 xpos; + static const tvec4 xneg; + static const tvec4 ypos; + static const tvec4 yneg; + static const tvec4 zpos; + static const tvec4 zneg; + static const tvec4 wpos; + static const tvec4 wneg; + + static const tvec4 right; + static const tvec4 left; + static const tvec4 up; + static const tvec4 down; + static const tvec4 backward; + static const tvec4 forward; }; template diff --git a/glm/core/type_vec4.inl b/glm/core/type_vec4.inl index 8944c9db..b7cb8118 100644 --- a/glm/core/type_vec4.inl +++ b/glm/core/type_vec4.inl @@ -1374,5 +1374,26 @@ namespace detail return tvec4(this->x, this->y, this->z, this->w); } + + + ////////////////////////////////////// + // Static constants + + 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)); + template const tvec4 tvec4::yneg = tvec4(T( 0), T(-1), T( 0), T( 0)); + template const tvec4 tvec4::zpos = tvec4(T( 0), T( 0), T( 1), T( 0)); + template const tvec4 tvec4::zneg = tvec4(T( 0), T( 0), T(-1), T( 0)); + template const tvec4 tvec4::wpos = tvec4(T( 0), T( 0), T( 0), T( 1)); + template const tvec4 tvec4::wneg = tvec4(T( 0), T( 0), T( 0), T(-1)); + + template const tvec4 tvec4::right = tvec4(T( 1), T( 0), T( 0), T( 0)); + template const tvec4 tvec4::left = tvec4(T(-1), T( 0), T( 0), T( 0)); + template const tvec4 tvec4::up = tvec4(T( 0), T( 1), T( 0), T( 0)); + template const tvec4 tvec4::down = tvec4(T( 0), T(-1), T( 0), T( 0)); + template const tvec4 tvec4::backward = tvec4(T( 0), T( 0), T( 1), T( 0)); + template const tvec4 tvec4::forward = tvec4(T( 0), T( 0), T(-1), T( 0)); + }//namespace detail }//namespace glm