diff --git a/doc/src/data.xml b/doc/src/data.xml index d44b6190..47a2de72 100644 --- a/doc/src/data.xml +++ b/doc/src/data.xml @@ -3,8 +3,9 @@
- - + + + @@ -61,8 +62,9 @@
+ - + @@ -152,6 +154,16 @@ + + + Various bugs fixed with GLM 0.9.1.3. + + + GLM 0.9.1.3 (zip) + GLM 0.9.1.3 (7z) + Submit a bug report + + Bug fixes Only for GLM 0.9.1.2. diff --git a/glm/core/_detail.hpp b/glm/core/_detail.hpp index 3c9fdfa9..1a874ad7 100644 --- a/glm/core/_detail.hpp +++ b/glm/core/_detail.hpp @@ -110,15 +110,15 @@ namespace detail union uif32 { - uif32() : + GLM_FUNC_QUALIFIER uif32() : i(0) {} - uif32(float f) : + GLM_FUNC_QUALIFIER uif32(float f) : f(f) {} - uif32(unsigned int i) : + GLM_FUNC_QUALIFIER uif32(unsigned int i) : i(i) {} @@ -128,15 +128,15 @@ namespace detail union uif64 { - uif64() : + GLM_FUNC_QUALIFIER uif64() : i(0) {} - uif64(double f) : + GLM_FUNC_QUALIFIER uif64(double f) : f(f) {} - uif64(uint64 i) : + GLM_FUNC_QUALIFIER uif64(uint64 i) : i(i) {} diff --git a/glm/core/func_integer.inl b/glm/core/func_integer.inl index 3e4d56c8..193fa800 100644 --- a/glm/core/func_integer.inl +++ b/glm/core/func_integer.inl @@ -197,7 +197,7 @@ namespace glm // imulExtended template - void imulExtended + GLM_FUNC_QUALIFIER void imulExtended ( genIType const & x, genIType const & y, @@ -259,25 +259,21 @@ namespace glm // bitfieldExtract template - genIUType bitfieldExtract + GLM_FUNC_QUALIFIER genIUType bitfieldExtract ( genIUType const & Value, int const & Offset, int const & Bits ) { - GLM_STATIC_ASSERT(std::numeric_limits::is_integer, "'bitfieldExtract' only accept integer values"); - assert(Offset + Bits <= sizeof(genIUType)); + int GenSize = int(sizeof(genIUType)) << int(3); - genIUType Result(0); - if(std::numeric_limits::is_signed) - Result |= (genIUType(1) << (sizeof(genIUType) * genIUType(8) - genIUType(1))) & (genIUType(1) << (Offset + Bits - genIUType(1))); + assert(Offset + Bits <= GenSize); - genIUType Mask(0); - for(int Bit = Offset; Bit < Bits; ++Bit) - Mask |= (genIUType(1) << Bit); + genIUType ShiftLeft = Bits ? Value << (GenSize - (Bits + Offset)) : genIUType(0); + genIUType ShiftBack = ShiftLeft >> genIUType(GenSize - Bits); - return Result | ((Mask & Value) >> Offset); + return ShiftBack; } template @@ -340,7 +336,7 @@ namespace glm genIUType Mask = 0; for(int Bit = Offset; Bit < Offset + Bits; ++Bit) - Mask |= (genIUType(1) << Bit); + Mask |= (1 << Bit); return (Base & ~Mask) | (Insert & Mask); } @@ -394,13 +390,14 @@ namespace glm template GLM_FUNC_QUALIFIER genIUType bitfieldReverse(genIUType const & Value) { - GLM_STATIC_ASSERT(std::numeric_limits::is_integer, "'bitfieldReverse' only accept integer values"); + GLM_STATIC_ASSERT(std::numeric_limits::is_integer, "'bitRevert' only accept integer values"); - genIUType Result = 0; - for(std::size_t i = 0; i < sizeof(genIUType) * std::size_t(8); ++i) - if(Value & (genIUType(1) << genIUType(i))) - Result |= (genIUType(1) << (genIUType(sizeof(genIUType)) * genIUType(8)) - genIUType(1) - genIUType(i)); - return Result; + genIUType Out = 0; + std::size_t BitSize = sizeof(genIUType) * 8; + for(std::size_t i = 0; i < BitSize; ++i) + if(In & (genIUType(1) << i)) + Out |= genIUType(1) << (BitSize - 1 - i); + return Out; } template @@ -441,14 +438,14 @@ namespace glm // bitCount template - int bitCount(genIUType const & Value) + GLM_FUNC_QUALIFIER int bitCount(genIUType const & Value) { GLM_STATIC_ASSERT(std::numeric_limits::is_integer, "'bitCount' only accept integer values"); int Count = 0; for(std::size_t i = 0; i < sizeof(genIUType) * std::size_t(8); ++i) { - if(Value & (genIUType(1) << i)) + if(Value & (1 << i)) ++Count; } return Count; diff --git a/glm/core/setup.hpp b/glm/core/setup.hpp index 6945bbc6..a90095fb 100644 --- a/glm/core/setup.hpp +++ b/glm/core/setup.hpp @@ -400,9 +400,11 @@ // User defines: GLM_FORCE_INLINE GLM_FORCE_CUDA #if(defined(GLM_FORCE_CUDA) || (defined(GLM_COMPILER) && (GLM_COMPILER >= GLM_COMPILER_CUDA30))) -# define GLM_CUDA_QUALIFIER __device__ __host__ +# define GLM_CUDA_FUNC_DEF __device__ __host__ +# define GLM_CUDA_FUNC_DECL __device__ __host__ #else -# define GLM_CUDA_QUALIFIER +# define GLM_CUDA_FUNC_DEF +# define GLM_CUDA_FUNC_DECL #endif #if(defined(GLM_FORCE_INLINE)) @@ -417,7 +419,8 @@ # define GLM_INLINE inline #endif//defined(GLM_FORCE_INLINE) -#define GLM_FUNC_QUALIFIER GLM_CUDA_QUALIFIER GLM_INLINE +#define GLM_FUNC_DECL GLM_CUDA_FUNC_DECL +#define GLM_FUNC_QUALIFIER GLM_CUDA_FUNC_DEF GLM_INLINE /////////////////////////////////////////////////////////////////////////////////////////////////// // Swizzle operators diff --git a/glm/core/type_float.hpp b/glm/core/type_float.hpp index a615c0f3..673797ae 100644 --- a/glm/core/type_float.hpp +++ b/glm/core/type_float.hpp @@ -46,7 +46,7 @@ namespace glm //! There is no guarantee on the actual precision. //! From GLSL 1.30.8 specification //! \ingroup core_precision - typedef mediump_float_t mediump_float; + typedef mediump_float_t mediump_float; //! High precision floating-point numbers. //! There is no guarantee on the actual precision. //! From GLSL 1.30.8 specification @@ -58,7 +58,7 @@ namespace glm #if(!defined(GLM_PRECISION_HIGHP_FLOAT) && !defined(GLM_PRECISION_MEDIUMP_FLOAT) && !defined(GLM_PRECISION_LOWP_FLOAT)) typedef precision::mediump_float float_t; #elif(defined(GLM_PRECISION_HIGHP_FLOAT) && !defined(GLM_PRECISION_MEDIUMP_FLOAT) && !defined(GLM_PRECISION_LOWP_FLOAT)) - typedef precision::highp_float float_t; + typedef precision::highp_float float_t; #elif(!defined(GLM_PRECISION_HIGHP_FLOAT) && defined(GLM_PRECISION_MEDIUMP_FLOAT) && !defined(GLM_PRECISION_LOWP_FLOAT)) typedef precision::mediump_float float_t; #elif(!defined(GLM_PRECISION_HIGHP_FLOAT) && !defined(GLM_PRECISION_MEDIUMP_FLOAT) && defined(GLM_PRECISION_LOWP_FLOAT)) diff --git a/glm/core/type_half.hpp b/glm/core/type_half.hpp index cc8fed60..00a90157 100644 --- a/glm/core/type_half.hpp +++ b/glm/core/type_half.hpp @@ -33,30 +33,30 @@ namespace glm { public: // Constructors - thalf(); - thalf(thalf const & s); + GLM_FUNC_DECL thalf(); + GLM_FUNC_DECL thalf(thalf const & s); template - explicit thalf(U const & s); + GLM_FUNC_DECL explicit thalf(U const & s); // Cast //operator float(); - operator float() const; + GLM_FUNC_DECL operator float() const; //operator double(); //operator double() const; // Unary updatable operators - thalf& operator= (thalf const & s); - thalf& operator+=(thalf const & s); - thalf& operator-=(thalf const & s); - thalf& operator*=(thalf const & s); - thalf& operator/=(thalf const & s); - thalf& operator++(); - thalf& operator--(); + GLM_FUNC_DECL thalf& operator= (thalf const & s); + GLM_FUNC_DECL thalf& operator+=(thalf const & s); + GLM_FUNC_DECL thalf& operator-=(thalf const & s); + GLM_FUNC_DECL thalf& operator*=(thalf const & s); + GLM_FUNC_DECL thalf& operator/=(thalf const & s); + GLM_FUNC_DECL thalf& operator++(); + GLM_FUNC_DECL thalf& operator--(); - float toFloat() const{return toFloat32(data);} + GLM_FUNC_DECL float toFloat() const{return toFloat32(data);} - hdata _data() const{return data;} + GLM_FUNC_DECL hdata _data() const{return data;} private: hdata data; diff --git a/glm/core/type_half.inl b/glm/core/type_half.inl index f02b465a..8166a75e 100644 --- a/glm/core/type_half.inl +++ b/glm/core/type_half.inl @@ -256,7 +256,7 @@ namespace detail GLM_FUNC_QUALIFIER thalf::operator float() const { - return toFloat(); + return toFloat32(this->data); } //GLM_FUNC_QUALIFIER half::operator double() diff --git a/glm/core/type_mat2x2.hpp b/glm/core/type_mat2x2.hpp index aecd36e0..aade1ef4 100644 --- a/glm/core/type_mat2x2.hpp +++ b/glm/core/type_mat2x2.hpp @@ -45,15 +45,15 @@ namespace glm typedef std::size_t size_type; typedef tvec2 col_type; typedef tvec2 row_type; - static size_type col_size(); - static size_type row_size(); + static GLM_FUNC_DECL size_type col_size(); + static GLM_FUNC_DECL size_type row_size(); typedef tmat2x2 type; typedef tmat2x2 transpose_type; public: // Implementation detail - tmat2x2 _inverse() const; + GLM_FUNC_DECL tmat2x2 _inverse() const; private: // Data @@ -61,62 +61,62 @@ namespace glm public: // Constructors - tmat2x2(); - tmat2x2( + GLM_FUNC_DECL tmat2x2(); + GLM_FUNC_DECL tmat2x2( tmat2x2 const & m); - explicit tmat2x2( + GLM_FUNC_DECL explicit tmat2x2( ctor Null); - explicit tmat2x2( + GLM_FUNC_DECL explicit tmat2x2( value_type const & x); - explicit tmat2x2( + GLM_FUNC_DECL explicit tmat2x2( value_type const & x1, value_type const & y1, value_type const & x2, value_type const & y2); - explicit tmat2x2( + GLM_FUNC_DECL explicit tmat2x2( col_type const & v1, col_type const & v2); // Conversions template - explicit tmat2x2(tmat2x2 const & m); + GLM_FUNC_DECL explicit tmat2x2(tmat2x2 const & m); - explicit tmat2x2(tmat3x3 const & x); - explicit tmat2x2(tmat4x4 const & x); - explicit tmat2x2(tmat2x3 const & x); - explicit tmat2x2(tmat3x2 const & x); - explicit tmat2x2(tmat2x4 const & x); - explicit tmat2x2(tmat4x2 const & x); - explicit tmat2x2(tmat3x4 const & x); - explicit tmat2x2(tmat4x3 const & x); + GLM_FUNC_DECL explicit tmat2x2(tmat3x3 const & x); + GLM_FUNC_DECL explicit tmat2x2(tmat4x4 const & x); + GLM_FUNC_DECL explicit tmat2x2(tmat2x3 const & x); + GLM_FUNC_DECL explicit tmat2x2(tmat3x2 const & x); + GLM_FUNC_DECL explicit tmat2x2(tmat2x4 const & x); + GLM_FUNC_DECL explicit tmat2x2(tmat4x2 const & x); + GLM_FUNC_DECL explicit tmat2x2(tmat3x4 const & x); + GLM_FUNC_DECL explicit tmat2x2(tmat4x3 const & x); ////////////////////////////////////// // Accesses - col_type & operator[](size_type i); - col_type const & operator[](size_type i) const; + GLM_FUNC_DECL col_type & operator[](size_type i); + GLM_FUNC_DECL col_type const & operator[](size_type i) const; // Unary updatable operators - tmat2x2 & operator=(tmat2x2 const & m); + GLM_FUNC_DECL tmat2x2 & operator=(tmat2x2 const & m); template - tmat2x2 & operator=(tmat2x2 const & m); + GLM_FUNC_DECL tmat2x2 & operator=(tmat2x2 const & m); template - tmat2x2 & operator+=(U const & s); + GLM_FUNC_DECL tmat2x2 & operator+=(U const & s); template - tmat2x2 & operator+=(tmat2x2 const & m); + GLM_FUNC_DECL tmat2x2 & operator+=(tmat2x2 const & m); template - tmat2x2 & operator-=(U const & s); + GLM_FUNC_DECL tmat2x2 & operator-=(U const & s); template - tmat2x2 & operator-=(tmat2x2 const & m); + GLM_FUNC_DECL tmat2x2 & operator-=(tmat2x2 const & m); template - tmat2x2 & operator*=(U const & s); + GLM_FUNC_DECL tmat2x2 & operator*=(U const & s); template - tmat2x2 & operator*=(tmat2x2 const & m); + GLM_FUNC_DECL tmat2x2 & operator*=(tmat2x2 const & m); template - tmat2x2 & operator/=(U const & s); + GLM_FUNC_DECL tmat2x2 & operator/=(U const & s); template - tmat2x2 & operator/=(tmat2x2 const & m); - tmat2x2 & operator++(); - tmat2x2 & operator--(); + GLM_FUNC_DECL tmat2x2 & operator/=(tmat2x2 const & m); + GLM_FUNC_DECL tmat2x2 & operator++(); + GLM_FUNC_DECL tmat2x2 & operator--(); }; // Binary operators diff --git a/glm/core/type_mat2x3.hpp b/glm/core/type_mat2x3.hpp index 647d1ebe..ed87f9e2 100644 --- a/glm/core/type_mat2x3.hpp +++ b/glm/core/type_mat2x3.hpp @@ -45,8 +45,8 @@ namespace glm typedef std::size_t size_type; typedef tvec3 col_type; typedef tvec2 row_type; - static size_type col_size(); - static size_type row_size(); + static GLM_FUNC_DECL size_type col_size(); + static GLM_FUNC_DECL size_type row_size(); typedef tmat2x3 type; typedef tmat3x2 transpose_type; @@ -57,58 +57,58 @@ namespace glm public: // Constructors - tmat2x3(); - tmat2x3(tmat2x3 const & m); + GLM_FUNC_DECL tmat2x3(); + GLM_FUNC_DECL tmat2x3(tmat2x3 const & m); - explicit tmat2x3( + GLM_FUNC_DECL explicit tmat2x3( ctor); - explicit tmat2x3( + GLM_FUNC_DECL explicit tmat2x3( value_type const & s); - explicit tmat2x3( + GLM_FUNC_DECL explicit tmat2x3( value_type const & x0, value_type const & y0, value_type const & z0, value_type const & x1, value_type const & y1, value_type const & z1); - explicit tmat2x3( + GLM_FUNC_DECL explicit tmat2x3( col_type const & v0, col_type const & v1); // Conversion template - explicit tmat2x3(tmat2x3 const & m); + GLM_FUNC_DECL explicit tmat2x3(tmat2x3 const & m); - explicit tmat2x3(tmat2x2 const & x); - explicit tmat2x3(tmat3x3 const & x); - explicit tmat2x3(tmat4x4 const & x); - explicit tmat2x3(tmat2x4 const & x); - explicit tmat2x3(tmat3x2 const & x); - explicit tmat2x3(tmat3x4 const & x); - explicit tmat2x3(tmat4x2 const & x); - explicit tmat2x3(tmat4x3 const & x); + GLM_FUNC_DECL explicit tmat2x3(tmat2x2 const & x); + GLM_FUNC_DECL explicit tmat2x3(tmat3x3 const & x); + GLM_FUNC_DECL explicit tmat2x3(tmat4x4 const & x); + GLM_FUNC_DECL explicit tmat2x3(tmat2x4 const & x); + GLM_FUNC_DECL explicit tmat2x3(tmat3x2 const & x); + GLM_FUNC_DECL explicit tmat2x3(tmat3x4 const & x); + GLM_FUNC_DECL explicit tmat2x3(tmat4x2 const & x); + GLM_FUNC_DECL explicit tmat2x3(tmat4x3 const & x); // Accesses col_type & operator[](size_type i); col_type const & operator[](size_type i) const; // Unary updatable operators - tmat2x3 & operator= (tmat2x3 const & m); + GLM_FUNC_DECL tmat2x3 & operator= (tmat2x3 const & m); template - tmat2x3 & operator= (tmat2x3 const & m); + GLM_FUNC_DECL tmat2x3 & operator= (tmat2x3 const & m); template - tmat2x3 & operator+= (U const & s); + GLM_FUNC_DECL tmat2x3 & operator+= (U const & s); template - tmat2x3 & operator+= (tmat2x3 const & m); + GLM_FUNC_DECL tmat2x3 & operator+= (tmat2x3 const & m); template - tmat2x3 & operator-= (U const & s); + GLM_FUNC_DECL tmat2x3 & operator-= (U const & s); template - tmat2x3 & operator-= (tmat2x3 const & m); + GLM_FUNC_DECL tmat2x3 & operator-= (tmat2x3 const & m); template - tmat2x3 & operator*= (U const & s); + GLM_FUNC_DECL tmat2x3 & operator*= (U const & s); template - tmat2x3 & operator*= (tmat2x3 const & m); + GLM_FUNC_DECL tmat2x3 & operator*= (tmat2x3 const & m); template - tmat2x3 & operator/= (U const & s); + GLM_FUNC_DECL tmat2x3 & operator/= (U const & s); - tmat2x3 & operator++ (); - tmat2x3 & operator-- (); + GLM_FUNC_DECL tmat2x3 & operator++ (); + GLM_FUNC_DECL tmat2x3 & operator-- (); }; // Binary operators diff --git a/glm/core/type_mat2x4.hpp b/glm/core/type_mat2x4.hpp index e0c00ffb..a14cc033 100644 --- a/glm/core/type_mat2x4.hpp +++ b/glm/core/type_mat2x4.hpp @@ -45,8 +45,8 @@ namespace glm typedef std::size_t size_type; typedef tvec4 col_type; typedef tvec2 row_type; - static size_type col_size(); - static size_type row_size(); + static GLM_FUNC_DECL size_type col_size(); + static GLM_FUNC_DECL size_type row_size(); typedef tmat2x4 type; typedef tmat4x2 transpose_type; @@ -57,58 +57,58 @@ namespace glm public: // Constructors - tmat2x4(); - tmat2x4(tmat2x4 const & m); + GLM_FUNC_DECL tmat2x4(); + GLM_FUNC_DECL tmat2x4(tmat2x4 const & m); - explicit tmat2x4( + GLM_FUNC_DECL explicit tmat2x4( ctor); - explicit tmat2x4( + GLM_FUNC_DECL explicit tmat2x4( value_type const & s); - explicit tmat2x4( + GLM_FUNC_DECL explicit tmat2x4( value_type const & x0, value_type const & y0, value_type const & z0, value_type const & w0, value_type const & x1, value_type const & y1, value_type const & z1, value_type const & w1); - explicit tmat2x4( + GLM_FUNC_DECL explicit tmat2x4( col_type const & v0, col_type const & v1); // Conversion template - explicit tmat2x4(tmat2x4 const & m); + GLM_FUNC_DECL explicit tmat2x4(tmat2x4 const & m); - explicit tmat2x4(tmat2x2 const & x); - explicit tmat2x4(tmat3x3 const & x); - explicit tmat2x4(tmat4x4 const & x); - explicit tmat2x4(tmat2x3 const & x); - explicit tmat2x4(tmat3x2 const & x); - explicit tmat2x4(tmat3x4 const & x); - explicit tmat2x4(tmat4x2 const & x); - explicit tmat2x4(tmat4x3 const & x); + GLM_FUNC_DECL explicit tmat2x4(tmat2x2 const & x); + GLM_FUNC_DECL explicit tmat2x4(tmat3x3 const & x); + GLM_FUNC_DECL explicit tmat2x4(tmat4x4 const & x); + GLM_FUNC_DECL explicit tmat2x4(tmat2x3 const & x); + GLM_FUNC_DECL explicit tmat2x4(tmat3x2 const & x); + GLM_FUNC_DECL explicit tmat2x4(tmat3x4 const & x); + GLM_FUNC_DECL explicit tmat2x4(tmat4x2 const & x); + GLM_FUNC_DECL explicit tmat2x4(tmat4x3 const & x); // Accesses - col_type & operator[](size_type i); - col_type const & operator[](size_type i) const; + GLM_FUNC_DECL col_type & operator[](size_type i); + GLM_FUNC_DECL col_type const & operator[](size_type i) const; // Unary updatable operators - tmat2x4& operator= (tmat2x4 const & m); + GLM_FUNC_DECL tmat2x4& operator= (tmat2x4 const & m); template - tmat2x4& operator= (tmat2x4 const & m); + GLM_FUNC_DECL tmat2x4& operator= (tmat2x4 const & m); template - tmat2x4& operator+= (U const & s); + GLM_FUNC_DECL tmat2x4& operator+= (U const & s); template - tmat2x4& operator+= (tmat2x4 const & m); + GLM_FUNC_DECL tmat2x4& operator+= (tmat2x4 const & m); template - tmat2x4& operator-= (U const & s); + GLM_FUNC_DECL tmat2x4& operator-= (U const & s); template - tmat2x4& operator-= (tmat2x4 const & m); + GLM_FUNC_DECL tmat2x4& operator-= (tmat2x4 const & m); template - tmat2x4& operator*= (U const & s); + GLM_FUNC_DECL tmat2x4& operator*= (U const & s); template - tmat2x4& operator*= (tmat2x4 const & m); + GLM_FUNC_DECL tmat2x4& operator*= (tmat2x4 const & m); template - tmat2x4& operator/= (U const & s); + GLM_FUNC_DECL tmat2x4& operator/= (U const & s); - tmat2x4& operator++ (); - tmat2x4& operator-- (); + GLM_FUNC_DECL tmat2x4& operator++ (); + GLM_FUNC_DECL tmat2x4& operator-- (); }; // Binary operators diff --git a/glm/core/type_mat3x2.hpp b/glm/core/type_mat3x2.hpp index 5a2bd8f0..3457b72f 100644 --- a/glm/core/type_mat3x2.hpp +++ b/glm/core/type_mat3x2.hpp @@ -45,8 +45,8 @@ namespace glm typedef std::size_t size_type; typedef tvec2 col_type; typedef tvec3 row_type; - static size_type col_size(); - static size_type row_size(); + static GLM_FUNC_DECL size_type col_size(); + static GLM_FUNC_DECL size_type row_size(); typedef tmat3x2 type; typedef tmat2x3 transpose_type; @@ -57,60 +57,60 @@ namespace glm public: // Constructors - tmat3x2(); - tmat3x2(tmat3x2 const & m); + GLM_FUNC_DECL tmat3x2(); + GLM_FUNC_DECL tmat3x2(tmat3x2 const & m); - explicit tmat3x2( + GLM_FUNC_DECL explicit tmat3x2( ctor); - explicit tmat3x2( + GLM_FUNC_DECL explicit tmat3x2( value_type const & s); - explicit tmat3x2( + GLM_FUNC_DECL explicit tmat3x2( value_type const & x0, value_type const & y0, value_type const & x1, value_type const & y1, value_type const & x2, value_type const & y2); - explicit tmat3x2( + GLM_FUNC_DECL explicit tmat3x2( col_type const & v0, col_type const & v1, col_type const & v2); // Conversion template - explicit tmat3x2(tmat3x2 const & m); + GLM_FUNC_DECL explicit tmat3x2(tmat3x2 const & m); - explicit tmat3x2(tmat2x2 const & x); - explicit tmat3x2(tmat3x3 const & x); - explicit tmat3x2(tmat4x4 const & x); - explicit tmat3x2(tmat2x3 const & x); - explicit tmat3x2(tmat2x4 const & x); - explicit tmat3x2(tmat3x4 const & x); - explicit tmat3x2(tmat4x2 const & x); - explicit tmat3x2(tmat4x3 const & x); + GLM_FUNC_DECL explicit tmat3x2(tmat2x2 const & x); + GLM_FUNC_DECL explicit tmat3x2(tmat3x3 const & x); + GLM_FUNC_DECL explicit tmat3x2(tmat4x4 const & x); + GLM_FUNC_DECL explicit tmat3x2(tmat2x3 const & x); + GLM_FUNC_DECL explicit tmat3x2(tmat2x4 const & x); + GLM_FUNC_DECL explicit tmat3x2(tmat3x4 const & x); + GLM_FUNC_DECL explicit tmat3x2(tmat4x2 const & x); + GLM_FUNC_DECL explicit tmat3x2(tmat4x3 const & x); // Accesses - col_type & operator[](size_type i); - col_type const & operator[](size_type i) const; + GLM_FUNC_DECL col_type & operator[](size_type i); + GLM_FUNC_DECL col_type const & operator[](size_type i) const; // Unary updatable operators - tmat3x2 & operator= (tmat3x2 const & m); + GLM_FUNC_DECL tmat3x2 & operator= (tmat3x2 const & m); template - tmat3x2 & operator= (tmat3x2 const & m); + GLM_FUNC_DECL tmat3x2 & operator= (tmat3x2 const & m); template - tmat3x2 & operator+= (U const & s); + GLM_FUNC_DECL tmat3x2 & operator+= (U const & s); template - tmat3x2 & operator+= (tmat3x2 const & m); + GLM_FUNC_DECL tmat3x2 & operator+= (tmat3x2 const & m); template - tmat3x2 & operator-= (U const & s); + GLM_FUNC_DECL tmat3x2 & operator-= (U const & s); template - tmat3x2 & operator-= (tmat3x2 const & m); + GLM_FUNC_DECL tmat3x2 & operator-= (tmat3x2 const & m); template - tmat3x2 & operator*= (U const & s); + GLM_FUNC_DECL tmat3x2 & operator*= (U const & s); template - tmat3x2 & operator*= (tmat3x2 const & m); + GLM_FUNC_DECL tmat3x2 & operator*= (tmat3x2 const & m); template - tmat3x2 & operator/= (U const & s); + GLM_FUNC_DECL tmat3x2 & operator/= (U const & s); - tmat3x2 & operator++ (); - tmat3x2 & operator-- (); + GLM_FUNC_DECL tmat3x2 & operator++ (); + GLM_FUNC_DECL tmat3x2 & operator-- (); }; // Binary operators diff --git a/glm/core/type_mat3x3.hpp b/glm/core/type_mat3x3.hpp index e5edfaff..bf18c167 100644 --- a/glm/core/type_mat3x3.hpp +++ b/glm/core/type_mat3x3.hpp @@ -45,15 +45,15 @@ namespace glm typedef std::size_t size_type; typedef tvec3 col_type; typedef tvec3 row_type; - static size_type col_size(); - static size_type row_size(); + static GLM_FUNC_DECL size_type col_size(); + static GLM_FUNC_DECL size_type row_size(); typedef tmat3x3 type; typedef tmat3x3 transpose_type; public: // Implementation detail - tmat3x3 _inverse() const; + GLM_FUNC_DECL tmat3x3 _inverse() const; private: // Data @@ -61,61 +61,61 @@ namespace glm public: // Constructors - tmat3x3(); - tmat3x3(tmat3x3 const & m); + GLM_FUNC_DECL tmat3x3(); + GLM_FUNC_DECL tmat3x3(tmat3x3 const & m); - explicit tmat3x3( + GLM_FUNC_DECL explicit tmat3x3( ctor Null); - explicit tmat3x3( + GLM_FUNC_DECL explicit tmat3x3( value_type const & s); - explicit tmat3x3( + GLM_FUNC_DECL explicit tmat3x3( value_type const & x0, value_type const & y0, value_type const & z0, value_type const & x1, value_type const & y1, value_type const & z1, value_type const & x2, value_type const & y2, value_type const & z2); - explicit tmat3x3( + GLM_FUNC_DECL explicit tmat3x3( col_type const & v0, col_type const & v1, col_type const & v2); // Conversions template - explicit tmat3x3(tmat3x3 const & m); + GLM_FUNC_DECL explicit tmat3x3(tmat3x3 const & m); - explicit tmat3x3(tmat2x2 const & x); - explicit tmat3x3(tmat4x4 const & x); - explicit tmat3x3(tmat2x3 const & x); - explicit tmat3x3(tmat3x2 const & x); - explicit tmat3x3(tmat2x4 const & x); - explicit tmat3x3(tmat4x2 const & x); - explicit tmat3x3(tmat3x4 const & x); - explicit tmat3x3(tmat4x3 const & x); + GLM_FUNC_DECL explicit tmat3x3(tmat2x2 const & x); + GLM_FUNC_DECL explicit tmat3x3(tmat4x4 const & x); + GLM_FUNC_DECL explicit tmat3x3(tmat2x3 const & x); + GLM_FUNC_DECL explicit tmat3x3(tmat3x2 const & x); + GLM_FUNC_DECL explicit tmat3x3(tmat2x4 const & x); + GLM_FUNC_DECL explicit tmat3x3(tmat4x2 const & x); + GLM_FUNC_DECL explicit tmat3x3(tmat3x4 const & x); + GLM_FUNC_DECL explicit tmat3x3(tmat4x3 const & x); // Accesses - col_type & operator[](size_type i); - col_type const & operator[](size_type i) const; + GLM_FUNC_DECL col_type & operator[](size_type i); + GLM_FUNC_DECL col_type const & operator[](size_type i) const; // Unary updatable operators - tmat3x3& operator= (tmat3x3 const & m); + GLM_FUNC_DECL tmat3x3& operator= (tmat3x3 const & m); template - tmat3x3& operator= (tmat3x3 const & m); + GLM_FUNC_DECL tmat3x3& operator= (tmat3x3 const & m); template - tmat3x3& operator+= (U const & s); + GLM_FUNC_DECL tmat3x3& operator+= (U const & s); template - tmat3x3& operator+= (tmat3x3 const & m); + GLM_FUNC_DECL tmat3x3& operator+= (tmat3x3 const & m); template - tmat3x3& operator-= (U const & s); + GLM_FUNC_DECL tmat3x3& operator-= (U const & s); template - tmat3x3& operator-= (tmat3x3 const & m); + GLM_FUNC_DECL tmat3x3& operator-= (tmat3x3 const & m); template - tmat3x3& operator*= (U const & s); + GLM_FUNC_DECL tmat3x3& operator*= (U const & s); template - tmat3x3& operator*= (tmat3x3 const & m); + GLM_FUNC_DECL tmat3x3& operator*= (tmat3x3 const & m); template - tmat3x3& operator/= (U const & s); + GLM_FUNC_DECL tmat3x3& operator/= (U const & s); template - tmat3x3& operator/= (tmat3x3 const & m); - tmat3x3& operator++ (); - tmat3x3& operator-- (); + GLM_FUNC_DECL tmat3x3& operator/= (tmat3x3 const & m); + GLM_FUNC_DECL tmat3x3& operator++ (); + GLM_FUNC_DECL tmat3x3& operator-- (); }; // Binary operators diff --git a/glm/core/type_mat3x4.hpp b/glm/core/type_mat3x4.hpp index 6f68b4cd..1f84ec7b 100644 --- a/glm/core/type_mat3x4.hpp +++ b/glm/core/type_mat3x4.hpp @@ -45,8 +45,8 @@ namespace glm typedef std::size_t size_type; typedef tvec4 col_type; typedef tvec3 row_type; - static size_type col_size(); - static size_type row_size(); + static GLM_FUNC_DECL size_type col_size(); + static GLM_FUNC_DECL size_type row_size(); typedef tmat3x4 type; typedef tmat4x3 transpose_type; @@ -57,60 +57,60 @@ namespace glm public: // Constructors - tmat3x4(); - tmat3x4(tmat3x4 const & m); + GLM_FUNC_DECL tmat3x4(); + GLM_FUNC_DECL tmat3x4(tmat3x4 const & m); - explicit tmat3x4( + GLM_FUNC_DECL explicit tmat3x4( ctor Null); - explicit tmat3x4( + GLM_FUNC_DECL explicit tmat3x4( value_type const & s); - explicit tmat3x4( + GLM_FUNC_DECL explicit tmat3x4( value_type const & x0, value_type const & y0, value_type const & z0, value_type const & w0, value_type const & x1, value_type const & y1, value_type const & z1, value_type const & w1, value_type const & x2, value_type const & y2, value_type const & z2, value_type const & w2); - explicit tmat3x4( + GLM_FUNC_DECL explicit tmat3x4( col_type const & v0, col_type const & v1, col_type const & v2); // Conversion template - explicit tmat3x4(tmat3x4 const & m); + GLM_FUNC_DECL explicit tmat3x4(tmat3x4 const & m); - explicit tmat3x4(tmat2x2 const & x); - explicit tmat3x4(tmat3x3 const & x); - explicit tmat3x4(tmat4x4 const & x); - explicit tmat3x4(tmat2x3 const & x); - explicit tmat3x4(tmat3x2 const & x); - explicit tmat3x4(tmat2x4 const & x); - explicit tmat3x4(tmat4x2 const & x); - explicit tmat3x4(tmat4x3 const & x); + GLM_FUNC_DECL explicit tmat3x4(tmat2x2 const & x); + GLM_FUNC_DECL explicit tmat3x4(tmat3x3 const & x); + GLM_FUNC_DECL explicit tmat3x4(tmat4x4 const & x); + GLM_FUNC_DECL explicit tmat3x4(tmat2x3 const & x); + GLM_FUNC_DECL explicit tmat3x4(tmat3x2 const & x); + GLM_FUNC_DECL explicit tmat3x4(tmat2x4 const & x); + GLM_FUNC_DECL explicit tmat3x4(tmat4x2 const & x); + GLM_FUNC_DECL explicit tmat3x4(tmat4x3 const & x); // Accesses col_type & operator[](size_type i); col_type const & operator[](size_type i) const; // Unary updatable operators - tmat3x4 & operator= (tmat3x4 const & m); + GLM_FUNC_DECL tmat3x4 & operator= (tmat3x4 const & m); template - tmat3x4 & operator= (tmat3x4 const & m); + GLM_FUNC_DECL tmat3x4 & operator= (tmat3x4 const & m); template - tmat3x4 & operator+= (U const & s); + GLM_FUNC_DECL tmat3x4 & operator+= (U const & s); template - tmat3x4 & operator+= (tmat3x4 const & m); + GLM_FUNC_DECL tmat3x4 & operator+= (tmat3x4 const & m); template - tmat3x4 & operator-= (U const & s); + GLM_FUNC_DECL tmat3x4 & operator-= (U const & s); template - tmat3x4 & operator-= (tmat3x4 const & m); + GLM_FUNC_DECL tmat3x4 & operator-= (tmat3x4 const & m); template - tmat3x4 & operator*= (U const & s); + GLM_FUNC_DECL tmat3x4 & operator*= (U const & s); template - tmat3x4 & operator*= (tmat3x4 const & m); + GLM_FUNC_DECL tmat3x4 & operator*= (tmat3x4 const & m); template - tmat3x4 & operator/= (U const & s); + GLM_FUNC_DECL tmat3x4 & operator/= (U const & s); - tmat3x4 & operator++ (); - tmat3x4 & operator-- (); + GLM_FUNC_DECL tmat3x4 & operator++ (); + GLM_FUNC_DECL tmat3x4 & operator-- (); }; // Binary operators diff --git a/glm/core/type_mat4x2.hpp b/glm/core/type_mat4x2.hpp index 3d90e3ac..3354ce8e 100644 --- a/glm/core/type_mat4x2.hpp +++ b/glm/core/type_mat4x2.hpp @@ -45,8 +45,8 @@ namespace glm typedef std::size_t size_type; typedef tvec2 col_type; typedef tvec4 row_type; - static size_type col_size(); - static size_type row_size(); + static GLM_FUNC_DECL size_type col_size(); + static GLM_FUNC_DECL size_type row_size(); typedef tmat4x2 type; typedef tmat2x4 transpose_type; @@ -57,19 +57,19 @@ namespace glm public: // Constructors - tmat4x2(); - tmat4x2(tmat4x2 const & m); + GLM_FUNC_DECL tmat4x2(); + GLM_FUNC_DECL tmat4x2(tmat4x2 const & m); - explicit tmat4x2( + GLM_FUNC_DECL explicit tmat4x2( ctor Null); - explicit tmat4x2( + GLM_FUNC_DECL explicit tmat4x2( value_type const & x); - explicit tmat4x2( + GLM_FUNC_DECL explicit tmat4x2( value_type const & x0, value_type const & y0, value_type const & x1, value_type const & y1, value_type const & x2, value_type const & y2, value_type const & x3, value_type const & y3); - explicit tmat4x2( + GLM_FUNC_DECL explicit tmat4x2( col_type const & v0, col_type const & v1, col_type const & v2, @@ -77,42 +77,42 @@ namespace glm // Conversions template - explicit tmat4x2(tmat4x2 const & m); + GLM_FUNC_DECL explicit tmat4x2(tmat4x2 const & m); - explicit tmat4x2(tmat2x2 const & x); - explicit tmat4x2(tmat3x3 const & x); - explicit tmat4x2(tmat4x4 const & x); - explicit tmat4x2(tmat2x3 const & x); - explicit tmat4x2(tmat3x2 const & x); - explicit tmat4x2(tmat2x4 const & x); - explicit tmat4x2(tmat4x3 const & x); - explicit tmat4x2(tmat3x4 const & x); + GLM_FUNC_DECL explicit tmat4x2(tmat2x2 const & x); + GLM_FUNC_DECL explicit tmat4x2(tmat3x3 const & x); + GLM_FUNC_DECL explicit tmat4x2(tmat4x4 const & x); + GLM_FUNC_DECL explicit tmat4x2(tmat2x3 const & x); + GLM_FUNC_DECL explicit tmat4x2(tmat3x2 const & x); + GLM_FUNC_DECL explicit tmat4x2(tmat2x4 const & x); + GLM_FUNC_DECL explicit tmat4x2(tmat4x3 const & x); + GLM_FUNC_DECL explicit tmat4x2(tmat3x4 const & x); // Accesses - col_type & operator[](size_type i); - col_type const & operator[](size_type i) const; + GLM_FUNC_DECL col_type & operator[](size_type i); + GLM_FUNC_DECL col_type const & operator[](size_type i) const; // Unary updatable operators - tmat4x2& operator= (tmat4x2 const & m); + GLM_FUNC_DECL tmat4x2& operator= (tmat4x2 const & m); template - tmat4x2& operator= (tmat4x2 const & m); + GLM_FUNC_DECL tmat4x2& operator= (tmat4x2 const & m); template - tmat4x2& operator+= (U const & s); + GLM_FUNC_DECL tmat4x2& operator+= (U const & s); template - tmat4x2& operator+= (tmat4x2 const & m); + GLM_FUNC_DECL tmat4x2& operator+= (tmat4x2 const & m); template - tmat4x2& operator-= (U const & s); + GLM_FUNC_DECL tmat4x2& operator-= (U const & s); template - tmat4x2& operator-= (tmat4x2 const & m); + GLM_FUNC_DECL tmat4x2& operator-= (tmat4x2 const & m); template - tmat4x2& operator*= (U const & s); + GLM_FUNC_DECL tmat4x2& operator*= (U const & s); template - tmat4x2& operator*= (tmat4x2 const & m); + GLM_FUNC_DECL tmat4x2& operator*= (tmat4x2 const & m); template - tmat4x2& operator/= (U const & s); + GLM_FUNC_DECL tmat4x2& operator/= (U const & s); - tmat4x2& operator++ (); - tmat4x2& operator-- (); + GLM_FUNC_DECL tmat4x2& operator++ (); + GLM_FUNC_DECL tmat4x2& operator-- (); }; // Binary operators diff --git a/glm/core/type_mat4x3.hpp b/glm/core/type_mat4x3.hpp index d9a311ad..b15a3c30 100644 --- a/glm/core/type_mat4x3.hpp +++ b/glm/core/type_mat4x3.hpp @@ -45,8 +45,8 @@ namespace glm typedef std::size_t size_type; typedef tvec3 col_type; typedef tvec4 row_type; - static size_type col_size(); - static size_type row_size(); + static GLM_FUNC_DECL size_type col_size(); + static GLM_FUNC_DECL size_type row_size(); typedef tmat4x3 type; typedef tmat3x4 transpose_type; @@ -57,19 +57,19 @@ namespace glm public: // Constructors - tmat4x3(); - tmat4x3(tmat4x3 const & m); + GLM_FUNC_DECL tmat4x3(); + GLM_FUNC_DECL tmat4x3(tmat4x3 const & m); - explicit tmat4x3( + GLM_FUNC_DECL explicit tmat4x3( ctor Null); - explicit tmat4x3( + GLM_FUNC_DECL explicit tmat4x3( value_type const & x); - explicit tmat4x3( + GLM_FUNC_DECL explicit tmat4x3( value_type const & x0, value_type const & y0, value_type const & z0, value_type const & x1, value_type const & y1, value_type const & z1, value_type const & x2, value_type const & y2, value_type const & z2, value_type const & x3, value_type const & y3, value_type const & z3); - explicit tmat4x3( + GLM_FUNC_DECL explicit tmat4x3( col_type const & v0, col_type const & v1, col_type const & v2, @@ -77,42 +77,42 @@ namespace glm // Conversion template - explicit tmat4x3(tmat4x3 const & m); + GLM_FUNC_DECL explicit tmat4x3(tmat4x3 const & m); - explicit tmat4x3(tmat2x2 const & x); - explicit tmat4x3(tmat3x3 const & x); - explicit tmat4x3(tmat4x4 const & x); - explicit tmat4x3(tmat2x3 const & x); - explicit tmat4x3(tmat3x2 const & x); - explicit tmat4x3(tmat2x4 const & x); - explicit tmat4x3(tmat4x2 const & x); - explicit tmat4x3(tmat3x4 const & x); + GLM_FUNC_DECL explicit tmat4x3(tmat2x2 const & x); + GLM_FUNC_DECL explicit tmat4x3(tmat3x3 const & x); + GLM_FUNC_DECL explicit tmat4x3(tmat4x4 const & x); + GLM_FUNC_DECL explicit tmat4x3(tmat2x3 const & x); + GLM_FUNC_DECL explicit tmat4x3(tmat3x2 const & x); + GLM_FUNC_DECL explicit tmat4x3(tmat2x4 const & x); + GLM_FUNC_DECL explicit tmat4x3(tmat4x2 const & x); + GLM_FUNC_DECL explicit tmat4x3(tmat3x4 const & x); // Accesses col_type & operator[](size_type i); col_type const & operator[](size_type i) const; // Unary updatable operators - tmat4x3 & operator= (tmat4x3 const & m); + GLM_FUNC_DECL tmat4x3 & operator= (tmat4x3 const & m); template - tmat4x3 & operator= (tmat4x3 const & m); + GLM_FUNC_DECL tmat4x3 & operator= (tmat4x3 const & m); template - tmat4x3 & operator+= (U const & s); + GLM_FUNC_DECL tmat4x3 & operator+= (U const & s); template - tmat4x3 & operator+= (tmat4x3 const & m); + GLM_FUNC_DECL tmat4x3 & operator+= (tmat4x3 const & m); template - tmat4x3 & operator-= (U const & s); + GLM_FUNC_DECL tmat4x3 & operator-= (U const & s); template - tmat4x3 & operator-= (tmat4x3 const & m); + GLM_FUNC_DECL tmat4x3 & operator-= (tmat4x3 const & m); template - tmat4x3 & operator*= (U const & s); + GLM_FUNC_DECL tmat4x3 & operator*= (U const & s); template - tmat4x3 & operator*= (tmat4x3 const & m); + GLM_FUNC_DECL tmat4x3 & operator*= (tmat4x3 const & m); template - tmat4x3 & operator/= (U const & s); + GLM_FUNC_DECL tmat4x3 & operator/= (U const & s); - tmat4x3 & operator++ (); - tmat4x3 & operator-- (); + GLM_FUNC_DECL tmat4x3 & operator++ (); + GLM_FUNC_DECL tmat4x3 & operator-- (); }; // Binary operators diff --git a/glm/core/type_mat4x4.hpp b/glm/core/type_mat4x4.hpp index 05325a1e..6aa1f68a 100644 --- a/glm/core/type_mat4x4.hpp +++ b/glm/core/type_mat4x4.hpp @@ -45,15 +45,15 @@ namespace glm typedef std::size_t size_type; typedef tvec4 col_type; typedef tvec4 row_type; - static size_type col_size(); - static size_type row_size(); + static GLM_FUNC_DECL size_type col_size(); + static GLM_FUNC_DECL size_type row_size(); typedef tmat4x4 type; typedef tmat4x4 transpose_type; public: // Implementation detail - tmat4x4 _inverse() const; + GLM_FUNC_DECL tmat4x4 _inverse() const; private: // Data @@ -61,19 +61,19 @@ namespace glm public: // Constructors - tmat4x4(); - tmat4x4(tmat4x4 const & m); + GLM_FUNC_DECL tmat4x4(); + GLM_FUNC_DECL tmat4x4(tmat4x4 const & m); - explicit tmat4x4( + GLM_FUNC_DECL explicit tmat4x4( ctor Null); - explicit tmat4x4( + GLM_FUNC_DECL explicit tmat4x4( value_type const & x); - explicit tmat4x4( + GLM_FUNC_DECL explicit tmat4x4( value_type const & x0, value_type const & y0, value_type const & z0, value_type const & w0, value_type const & x1, value_type const & y1, value_type const & z1, value_type const & w1, value_type const & x2, value_type const & y2, value_type const & z2, value_type const & w2, value_type const & x3, value_type const & y3, value_type const & z3, value_type const & w3); - explicit tmat4x4( + GLM_FUNC_DECL explicit tmat4x4( col_type const & v0, col_type const & v1, col_type const & v2, @@ -81,43 +81,43 @@ namespace glm // Conversions template - explicit tmat4x4(tmat4x4 const & m); + GLM_FUNC_DECL explicit tmat4x4(tmat4x4 const & m); - explicit tmat4x4(tmat2x2 const & x); - explicit tmat4x4(tmat3x3 const & x); - explicit tmat4x4(tmat2x3 const & x); - explicit tmat4x4(tmat3x2 const & x); - explicit tmat4x4(tmat2x4 const & x); - explicit tmat4x4(tmat4x2 const & x); - explicit tmat4x4(tmat3x4 const & x); - explicit tmat4x4(tmat4x3 const & x); + GLM_FUNC_DECL explicit tmat4x4(tmat2x2 const & x); + GLM_FUNC_DECL explicit tmat4x4(tmat3x3 const & x); + GLM_FUNC_DECL explicit tmat4x4(tmat2x3 const & x); + GLM_FUNC_DECL explicit tmat4x4(tmat3x2 const & x); + GLM_FUNC_DECL explicit tmat4x4(tmat2x4 const & x); + GLM_FUNC_DECL explicit tmat4x4(tmat4x2 const & x); + GLM_FUNC_DECL explicit tmat4x4(tmat3x4 const & x); + GLM_FUNC_DECL explicit tmat4x4(tmat4x3 const & x); // Accesses - col_type & operator[](size_type i); - col_type const & operator[](size_type i) const; + GLM_FUNC_DECL col_type & operator[](size_type i); + GLM_FUNC_DECL col_type const & operator[](size_type i) const; // Unary updatable operators - tmat4x4 & operator= (tmat4x4 const & m); + GLM_FUNC_DECL tmat4x4 & operator= (tmat4x4 const & m); template - tmat4x4 & operator= (tmat4x4 const & m); + GLM_FUNC_DECL tmat4x4 & operator= (tmat4x4 const & m); template - tmat4x4 & operator+= (U const & s); + GLM_FUNC_DECL tmat4x4 & operator+= (U const & s); template - tmat4x4 & operator+= (tmat4x4 const & m); + GLM_FUNC_DECL tmat4x4 & operator+= (tmat4x4 const & m); template - tmat4x4 & operator-= (U const & s); + GLM_FUNC_DECL tmat4x4 & operator-= (U const & s); template - tmat4x4 & operator-= (tmat4x4 const & m); + GLM_FUNC_DECL tmat4x4 & operator-= (tmat4x4 const & m); template - tmat4x4 & operator*= (U const & s); + GLM_FUNC_DECL tmat4x4 & operator*= (U const & s); template - tmat4x4 & operator*= (tmat4x4 const & m); + GLM_FUNC_DECL tmat4x4 & operator*= (tmat4x4 const & m); template - tmat4x4 & operator/= (U const & s); + GLM_FUNC_DECL tmat4x4 & operator/= (U const & s); template - tmat4x4 & operator/= (tmat4x4 const & m); - tmat4x4 & operator++ (); - tmat4x4 & operator-- (); + GLM_FUNC_DECL tmat4x4 & operator/= (tmat4x4 const & m); + GLM_FUNC_DECL tmat4x4 & operator++ (); + GLM_FUNC_DECL tmat4x4 & operator-- (); }; // Binary operators diff --git a/glm/core/type_vec1.hpp b/glm/core/type_vec1.hpp index 2b3ad663..5dcbca88 100644 --- a/glm/core/type_vec1.hpp +++ b/glm/core/type_vec1.hpp @@ -41,7 +41,7 @@ namespace glm typedef T value_type; typedef std::size_t size_type; - static size_type value_size(); + static GLM_FUNC_DECL size_type value_size(); typedef tvec1 type; typedef tvec1 bool_type; @@ -58,99 +58,99 @@ namespace glm ////////////////////////////////////// // Accesses - value_type & operator[](size_type i); - value_type const & operator[](size_type i) const; + GLM_FUNC_DECL value_type & operator[](size_type i); + GLM_FUNC_DECL value_type const & operator[](size_type i) const; ////////////////////////////////////// // Implicit basic constructors - tvec1(); - tvec1(tvec1 const & v); + GLM_FUNC_DECL tvec1(); + GLM_FUNC_DECL tvec1(tvec1 const & v); ////////////////////////////////////// // Explicit basic constructors - explicit tvec1( + GLM_FUNC_DECL explicit tvec1( ctor); - explicit tvec1( + GLM_FUNC_DECL explicit tvec1( value_type const & s); ////////////////////////////////////// // Swizzle constructors - tvec1(tref1 const & r); + GLM_FUNC_DECL tvec1(tref1 const & r); ////////////////////////////////////// // Convertion scalar constructors //! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) template - explicit tvec1(U const & s); + GLM_FUNC_DECL explicit tvec1(U const & s); ////////////////////////////////////// // Convertion vector constructors //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) template - explicit tvec1(tvec2 const & v); + GLM_FUNC_DECL explicit tvec1(tvec2 const & v); //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) template - explicit tvec1(tvec3 const & v); + GLM_FUNC_DECL explicit tvec1(tvec3 const & v); //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) template - explicit tvec1(tvec4 const & v); + GLM_FUNC_DECL explicit tvec1(tvec4 const & v); ////////////////////////////////////// // Unary arithmetic operators - tvec1 & operator= (tvec1 const & v); + GLM_FUNC_DECL tvec1 & operator= (tvec1 const & v); - tvec1 & operator+=(value_type const & s); - tvec1 & operator+=(tvec1 const & v); - tvec1 & operator-=(value_type const & s); - tvec1 & operator-=(tvec1 const & v); - tvec1 & operator*=(value_type const & s); - tvec1 & operator*=(tvec1 const & v); - tvec1 & operator/=(value_type const & s); - tvec1 & operator/=(tvec1 const & v); - tvec1 & operator++(); - tvec1 & operator--(); + GLM_FUNC_DECL tvec1 & operator+=(value_type const & s); + GLM_FUNC_DECL tvec1 & operator+=(tvec1 const & v); + GLM_FUNC_DECL tvec1 & operator-=(value_type const & s); + GLM_FUNC_DECL tvec1 & operator-=(tvec1 const & v); + GLM_FUNC_DECL tvec1 & operator*=(value_type const & s); + GLM_FUNC_DECL tvec1 & operator*=(tvec1 const & v); + GLM_FUNC_DECL tvec1 & operator/=(value_type const & s); + GLM_FUNC_DECL tvec1 & operator/=(tvec1 const & v); + GLM_FUNC_DECL tvec1 & operator++(); + GLM_FUNC_DECL tvec1 & operator--(); ////////////////////////////////////// // Unary bit operators - tvec1 & operator%=(value_type const & s); - tvec1 & operator%=(tvec1 const & v); - tvec1 & operator&=(value_type const & s); - tvec1 & operator&=(tvec1 const & v); - tvec1 & operator|=(value_type const & s); - tvec1 & operator|=(tvec1 const & v); - tvec1 & operator^=(value_type const & s); - tvec1 & operator^=(tvec1 const & v); - tvec1 & operator<<=(value_type const & s); - tvec1 & operator<<=(tvec1 const & v); - tvec1 & operator>>=(value_type const & s); - tvec1 & operator>>=(tvec1 const & v); + GLM_FUNC_DECL tvec1 & operator%=(value_type const & s); + GLM_FUNC_DECL tvec1 & operator%=(tvec1 const & v); + GLM_FUNC_DECL tvec1 & operator&=(value_type const & s); + GLM_FUNC_DECL tvec1 & operator&=(tvec1 const & v); + GLM_FUNC_DECL tvec1 & operator|=(value_type const & s); + GLM_FUNC_DECL tvec1 & operator|=(tvec1 const & v); + GLM_FUNC_DECL tvec1 & operator^=(value_type const & s); + GLM_FUNC_DECL tvec1 & operator^=(tvec1 const & v); + GLM_FUNC_DECL tvec1 & operator<<=(value_type const & s); + GLM_FUNC_DECL tvec1 & operator<<=(tvec1 const & v); + GLM_FUNC_DECL tvec1 & operator>>=(value_type const & s); + GLM_FUNC_DECL tvec1 & operator>>=(tvec1 const & v); ////////////////////////////////////// // Swizzle operators - value_type swizzle(comp X) const; - tvec2 swizzle(comp X, comp Y) const; - tvec3 swizzle(comp X, comp Y, comp Z) const; - tvec4 swizzle(comp X, comp Y, comp Z, comp W) const; - tref1 swizzle(comp X); + GLM_FUNC_DECL value_type swizzle(comp X) const; + GLM_FUNC_DECL tvec2 swizzle(comp X, comp Y) const; + GLM_FUNC_DECL tvec3 swizzle(comp X, comp Y, comp Z) const; + GLM_FUNC_DECL tvec4 swizzle(comp X, comp Y, comp Z, comp W) const; + GLM_FUNC_DECL tref1 swizzle(comp X); }; template struct tref1 { - tref1(T & x); - tref1(tref1 const & r); - tref1(tvec1 const & v); + GLM_FUNC_DECL tref1(T & x); + GLM_FUNC_DECL tref1(tref1 const & r); + GLM_FUNC_DECL tref1(tvec1 const & v); - tref1 & operator= (tref1 const & r); - tref1 & operator= (tvec1 const & v); + GLM_FUNC_DECL tref1 & operator= (tref1 const & r); + GLM_FUNC_DECL tref1 & operator= (tvec1 const & v); T& x; }; diff --git a/glm/core/type_vec2.hpp b/glm/core/type_vec2.hpp index 3e212c88..47e384de 100644 --- a/glm/core/type_vec2.hpp +++ b/glm/core/type_vec2.hpp @@ -41,7 +41,7 @@ namespace glm typedef T value_type; typedef std::size_t size_type; - static size_type value_size(); + static GLM_FUNC_DECL size_type value_size(); typedef tvec2 type; typedef tvec2 bool_type; @@ -66,23 +66,23 @@ namespace glm ////////////////////////////////////// // Accesses - value_type & operator[](size_type i); - value_type const & operator[](size_type i) const; + GLM_FUNC_DECL value_type & operator[](size_type i); + GLM_FUNC_DECL value_type const & operator[](size_type i) const; ////////////////////////////////////// // Implicit basic constructors - tvec2(); - tvec2(tvec2 const & v); + GLM_FUNC_DECL tvec2(); + GLM_FUNC_DECL tvec2(tvec2 const & v); ////////////////////////////////////// // Explicit basic constructors - explicit tvec2( + GLM_FUNC_DECL explicit tvec2( ctor); - explicit tvec2( + GLM_FUNC_DECL explicit tvec2( value_type const & s); - explicit tvec2( + GLM_FUNC_DECL explicit tvec2( value_type const & s1, value_type const & s2); @@ -96,11 +96,11 @@ namespace glm //! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) template - explicit tvec2( + GLM_FUNC_DECL explicit tvec2( U const & x); //! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) template - explicit tvec2( + GLM_FUNC_DECL explicit tvec2( U const & x, V const & y); @@ -109,87 +109,87 @@ namespace glm //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) template - explicit tvec2(tvec2 const & v); + GLM_FUNC_DECL explicit tvec2(tvec2 const & v); //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) template - explicit tvec2(tvec3 const & v); + GLM_FUNC_DECL explicit tvec2(tvec3 const & v); //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) template - explicit tvec2(tvec4 const & v); + GLM_FUNC_DECL explicit tvec2(tvec4 const & v); ////////////////////////////////////// // Unary arithmetic operators - tvec2 & operator= (tvec2 const & v); + GLM_FUNC_DECL tvec2 & operator= (tvec2 const & v); template - tvec2 & operator= (tvec2 const & v); + GLM_FUNC_DECL tvec2 & operator= (tvec2 const & v); template - tvec2 & operator+=(U const & s); + GLM_FUNC_DECL tvec2 & operator+=(U const & s); template - tvec2 & operator+=(tvec2 const & v); + GLM_FUNC_DECL tvec2 & operator+=(tvec2 const & v); template - tvec2 & operator-=(U const & s); + GLM_FUNC_DECL tvec2 & operator-=(U const & s); template - tvec2 & operator-=(tvec2 const & v); + GLM_FUNC_DECL tvec2 & operator-=(tvec2 const & v); template - tvec2 & operator*=(U const & s); + GLM_FUNC_DECL tvec2 & operator*=(U const & s); template - tvec2 & operator*=(tvec2 const & v); + GLM_FUNC_DECL tvec2 & operator*=(tvec2 const & v); template - tvec2 & operator/=(U const & s); + GLM_FUNC_DECL tvec2 & operator/=(U const & s); template - tvec2 & operator/=(tvec2 const & v); - tvec2 & operator++(); - tvec2 & operator--(); + GLM_FUNC_DECL tvec2 & operator/=(tvec2 const & v); + GLM_FUNC_DECL tvec2 & operator++(); + GLM_FUNC_DECL tvec2 & operator--(); ////////////////////////////////////// // Unary bit operators template - tvec2 & operator%= (U const & s); + GLM_FUNC_DECL tvec2 & operator%= (U const & s); template - tvec2 & operator%= (tvec2 const & v); + GLM_FUNC_DECL tvec2 & operator%= (tvec2 const & v); template - tvec2 & operator&= (U const & s); + GLM_FUNC_DECL tvec2 & operator&= (U const & s); template - tvec2 & operator&= (tvec2 const & v); + GLM_FUNC_DECL tvec2 & operator&= (tvec2 const & v); template - tvec2 & operator|= (U const & s); + GLM_FUNC_DECL tvec2 & operator|= (U const & s); template - tvec2 & operator|= (tvec2 const & v); + GLM_FUNC_DECL tvec2 & operator|= (tvec2 const & v); template - tvec2 & operator^= (U const & s); + GLM_FUNC_DECL tvec2 & operator^= (U const & s); template - tvec2 & operator^= (tvec2 const & v); + GLM_FUNC_DECL tvec2 & operator^= (tvec2 const & v); template - tvec2 & operator<<=(U const & s); + GLM_FUNC_DECL tvec2 & operator<<=(U const & s); template - tvec2 & operator<<=(tvec2 const & v); + GLM_FUNC_DECL tvec2 & operator<<=(tvec2 const & v); template - tvec2 & operator>>=(U const & s); + GLM_FUNC_DECL tvec2 & operator>>=(U const & s); template - tvec2 & operator>>=(tvec2 const & v); + GLM_FUNC_DECL tvec2 & operator>>=(tvec2 const & v); ////////////////////////////////////// // Swizzle operators - value_type swizzle(comp X) const; - tvec2 swizzle(comp X, comp Y) const; - tvec3 swizzle(comp X, comp Y, comp Z) const; - tvec4 swizzle(comp X, comp Y, comp Z, comp W) const; - tref2 swizzle(comp X, comp Y); + GLM_FUNC_DECL value_type swizzle(comp X) const; + GLM_FUNC_DECL tvec2 swizzle(comp X, comp Y) const; + GLM_FUNC_DECL tvec3 swizzle(comp X, comp Y, comp Z) const; + GLM_FUNC_DECL tvec4 swizzle(comp X, comp Y, comp Z, comp W) const; + GLM_FUNC_DECL tref2 swizzle(comp X, comp Y); }; template struct tref2 { - tref2(T & x, T & y); - tref2(tref2 const & r); - tref2(tvec2 const & v); + GLM_FUNC_DECL tref2(T & x, T & y); + GLM_FUNC_DECL tref2(tref2 const & r); + GLM_FUNC_DECL tref2(tvec2 const & v); - tref2 & operator= (tref2 const & r); - tref2 & operator= (tvec2 const & v); + GLM_FUNC_DECL tref2 & operator= (tref2 const & r); + GLM_FUNC_DECL tref2 & operator= (tvec2 const & v); T& x; T& y; diff --git a/glm/core/type_vec3.hpp b/glm/core/type_vec3.hpp index 189950ab..7ea1cbfa 100644 --- a/glm/core/type_vec3.hpp +++ b/glm/core/type_vec3.hpp @@ -40,7 +40,7 @@ namespace glm typedef T value_type; typedef std::size_t size_type; - static size_type value_size(); + static GLM_FUNC_DECL size_type value_size(); typedef tvec3 type; typedef tvec3 bool_type; @@ -66,23 +66,23 @@ namespace glm ////////////////////////////////////// // Accesses - value_type & operator[](size_type i); - value_type const & operator[](size_type i) const; + GLM_FUNC_DECL value_type & operator[](size_type i); + GLM_FUNC_DECL value_type const & operator[](size_type i) const; ////////////////////////////////////// // Implicit basic constructors - tvec3(); - tvec3(tvec3 const & v); + GLM_FUNC_DECL tvec3(); + GLM_FUNC_DECL tvec3(tvec3 const & v); ////////////////////////////////////// // Explicit basic constructors - explicit tvec3( + GLM_FUNC_DECL explicit tvec3( ctor); - explicit tvec3( + GLM_FUNC_DECL explicit tvec3( value_type const & s); - explicit tvec3( + GLM_FUNC_DECL explicit tvec3( value_type const & s1, value_type const & s2, value_type const & s3); @@ -90,18 +90,18 @@ namespace glm ////////////////////////////////////// // Swizzle constructors - tvec3(tref3 const & r); + GLM_FUNC_DECL tvec3(tref3 const & r); ////////////////////////////////////// // Convertion scalar constructors //! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) template - explicit tvec3( + GLM_FUNC_DECL explicit tvec3( U const & x); //! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) template - explicit tvec3( + GLM_FUNC_DECL explicit tvec3( U const & x, V const & y, W const & z); @@ -111,90 +111,90 @@ namespace glm //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) template - explicit tvec3(tvec2 const & v, B const & s); + GLM_FUNC_DECL explicit tvec3(tvec2 const & v, B const & s); //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) template - explicit tvec3(A const & s, tvec2 const & v); + GLM_FUNC_DECL explicit tvec3(A const & s, tvec2 const & v); //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) template - explicit tvec3(tvec3 const & v); + GLM_FUNC_DECL explicit tvec3(tvec3 const & v); //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) template - explicit tvec3(tvec4 const & v); + GLM_FUNC_DECL explicit tvec3(tvec4 const & v); ////////////////////////////////////// // Unary arithmetic operators - tvec3 & operator= (tvec3 const & v); + GLM_FUNC_DECL tvec3 & operator= (tvec3 const & v); template - tvec3 & operator= (tvec3 const & v); + GLM_FUNC_DECL tvec3 & operator= (tvec3 const & v); template - tvec3 & operator+=(U const & s); + GLM_FUNC_DECL tvec3 & operator+=(U const & s); template - tvec3 & operator+=(tvec3 const & v); + GLM_FUNC_DECL tvec3 & operator+=(tvec3 const & v); template - tvec3 & operator-=(U const & s); + GLM_FUNC_DECL tvec3 & operator-=(U const & s); template - tvec3 & operator-=(tvec3 const & v); + GLM_FUNC_DECL tvec3 & operator-=(tvec3 const & v); template - tvec3 & operator*=(U const & s); + GLM_FUNC_DECL tvec3 & operator*=(U const & s); template - tvec3 & operator*=(tvec3 const & v); + GLM_FUNC_DECL tvec3 & operator*=(tvec3 const & v); template - tvec3 & operator/=(U const & s); + GLM_FUNC_DECL tvec3 & operator/=(U const & s); template - tvec3 & operator/=(tvec3 const & v); - tvec3 & operator++(); - tvec3 & operator--(); + GLM_FUNC_DECL tvec3 & operator/=(tvec3 const & v); + GLM_FUNC_DECL tvec3 & operator++(); + GLM_FUNC_DECL tvec3 & operator--(); ////////////////////////////////////// // Unary bit operators template - tvec3 & operator%= (U const & s); + GLM_FUNC_DECL tvec3 & operator%= (U const & s); template - tvec3 & operator%= (tvec3 const & v); + GLM_FUNC_DECL tvec3 & operator%= (tvec3 const & v); template - tvec3 & operator&= (U const & s); + GLM_FUNC_DECL tvec3 & operator&= (U const & s); template - tvec3 & operator&= (tvec3 const & v); + GLM_FUNC_DECL tvec3 & operator&= (tvec3 const & v); template - tvec3 & operator|= (U const & s); + GLM_FUNC_DECL tvec3 & operator|= (U const & s); template - tvec3 & operator|= (tvec3 const & v); + GLM_FUNC_DECL tvec3 & operator|= (tvec3 const & v); template - tvec3 & operator^= (U const & s); + GLM_FUNC_DECL tvec3 & operator^= (U const & s); template - tvec3 & operator^= (tvec3 const & v); + GLM_FUNC_DECL tvec3 & operator^= (tvec3 const & v); template - tvec3 & operator<<=(U const & s); + GLM_FUNC_DECL tvec3 & operator<<=(U const & s); template - tvec3 & operator<<=(tvec3 const & v); + GLM_FUNC_DECL tvec3 & operator<<=(tvec3 const & v); template - tvec3 & operator>>=(U const & s); + GLM_FUNC_DECL tvec3 & operator>>=(U const & s); template - tvec3 & operator>>=(tvec3 const & v); + GLM_FUNC_DECL tvec3 & operator>>=(tvec3 const & v); ////////////////////////////////////// // Swizzle operators - value_type swizzle(comp X) const; - tvec2 swizzle(comp X, comp Y) const; - tvec3 swizzle(comp X, comp Y, comp Z) const; - tvec4 swizzle(comp X, comp Y, comp Z, comp W) const; - tref3 swizzle(comp X, comp Y, comp Z); + GLM_FUNC_DECL value_type swizzle(comp X) const; + GLM_FUNC_DECL tvec2 swizzle(comp X, comp Y) const; + GLM_FUNC_DECL tvec3 swizzle(comp X, comp Y, comp Z) const; + GLM_FUNC_DECL tvec4 swizzle(comp X, comp Y, comp Z, comp W) const; + GLM_FUNC_DECL tref3 swizzle(comp X, comp Y, comp Z); }; template struct tref3 { - tref3(T & x, T & y, T & z); - tref3(tref3 const & r); - tref3(tvec3 const & v); + GLM_FUNC_DECL tref3(T & x, T & y, T & z); + GLM_FUNC_DECL tref3(tref3 const & r); + GLM_FUNC_DECL tref3(tvec3 const & v); - tref3 & operator= (tref3 const & r); - tref3 & operator= (tvec3 const & v); + GLM_FUNC_DECL tref3 & operator= (tref3 const & r); + GLM_FUNC_DECL tref3 & operator= (tvec3 const & v); T & x; T & y; diff --git a/glm/core/type_vec4.hpp b/glm/core/type_vec4.hpp index 7257ceb0..25135de4 100644 --- a/glm/core/type_vec4.hpp +++ b/glm/core/type_vec4.hpp @@ -40,7 +40,7 @@ namespace glm typedef T value_type; typedef std::size_t size_type; - static size_type value_size(); + static GLM_FUNC_DECL size_type value_size(); typedef tvec4 type; typedef tvec4 bool_type; @@ -67,23 +67,23 @@ namespace glm ////////////////////////////////////// // Accesses - value_type & operator[](size_type i); - value_type const & operator[](size_type i) const; + GLM_FUNC_DECL value_type & operator[](size_type i); + GLM_FUNC_DECL value_type const & operator[](size_type i) const; ////////////////////////////////////// // Implicit basic constructors - tvec4(); - tvec4(type const & v); + GLM_FUNC_DECL tvec4(); + GLM_FUNC_DECL tvec4(type const & v); ////////////////////////////////////// // Explicit basic constructors - explicit tvec4( + GLM_FUNC_DECL explicit tvec4( ctor); - explicit tvec4( + GLM_FUNC_DECL explicit tvec4( value_type const & s); - explicit tvec4( + GLM_FUNC_DECL explicit tvec4( value_type const & s0, value_type const & s1, value_type const & s2, @@ -92,18 +92,18 @@ namespace glm ////////////////////////////////////// // Swizzle constructors - tvec4(tref4 const & r); + GLM_FUNC_DECL tvec4(tref4 const & r); ////////////////////////////////////// // Convertion scalar constructors //! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) template - explicit tvec4( + GLM_FUNC_DECL explicit tvec4( U const & x); //! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) template - explicit tvec4( + GLM_FUNC_DECL explicit tvec4( A const & x, B const & y, C const & z, @@ -114,99 +114,99 @@ namespace glm //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) template - explicit tvec4(tvec2 const & v, B const & s1, C const & s2); + GLM_FUNC_DECL explicit tvec4(tvec2 const & v, B const & s1, C const & s2); //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) template - explicit tvec4(A const & s1, tvec2 const & v, C const & s2); + GLM_FUNC_DECL explicit tvec4(A const & s1, tvec2 const & v, C const & s2); //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) template - explicit tvec4(A const & s1, B const & s2, tvec2 const & v); + GLM_FUNC_DECL explicit tvec4(A const & s1, B const & s2, tvec2 const & v); //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) template - explicit tvec4(tvec3 const & v, B const & s); + GLM_FUNC_DECL explicit tvec4(tvec3 const & v, B const & s); //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) template - explicit tvec4(A const & s, tvec3 const & v); + GLM_FUNC_DECL explicit tvec4(A const & s, tvec3 const & v); //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) template - explicit tvec4(tvec2 const & v1, tvec2 const & v2); + GLM_FUNC_DECL explicit tvec4(tvec2 const & v1, tvec2 const & v2); //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) template - explicit tvec4(tvec4 const & v); + GLM_FUNC_DECL explicit tvec4(tvec4 const & v); ////////////////////////////////////// // Unary arithmetic operators - tvec4 & operator= (tvec4 const & v); + GLM_FUNC_DECL tvec4 & operator= (tvec4 const & v); template - tvec4 & operator= (tvec4 const & v); + GLM_FUNC_DECL tvec4 & operator= (tvec4 const & v); template - tvec4 & operator+=(U const & s); + GLM_FUNC_DECL tvec4 & operator+=(U const & s); template - tvec4 & operator+=(tvec4 const & v); + GLM_FUNC_DECL tvec4 & operator+=(tvec4 const & v); template - tvec4 & operator-=(U const & s); + GLM_FUNC_DECL tvec4 & operator-=(U const & s); template - tvec4 & operator-=(tvec4 const & v); + GLM_FUNC_DECL tvec4 & operator-=(tvec4 const & v); template - tvec4 & operator*=(U const & s); + GLM_FUNC_DECL tvec4 & operator*=(U const & s); template - tvec4 & operator*=(tvec4 const & v); + GLM_FUNC_DECL tvec4 & operator*=(tvec4 const & v); template - tvec4 & operator/=(U const & s); + GLM_FUNC_DECL tvec4 & operator/=(U const & s); template - tvec4 & operator/=(tvec4 const & v); - tvec4 & operator++(); - tvec4 & operator--(); + GLM_FUNC_DECL tvec4 & operator/=(tvec4 const & v); + GLM_FUNC_DECL tvec4 & operator++(); + GLM_FUNC_DECL tvec4 & operator--(); ////////////////////////////////////// // Unary bit operators template - tvec4 & operator%= (U const & s); + GLM_FUNC_DECL tvec4 & operator%= (U const & s); template - tvec4 & operator%= (tvec4 const & v); + GLM_FUNC_DECL tvec4 & operator%= (tvec4 const & v); template - tvec4 & operator&= (U const & s); + GLM_FUNC_DECL tvec4 & operator&= (U const & s); template - tvec4 & operator&= (tvec4 const & v); + GLM_FUNC_DECL tvec4 & operator&= (tvec4 const & v); template - tvec4 & operator|= (U const & s); + GLM_FUNC_DECL tvec4 & operator|= (U const & s); template - tvec4 & operator|= (tvec4 const & v); + GLM_FUNC_DECL tvec4 & operator|= (tvec4 const & v); template - tvec4 & operator^= (U const & s); + GLM_FUNC_DECL tvec4 & operator^= (U const & s); template - tvec4 & operator^= (tvec4 const & v); + GLM_FUNC_DECL tvec4 & operator^= (tvec4 const & v); template - tvec4 & operator<<=(U const & s); + GLM_FUNC_DECL tvec4 & operator<<=(U const & s); template - tvec4 & operator<<=(tvec4 const & v); + GLM_FUNC_DECL tvec4 & operator<<=(tvec4 const & v); template - tvec4 & operator>>=(U const & s); + GLM_FUNC_DECL tvec4 & operator>>=(U const & s); template - tvec4 & operator>>=(tvec4 const & v); + GLM_FUNC_DECL tvec4 & operator>>=(tvec4 const & v); ////////////////////////////////////// // Swizzle operators - value_type swizzle(comp X) const; - tvec2 swizzle(comp X, comp Y) const; - tvec3 swizzle(comp X, comp Y, comp Z) const; - tvec4 swizzle(comp X, comp Y, comp Z, comp W) const; - tref4 swizzle(comp X, comp Y, comp Z, comp W); + GLM_FUNC_DECL value_type swizzle(comp X) const; + GLM_FUNC_DECL tvec2 swizzle(comp X, comp Y) const; + GLM_FUNC_DECL tvec3 swizzle(comp X, comp Y, comp Z) const; + GLM_FUNC_DECL tvec4 swizzle(comp X, comp Y, comp Z, comp W) const; + GLM_FUNC_DECL tref4 swizzle(comp X, comp Y, comp Z, comp W); }; template struct tref4 { - tref4(T & x, T & y, T & z, T & w); - tref4(tref4 const & r); - tref4(tvec4 const & v); + GLM_FUNC_DECL tref4(T & x, T & y, T & z, T & w); + GLM_FUNC_DECL tref4(tref4 const & r); + GLM_FUNC_DECL tref4(tvec4 const & v); - tref4 & operator= (tref4 const & r); - tref4 & operator= (tvec4 const & v); + GLM_FUNC_DECL tref4 & operator= (tref4 const & r); + GLM_FUNC_DECL tref4 & operator= (tvec4 const & v); T & x; T & y; diff --git a/glm/ext.hpp b/glm/ext.hpp index 53de8872..d925fe6f 100644 --- a/glm/ext.hpp +++ b/glm/ext.hpp @@ -48,6 +48,7 @@ #include "./gtx/intersect.hpp" #include "./gtx/log_base.hpp" #include "./gtx/matrix_cross_product.hpp" +#include "./gtx/matrix_interpolation.hpp" #include "./gtx/matrix_major_storage.hpp" #include "./gtx/matrix_operation.hpp" #include "./gtx/matrix_query.hpp" diff --git a/glm/gtx/matrix_interpolation.hpp b/glm/gtx/matrix_interpolation.hpp new file mode 100644 index 00000000..7d9d6135 --- /dev/null +++ b/glm/gtx/matrix_interpolation.hpp @@ -0,0 +1,73 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2011-03-05 +// Updated : 2011-03-05 +// Licence : This source is under MIT License +// File : glm/gtx/matrix_interpolation.hpp +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Dependency: +// - GLM core +// - GLM_GTX_matric_interpolation +/////////////////////////////////////////////////////////////////////////////////////////////////// +// This extension has been written by Ghenadii Ursachi (the.asteroth@gmail.com) +/////////////////////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_gtx_matrix_interpolation +#define glm_gtx_matrix_interpolation + +// Dependency: +//#include "../glm.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_matrix_interpolation extension included") +#endif + +namespace glm +{ + namespace test{ + void main_gtx_transform(); + }//namespace test + + namespace gtx{ + //! GLM_GTX_matrix_interpolation extension: Add transformation matrices + namespace matrix_interpolation + { + /// \addtogroup gtx_matrix_interpolation + ///@{ + + //! Get the axis and angle of the rotation from a matrix. + //! From GLM_GTX_matrix_interpolation extension. + template + void axisAngle( + detail::tmat4x4 const & mat, + detail::tvec3 & axis, + T & angle); + + //! Build a matrix from axis and angle. + //! From GLM_GTX_matrix_interpolation extension. + template + detail::tmat4x4 axisAngleMatrix( + detail::tvec3 const & axis, + T const angle); + + //! Build a interpolation of 4 * 4 matrixes. + //! From GLM_GTX_matrix_interpolation extension. + //! Warning! works only with rotation and/or translation matrixes, scale will generate unexpected results. + template + detail::tmat4x4 interpolate( + detail::tmat4x4 const & m1, + detail::tmat4x4 const & m2, + T const delta); + + ///@} + + }//namespace matrix_interpolation + }//namespace gtx +}//namespace glm + +#include "matrix_interpolation.inl" + +namespace glm{using namespace gtx::matrix_interpolation;} + +#endif//glm_gtx_transform diff --git a/glm/gtx/matrix_interpolation.inl b/glm/gtx/matrix_interpolation.inl new file mode 100644 index 00000000..ab4d2bb4 --- /dev/null +++ b/glm/gtx/matrix_interpolation.inl @@ -0,0 +1,117 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2011-03-05 +// Updated : 2011-03-05 +// Licence : This source is under MIT License +// File : glm/gtx/matrix_interpolation.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm{ +namespace gtx{ +namespace matrix_interpolation +{ + template + GLM_FUNC_QUALIFIER void axisAngle( + detail::tmat4x4 const & mat, + detail::tvec3 & axis, + T & angle) + { + T epsilon = (T)0.01; + T epsilon2 = (T)0.1; + + if ((fabs(mat[1][0] - mat[0][1]) < epsilon) && (fabs(mat[2][0] - mat[0][2]) < epsilon) && (fabs(mat[2][1] - mat[1][2]) < epsilon)) { + if ((fabs(mat[1][0] + mat[0][1]) < epsilon2) && (fabs(mat[2][0] + mat[0][2]) < epsilon2) && (fabs(mat[2][1] + mat[1][2]) < epsilon2) && (fabs(mat[0][0] + mat[1][1] + mat[2][2] - (T)3.0) < epsilon2)) { + angle = (T)0.0; + axis.x = (T)1.0; + axis.y = (T)0.0; + axis.z = (T)0.0; + return; + } + angle = M_1_PI; + T xx = (mat[0][0] + (T)1.0) / (T)2.0; + T yy = (mat[1][1] + (T)1.0) / (T)2.0; + T zz = (mat[2][2] + (T)1.0) / (T)2.0; + T xy = (mat[1][0] + mat[0][1]) / (T)4.0; + T xz = (mat[2][0] + mat[0][2]) / (T)4.0; + T yz = (mat[2][1] + mat[1][2]) / (T)4.0; + if ((xx > yy) && (xx > zz)) { + if (xx < epsilon) { + axis.x = (T)0.0; + axis.y = (T)0.7071; + axis.z = (T)0.7071; + } else { + axis.x = sqrt(xx); + axis.y = xy / axis.x; + axis.z = xz / axis.x; + } + } else if (yy > zz) { + if (yy < epsilon) { + axis.x = (T)0.7071; + axis.y = (T)0.0; + axis.z = (T)0.7071; + } else { + axis.y = sqrt(yy); + axis.x = xy / axis.y; + axis.z = yz / axis.y; + } + } else { + if (zz < epsilon) { + axis.x = (T)0.7071; + axis.y = (T)0.7071; + axis.z = (T)0.0; + } else { + axis.z = sqrt(zz); + axis.x = xz / axis.z; + axis.y = yz / axis.z; + } + } + return; + } + T s = sqrt((mat[2][1] - mat[1][2]) * (mat[2][1] - mat[1][2]) + (mat[2][0] - mat[0][2]) * (mat[2][0] - mat[0][2]) + (mat[1][0] - mat[0][1]) * (mat[1][0] - mat[0][1])); + if (glm::abs(s) < T(0.001)) + s = (T)1.0; + angle = acos((mat[0][0] + mat[1][1] + mat[2][2] - (T)1.0) / (T)2.0); + axis.x = (mat[1][2] - mat[2][1]) / s; + axis.y = (mat[2][0] - mat[0][2]) / s; + axis.z = (mat[0][1] - mat[1][0]) / s; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 axisAngleMatrix( + detail::tvec3 const & axis, + T const angle) + { + T c = cos(angle); + T s = sin(angle); + T t = T(1) - c; + detail::tvec3 n = normalize(axis); + + return detail::tmat4x4( + t * n.x * n.x + c, t * n.x * n.y + n.z * s, t * n.x * n.z - n.y * s, T(0), + t * n.x * n.y - n.z * s, t * n.y * n.y + c, t * n.y * n.z + n.x * s, T(0), + t * n.x * n.z + n.y * s, t * n.y * n.z - n.x * s, t * n.z * n.z + c, T(0), + T(0), T(0), T(0), T(1) + ); + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 interpolate( + detail::tmat4x4 const & m1, + detail::tmat4x4 const & m2, + T const delta) + { + detail::tmat4x4 dltRotation = m2 * transpose(m1); + detail::tvec3 dltAxis; + T dltAngle; + axisAngle(dltRotation, dltAxis, dltAngle); + detail::tmat4x4 out = axisAngleMatrix(dltAxis, dltAngle * delta) * rotationMatrix(m1); + out[3][0] = m1[3][0] + delta * (m2[3][0] - m1[3][0]); + out[3][1] = m1[3][1] + delta * (m2[3][1] - m1[3][1]); + out[3][2] = m1[3][2] + delta * (m2[3][2] - m1[3][2]); + return out; + } + +}//namespace transform +}//namespace gtx +}//namespace glm diff --git a/readme.txt b/readme.txt index d85ec123..412e491e 100644 --- a/readme.txt +++ b/readme.txt @@ -13,6 +13,11 @@ GLM is a header only library, there is nothing to build, just include it. More informations in GLM manual: http://glm.g-truc.net/glm-0.9.1.pdf +================================================================================ +GLM 0.9.1.3: 2010-05-07 +-------------------------------------------------------------------------------- +- Fixed bugs + ================================================================================ GLM 0.9.1.2: 2010-04-15 -------------------------------------------------------------------------------- diff --git a/test/core/core_func_integer.cpp b/test/core/core_func_integer.cpp index 948626f5..988119df 100644 --- a/test/core/core_func_integer.cpp +++ b/test/core/core_func_integer.cpp @@ -118,7 +118,7 @@ namespace bitRevert else if(Data64[i].Result == FAIL && !Compare) continue; - std::cout << "glm::bitfieldReverse test fail on test " << i << std::endl; + std::cout << "glm::bitRevert test fail on test " << i << std::endl; return 1; } diff --git a/test/core/core_type_float.cpp b/test/core/core_type_float.cpp index 5295658a..ff9cb5f4 100644 --- a/test/core/core_type_float.cpp +++ b/test/core/core_type_float.cpp @@ -2,16 +2,36 @@ // OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net) /////////////////////////////////////////////////////////////////////////////////////////////////// // Created : 2008-08-31 -// Updated : 2008-08-31 +// Updated : 2011-05-06 // Licence : This source is under MIT License // File : test/core/type_float.cpp /////////////////////////////////////////////////////////////////////////////////////////////////// #include +int test_float_size() +{ + return + sizeof(glm::float_t) != sizeof(glm::lowp_float) && + sizeof(glm::float_t) != sizeof(glm::mediump_float) && + sizeof(glm::float_t) != sizeof(glm::highp_float); +} + +int test_float_precision() +{ + return ( + sizeof(glm::lowp_float) <= sizeof(glm::mediump_float) && + sizeof(glm::mediump_float) <= sizeof(glm::highp_float)) ? 0 : 1; +} + int main() { - return -1; + int Error = 0; + + Error += test_float_size(); + Error += test_float_precision(); + + return Error; } diff --git a/test/core/core_type_int.cpp b/test/core/core_type_int.cpp index b1e4b147..035622df 100644 --- a/test/core/core_type_int.cpp +++ b/test/core/core_type_int.cpp @@ -2,14 +2,51 @@ // OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net) /////////////////////////////////////////////////////////////////////////////////////////////////// // Created : 2008-08-31 -// Updated : 2008-08-31 +// Updated : 2011-05-06 // Licence : This source is under MIT License // File : test/core/type_int.cpp /////////////////////////////////////////////////////////////////////////////////////////////////// #include +int test_int_size() +{ + return + sizeof(glm::int_t) != sizeof(glm::lowp_int) && + sizeof(glm::int_t) != sizeof(glm::mediump_int) && + sizeof(glm::int_t) != sizeof(glm::highp_int); +} + +int test_uint_size() +{ + return + sizeof(glm::uint_t) != sizeof(glm::lowp_uint) && + sizeof(glm::uint_t) != sizeof(glm::mediump_uint) && + sizeof(glm::uint_t) != sizeof(glm::highp_uint); +} + +int test_int_precision() +{ + return ( + sizeof(glm::lowp_int) <= sizeof(glm::mediump_int) && + sizeof(glm::mediump_int) <= sizeof(glm::highp_int)) ? 0 : 1; +} + +int test_uint_precision() +{ + return ( + sizeof(glm::lowp_uint) <= sizeof(glm::mediump_uint) && + sizeof(glm::mediump_uint) <= sizeof(glm::highp_uint)) ? 0 : 1; +} + int main() { - return -1; + int Error = 0; + + Error += test_int_size(); + Error += test_int_precision(); + Error += test_uint_size(); + Error += test_uint_precision(); + + return Error; } diff --git a/test/gtc/gtc_type_precision.cpp b/test/gtc/gtc_type_precision.cpp index 0b9bc908..bca3b104 100644 --- a/test/gtc/gtc_type_precision.cpp +++ b/test/gtc/gtc_type_precision.cpp @@ -2,18 +2,189 @@ // OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net) /////////////////////////////////////////////////////////////////////////////////////////////////// // Created : 2010-09-16 -// Updated : 2010-09-16 +// Updated : 2011-05-06 // Licence : This source is under MIT licence -// File : test/gtc/matrix_transform.cpp +// File : test/gtc/type_precision.cpp /////////////////////////////////////////////////////////////////////////////////////////////////// #define GLM_MESSAGES #include -#include +#include + +/* +//typedef i8 i8vec1; //!< \brief 8bit signed integer scalar. (from GLM_GTC_type_precision extension) +typedef detail::tvec2 i8vec2; //!< \brief 8bit signed integer vector of 2 components. (from GLM_GTC_type_precision extension) +typedef detail::tvec3 i8vec3; //!< \brief 8bit signed integer vector of 3 components. (from GLM_GTC_type_precision extension) +typedef detail::tvec4 i8vec4; //!< \brief 8bit signed integer vector of 4 components. (from GLM_GTC_type_precision extension) + +//typedef i16 i16vec1; //!< \brief 16bit signed integer scalar. (from GLM_GTC_type_precision extension) +typedef detail::tvec2 i16vec2; //!< \brief 16bit signed integer vector of 2 components. (from GLM_GTC_type_precision extension) +typedef detail::tvec3 i16vec3; //!< \brief 16bit signed integer vector of 3 components. (from GLM_GTC_type_precision extension) +typedef detail::tvec4 i16vec4; //!< \brief 16bit signed integer vector of 4 components. (from GLM_GTC_type_precision extension) + +//typedef i32 i32vec1; //!< \brief 32bit signed integer scalar. (from GLM_GTC_type_precision extension) +typedef detail::tvec2 i32vec2; //!< \brief 32bit signed integer vector of 2 components. (from GLM_GTC_type_precision extension) +typedef detail::tvec3 i32vec3; //!< \brief 32bit signed integer vector of 3 components. (from GLM_GTC_type_precision extension) +typedef detail::tvec4 i32vec4; //!< \brief 32bit signed integer vector of 4 components. (from GLM_GTC_type_precision extension) + +//typedef i64 i64vec1; //!< \brief 32bit signed integer scalar. (from GLM_GTC_type_precision extension) +typedef detail::tvec2 i64vec2; //!< \brief 64bit signed integer vector of 2 components. (from GLM_GTC_type_precision extension) +typedef detail::tvec3 i64vec3; //!< \brief 64bit signed integer vector of 3 components. (from GLM_GTC_type_precision extension) +typedef detail::tvec4 i64vec4; //!< \brief 64bit signed integer vector of 4 components. (from GLM_GTC_type_precision extension) + +///////////////////////////// +// Unsigned int vector types + + +//typedef u8 u8vec1; //!< \brief 8bit unsigned integer scalar. (from GLM_GTC_type_precision extension) +typedef detail::tvec2 u8vec2; //!< \brief 8bit unsigned integer vector of 2 components. (from GLM_GTC_type_precision extension) +typedef detail::tvec3 u8vec3; //!< \brief 8bit unsigned integer vector of 3 components. (from GLM_GTC_type_precision extension) +typedef detail::tvec4 u8vec4; //!< \brief 8bit unsigned integer vector of 4 components. (from GLM_GTC_type_precision extension) + +//typedef u16 u16vec1; //!< \brief 16bit unsigned integer scalar. (from GLM_GTC_type_precision extension) +typedef detail::tvec2 u16vec2; //!< \brief 16bit unsigned integer vector of 2 components. (from GLM_GTC_type_precision extension) +typedef detail::tvec3 u16vec3; //!< \brief 16bit unsigned integer vector of 3 components. (from GLM_GTC_type_precision extension) +typedef detail::tvec4 u16vec4; //!< \brief 16bit unsigned integer vector of 4 components. (from GLM_GTC_type_precision extension) + +//typedef u32 u32vec1; //!< \brief 32bit unsigned integer scalar. (from GLM_GTC_type_precision extension) +typedef detail::tvec2 u32vec2; //!< \brief 32bit unsigned integer vector of 2 components. (from GLM_GTC_type_precision extension) +typedef detail::tvec3 u32vec3; //!< \brief 32bit unsigned integer vector of 3 components. (from GLM_GTC_type_precision extension) +typedef detail::tvec4 u32vec4; //!< \brief 32bit unsigned integer vector of 4 components. (from GLM_GTC_type_precision extension) + +//typedef u64 u64vec1; //!< \brief 64bit unsigned integer scalar. (from GLM_GTC_type_precision extension) +typedef detail::tvec2 u64vec2; //!< \brief 64bit unsigned integer vector of 2 components. (from GLM_GTC_type_precision extension) +typedef detail::tvec3 u64vec3; //!< \brief 64bit unsigned integer vector of 3 components. (from GLM_GTC_type_precision extension) +typedef detail::tvec4 u64vec4; //!< \brief 64bit unsigned integer vector of 4 components. (from GLM_GTC_type_precision extension) + +//typedef f16 f16vec1; //!< \brief Half-precision floating-point scalar. (from GLM_GTC_type_precision extension) +typedef detail::tvec2 f16vec2; //!< \brief Half-precision floating-point vector of 2 components. (from GLM_GTC_type_precision extension) +typedef detail::tvec3 f16vec3; //!< \brief Half-precision floating-point vector of 3 components. (from GLM_GTC_type_precision extension) +typedef detail::tvec4 f16vec4; //!< \brief Half-precision floating-point vector of 4 components. (from GLM_GTC_type_precision extension) + +//typedef f32 f32vec1; //!< \brief Single-precision floating-point scalar. (from GLM_GTC_type_precision extension) +typedef detail::tvec2 f32vec2; //!< \brief Single-precision floating-point vector of 2 components. (from GLM_GTC_type_precision extension) +typedef detail::tvec3 f32vec3; //!< \brief Single-precision floating-point vector of 3 components. (from GLM_GTC_type_precision extension) +typedef detail::tvec4 f32vec4; //!< \brief Single-precision floating-point vector of 4 components. (from GLM_GTC_type_precision extension) + +//typedef f64 f64vec1; //!< \brief Single-precision floating-point scalar. (from GLM_GTC_type_precision extension) +typedef detail::tvec2 f64vec2; //!< \brief Double-precision floating-point vector of 2 components. (from GLM_GTC_type_precision extension) +typedef detail::tvec3 f64vec3; //!< \brief Double-precision floating-point vector of 3 components. (from GLM_GTC_type_precision extension) +typedef detail::tvec4 f64vec4; //!< \brief Double-precision floating-point vector of 4 components. (from GLM_GTC_type_precision extension) + +////////////////////// +// Float matrix types + +//typedef f32 fmat1; //!< \brief Single-precision floating-point scalar. (from GLM_GTC_type_precision extension) +typedef detail::tmat2x2 fmat2; //!< \brief Single-precision floating-point 2x2 matrix. (from GLM_GTC_type_precision extension) +typedef detail::tmat3x3 fmat3; //!< \brief Single-precision floating-point 3x3 matrix. (from GLM_GTC_type_precision extension) +typedef detail::tmat4x4 fmat4; //!< \brief Single-precision floating-point 4x4 matrix. (from GLM_GTC_type_precision extension) + +//typedef f32 fmat1x1; //!< \brief Single-precision floating-point scalar. (from GLM_GTC_type_precision extension) +typedef detail::tmat2x2 fmat2x2; //!< \brief Single-precision floating-point 2x2 matrix. (from GLM_GTC_type_precision extension) +typedef detail::tmat2x3 fmat2x3; //!< \brief Single-precision floating-point 2x3 matrix. (from GLM_GTC_type_precision extension) +typedef detail::tmat2x4 fmat2x4; //!< \brief Single-precision floating-point 2x4 matrix. (from GLM_GTC_type_precision extension) +typedef detail::tmat3x2 fmat3x2; //!< \brief Single-precision floating-point 3x2 matrix. (from GLM_GTC_type_precision extension) +typedef detail::tmat3x3 fmat3x3; //!< \brief Single-precision floating-point 3x3 matrix. (from GLM_GTC_type_precision extension) +typedef detail::tmat3x4 fmat3x4; //!< \brief Single-precision floating-point 3x4 matrix. (from GLM_GTC_type_precision extension) +typedef detail::tmat4x2 fmat4x2; //!< \brief Single-precision floating-point 4x2 matrix. (from GLM_GTC_type_precision extension) +typedef detail::tmat4x3 fmat4x3; //!< \brief Single-precision floating-point 4x3 matrix. (from GLM_GTC_type_precision extension) +typedef detail::tmat4x4 fmat4x4; //!< \brief Single-precision floating-point 4x4 matrix. (from GLM_GTC_type_precision extension) + +//typedef f16 f16mat1; //!< \brief Half-precision floating-point scalar. (from GLM_GTC_type_precision extension) +typedef detail::tmat2x2 f16mat2; //!< \brief Half-precision floating-point 2x2 matrix. (from GLM_GTC_type_precision extension) +typedef detail::tmat3x3 f16mat3; //!< \brief Half-precision floating-point 3x3 matrix. (from GLM_GTC_type_precision extension) +typedef detail::tmat4x4 f16mat4; //!< \brief Half-precision floating-point 4x4 matrix. (from GLM_GTC_type_precision extension) + +//typedef f16 f16mat1x1; //!< \brief Half-precision floating-point scalar. (from GLM_GTC_type_precision extension) +typedef detail::tmat2x2 f16mat2x2; //!< \brief Half-precision floating-point 2x2 matrix. (from GLM_GTC_type_precision extension) +typedef detail::tmat2x3 f16mat2x3; //!< \brief Half-precision floating-point 2x3 matrix. (from GLM_GTC_type_precision extension) +typedef detail::tmat2x4 f16mat2x4; //!< \brief Half-precision floating-point 2x4 matrix. (from GLM_GTC_type_precision extension) +typedef detail::tmat3x2 f16mat3x2; //!< \brief Half-precision floating-point 3x2 matrix. (from GLM_GTC_type_precision extension) +typedef detail::tmat3x3 f16mat3x3; //!< \brief Half-precision floating-point 3x3 matrix. (from GLM_GTC_type_precision extension) +typedef detail::tmat3x4 f16mat3x4; //!< \brief Half-precision floating-point 3x4 matrix. (from GLM_GTC_type_precision extension) +typedef detail::tmat4x2 f16mat4x2; //!< \brief Half-precision floating-point 4x2 matrix. (from GLM_GTC_type_precision extension) +typedef detail::tmat4x3 f16mat4x3; //!< \brief Half-precision floating-point 4x3 matrix. (from GLM_GTC_type_precision extension) +typedef detail::tmat4x4 f16mat4x4; //!< \brief Half-precision floating-point 4x4 matrix. (from GLM_GTC_type_precision extension) + +//typedef f32 f32mat1; //!< \brief Single-precision floating-point scalar. (from GLM_GTC_type_precision extension) +typedef detail::tmat2x2 f32mat2; //!< \brief Single-precision floating-point 2x2 matrix. (from GLM_GTC_type_precision extension) +typedef detail::tmat3x3 f32mat3; //!< \brief Single-precision floating-point 3x3 matrix. (from GLM_GTC_type_precision extension) +typedef detail::tmat4x4 f32mat4; //!< \brief Single-precision floating-point 4x4 matrix. (from GLM_GTC_type_precision extension) + +//typedef f32 f32mat1x1; //!< \brief Single-precision floating-point scalar. (from GLM_GTC_type_precision extension) +typedef detail::tmat2x2 f32mat2x2; //!< \brief Single-precision floating-point 2x2 matrix. (from GLM_GTC_type_precision extension) +typedef detail::tmat2x3 f32mat2x3; //!< \brief Single-precision floating-point 2x3 matrix. (from GLM_GTC_type_precision extension) +typedef detail::tmat2x4 f32mat2x4; //!< \brief Single-precision floating-point 2x4 matrix. (from GLM_GTC_type_precision extension) +typedef detail::tmat3x2 f32mat3x2; //!< \brief Single-precision floating-point 3x2 matrix. (from GLM_GTC_type_precision extension) +typedef detail::tmat3x3 f32mat3x3; //!< \brief Single-precision floating-point 3x3 matrix. (from GLM_GTC_type_precision extension) +typedef detail::tmat3x4 f32mat3x4; //!< \brief Single-precision floating-point 3x4 matrix. (from GLM_GTC_type_precision extension) +typedef detail::tmat4x2 f32mat4x2; //!< \brief Single-precision floating-point 4x2 matrix. (from GLM_GTC_type_precision extension) +typedef detail::tmat4x3 f32mat4x3; //!< \brief Single-precision floating-point 4x3 matrix. (from GLM_GTC_type_precision extension) +typedef detail::tmat4x4 f32mat4x4; //!< \brief Single-precision floating-point 4x4 matrix. (from GLM_GTC_type_precision extension) + +//typedef f64 f64mat1; //!< \brief Double-precision floating-point scalar. (from GLM_GTC_type_precision extension) +typedef detail::tmat2x2 f64mat2; //!< \brief Double-precision floating-point 2x2 matrix. (from GLM_GTC_type_precision extension) +typedef detail::tmat3x3 f64mat3; //!< \brief Double-precision floating-point 3x3 matrix. (from GLM_GTC_type_precision extension) +typedef detail::tmat4x4 f64mat4; //!< \brief Double-precision floating-point 4x4 matrix. (from GLM_GTC_type_precision extension) + +//typedef f64 f64mat1x1; //!< \brief Double-precision floating-point scalar. (from GLM_GTC_type_precision extension) +typedef detail::tmat2x2 f64mat2x2; //!< \brief Double-precision floating-point 2x2 matrix. (from GLM_GTC_type_precision extension) +typedef detail::tmat2x3 f64mat2x3; //!< \brief Double-precision floating-point 2x3 matrix. (from GLM_GTC_type_precision extension) +typedef detail::tmat2x4 f64mat2x4; //!< \brief Double-precision floating-point 2x4 matrix. (from GLM_GTC_type_precision extension) +typedef detail::tmat3x2 f64mat3x2; //!< \brief Double-precision floating-point 3x2 matrix. (from GLM_GTC_type_precision extension) +typedef detail::tmat3x3 f64mat3x3; //!< \brief Double-precision floating-point 3x3 matrix. (from GLM_GTC_type_precision extension) +typedef detail::tmat3x4 f64mat3x4; //!< \brief Double-precision floating-point 3x4 matrix. (from GLM_GTC_type_precision extension) +typedef detail::tmat4x2 f64mat4x2; //!< \brief Double-precision floating-point 4x2 matrix. (from GLM_GTC_type_precision extension) +typedef detail::tmat4x3 f64mat4x3; //!< \brief Double-precision floating-point 4x3 matrix. (from GLM_GTC_type_precision extension) +typedef detail::tmat4x4 f64mat4x4; //!< \brief Double-precision floating-point 4x4 matrix. (from GLM_GTC_type_precision extension) +*/ +static int test_scalar_size() +{ + return !( + sizeof(glm::int8) == 1 && + sizeof(glm::int16) == 2 && + sizeof(glm::int32) == 4 && + sizeof(glm::int64) == 8 && + sizeof(glm::uint8) == 1 && + sizeof(glm::uint16) == 2 && + sizeof(glm::uint32) == 4 && + sizeof(glm::uint64) == 8 && + sizeof(glm::float16) == 2 && + sizeof(glm::float32) == 4 && + sizeof(glm::float64) == 8); +} + +static int test_ivec_size() +{ + return !( + sizeof(glm::i8vec2) == 2 && + sizeof(glm::i8vec3) == 3 && + sizeof(glm::i8vec4) == 4 && + sizeof(glm::i16vec2) == 4 && + sizeof(glm::i16vec3) == 6 && + sizeof(glm::i16vec4) == 8 && + sizeof(glm::i32vec2) == 8 && + sizeof(glm::i32vec3) == 12 && + sizeof(glm::i32vec4) == 16 && + sizeof(glm::i64vec2) == 16 && + sizeof(glm::i64vec3) == 24 && + sizeof(glm::i64vec4) == 32); +} + +static int test_quat_size() +{ + return !( + sizeof(glm::f16quat) == 8 && + sizeof(glm::f32quat) == 16 && + sizeof(glm::f64quat) == 32); +} int main() { - int Failed = 0; - - return Failed; + int Error = 0; + Error += test_scalar_size(); + //Error += test_mat_size(); + Error += test_ivec_size(); + Error += test_quat_size(); + return Error; }