diff --git a/glm/detail/precision.hpp b/glm/detail/precision.hpp index 32785b94..c657d031 100644 --- a/glm/detail/precision.hpp +++ b/glm/detail/precision.hpp @@ -42,12 +42,4 @@ namespace glm simd, defaultp = highp }; - - template class genType> - struct type - { - static bool const is_vec = false; - static bool const is_mat = false; - static bool const is_quat = false; - }; }//namespace glm diff --git a/glm/detail/type_mat2x2.hpp b/glm/detail/type_mat2x2.hpp index a263d54d..0388e759 100644 --- a/glm/detail/type_mat2x2.hpp +++ b/glm/detail/type_mat2x2.hpp @@ -54,17 +54,6 @@ namespace glm template friend tvec2 operator/(tvec2 const & v, tmat2x2 const & m); -# ifdef GLM_META_PROG_HELPERS - static GLM_RELAXED_CONSTEXPR length_t components = 2; - static GLM_RELAXED_CONSTEXPR length_t cols = 2; - static GLM_RELAXED_CONSTEXPR length_t rows = 2; - static GLM_RELAXED_CONSTEXPR precision prec = P; -# endif//GLM_META_PROG_HELPERS - -# ifdef GLM_STATIC_CONST_MEMBERS - static const type ZERO; - static const type IDENTITY; -# endif private: col_type value[2]; @@ -113,19 +102,11 @@ namespace glm // -- Accesses -- -# ifdef GLM_FORCE_SIZE_FUNC - typedef size_t size_type; - GLM_FUNC_DECL GLM_CONSTEXPR size_t size() const; + typedef length_t length_type; + GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const; - GLM_FUNC_DECL col_type & operator[](size_type i); - GLM_FUNC_DECL col_type const & operator[](size_type i) const; -# else - typedef length_t length_type; - GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const; - - GLM_FUNC_DECL col_type & operator[](length_type i); - GLM_FUNC_DECL col_type const & operator[](length_type i) const; -# endif//GLM_FORCE_SIZE_FUNC + GLM_FUNC_DECL col_type & operator[](length_type i); + GLM_FUNC_DECL col_type const & operator[](length_type i) const; // -- Unary arithmetic operators -- @@ -229,16 +210,6 @@ namespace glm template GLM_FUNC_DECL bool operator!=(tmat2x2 const & m1, tmat2x2 const & m2); - - // -- Is type -- - - template - struct type - { - static bool const is_vec = false; - static bool const is_mat = true; - static bool const is_quat = false; - }; } //namespace glm #ifndef GLM_EXTERNAL_TEMPLATE diff --git a/glm/detail/type_mat2x2.inl b/glm/detail/type_mat2x2.inl index 3f215e3f..960fee57 100644 --- a/glm/detail/type_mat2x2.inl +++ b/glm/detail/type_mat2x2.inl @@ -50,13 +50,6 @@ namespace detail } }//namespace detail -# ifdef GLM_STATIC_CONST_MEMBERS - template - const tmat2x2 tmat2x2::ZERO(static_cast(0)); - - template - const tmat2x2 tmat2x2::IDENTITY(static_cast(1)); -# endif // -- Constructors -- # if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT) diff --git a/glm/detail/type_mat2x3.hpp b/glm/detail/type_mat2x3.hpp index 7fc67faa..da412319 100644 --- a/glm/detail/type_mat2x3.hpp +++ b/glm/detail/type_mat2x3.hpp @@ -50,18 +50,6 @@ namespace glm typedef tmat3x2 transpose_type; typedef T value_type; -# ifdef GLM_META_PROG_HELPERS - static GLM_RELAXED_CONSTEXPR length_t components = 2; - static GLM_RELAXED_CONSTEXPR length_t cols = 2; - static GLM_RELAXED_CONSTEXPR length_t rows = 3; - static GLM_RELAXED_CONSTEXPR precision prec = P; -# endif//GLM_META_PROG_HELPERS - -# ifdef GLM_STATIC_CONST_MEMBERS - static const type ZERO; - static const type IDENTITY; -# endif - private: col_type value[2]; @@ -110,19 +98,11 @@ namespace glm // -- Accesses -- -# ifdef GLM_FORCE_SIZE_FUNC - typedef size_t size_type; - GLM_FUNC_DECL GLM_CONSTEXPR size_t size() const; + typedef length_t length_type; + GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const; - GLM_FUNC_DECL col_type & operator[](size_type i); - GLM_FUNC_DECL col_type const & operator[](size_type i) const; -# else - typedef length_t length_type; - GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const; - - GLM_FUNC_DECL col_type & operator[](length_type i); - GLM_FUNC_DECL col_type const & operator[](length_type i) const; -# endif//GLM_FORCE_SIZE_FUNC + GLM_FUNC_DECL col_type & operator[](length_type i); + GLM_FUNC_DECL col_type const & operator[](length_type i) const; // -- Unary arithmetic operators -- @@ -207,16 +187,6 @@ namespace glm template GLM_FUNC_DECL bool operator!=(tmat2x3 const & m1, tmat2x3 const & m2); - - // -- Is type -- - - template - struct type - { - static bool const is_vec = false; - static bool const is_mat = true; - static bool const is_quat = false; - }; }//namespace glm #ifndef GLM_EXTERNAL_TEMPLATE diff --git a/glm/detail/type_mat2x3.inl b/glm/detail/type_mat2x3.inl index e7cabb72..76c00f50 100644 --- a/glm/detail/type_mat2x3.inl +++ b/glm/detail/type_mat2x3.inl @@ -32,13 +32,6 @@ namespace glm { -# ifdef GLM_STATIC_CONST_MEMBERS - template - const tmat2x3 tmat2x3::ZERO(static_cast(0)); - - template - const tmat2x3 tmat2x3::IDENTITY(static_cast(1)); -# endif // -- Constructors -- # if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT) diff --git a/glm/detail/type_mat2x4.hpp b/glm/detail/type_mat2x4.hpp index e03e0948..7e0cc87d 100644 --- a/glm/detail/type_mat2x4.hpp +++ b/glm/detail/type_mat2x4.hpp @@ -50,18 +50,6 @@ namespace glm typedef tmat4x2 transpose_type; typedef T value_type; -# ifdef GLM_META_PROG_HELPERS - static GLM_RELAXED_CONSTEXPR length_t components = 2; - static GLM_RELAXED_CONSTEXPR length_t cols = 2; - static GLM_RELAXED_CONSTEXPR length_t rows = 4; - static GLM_RELAXED_CONSTEXPR precision prec = P; -# endif//GLM_META_PROG_HELPERS - -# ifdef GLM_STATIC_CONST_MEMBERS - static const type ZERO; - static const type IDENTITY; -# endif - private: col_type value[2]; @@ -112,19 +100,11 @@ namespace glm // -- Accesses -- -# ifdef GLM_FORCE_SIZE_FUNC - typedef size_t size_type; - GLM_FUNC_DECL GLM_CONSTEXPR size_t size() const; + typedef length_t length_type; + GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const; - GLM_FUNC_DECL col_type & operator[](size_type i); - GLM_FUNC_DECL col_type const & operator[](size_type i) const; -# else - typedef length_t length_type; - GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const; - - GLM_FUNC_DECL col_type & operator[](length_type i); - GLM_FUNC_DECL col_type const & operator[](length_type i) const; -# endif//GLM_FORCE_SIZE_FUNC + GLM_FUNC_DECL col_type & operator[](length_type i); + GLM_FUNC_DECL col_type const & operator[](length_type i) const; // -- Unary arithmetic operators -- @@ -209,16 +189,6 @@ namespace glm template GLM_FUNC_DECL bool operator!=(tmat2x4 const & m1, tmat2x4 const & m2); - - // -- Is type -- - - template - struct type - { - static bool const is_vec = false; - static bool const is_mat = true; - static bool const is_quat = false; - }; }//namespace glm #ifndef GLM_EXTERNAL_TEMPLATE diff --git a/glm/detail/type_mat2x4.inl b/glm/detail/type_mat2x4.inl index f92b4df5..cac649f6 100644 --- a/glm/detail/type_mat2x4.inl +++ b/glm/detail/type_mat2x4.inl @@ -32,13 +32,6 @@ namespace glm { -# ifdef GLM_STATIC_CONST_MEMBERS - template - const tmat2x4 tmat2x4::ZERO(static_cast(0)); - - template - const tmat2x4 tmat2x4::IDENTITY(static_cast(1)); -# endif // -- Constructors -- # if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT) diff --git a/glm/detail/type_mat3x2.hpp b/glm/detail/type_mat3x2.hpp index 2f594bb1..06922b6b 100644 --- a/glm/detail/type_mat3x2.hpp +++ b/glm/detail/type_mat3x2.hpp @@ -50,18 +50,6 @@ namespace glm typedef tmat2x3 transpose_type; typedef T value_type; -# ifdef GLM_META_PROG_HELPERS - static GLM_RELAXED_CONSTEXPR length_t components = 3; - static GLM_RELAXED_CONSTEXPR length_t cols = 3; - static GLM_RELAXED_CONSTEXPR length_t rows = 2; - static GLM_RELAXED_CONSTEXPR precision prec = P; -# endif//GLM_META_PROG_HELPERS - -# ifdef GLM_STATIC_CONST_MEMBERS - static const type ZERO; - static const type IDENTITY; -# endif - private: col_type value[3]; @@ -117,19 +105,11 @@ namespace glm // -- Accesses -- -# ifdef GLM_FORCE_SIZE_FUNC - typedef size_t size_type; - GLM_FUNC_DECL GLM_CONSTEXPR size_t size() const; + typedef length_t length_type; + GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const; - GLM_FUNC_DECL col_type & operator[](size_type i); - GLM_FUNC_DECL col_type const & operator[](size_type i) const; -# else - typedef length_t length_type; - GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const; - - GLM_FUNC_DECL col_type & operator[](length_type i); - GLM_FUNC_DECL col_type const & operator[](length_type i) const; -# endif//GLM_FORCE_SIZE_FUNC + GLM_FUNC_DECL col_type & operator[](length_type i); + GLM_FUNC_DECL col_type const & operator[](length_type i) const; // -- Unary arithmetic operators -- @@ -215,15 +195,6 @@ namespace glm template GLM_FUNC_DECL bool operator!=(tmat3x2 const & m1, tmat3x2 const & m2); - // -- Is type -- - - template - struct type - { - static bool const is_vec = false; - static bool const is_mat = true; - static bool const is_quat = false; - }; }//namespace glm #ifndef GLM_EXTERNAL_TEMPLATE diff --git a/glm/detail/type_mat3x2.inl b/glm/detail/type_mat3x2.inl index 24079cfe..f497e395 100644 --- a/glm/detail/type_mat3x2.inl +++ b/glm/detail/type_mat3x2.inl @@ -32,13 +32,6 @@ namespace glm { -# ifdef GLM_STATIC_CONST_MEMBERS - template - const tmat3x2 tmat3x2::ZERO(static_cast(0)); - - template - const tmat3x2 tmat3x2::IDENTITY(static_cast(1)); -# endif // -- Constructors -- # if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT) diff --git a/glm/detail/type_mat3x3.hpp b/glm/detail/type_mat3x3.hpp index 2aaae21e..806ae811 100644 --- a/glm/detail/type_mat3x3.hpp +++ b/glm/detail/type_mat3x3.hpp @@ -49,18 +49,6 @@ namespace glm typedef tmat3x3 transpose_type; typedef T value_type; -# ifdef GLM_META_PROG_HELPERS - static GLM_RELAXED_CONSTEXPR length_t components = 3; - static GLM_RELAXED_CONSTEXPR length_t cols = 3; - static GLM_RELAXED_CONSTEXPR length_t rows = 3; - static GLM_RELAXED_CONSTEXPR precision prec = P; -# endif//GLM_META_PROG_HELPERS - -# ifdef GLM_STATIC_CONST_MEMBERS - static const type ZERO; - static const type IDENTITY; -# endif - template friend tvec3 operator/(tmat3x3 const & m, tvec3 const & v); template @@ -121,19 +109,11 @@ namespace glm // -- Accesses -- -# ifdef GLM_FORCE_SIZE_FUNC - typedef size_t size_type; - GLM_FUNC_DECL GLM_CONSTEXPR size_t size() const; + typedef length_t length_type; + GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const; - GLM_FUNC_DECL col_type & operator[](size_type i); - GLM_FUNC_DECL col_type const & operator[](size_type i) const; -# else - typedef length_t length_type; - GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const; - - GLM_FUNC_DECL col_type & operator[](length_type i); - GLM_FUNC_DECL col_type const & operator[](length_type i) const; -# endif//GLM_FORCE_SIZE_FUNC + GLM_FUNC_DECL col_type & operator[](length_type i); + GLM_FUNC_DECL col_type const & operator[](length_type i) const; // -- Unary arithmetic operators -- @@ -237,16 +217,6 @@ namespace glm template GLM_FUNC_DECL bool operator!=(tmat3x3 const & m1, tmat3x3 const & m2); - - // -- Is type -- - - template - struct type - { - static bool const is_vec = false; - static bool const is_mat = true; - static bool const is_quat = false; - }; }//namespace glm #ifndef GLM_EXTERNAL_TEMPLATE diff --git a/glm/detail/type_mat3x3.inl b/glm/detail/type_mat3x3.inl index c3b07108..9ee0111e 100644 --- a/glm/detail/type_mat3x3.inl +++ b/glm/detail/type_mat3x3.inl @@ -56,14 +56,6 @@ namespace detail } }//namespace detail -# ifdef GLM_STATIC_CONST_MEMBERS - template - const tmat3x3 tmat3x3::ZERO(static_cast(0)); - - template - const tmat3x3 tmat3x3::IDENTITY(static_cast(1)); -# endif - // -- Constructors -- # if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT) diff --git a/glm/detail/type_mat3x4.hpp b/glm/detail/type_mat3x4.hpp index 6b5c1dbe..445340ec 100644 --- a/glm/detail/type_mat3x4.hpp +++ b/glm/detail/type_mat3x4.hpp @@ -50,18 +50,6 @@ namespace glm typedef tmat4x3 transpose_type; typedef T value_type; -# ifdef GLM_META_PROG_HELPERS - static GLM_RELAXED_CONSTEXPR length_t components = 3; - static GLM_RELAXED_CONSTEXPR length_t cols = 3; - static GLM_RELAXED_CONSTEXPR length_t rows = 4; - static GLM_RELAXED_CONSTEXPR precision prec = P; -# endif//GLM_META_PROG_HELPERS - -# ifdef GLM_STATIC_CONST_MEMBERS - static const type ZERO; - static const type IDENTITY; -# endif - private: col_type value[3]; @@ -117,19 +105,11 @@ namespace glm // -- Accesses -- -# ifdef GLM_FORCE_SIZE_FUNC - typedef size_t size_type; - GLM_FUNC_DECL GLM_CONSTEXPR size_t size() const; + typedef length_t length_type; + GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const; - GLM_FUNC_DECL col_type & operator[](size_type i); - GLM_FUNC_DECL col_type const & operator[](size_type i) const; -# else - typedef length_t length_type; - GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const; - - GLM_FUNC_DECL col_type & operator[](length_type i); - GLM_FUNC_DECL col_type const & operator[](length_type i) const; -# endif//GLM_FORCE_SIZE_FUNC + GLM_FUNC_DECL col_type & operator[](length_type i); + GLM_FUNC_DECL col_type const & operator[](length_type i) const; // -- Unary arithmetic operators -- @@ -214,16 +194,6 @@ namespace glm template GLM_FUNC_DECL bool operator!=(tmat3x4 const & m1, tmat3x4 const & m2); - - // -- Is type -- - - template - struct type - { - static bool const is_vec = false; - static bool const is_mat = true; - static bool const is_quat = false; - }; }//namespace glm #ifndef GLM_EXTERNAL_TEMPLATE diff --git a/glm/detail/type_mat3x4.inl b/glm/detail/type_mat3x4.inl index dd1f0563..3991d95d 100644 --- a/glm/detail/type_mat3x4.inl +++ b/glm/detail/type_mat3x4.inl @@ -32,13 +32,6 @@ namespace glm { -# ifdef GLM_STATIC_CONST_MEMBERS - template - const tmat3x4 tmat3x4::ZERO(static_cast(0)); - - template - const tmat3x4 tmat3x4::IDENTITY(static_cast(1)); -# endif // -- Constructors -- # if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT) diff --git a/glm/detail/type_mat4x2.hpp b/glm/detail/type_mat4x2.hpp index bd71e121..ad66ed19 100644 --- a/glm/detail/type_mat4x2.hpp +++ b/glm/detail/type_mat4x2.hpp @@ -50,18 +50,6 @@ namespace glm typedef tmat2x4 transpose_type; typedef T value_type; -# ifdef GLM_META_PROG_HELPERS - static GLM_RELAXED_CONSTEXPR length_t components = 4; - static GLM_RELAXED_CONSTEXPR length_t cols = 4; - static GLM_RELAXED_CONSTEXPR length_t rows = 2; - static GLM_RELAXED_CONSTEXPR precision prec = P; -# endif//GLM_META_PROG_HELPERS - -# ifdef GLM_STATIC_CONST_MEMBERS - static const type ZERO; - static const type IDENTITY; -# endif - private: col_type value[4]; @@ -122,19 +110,11 @@ namespace glm // -- Accesses -- -# ifdef GLM_FORCE_SIZE_FUNC - typedef size_t size_type; - GLM_FUNC_DECL GLM_CONSTEXPR size_t size() const; + typedef length_t length_type; + GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const; - GLM_FUNC_DECL col_type & operator[](size_type i); - GLM_FUNC_DECL col_type const & operator[](size_type i) const; -# else - typedef length_t length_type; - GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const; - - GLM_FUNC_DECL col_type & operator[](length_type i); - GLM_FUNC_DECL col_type const & operator[](length_type i) const; -# endif//GLM_FORCE_SIZE_FUNC + GLM_FUNC_DECL col_type & operator[](length_type i); + GLM_FUNC_DECL col_type const & operator[](length_type i) const; // -- Unary arithmetic operators -- @@ -219,16 +199,6 @@ namespace glm template GLM_FUNC_DECL bool operator!=(tmat4x2 const & m1, tmat4x2 const & m2); - - // -- Is type -- - - template - struct type - { - static bool const is_vec = false; - static bool const is_mat = true; - static bool const is_quat = false; - }; }//namespace glm #ifndef GLM_EXTERNAL_TEMPLATE diff --git a/glm/detail/type_mat4x3.hpp b/glm/detail/type_mat4x3.hpp index 9ee26169..22d772c2 100644 --- a/glm/detail/type_mat4x3.hpp +++ b/glm/detail/type_mat4x3.hpp @@ -50,18 +50,6 @@ namespace glm typedef tmat3x4 transpose_type; typedef T value_type; -# ifdef GLM_META_PROG_HELPERS - static GLM_RELAXED_CONSTEXPR length_t components = 4; - static GLM_RELAXED_CONSTEXPR length_t cols = 4; - static GLM_RELAXED_CONSTEXPR length_t rows = 3; - static GLM_RELAXED_CONSTEXPR precision prec = P; -# endif//GLM_META_PROG_HELPERS - -# ifdef GLM_STATIC_CONST_MEMBERS - static const type ZERO; - static const type IDENTITY; -# endif - private: col_type value[4]; @@ -122,19 +110,11 @@ namespace glm // -- Accesses -- -# ifdef GLM_FORCE_SIZE_FUNC - typedef size_t size_type; - GLM_FUNC_DECL GLM_CONSTEXPR size_t size() const; + typedef length_t length_type; + GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const; - GLM_FUNC_DECL col_type & operator[](size_type i); - GLM_FUNC_DECL col_type const & operator[](size_type i) const; -# else - typedef length_t length_type; - GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const; - - GLM_FUNC_DECL col_type & operator[](length_type i); - GLM_FUNC_DECL col_type const & operator[](length_type i) const; -# endif//GLM_FORCE_SIZE_FUNC + GLM_FUNC_DECL col_type & operator[](length_type i); + GLM_FUNC_DECL col_type const & operator[](length_type i) const; // -- Unary arithmetic operators -- @@ -219,16 +199,6 @@ namespace glm template GLM_FUNC_DECL bool operator!=(tmat4x3 const & m1, tmat4x3 const & m2); - - // -- Is type -- - - template - struct type - { - static bool const is_vec = false; - static bool const is_mat = true; - static bool const is_quat = false; - }; }//namespace glm #ifndef GLM_EXTERNAL_TEMPLATE diff --git a/glm/detail/type_mat4x3.inl b/glm/detail/type_mat4x3.inl index 58eeb6f9..c2979782 100644 --- a/glm/detail/type_mat4x3.inl +++ b/glm/detail/type_mat4x3.inl @@ -32,13 +32,6 @@ namespace glm { -# ifdef GLM_STATIC_CONST_MEMBERS - template - const tmat4x3 tmat4x3::ZERO(static_cast(0)); - - template - const tmat4x3 tmat4x3::IDENTITY(static_cast(1)); -# endif // -- Constructors -- # if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT) diff --git a/glm/detail/type_mat4x4.hpp b/glm/detail/type_mat4x4.hpp index bb5fba0b..4766f1d6 100644 --- a/glm/detail/type_mat4x4.hpp +++ b/glm/detail/type_mat4x4.hpp @@ -49,18 +49,6 @@ namespace glm typedef tmat4x4 transpose_type; typedef T value_type; -# ifdef GLM_META_PROG_HELPERS - static GLM_RELAXED_CONSTEXPR length_t components = 4; - static GLM_RELAXED_CONSTEXPR length_t cols = 4; - static GLM_RELAXED_CONSTEXPR length_t rows = 4; - static GLM_RELAXED_CONSTEXPR precision prec = P; -# endif//GLM_META_PROG_HELPERS - -# ifdef GLM_STATIC_CONST_MEMBERS - static const type ZERO; - static const type IDENTITY; -# endif - template friend tvec4 operator/(tmat4x4 const & m, tvec4 const & v); template @@ -126,19 +114,11 @@ namespace glm // -- Accesses -- -# ifdef GLM_FORCE_SIZE_FUNC - typedef size_t size_type; - GLM_FUNC_DECL GLM_CONSTEXPR size_t size() const; + typedef length_t length_type; + GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const; - GLM_FUNC_DECL col_type & operator[](size_type i); - GLM_FUNC_DECL col_type const & operator[](size_type i) const; -# else - typedef length_t length_type; - GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const; - - GLM_FUNC_DECL col_type & operator[](length_type i); - GLM_FUNC_DECL col_type const & operator[](length_type i) const; -# endif//GLM_FORCE_SIZE_FUNC + GLM_FUNC_DECL col_type & operator[](length_type i); + GLM_FUNC_DECL col_type const & operator[](length_type i) const; // -- Unary arithmetic operators -- @@ -242,16 +222,6 @@ namespace glm template GLM_FUNC_DECL bool operator!=(tmat4x4 const & m1, tmat4x4 const & m2); - - // -- Is type -- - - template - struct type - { - static bool const is_vec = false; - static bool const is_mat = true; - static bool const is_quat = false; - }; }//namespace glm #ifndef GLM_EXTERNAL_TEMPLATE diff --git a/glm/detail/type_mat4x4.inl b/glm/detail/type_mat4x4.inl index acfa318c..319325a7 100644 --- a/glm/detail/type_mat4x4.inl +++ b/glm/detail/type_mat4x4.inl @@ -92,13 +92,6 @@ namespace detail } }//namespace detail -# ifdef GLM_STATIC_CONST_MEMBERS - template - const tmat4x4 tmat4x4::ZERO(static_cast(0)); - - template - const tmat4x4 tmat4x4::IDENTITY(static_cast(1)); -# endif // -- Constructors -- # if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT) diff --git a/glm/detail/type_vec1.hpp b/glm/detail/type_vec1.hpp index 2e811a36..40291ecb 100644 --- a/glm/detail/type_vec1.hpp +++ b/glm/detail/type_vec1.hpp @@ -54,15 +54,6 @@ namespace glm typedef tvec1 bool_type; typedef T value_type; -# ifdef GLM_META_PROG_HELPERS - static GLM_RELAXED_CONSTEXPR length_t components = 1; - static GLM_RELAXED_CONSTEXPR precision prec = P; -# endif//GLM_META_PROG_HELPERS - -# ifdef GLM_STATIC_CONST_MEMBERS - static const type ZERO; - static const type X; -# endif // -- Data -- # if GLM_HAS_ANONYMOUS_UNION @@ -94,21 +85,12 @@ namespace glm // -- Component accesses -- -# ifdef GLM_FORCE_SIZE_FUNC - /// Return the count of components of the vector - typedef size_t size_type; - GLM_FUNC_DECL GLM_CONSTEXPR size_type size() const; + /// Return the count of components of the vector + typedef length_t length_type; + GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const; - GLM_FUNC_DECL T & operator[](size_type i); - GLM_FUNC_DECL T const & operator[](size_type i) const; -# else - /// Return the count of components of the vector - typedef length_t length_type; - GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const; - - GLM_FUNC_DECL T & operator[](length_type i); - GLM_FUNC_DECL T const & operator[](length_type i) const; -# endif//GLM_FORCE_SIZE_FUNC + GLM_FUNC_DECL T & operator[](length_type i); + GLM_FUNC_DECL T const & operator[](length_type i) const; // -- Implicit basic constructors -- @@ -322,16 +304,6 @@ namespace glm template GLM_FUNC_DECL tvec1 operator||(tvec1 const & v1, tvec1 const & v2); - - // -- Is type -- - - template - struct type - { - static bool const is_vec = true; - static bool const is_mat = false; - static bool const is_quat = false; - }; }//namespace glm #ifndef GLM_EXTERNAL_TEMPLATE diff --git a/glm/detail/type_vec1.inl b/glm/detail/type_vec1.inl index 9d397d64..d1bf7cf5 100644 --- a/glm/detail/type_vec1.inl +++ b/glm/detail/type_vec1.inl @@ -32,13 +32,6 @@ namespace glm { -# ifdef GLM_STATIC_CONST_MEMBERS - template - const tvec1 tvec1::X(static_cast(1)); - - template - const tvec1 tvec1::ZERO(static_cast(0)); -# endif // -- Implicit basic constructors -- # if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT) @@ -102,47 +95,25 @@ namespace glm // -- Component accesses -- -# ifdef GLM_FORCE_SIZE_FUNC - template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tvec1::size_type tvec1::size() const - { - return 1; - } + template + GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tvec1::length_type tvec1::length() const + { + return 1; + } - template - GLM_FUNC_QUALIFIER T & tvec1::operator[](typename tvec1::size_type i) - { - assert(i >= 0 && static_cast(i) < detail::component_count(*this)); - return (&x)[i]; - } + template + GLM_FUNC_QUALIFIER T & tvec1::operator[](typename tvec1::length_type i) + { + assert(i >= 0 && static_cast(i) < detail::component_count(*this)); + return (&x)[i]; + } - template - GLM_FUNC_QUALIFIER T const & tvec1::operator[](typename tvec1::size_type i) const - { - assert(i >= 0 && static_cast(i) < detail::component_count(*this)); - return (&x)[i]; - } -# else - template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tvec1::length_type tvec1::length() const - { - return 1; - } - - template - GLM_FUNC_QUALIFIER T & tvec1::operator[](typename tvec1::length_type i) - { - assert(i >= 0 && static_cast(i) < detail::component_count(*this)); - return (&x)[i]; - } - - template - GLM_FUNC_QUALIFIER T const & tvec1::operator[](typename tvec1::length_type i) const - { - assert(i >= 0 && static_cast(i) < detail::component_count(*this)); - return (&x)[i]; - } -# endif//GLM_FORCE_SIZE_FUNC + template + GLM_FUNC_QUALIFIER T const & tvec1::operator[](typename tvec1::length_type i) const + { + assert(i >= 0 && static_cast(i) < detail::component_count(*this)); + return (&x)[i]; + } // -- Unary arithmetic operators -- diff --git a/glm/detail/type_vec2.hpp b/glm/detail/type_vec2.hpp index 1af3e31a..de425e10 100644 --- a/glm/detail/type_vec2.hpp +++ b/glm/detail/type_vec2.hpp @@ -49,21 +49,9 @@ namespace glm { // -- Implementation detail -- + typedef T value_type; typedef tvec2 type; typedef tvec2 bool_type; - typedef T value_type; - -# ifdef GLM_META_PROG_HELPERS - static GLM_RELAXED_CONSTEXPR length_t components = 2; - static GLM_RELAXED_CONSTEXPR precision prec = P; -# endif//GLM_META_PROG_HELPERS - -# ifdef GLM_STATIC_CONST_MEMBERS - static const type ZERO; - static const type X; - static const type Y; - static const type XY; -# endif // -- Data -- @@ -97,21 +85,12 @@ namespace glm // -- Component accesses -- -# ifdef GLM_FORCE_SIZE_FUNC - /// Return the count of components of the vector - typedef size_t size_type; - GLM_FUNC_DECL GLM_CONSTEXPR size_type size() const; + /// Return the count of components of the vector + typedef length_t length_type; + GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const; - GLM_FUNC_DECL T & operator[](size_type i); - GLM_FUNC_DECL T const & operator[](size_type i) const; -# else - /// Return the count of components of the vector - typedef length_t length_type; - GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const; - - GLM_FUNC_DECL T & operator[](length_type i); - GLM_FUNC_DECL T const & operator[](length_type i) const; -# endif//GLM_FORCE_SIZE_FUNC + GLM_FUNC_DECL T & operator[](length_type i); + GLM_FUNC_DECL T const & operator[](length_type i) const; // -- Implicit basic constructors -- @@ -411,16 +390,6 @@ namespace glm template GLM_FUNC_DECL tvec2 operator||(tvec2 const & v1, tvec2 const & v2); - - // -- Is type -- - - template - struct type - { - static bool const is_vec = true; - static bool const is_mat = false; - static bool const is_quat = false; - }; }//namespace glm #ifndef GLM_EXTERNAL_TEMPLATE diff --git a/glm/detail/type_vec3.hpp b/glm/detail/type_vec3.hpp index 72d32286..70e4290b 100644 --- a/glm/detail/type_vec3.hpp +++ b/glm/detail/type_vec3.hpp @@ -53,22 +53,6 @@ namespace glm typedef tvec3 bool_type; typedef T value_type; -# ifdef GLM_META_PROG_HELPERS - static GLM_RELAXED_CONSTEXPR length_t components = 3; - static GLM_RELAXED_CONSTEXPR precision prec = P; -# endif//GLM_META_PROG_HELPERS - -# ifdef GLM_STATIC_CONST_MEMBERS - static const type ZERO; - static const type X; - static const type Y; - static const type Z; - static const type XY; - static const type XZ; - static const type YZ; - static const type XYZ; -# endif - // -- Data -- # if GLM_HAS_ANONYMOUS_UNION @@ -102,21 +86,12 @@ namespace glm // -- Component accesses -- -# ifdef GLM_FORCE_SIZE_FUNC - /// Return the count of components of the vector - typedef size_t size_type; - GLM_FUNC_DECL GLM_CONSTEXPR size_type size() const; + /// Return the count of components of the vector + typedef length_t length_type; + GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const; - GLM_FUNC_DECL T & operator[](size_type i); - GLM_FUNC_DECL T const & operator[](size_type i) const; -# else - /// Return the count of components of the vector - typedef length_t length_type; - GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const; - - GLM_FUNC_DECL T & operator[](length_type i); - GLM_FUNC_DECL T const & operator[](length_type i) const; -# endif//GLM_FORCE_SIZE_FUNC + GLM_FUNC_DECL T & operator[](length_type i); + GLM_FUNC_DECL T const & operator[](length_type i) const; // -- Implicit basic constructors -- @@ -437,16 +412,6 @@ namespace glm template GLM_FUNC_DECL tvec3 operator||(tvec3 const & v1, tvec3 const & v2); - - // -- Is type -- - - template - struct type - { - static bool const is_vec = true; - static bool const is_mat = false; - static bool const is_quat = false; - }; }//namespace glm #ifndef GLM_EXTERNAL_TEMPLATE diff --git a/glm/detail/type_vec4.hpp b/glm/detail/type_vec4.hpp index 86156e5f..4668ff81 100644 --- a/glm/detail/type_vec4.hpp +++ b/glm/detail/type_vec4.hpp @@ -103,33 +103,9 @@ namespace detail { // -- Implementation detail -- + typedef T value_type; typedef tvec4 type; typedef tvec4 bool_type; - typedef T value_type; - -# ifdef GLM_META_PROG_HELPERS - static GLM_RELAXED_CONSTEXPR length_t components = 4; - static GLM_RELAXED_CONSTEXPR precision prec = P; -# endif//GLM_META_PROG_HELPERS - -# ifdef GLM_STATIC_CONST_MEMBERS - static const type ZERO; - static const type X; - static const type Y; - static const type Z; - static const type W; - static const type XY; - static const type XZ; - static const type XW; - static const type YZ; - static const type YW; - static const type ZW; - static const type XYZ; - static const type XYW; - static const type XZW; - static const type YZW; - static const type XYZW; -# endif // -- Data -- @@ -167,21 +143,12 @@ namespace detail // -- Component accesses -- -# ifdef GLM_FORCE_SIZE_FUNC - /// Return the count of components of the vector - typedef size_t size_type; - GLM_FUNC_DECL GLM_CONSTEXPR size_type size() const; + /// Return the count of components of the vector + typedef length_t length_type; + GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const; - GLM_FUNC_DECL T & operator[](size_type i); - GLM_FUNC_DECL T const & operator[](size_type i) const; -# else - /// Return the count of components of the vector - typedef length_t length_type; - GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const; - - GLM_FUNC_DECL T & operator[](length_type i); - GLM_FUNC_DECL T const & operator[](length_type i) const; -# endif//GLM_FORCE_SIZE_FUNC + GLM_FUNC_DECL T & operator[](length_type i); + GLM_FUNC_DECL T const & operator[](length_type i) const; // -- Implicit basic constructors -- @@ -544,16 +511,6 @@ namespace detail template GLM_FUNC_DECL tvec4 operator||(tvec4 const & v1, tvec4 const & v2); - - // -- Is type -- - - template - struct type - { - static bool const is_vec = true; - static bool const is_mat = false; - static bool const is_quat = false; - }; }//namespace glm #ifndef GLM_EXTERNAL_TEMPLATE diff --git a/glm/detail/type_vec4.inl b/glm/detail/type_vec4.inl index f8d30b57..3a929a01 100644 --- a/glm/detail/type_vec4.inl +++ b/glm/detail/type_vec4.inl @@ -32,72 +32,6 @@ namespace glm { - -# ifdef GLM_STATIC_CONST_MEMBERS - template - const tvec4 tvec4::ZERO - (static_cast(0), static_cast(0), static_cast(0), static_cast(0)); - - template - const tvec4 tvec4::X - (static_cast(1), static_cast(0), static_cast(0), static_cast(0)); - - template - const tvec4 tvec4::Y - (static_cast(0), static_cast(1), static_cast(0), static_cast(0)); - - template - const tvec4 tvec4::Z - (static_cast(0), static_cast(0), static_cast(1), static_cast(0)); - - template - const tvec4 tvec4::W - (static_cast(0), static_cast(0), static_cast(0), static_cast(1)); - - template - const tvec4 tvec4::XY - (static_cast(1), static_cast(1), static_cast(0), static_cast(0)); - - template - const tvec4 tvec4::XZ - (static_cast(1), static_cast(0), static_cast(1), static_cast(0)); - - template - const tvec4 tvec4::XW - (static_cast(1), static_cast(0), static_cast(0), static_cast(1)); - - template - const tvec4 tvec4::YZ - (static_cast(0), static_cast(1), static_cast(1), static_cast(0)); - - template - const tvec4 tvec4::YW - (static_cast(0), static_cast(1), static_cast(0), static_cast(1)); - - template - const tvec4 tvec4::ZW - (static_cast(0), static_cast(0), static_cast(1), static_cast(1)); - - template - const tvec4 tvec4::XYZ - (static_cast(1), static_cast(1), static_cast(1), static_cast(0)); - - template - const tvec4 tvec4::XYW - (static_cast(1), static_cast(1), static_cast(0), static_cast(1)); - - template - const tvec4 tvec4::XZW - (static_cast(1), static_cast(0), static_cast(1), static_cast(1)); - - template - const tvec4 tvec4::YZW - (static_cast(0), static_cast(1), static_cast(1), static_cast(1)); - - template - const tvec4 tvec4::XYZW - (static_cast(1), static_cast(1), static_cast(1), static_cast(1)); -# endif // -- Implicit basic constructors -- # if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT) @@ -270,47 +204,25 @@ namespace glm // -- Component accesses -- -# ifdef GLM_FORCE_SIZE_FUNC - template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tvec4::size_type tvec4::size() const - { - return 4; - } + template + GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tvec4::length_type tvec4::length() const + { + return 4; + } - template - GLM_FUNC_QUALIFIER T & tvec4::operator[](typename tvec4::size_type i) - { - assert(i >= 0 && static_cast(i) < detail::component_count(*this)); - return (&x)[i]; - } + template + GLM_FUNC_QUALIFIER T & tvec4::operator[](typename tvec4::length_type i) + { + assert(i >= 0 && static_cast(i) < detail::component_count(*this)); + return (&x)[i]; + } - template - GLM_FUNC_QUALIFIER T const & tvec4::operator[](typename tvec4::size_type i) const - { - assert(i >= 0 && static_cast(i) < detail::component_count(*this)); - return (&x)[i]; - } -# else - template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tvec4::length_type tvec4::length() const - { - return 4; - } - - template - GLM_FUNC_QUALIFIER T & tvec4::operator[](typename tvec4::length_type i) - { - assert(i >= 0 && static_cast(i) < detail::component_count(*this)); - return (&x)[i]; - } - - template - GLM_FUNC_QUALIFIER T const & tvec4::operator[](typename tvec4::length_type i) const - { - assert(i >= 0 && static_cast(i) < detail::component_count(*this)); - return (&x)[i]; - } -# endif//GLM_FORCE_SIZE_FUNC + template + GLM_FUNC_QUALIFIER T const & tvec4::operator[](typename tvec4::length_type i) const + { + assert(i >= 0 && static_cast(i) < detail::component_count(*this)); + return (&x)[i]; + } // -- Unary arithmetic operators -- diff --git a/glm/gtc/quaternion.hpp b/glm/gtc/quaternion.hpp index 431228d7..a7055fae 100644 --- a/glm/gtc/quaternion.hpp +++ b/glm/gtc/quaternion.hpp @@ -67,52 +67,18 @@ namespace glm typedef tquat type; typedef T value_type; -# ifdef GLM_META_PROG_HELPERS - static GLM_RELAXED_CONSTEXPR length_t components = 4; - static GLM_RELAXED_CONSTEXPR precision prec = P; -# endif//GLM_META_PROG_HELPERS - // -- Data -- T x, y, z, w; -# ifdef GLM_STATIC_CONST_MEMBERS - static const type ZERO; - static const type IDENTITY; - static const type X; - static const type Y; - static const type Z; - static const type W; - static const type XY; - static const type XZ; - static const type XW; - static const type YZ; - static const type YW; - static const type ZW; - static const type XYZ; - static const type XYW; - static const type XZW; - static const type YZW; - static const type XYZW; -# endif - // -- Component accesses -- -# ifdef GLM_FORCE_SIZE_FUNC - typedef size_t size_type; - /// Return the count of components of a quaternion - GLM_FUNC_DECL GLM_CONSTEXPR size_type size() const; + typedef length_t length_type; + /// Return the count of components of a quaternion + GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const; - GLM_FUNC_DECL T & operator[](size_type i); - GLM_FUNC_DECL T const & operator[](size_type i) const; -# else - typedef length_t length_type; - /// Return the count of components of a quaternion - GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const; - - GLM_FUNC_DECL T & operator[](length_type i); - GLM_FUNC_DECL T const & operator[](length_type i) const; -# endif//GLM_FORCE_SIZE_FUNC + GLM_FUNC_DECL T & operator[](length_type i); + GLM_FUNC_DECL T const & operator[](length_type i) const; // -- Implicit basic constructors -- @@ -397,16 +363,6 @@ namespace glm template GLM_FUNC_DECL tvec4 notEqual(tquat const & x, tquat const & y); /// @} - - // -- Is type -- - - template - struct type - { - static bool const is_vec = false; - static bool const is_mat = false; - static bool const is_quat = true; - }; } //namespace glm #include "quaternion.inl" diff --git a/glm/gtc/quaternion.inl b/glm/gtc/quaternion.inl index b46cd62c..ff4c2d68 100644 --- a/glm/gtc/quaternion.inl +++ b/glm/gtc/quaternion.inl @@ -49,116 +49,27 @@ namespace detail }; }//namespace detail -# ifdef GLM_STATIC_CONST_MEMBERS - template - const tquat tquat::ZERO - (static_cast(0), static_cast(0), static_cast(0), static_cast(0)); - - template const tquat tquat::IDENTITY; - - template - const tquat tquat::X - (static_cast(0), static_cast(1), static_cast(0), static_cast(0)); - - template - const tquat tquat::Y - (static_cast(0), static_cast(0), static_cast(1), static_cast(0)); - - template - const tquat tquat::Z - (static_cast(0), static_cast(0), static_cast(0), static_cast(1)); - - template - const tquat tquat::W - (static_cast(1), static_cast(0), static_cast(0), static_cast(0)); - - template - const tquat tquat::XY - (static_cast(0), static_cast(1), static_cast(1), static_cast(0)); - - template - const tquat tquat::XZ - (static_cast(0), static_cast(0), static_cast(1), static_cast(1)); - - template - const tquat tquat::XW - (static_cast(1), static_cast(1), static_cast(0), static_cast(0)); - - template - const tquat tquat::YZ - (static_cast(0), static_cast(0), static_cast(1), static_cast(1)); - - template - const tquat tquat::YW - (static_cast(1), static_cast(0), static_cast(1), static_cast(0)); - - template - const tquat tquat::ZW - (static_cast(1), static_cast(0), static_cast(0), static_cast(1)); - - template - const tquat tquat::XYZ - (static_cast(0), static_cast(1), static_cast(1), static_cast(1)); - - template - const tquat tquat::XYW - (static_cast(1), static_cast(1), static_cast(1), static_cast(0)); - - template - const tquat tquat::XZW - (static_cast(1), static_cast(1), static_cast(0), static_cast(1)); - - template - const tquat tquat::YZW - (static_cast(1), static_cast(0), static_cast(1), static_cast(1)); - - template - const tquat tquat::XYZW - (static_cast(1), static_cast(1), static_cast(1), static_cast(1)); -# endif // -- Component accesses -- -# ifdef GLM_FORCE_SIZE_FUNC - template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tquat::size_type tquat::size() const - { - return 4; - } + template + GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tquat::length_type tquat::length() const + { + return 4; + } - template - GLM_FUNC_QUALIFIER T & tquat::operator[](typename tquat::size_type i) - { - assert(i >= 0 && static_cast(i) < detail::component_count(*this)); - return (&x)[i]; - } + template + GLM_FUNC_QUALIFIER T & tquat::operator[](typename tquat::length_type i) + { + assert(i >= 0 && static_cast(i) < detail::component_count(*this)); + return (&x)[i]; + } - template - GLM_FUNC_QUALIFIER T const & tquat::operator[](typename tquat::size_type i) const - { - assert(i >= 0 && static_cast(i) < detail::component_count(*this)); - return (&x)[i]; - } -# else - template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tquat::length_type tquat::length() const - { - return 4; - } - - template - GLM_FUNC_QUALIFIER T & tquat::operator[](typename tquat::length_type i) - { - assert(i >= 0 && static_cast(i) < detail::component_count(*this)); - return (&x)[i]; - } - - template - GLM_FUNC_QUALIFIER T const & tquat::operator[](typename tquat::length_type i) const - { - assert(i >= 0 && static_cast(i) < detail::component_count(*this)); - return (&x)[i]; - } -# endif//GLM_FORCE_SIZE_FUNC + template + GLM_FUNC_QUALIFIER T const & tquat::operator[](typename tquat::length_type i) const + { + assert(i >= 0 && static_cast(i) < detail::component_count(*this)); + return (&x)[i]; + } // -- Implicit basic constructors -- diff --git a/glm/gtx/dual_quaternion.hpp b/glm/gtx/dual_quaternion.hpp index 35a5d850..9bef77dd 100644 --- a/glm/gtx/dual_quaternion.hpp +++ b/glm/gtx/dual_quaternion.hpp @@ -66,32 +66,18 @@ namespace glm typedef T value_type; typedef glm::tquat part_type; -# ifdef GLM_META_PROG_HELPERS - static GLM_RELAXED_CONSTEXPR length_t components = 2; - static GLM_RELAXED_CONSTEXPR precision prec = P; -# endif//GLM_META_PROG_HELPERS - // -- Data -- glm::tquat real, dual; // -- Component accesses -- -# ifdef GLM_FORCE_SIZE_FUNC - typedef size_t size_type; - /// Return the count of components of a dual quaternion - GLM_FUNC_DECL GLM_CONSTEXPR size_type size() const; + typedef length_t length_type; + /// Return the count of components of a dual quaternion + GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const; - GLM_FUNC_DECL part_type & operator[](size_type i); - GLM_FUNC_DECL part_type const & operator[](size_type i) const; -# else - typedef length_t length_type; - /// Return the count of components of a dual quaternion - GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const; - - GLM_FUNC_DECL part_type & operator[](length_type i); - GLM_FUNC_DECL part_type const & operator[](length_type i) const; -# endif//GLM_FORCE_SIZE_FUNC + GLM_FUNC_DECL part_type & operator[](length_type i); + GLM_FUNC_DECL part_type const & operator[](length_type i) const; // -- Implicit basic constructors -- @@ -295,16 +281,6 @@ namespace glm #endif /// @} - - // -- Is type -- - - template - struct type - { - static bool const is_vec = false; - static bool const is_mat = false; - static bool const is_quat = true; - }; } //namespace glm #include "dual_quaternion.inl" diff --git a/glm/gtx/simd_mat4.hpp b/glm/gtx/simd_mat4.hpp index e1567610..ae5790ae 100644 --- a/glm/gtx/simd_mat4.hpp +++ b/glm/gtx/simd_mat4.hpp @@ -76,18 +76,6 @@ namespace detail typedef tvec4 pure_col_type; typedef tmat4x4 pure_transpose_type; -# ifdef GLM_META_PROG_HELPERS - static GLM_RELAXED_CONSTEXPR length_t components = 4; - static GLM_RELAXED_CONSTEXPR length_t cols = 4; - static GLM_RELAXED_CONSTEXPR length_t rows = 4; - static GLM_RELAXED_CONSTEXPR precision prec = defaultp; -# endif//GLM_META_PROG_HELPERS - -# ifdef GLM_STATIC_CONST_MEMBERS - static const type ZERO; - static const type IDENTITY; -# endif - GLM_FUNC_DECL length_t length() const; fvec4SIMD Data[4]; diff --git a/glm/gtx/simd_mat4.inl b/glm/gtx/simd_mat4.inl index c436ab1f..13dcb20f 100644 --- a/glm/gtx/simd_mat4.inl +++ b/glm/gtx/simd_mat4.inl @@ -61,11 +61,6 @@ GLM_FUNC_QUALIFIER fvec4SIMD const & fmat4x4SIMD::operator[] return this->Data[i]; } -#ifdef GLM_STATIC_CONST_MEMBERS - const fmat4x4SIMD fmat4x4SIMD::ZERO(static_cast(0)); - const fmat4x4SIMD fmat4x4SIMD::IDENTITY(static_cast(1)); -#endif - ////////////////////////////////////////////////////////////// // Constructors diff --git a/glm/gtx/simd_quat.hpp b/glm/gtx/simd_quat.hpp index 16782081..d06093eb 100644 --- a/glm/gtx/simd_quat.hpp +++ b/glm/gtx/simd_quat.hpp @@ -76,11 +76,6 @@ namespace detail typedef tquat bool_type; typedef tquat pure_type; -# ifdef GLM_META_PROG_HELPERS - static GLM_RELAXED_CONSTEXPR length_t components = 4; - static GLM_RELAXED_CONSTEXPR precision prec = defaultp; -# endif//GLM_META_PROG_HELPERS - #ifdef GLM_SIMD_ENABLE_XYZW_UNION union { @@ -91,26 +86,6 @@ namespace detail __m128 Data; #endif -# ifdef GLM_STATIC_CONST_MEMBERS - static const type ZERO; - static const type IDENTITY; - static const type X; - static const type Y; - static const type Z; - static const type W; - static const type XY; - static const type XZ; - static const type XW; - static const type YZ; - static const type YW; - static const type ZW; - static const type XYZ; - static const type XYW; - static const type XZW; - static const type YZW; - static const type XYZW; -# endif - ////////////////////////////////////// // Implicit basic constructors diff --git a/glm/gtx/simd_quat.inl b/glm/gtx/simd_quat.inl index c301988a..1fe9c93f 100644 --- a/glm/gtx/simd_quat.inl +++ b/glm/gtx/simd_quat.inl @@ -51,26 +51,6 @@ void print(const fvec4SIMD &v) } #endif -# ifdef GLM_STATIC_CONST_MEMBERS - const fquatSIMD fquatSIMD::ZERO(0, 0, 0, 0); - const fquatSIMD fquatSIMD::IDENTITY(1, 0, 0, 0); - const fquatSIMD fquatSIMD::X(0, 1, 0, 0); - const fquatSIMD fquatSIMD::Y(0, 0, 1, 0); - const fquatSIMD fquatSIMD::Z(0, 0, 0, 1); - const fquatSIMD fquatSIMD::W(1, 0, 0, 0); - const fquatSIMD fquatSIMD::XY(0, 1, 1, 0); - const fquatSIMD fquatSIMD::XZ(0, 1, 0, 1); - const fquatSIMD fquatSIMD::XW(1, 1, 0, 0); - const fquatSIMD fquatSIMD::YZ(0, 0, 1, 1); - const fquatSIMD fquatSIMD::YW(1, 0, 1, 0); - const fquatSIMD fquatSIMD::ZW(1, 0, 0, 1); - const fquatSIMD fquatSIMD::XYZ(0, 1, 1, 1); - const fquatSIMD fquatSIMD::XYW(1, 1, 1, 0); - const fquatSIMD fquatSIMD::XZW(1, 1, 0, 1); - const fquatSIMD fquatSIMD::YZW(1, 0, 1, 1); - const fquatSIMD fquatSIMD::XYZW(1, 1, 1, 1); -# endif - ////////////////////////////////////// // Implicit basic constructors diff --git a/glm/gtx/simd_vec4.hpp b/glm/gtx/simd_vec4.hpp index 3877f821..8e61311c 100644 --- a/glm/gtx/simd_vec4.hpp +++ b/glm/gtx/simd_vec4.hpp @@ -99,11 +99,6 @@ namespace detail typedef tvec4 pure_type; typedef tvec4 bool_type; -# ifdef GLM_META_PROG_HELPERS - static GLM_RELAXED_CONSTEXPR length_t components = 4; - static GLM_RELAXED_CONSTEXPR precision prec = defaultp; -# endif//GLM_META_PROG_HELPERS - #ifdef GLM_SIMD_ENABLE_XYZW_UNION union { @@ -114,25 +109,6 @@ namespace detail __m128 Data; #endif -# ifdef GLM_STATIC_CONST_MEMBERS - static const type ZERO; - static const type X; - static const type Y; - static const type Z; - static const type W; - static const type XY; - static const type XZ; - static const type XW; - static const type YZ; - static const type YW; - static const type ZW; - static const type XYZ; - static const type XYW; - static const type XZW; - static const type YZW; - static const type XYZW; -# endif - ////////////////////////////////////// // Implicit basic constructors diff --git a/glm/gtx/simd_vec4.inl b/glm/gtx/simd_vec4.inl index b1413eea..6271d0cf 100644 --- a/glm/gtx/simd_vec4.inl +++ b/glm/gtx/simd_vec4.inl @@ -16,25 +16,6 @@ struct shuffle_mask enum{value = Value}; }; -# ifdef GLM_STATIC_CONST_MEMBERS - const fvec4SIMD fvec4SIMD::ZERO(0, 0, 0, 0); - const fvec4SIMD fvec4SIMD::X(1, 0, 0, 0); - const fvec4SIMD fvec4SIMD::Y(0, 1, 0, 0); - const fvec4SIMD fvec4SIMD::Z(0, 0, 1, 0); - const fvec4SIMD fvec4SIMD::W(0, 0, 0, 1); - const fvec4SIMD fvec4SIMD::XY(1, 1, 0, 0); - const fvec4SIMD fvec4SIMD::XZ(1, 0, 1, 0); - const fvec4SIMD fvec4SIMD::XW(1, 0, 0, 1); - const fvec4SIMD fvec4SIMD::YZ(0, 1, 1, 0); - const fvec4SIMD fvec4SIMD::YW(0, 1, 0, 1); - const fvec4SIMD fvec4SIMD::ZW(0, 0, 1, 1); - const fvec4SIMD fvec4SIMD::XYZ(1, 1, 1, 0); - const fvec4SIMD fvec4SIMD::XYW(1, 1, 0, 1); - const fvec4SIMD fvec4SIMD::XZW(1, 0, 1, 1); - const fvec4SIMD fvec4SIMD::YZW(0, 1, 1, 1); - const fvec4SIMD fvec4SIMD::XYZW(1, 1, 1, 1); -# endif - ////////////////////////////////////// // Implicit basic constructors diff --git a/glm/gtx/type_trait.hpp b/glm/gtx/type_trait.hpp new file mode 100644 index 00000000..1875b1a0 --- /dev/null +++ b/glm/gtx/type_trait.hpp @@ -0,0 +1,224 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2016 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// Restrictions: +/// By making use of the Software for military purposes, you choose to make +/// a Bunny unhappy. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// 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 +/// @date 2016-03-12 / 2016-03-12 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// +/// @defgroup gtx_type_info GLM_GTX_type_info +/// @ingroup gtx +/// +/// @brief Defines aligned types. +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#pragma once + +// Dependency: +#include "../detail/precision.hpp" +#include "../detail/setup.hpp" + +#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +# pragma message("GLM: GLM_GTX_type_info extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_type_info + /// @{ + + template struct tvec1; + template struct tvec2; + template struct tvec3; + template struct tvec4; + + template struct tmat2x2; + template struct tmat2x3; + template struct tmat2x4; + template struct tmat3x2; + template struct tmat3x3; + template struct tmat3x4; + template struct tmat4x2; + template struct tmat4x3; + template struct tmat4x4; + + template struct tquat; + template struct tdualquat; + + template