From 73281f19786f178fea6f5d033fd7271e2787f663 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Wed, 9 Oct 2013 23:33:39 +0200 Subject: [PATCH] Improve CUDA coverage to all GTC extensions. Fixed missing constructors #120 --- glm/core/type_mat2x2.inl | 6 +-- glm/core/type_mat2x3.inl | 6 +-- glm/core/type_mat2x4.inl | 6 +-- glm/core/type_mat3x2.inl | 6 +-- glm/core/type_mat3x3.inl | 6 +-- glm/core/type_mat3x4.inl | 6 +-- glm/core/type_mat4x2.inl | 6 +-- glm/core/type_mat4x3.inl | 6 +-- glm/core/type_mat4x4.inl | 4 +- glm/gtc/matrix_transform.hpp | 28 +++++++------- glm/gtc/matrix_transform.inl | 2 +- glm/gtc/packing.inl | 50 +++++++++--------------- glm/gtc/quaternion.hpp | 74 ++++++++++++++++++------------------ glm/gtc/random.hpp | 12 +++--- glm/gtc/reciprocal.hpp | 24 ++++++------ glm/gtc/type_ptr.hpp | 34 ++++++++--------- glm/gtc/ulp.hpp | 12 +++--- 17 files changed, 138 insertions(+), 150 deletions(-) diff --git a/glm/core/type_mat2x2.inl b/glm/core/type_mat2x2.inl index 08e8d645..c04d0443 100644 --- a/glm/core/type_mat2x2.inl +++ b/glm/core/type_mat2x2.inl @@ -168,7 +168,7 @@ namespace detail // Conversion constructors template template - GLM_FUNC_DECL tmat2x2::tmat2x2 + GLM_FUNC_QUALIFIER tmat2x2::tmat2x2 ( U const & s ) @@ -180,7 +180,7 @@ namespace detail template template - GLM_FUNC_DECL tmat2x2::tmat2x2 + GLM_FUNC_QUALIFIER tmat2x2::tmat2x2 ( X1 const & x1, Y1 const & y1, X2 const & x2, Y2 const & y2 @@ -192,7 +192,7 @@ namespace detail template template - GLM_FUNC_DECL tmat2x2::tmat2x2 + GLM_FUNC_QUALIFIER tmat2x2::tmat2x2 ( tvec2 const & v1, tvec2 const & v2 diff --git a/glm/core/type_mat2x3.inl b/glm/core/type_mat2x3.inl index 546636f9..89600262 100644 --- a/glm/core/type_mat2x3.inl +++ b/glm/core/type_mat2x3.inl @@ -167,7 +167,7 @@ namespace detail // Conversion constructors template template - GLM_FUNC_DECL tmat2x3::tmat2x3 + GLM_FUNC_QUALIFIER tmat2x3::tmat2x3 ( U const & s ) @@ -181,7 +181,7 @@ namespace detail template < typename X1, typename Y1, typename Z1, typename X2, typename Y2, typename Z2> - GLM_FUNC_DECL tmat2x3::tmat2x3 + GLM_FUNC_QUALIFIER tmat2x3::tmat2x3 ( X1 const & x1, Y1 const & y1, Z1 const & z1, X2 const & x2, Y2 const & y2, Z2 const & z2 @@ -193,7 +193,7 @@ namespace detail template template - GLM_FUNC_DECL tmat2x3::tmat2x3 + GLM_FUNC_QUALIFIER tmat2x3::tmat2x3 ( tvec3 const & v1, tvec3 const & v2 diff --git a/glm/core/type_mat2x4.inl b/glm/core/type_mat2x4.inl index 2551e65d..7f4efd87 100644 --- a/glm/core/type_mat2x4.inl +++ b/glm/core/type_mat2x4.inl @@ -170,7 +170,7 @@ namespace detail // Conversion constructors template template - GLM_FUNC_DECL tmat2x4::tmat2x4 + GLM_FUNC_QUALIFIER tmat2x4::tmat2x4 ( U const & s ) @@ -184,7 +184,7 @@ namespace detail template < typename X1, typename Y1, typename Z1, typename W1, typename X2, typename Y2, typename Z2, typename W2> - GLM_FUNC_DECL tmat2x4::tmat2x4 + GLM_FUNC_QUALIFIER tmat2x4::tmat2x4 ( X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1, X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2 @@ -196,7 +196,7 @@ namespace detail template template - GLM_FUNC_DECL tmat2x4::tmat2x4 + GLM_FUNC_QUALIFIER tmat2x4::tmat2x4 ( tvec4 const & v1, tvec4 const & v2 diff --git a/glm/core/type_mat3x2.inl b/glm/core/type_mat3x2.inl index 7fc38b15..3d6a3ef6 100644 --- a/glm/core/type_mat3x2.inl +++ b/glm/core/type_mat3x2.inl @@ -177,7 +177,7 @@ namespace detail // Conversion constructors template template - GLM_FUNC_DECL tmat3x2::tmat3x2 + GLM_FUNC_QUALIFIER tmat3x2::tmat3x2 ( U const & s ) @@ -193,7 +193,7 @@ namespace detail typename X1, typename Y1, typename X2, typename Y2, typename X3, typename Y3> - GLM_FUNC_DECL tmat3x2::tmat3x2 + GLM_FUNC_QUALIFIER tmat3x2::tmat3x2 ( X1 const & x1, Y1 const & y1, X2 const & x2, Y2 const & y2, @@ -207,7 +207,7 @@ namespace detail template template - GLM_FUNC_DECL tmat3x2::tmat3x2 + GLM_FUNC_QUALIFIER tmat3x2::tmat3x2 ( tvec2 const & v1, tvec2 const & v2, diff --git a/glm/core/type_mat3x3.inl b/glm/core/type_mat3x3.inl index 3d4bfc2a..3f800a4e 100644 --- a/glm/core/type_mat3x3.inl +++ b/glm/core/type_mat3x3.inl @@ -180,7 +180,7 @@ namespace detail // Conversion constructors template template - GLM_FUNC_DECL tmat3x3::tmat3x3 + GLM_FUNC_QUALIFIER tmat3x3::tmat3x3 ( U const & s ) @@ -196,7 +196,7 @@ namespace detail typename X1, typename Y1, typename Z1, typename X2, typename Y2, typename Z2, typename X3, typename Y3, typename Z3> - GLM_FUNC_DECL tmat3x3::tmat3x3 + GLM_FUNC_QUALIFIER tmat3x3::tmat3x3 ( X1 const & x1, Y1 const & y1, Z1 const & z1, X2 const & x2, Y2 const & y2, Z2 const & z2, @@ -210,7 +210,7 @@ namespace detail template template - GLM_FUNC_DECL tmat3x3::tmat3x3 + GLM_FUNC_QUALIFIER tmat3x3::tmat3x3 ( tvec3 const & v1, tvec3 const & v2, diff --git a/glm/core/type_mat3x4.inl b/glm/core/type_mat3x4.inl index 50dac71e..35782d63 100644 --- a/glm/core/type_mat3x4.inl +++ b/glm/core/type_mat3x4.inl @@ -153,7 +153,7 @@ namespace detail // Conversion constructors template template - GLM_FUNC_DECL tmat3x4::tmat3x4 + GLM_FUNC_QUALIFIER tmat3x4::tmat3x4 ( U const & s ) @@ -169,7 +169,7 @@ namespace detail typename X1, typename Y1, typename Z1, typename W1, typename X2, typename Y2, typename Z2, typename W2, typename X3, typename Y3, typename Z3, typename W3> - GLM_FUNC_DECL tmat3x4::tmat3x4 + GLM_FUNC_QUALIFIER tmat3x4::tmat3x4 ( X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1, X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2, @@ -183,7 +183,7 @@ namespace detail template template - GLM_FUNC_DECL tmat3x4::tmat3x4 + GLM_FUNC_QUALIFIER tmat3x4::tmat3x4 ( tvec4 const & v1, tvec4 const & v2, diff --git a/glm/core/type_mat4x2.inl b/glm/core/type_mat4x2.inl index d18c1773..1455596c 100644 --- a/glm/core/type_mat4x2.inl +++ b/glm/core/type_mat4x2.inl @@ -158,7 +158,7 @@ namespace detail // Conversion constructors template template - GLM_FUNC_DECL tmat4x2::tmat4x2 + GLM_FUNC_QUALIFIER tmat4x2::tmat4x2 ( U const & s ) @@ -176,7 +176,7 @@ namespace detail typename X2, typename Y2, typename X3, typename Y3, typename X4, typename Y4> - GLM_FUNC_DECL tmat4x2::tmat4x2 + GLM_FUNC_QUALIFIER tmat4x2::tmat4x2 ( X1 const & x1, Y1 const & y1, X2 const & x2, Y2 const & y2, @@ -192,7 +192,7 @@ namespace detail template template - GLM_FUNC_DECL tmat4x2::tmat4x2 + GLM_FUNC_QUALIFIER tmat4x2::tmat4x2 ( tvec2 const & v1, tvec2 const & v2, diff --git a/glm/core/type_mat4x3.inl b/glm/core/type_mat4x3.inl index 125354a1..4cd53825 100644 --- a/glm/core/type_mat4x3.inl +++ b/glm/core/type_mat4x3.inl @@ -183,7 +183,7 @@ namespace detail // Conversion constructors template template - GLM_FUNC_DECL tmat4x3::tmat4x3 + GLM_FUNC_QUALIFIER tmat4x3::tmat4x3 ( U const & s ) @@ -201,7 +201,7 @@ namespace detail typename X2, typename Y2, typename Z2, typename X3, typename Y3, typename Z3, typename X4, typename Y4, typename Z4> - GLM_FUNC_DECL tmat4x3::tmat4x3 + GLM_FUNC_QUALIFIER tmat4x3::tmat4x3 ( X1 const & x1, Y1 const & y1, Z1 const & z1, X2 const & x2, Y2 const & y2, Z2 const & z2, @@ -217,7 +217,7 @@ namespace detail template template - GLM_FUNC_DECL tmat4x3::tmat4x3 + GLM_FUNC_QUALIFIER tmat4x3::tmat4x3 ( tvec3 const & v1, tvec3 const & v2, diff --git a/glm/core/type_mat4x4.inl b/glm/core/type_mat4x4.inl index d1bc35f8..33a01282 100644 --- a/glm/core/type_mat4x4.inl +++ b/glm/core/type_mat4x4.inl @@ -225,7 +225,7 @@ namespace detail typename X2, typename Y2, typename Z2, typename W2, typename X3, typename Y3, typename Z3, typename W3, typename X4, typename Y4, typename Z4, typename W4> - GLM_FUNC_DECL tmat4x4::tmat4x4 + GLM_FUNC_QUALIFIER tmat4x4::tmat4x4 ( X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1, X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2, @@ -261,7 +261,7 @@ namespace detail template template - GLM_FUNC_DECL tmat4x4::tmat4x4 + GLM_FUNC_QUALIFIER tmat4x4::tmat4x4 ( tvec4 const & v1, tvec4 const & v2, diff --git a/glm/gtc/matrix_transform.hpp b/glm/gtc/matrix_transform.hpp index 5eebfe10..dfe12219 100644 --- a/glm/gtc/matrix_transform.hpp +++ b/glm/gtc/matrix_transform.hpp @@ -79,7 +79,7 @@ namespace glm /// @see - translate(detail::tmat4x4 const & m, T x, T y, T z) /// @see - translate(detail::tvec3 const & v) template - detail::tmat4x4 translate( + GLM_FUNC_DECL detail::tmat4x4 translate( detail::tmat4x4 const & m, detail::tvec3 const & v); @@ -95,7 +95,7 @@ namespace glm /// @see - rotate(detail::tmat4x4 const & m, T angle, T x, T y, T z) /// @see - rotate(T angle, detail::tvec3 const & v) template - detail::tmat4x4 rotate( + GLM_FUNC_DECL detail::tmat4x4 rotate( detail::tmat4x4 const & m, T const & angle, detail::tvec3 const & axis); @@ -111,7 +111,7 @@ namespace glm /// @see - scale(detail::tmat4x4 const & m, T x, T y, T z) /// @see - scale(detail::tvec3 const & v) template - detail::tmat4x4 scale( + GLM_FUNC_DECL detail::tmat4x4 scale( detail::tmat4x4 const & m, detail::tvec3 const & v); @@ -127,7 +127,7 @@ namespace glm /// @see gtc_matrix_transform /// @see - glm::ortho(T const & left, T const & right, T const & bottom, T const & top) template - detail::tmat4x4 ortho( + GLM_FUNC_DECL detail::tmat4x4 ortho( T const & left, T const & right, T const & bottom, @@ -145,7 +145,7 @@ namespace glm /// @see gtc_matrix_transform /// @see - glm::ortho(T const & left, T const & right, T const & bottom, T const & top, T const & zNear, T const & zFar) template - detail::tmat4x4 ortho( + GLM_FUNC_DECL detail::tmat4x4 ortho( T const & left, T const & right, T const & bottom, @@ -162,7 +162,7 @@ namespace glm /// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double. /// @see gtc_matrix_transform template - detail::tmat4x4 frustum( + GLM_FUNC_DECL detail::tmat4x4 frustum( T const & left, T const & right, T const & bottom, @@ -179,7 +179,7 @@ namespace glm /// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double. /// @see gtc_matrix_transform template - detail::tmat4x4 perspective( + GLM_FUNC_DECL detail::tmat4x4 perspective( T const & fovy, T const & aspect, T const & near, @@ -195,7 +195,7 @@ namespace glm /// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double. /// @see gtc_matrix_transform template - detail::tmat4x4 perspectiveFov( + GLM_FUNC_DECL detail::tmat4x4 perspectiveFov( T const & fov, T const & width, T const & height, @@ -210,7 +210,7 @@ namespace glm /// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double. /// @see gtc_matrix_transform template - detail::tmat4x4 infinitePerspective( + GLM_FUNC_DECL detail::tmat4x4 infinitePerspective( T fovy, T aspect, T near); /// Creates a matrix for a symmetric perspective-view frustum with far plane at infinite for graphics hardware that doesn't support depth clamping. @@ -221,7 +221,7 @@ namespace glm /// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double. /// @see gtc_matrix_transform template - detail::tmat4x4 tweakedInfinitePerspective( + GLM_FUNC_DECL detail::tmat4x4 tweakedInfinitePerspective( T fovy, T aspect, T near); /// Map the specified object coordinates (obj.x, obj.y, obj.z) into window coordinates. @@ -234,7 +234,7 @@ namespace glm /// @tparam U Currently supported: Floating-point types and integer types. /// @see gtc_matrix_transform template - detail::tvec3 project( + GLM_FUNC_DECL detail::tvec3 project( detail::tvec3 const & obj, detail::tmat4x4 const & model, detail::tmat4x4 const & proj, @@ -250,7 +250,7 @@ namespace glm /// @tparam U Currently supported: Floating-point types and integer types. /// @see gtc_matrix_transform template - detail::tvec3 unProject( + GLM_FUNC_DECL detail::tvec3 unProject( detail::tvec3 const & win, detail::tmat4x4 const & model, detail::tmat4x4 const & proj, @@ -265,7 +265,7 @@ namespace glm /// @tparam U Currently supported: Floating-point types and integer types. /// @see gtc_matrix_transform template - detail::tmat4x4 pickMatrix( + GLM_FUNC_DECL detail::tmat4x4 pickMatrix( detail::tvec2 const & center, detail::tvec2 const & delta, detail::tvec4 const & viewport); @@ -278,7 +278,7 @@ namespace glm /// @see gtc_matrix_transform /// @see - frustum(T const & left, T const & right, T const & bottom, T const & top, T const & nearVal, T const & farVal) frustum(T const & left, T const & right, T const & bottom, T const & top, T const & nearVal, T const & farVal) template - detail::tmat4x4 lookAt( + GLM_FUNC_DECL detail::tmat4x4 lookAt( detail::tvec3 const & eye, detail::tvec3 const & center, detail::tvec3 const & up); diff --git a/glm/gtc/matrix_transform.inl b/glm/gtc/matrix_transform.inl index cdc47894..57bf9b84 100644 --- a/glm/gtc/matrix_transform.inl +++ b/glm/gtc/matrix_transform.inl @@ -388,7 +388,7 @@ namespace glm } template - detail::tmat4x4 pickMatrix + GLM_FUNC_QUALIFIER detail::tmat4x4 pickMatrix ( detail::tvec2 const & center, detail::tvec2 const & delta, diff --git a/glm/gtc/packing.inl b/glm/gtc/packing.inl index 326a4423..3056c8a8 100644 --- a/glm/gtc/packing.inl +++ b/glm/gtc/packing.inl @@ -29,7 +29,7 @@ namespace glm{ namespace detail { - glm::uint16 float2half(glm::uint32 const & f) + GLM_FUNC_QUALIFIER glm::uint16 float2half(glm::uint32 const & f) { // 10 bits => EE EEEFFFFF // 11 bits => EEE EEFFFFFF @@ -47,7 +47,7 @@ namespace detail ((f >> 13) & 0x03ff); // Mantissa } - glm::uint32 float2packed11(glm::uint32 const & f) + GLM_FUNC_QUALIFIER glm::uint32 float2packed11(glm::uint32 const & f) { // 10 bits => EE EEEFFFFF // 11 bits => EEE EEFFFFFF @@ -65,7 +65,7 @@ namespace detail ((f >> 17) & 0x003f); // Mantissa } - glm::uint32 packed11ToFloat(glm::uint32 const & p) + GLM_FUNC_QUALIFIER glm::uint32 packed11ToFloat(glm::uint32 const & p) { // 10 bits => EE EEEFFFFF // 11 bits => EEE EEFFFFFF @@ -83,7 +83,7 @@ namespace detail ((p & 0x003f) << 17); // Mantissa } - glm::uint32 float2packed10(glm::uint32 const & f) + GLM_FUNC_QUALIFIER glm::uint32 float2packed10(glm::uint32 const & f) { // 10 bits => EE EEEFFFFF // 11 bits => EEE EEFFFFFF @@ -104,7 +104,7 @@ namespace detail ((f >> 18) & 0x001f); // Mantissa } - glm::uint32 packed10ToFloat(glm::uint32 const & p) + GLM_FUNC_QUALIFIER glm::uint32 packed10ToFloat(glm::uint32 const & p) { // 10 bits => EE EEEFFFFF // 11 bits => EEE EEFFFFFF @@ -125,18 +125,12 @@ namespace detail ((p & 0x001f) << 18); // Mantissa } - glm::uint half2float(glm::uint const & h) + GLM_FUNC_QUALIFIER glm::uint half2float(glm::uint const & h) { return ((h & 0x8000) << 16) | ((( h & 0x7c00) + 0x1C000) << 13) | ((h & 0x03FF) << 13); } - union uif - { - glm::uint i; - float f; - }; - - glm::uint floatTo11bit(float x) + GLM_FUNC_QUALIFIER glm::uint floatTo11bit(float x) { if(x == 0.0f) return 0; @@ -145,12 +139,10 @@ namespace detail else if(glm::isinf(x)) return 0x1f << 6; - uif Union; - Union.f = x; - return float2packed11(Union.i); + return float2packed11(reinterpret_cast(x)); } - float packed11bitToFloat(glm::uint x) + GLM_FUNC_QUALIFIER float packed11bitToFloat(glm::uint x) { if(x == 0) return 0.0f; @@ -159,12 +151,11 @@ namespace detail else if(x == (0x1f << 6)) return ~0;//Inf - uif Union; - Union.i = packed11ToFloat(x); - return Union.f; + uint result = packed11ToFloat(x); + return reinterpret_cast(result); } - glm::uint floatTo10bit(float x) + GLM_FUNC_QUALIFIER glm::uint floatTo10bit(float x) { if(x == 0.0f) return 0; @@ -173,9 +164,7 @@ namespace detail else if(glm::isinf(x)) return 0x1f << 5; - uif Union; - Union.f = x; - return float2packed10(Union.i); + return float2packed10(reinterpret_cast(x)); } float packed10bitToFloat(glm::uint x) @@ -187,9 +176,8 @@ namespace detail else if(x == (0x1f << 5)) return ~0;//Inf - uif Union; - Union.i = packed10ToFloat(x); - return Union.f; + uint result = packed10ToFloat(x); + return reinterpret_cast(result); } glm::uint f11_f11_f10(float x, float y, float z) @@ -325,19 +313,19 @@ namespace detail -1.0f, 1.0f); } - GLM_FUNC_DECL uint16 packHalf1x16(float const & v) + GLM_FUNC_QUALIFIER uint16 packHalf1x16(float const & v) { int16 Topack = detail::toFloat16(v); return *reinterpret_cast(&Topack); } - GLM_FUNC_DECL float unpackHalf1x16(uint16 const & v) + GLM_FUNC_QUALIFIER float unpackHalf1x16(uint16 const & v) { int16 Unpack(*reinterpret_cast(const_cast(&v))); return detail::toFloat32(Unpack); } - GLM_FUNC_DECL uint64 packHalf4x16(glm::vec4 const & v) + GLM_FUNC_QUALIFIER uint64 packHalf4x16(glm::vec4 const & v) { i16vec4 Unpack( detail::toFloat16(v.x), @@ -348,7 +336,7 @@ namespace detail return *reinterpret_cast(&Unpack); } - GLM_FUNC_DECL glm::vec4 unpackHalf4x16(uint64 const & v) + GLM_FUNC_QUALIFIER glm::vec4 unpackHalf4x16(uint64 const & v) { i16vec4 Unpack = *reinterpret_cast(const_cast(&v)); diff --git a/glm/gtc/quaternion.hpp b/glm/gtc/quaternion.hpp index 4d9f6c13..3acf6fbe 100644 --- a/glm/gtc/quaternion.hpp +++ b/glm/gtc/quaternion.hpp @@ -64,7 +64,7 @@ namespace detail GLM_FUNC_DECL GLM_CONSTEXPR int length() const; // Constructors - tquat(); + GLM_FUNC_DECL tquat(); template GLM_FUNC_DECL explicit tquat( tquat const & q); @@ -111,51 +111,51 @@ namespace detail }; template - detail::tquat operator- ( + GLM_FUNC_DECL detail::tquat operator- ( detail::tquat const & q); template - detail::tquat operator+ ( + GLM_FUNC_DECL detail::tquat operator+ ( detail::tquat const & q, detail::tquat const & p); template - detail::tquat operator* ( + GLM_FUNC_DECL detail::tquat operator* ( detail::tquat const & q, detail::tquat const & p); template - detail::tvec3 operator* ( + GLM_FUNC_DECL detail::tvec3 operator* ( detail::tquat const & q, detail::tvec3 const & v); template - detail::tvec3 operator* ( + GLM_FUNC_DECL detail::tvec3 operator* ( detail::tvec3 const & v, detail::tquat const & q); template - detail::tvec4 operator* ( + GLM_FUNC_DECL detail::tvec4 operator* ( detail::tquat const & q, detail::tvec4 const & v); template - detail::tvec4 operator* ( + GLM_FUNC_DECL detail::tvec4 operator* ( detail::tvec4 const & v, detail::tquat const & q); template - detail::tquat operator* ( + GLM_FUNC_DECL detail::tquat operator* ( detail::tquat const & q, T const & s); template - detail::tquat operator* ( + GLM_FUNC_DECL detail::tquat operator* ( T const & s, detail::tquat const & q); template - detail::tquat operator/ ( + GLM_FUNC_DECL detail::tquat operator/ ( detail::tquat const & q, T const & s); @@ -168,21 +168,21 @@ namespace detail /// /// @see gtc_quaternion template - T length( + GLM_FUNC_DECL T length( detail::tquat const & q); /// Returns the normalized quaternion. /// /// @see gtc_quaternion template - detail::tquat normalize( + GLM_FUNC_DECL detail::tquat normalize( detail::tquat const & q); /// Returns dot product of q1 and q2, i.e., q1[0] * q2[0] + q1[1] * q2[1] + ... /// /// @see gtc_quaternion template - T dot( + GLM_FUNC_DECL T dot( detail::tquat const & q1, detail::tquat const & q2); @@ -197,7 +197,7 @@ namespace detail /// @see gtc_quaternion /// @see - slerp(detail::tquat const & x, detail::tquat const & y, T const & a) template - detail::tquat mix( + GLM_FUNC_DECL detail::tquat mix( detail::tquat const & x, detail::tquat const & y, T const & a); @@ -211,7 +211,7 @@ namespace detail /// @tparam T Value type used to build the quaternion. Supported: half, float or double. /// @see gtc_quaternion template - detail::tquat lerp( + GLM_FUNC_DECL detail::tquat lerp( detail::tquat const & x, detail::tquat const & y, T const & a); @@ -225,7 +225,7 @@ namespace detail /// @tparam T Value type used to build the quaternion. Supported: half, float or double. /// @see gtc_quaternion template - detail::tquat slerp( + GLM_FUNC_DECL detail::tquat slerp( detail::tquat const & x, detail::tquat const & y, T const & a); @@ -234,14 +234,14 @@ namespace detail /// /// @see gtc_quaternion template - detail::tquat conjugate( + GLM_FUNC_DECL detail::tquat conjugate( detail::tquat const & q); /// Returns the q inverse. /// /// @see gtc_quaternion template - detail::tquat inverse( + GLM_FUNC_DECL detail::tquat inverse( detail::tquat const & q); /// Rotates a quaternion from a vector of 3 components axis and an angle. @@ -252,7 +252,7 @@ namespace detail /// /// @see gtc_quaternion template - detail::tquat rotate( + GLM_FUNC_DECL detail::tquat rotate( detail::tquat const & q, T const & angle, detail::tvec3 const & axis); @@ -261,66 +261,66 @@ namespace detail /// /// @see gtc_quaternion template - detail::tvec3 eulerAngles( + GLM_FUNC_DECL detail::tvec3 eulerAngles( detail::tquat const & x); /// Returns roll value of euler angles expressed in radians if GLM_FORCE_RADIANS is define or degrees otherwise. /// /// @see gtx_quaternion template - T roll(detail::tquat const & x); + GLM_FUNC_DECL T roll(detail::tquat const & x); /// Returns pitch value of euler angles expressed in radians if GLM_FORCE_RADIANS is define or degrees otherwise. /// /// @see gtx_quaternion template - T pitch(detail::tquat const & x); + GLM_FUNC_DECL T pitch(detail::tquat const & x); /// Returns yaw value of euler angles expressed in radians if GLM_FORCE_RADIANS is define or degrees otherwise. /// /// @see gtx_quaternion template - T yaw(detail::tquat const & x); + GLM_FUNC_DECL T yaw(detail::tquat const & x); /// Converts a quaternion to a 3 * 3 matrix. /// /// @see gtc_quaternion template - detail::tmat3x3 mat3_cast( + GLM_FUNC_DECL detail::tmat3x3 mat3_cast( detail::tquat const & x); /// Converts a quaternion to a 4 * 4 matrix. /// /// @see gtc_quaternion template - detail::tmat4x4 mat4_cast( + GLM_FUNC_DECL detail::tmat4x4 mat4_cast( detail::tquat const & x); /// Converts a 3 * 3 matrix to a quaternion. /// /// @see gtc_quaternion template - detail::tquat quat_cast( + GLM_FUNC_DECL detail::tquat quat_cast( detail::tmat3x3 const & x); /// Converts a 4 * 4 matrix to a quaternion. /// /// @see gtc_quaternion template - detail::tquat quat_cast( + GLM_FUNC_DECL detail::tquat quat_cast( detail::tmat4x4 const & x); /// Returns the quaternion rotation angle. /// /// @see gtc_quaternion template - T angle(detail::tquat const & x); + GLM_FUNC_DECL T angle(detail::tquat const & x); /// Returns the q rotation axis. /// /// @see gtc_quaternion template - detail::tvec3 axis( + GLM_FUNC_DECL detail::tvec3 axis( detail::tquat const & x); /// Build a quaternion from an angle and a normalized axis. @@ -330,7 +330,7 @@ namespace detail /// /// @see gtc_quaternion template - detail::tquat angleAxis( + GLM_FUNC_DECL detail::tquat angleAxis( T const & angle, detail::tvec3 const & axis); @@ -340,7 +340,7 @@ namespace detail /// /// @see gtc_quaternion template - typename quatType::bool_type lessThan(quatType const & x, quatType const & y); + GLM_FUNC_DECL typename quatType::bool_type lessThan(quatType const & x, quatType const & y); /// Returns the component-wise comparison of result x <= y. /// @@ -348,7 +348,7 @@ namespace detail /// /// @see gtc_quaternion template - typename quatType::bool_type lessThanEqual(quatType const & x, quatType const & y); + GLM_FUNC_DECL typename quatType::bool_type lessThanEqual(quatType const & x, quatType const & y); /// Returns the component-wise comparison of result x > y. /// @@ -356,7 +356,7 @@ namespace detail /// /// @see gtc_quaternion template - typename quatType::bool_type greaterThan(quatType const & x, quatType const & y); + GLM_FUNC_DECL typename quatType::bool_type greaterThan(quatType const & x, quatType const & y); /// Returns the component-wise comparison of result x >= y. /// @@ -364,7 +364,7 @@ namespace detail /// /// @see gtc_quaternion template - typename quatType::bool_type greaterThanEqual(quatType const & x, quatType const & y); + GLM_FUNC_DECL typename quatType::bool_type greaterThanEqual(quatType const & x, quatType const & y); /// Returns the component-wise comparison of result x == y. /// @@ -372,7 +372,7 @@ namespace detail /// /// @see gtc_quaternion template - typename quatType::bool_type equal(quatType const & x, quatType const & y); + GLM_FUNC_DECL typename quatType::bool_type equal(quatType const & x, quatType const & y); /// Returns the component-wise comparison of result x != y. /// @@ -380,7 +380,7 @@ namespace detail /// /// @see gtc_quaternion template - typename quatType::bool_type notEqual(quatType const & x, quatType const & y); + GLM_FUNC_DECL typename quatType::bool_type notEqual(quatType const & x, quatType const & y); /// @} } //namespace glm diff --git a/glm/gtc/random.hpp b/glm/gtc/random.hpp index 60501c79..6748cfab 100644 --- a/glm/gtc/random.hpp +++ b/glm/gtc/random.hpp @@ -59,7 +59,7 @@ namespace glm /// @tparam genType Value type. Currently supported: half (not recommanded), float or double scalars and vectors. /// @see gtc_random template - genType linearRand( + GLM_FUNC_DECL genType linearRand( genType const & Min, genType const & Max); @@ -69,7 +69,7 @@ namespace glm /// @param Deviation /// @see gtc_random template - genType gaussRand( + GLM_FUNC_DECL genType gaussRand( genType const & Mean, genType const & Deviation); @@ -78,7 +78,7 @@ namespace glm /// @param Radius /// @see gtc_random template - detail::tvec2 circularRand( + GLM_FUNC_DECL detail::tvec2 circularRand( T const & Radius); /// Generate a random 3D vector which coordinates are regulary distributed on a sphere of a given radius @@ -86,7 +86,7 @@ namespace glm /// @param Radius /// @see gtc_random template - detail::tvec3 sphericalRand( + GLM_FUNC_DECL detail::tvec3 sphericalRand( T const & Radius); /// Generate a random 2D vector which coordinates are regulary distributed within the area of a disk of a given radius @@ -94,7 +94,7 @@ namespace glm /// @param Radius /// @see gtc_random template - detail::tvec2 diskRand( + GLM_FUNC_DECL detail::tvec2 diskRand( T const & Radius); /// Generate a random 3D vector which coordinates are regulary distributed within the volume of a ball of a given radius @@ -102,7 +102,7 @@ namespace glm /// @param Radius /// @see gtc_random template - detail::tvec3 ballRand( + GLM_FUNC_DECL detail::tvec3 ballRand( T const & Radius); /// @} diff --git a/glm/gtc/reciprocal.hpp b/glm/gtc/reciprocal.hpp index 4b04b667..22d32c1d 100644 --- a/glm/gtc/reciprocal.hpp +++ b/glm/gtc/reciprocal.hpp @@ -55,75 +55,75 @@ namespace glm /// /// @see gtc_reciprocal template - genType sec(genType const & angle); + GLM_FUNC_DECL genType sec(genType const & angle); /// Cosecant function. /// hypotenuse / opposite or 1 / sin(x) /// /// @see gtc_reciprocal template - genType csc(genType const & angle); + GLM_FUNC_DECL genType csc(genType const & angle); /// Cotangent function. /// adjacent / opposite or 1 / tan(x) /// /// @see gtc_reciprocal template - genType cot(genType const & angle); + GLM_FUNC_DECL genType cot(genType const & angle); /// Inverse secant function. /// /// @see gtc_reciprocal template - genType asec(genType const & x); + GLM_FUNC_DECL genType asec(genType const & x); /// Inverse cosecant function. /// /// @see gtc_reciprocal template - genType acsc(genType const & x); + GLM_FUNC_DECL genType acsc(genType const & x); /// Inverse cotangent function. /// /// @see gtc_reciprocal template - genType acot(genType const & x); + GLM_FUNC_DECL genType acot(genType const & x); /// Secant hyperbolic function. /// /// @see gtc_reciprocal template - genType sech(genType const & angle); + GLM_FUNC_DECL genType sech(genType const & angle); /// Cosecant hyperbolic function. /// /// @see gtc_reciprocal template - genType csch(genType const & angle); + GLM_FUNC_DECL genType csch(genType const & angle); /// Cotangent hyperbolic function. /// /// @see gtc_reciprocal template - genType coth(genType const & angle); + GLM_FUNC_DECL genType coth(genType const & angle); /// Inverse secant hyperbolic function. /// /// @see gtc_reciprocal template - genType asech(genType const & x); + GLM_FUNC_DECL genType asech(genType const & x); /// Inverse cosecant hyperbolic function. /// /// @see gtc_reciprocal template - genType acsch(genType const & x); + GLM_FUNC_DECL genType acsch(genType const & x); /// Inverse cotangent hyperbolic function. /// /// @see gtc_reciprocal template - genType acoth(genType const & x); + GLM_FUNC_DECL genType acoth(genType const & x); /// @} }//namespace glm diff --git a/glm/gtc/type_ptr.hpp b/glm/gtc/type_ptr.hpp index 045a0ba1..c7736f8a 100644 --- a/glm/gtc/type_ptr.hpp +++ b/glm/gtc/type_ptr.hpp @@ -76,88 +76,88 @@ namespace glm /// Return the constant address to the data of the input parameter. /// @see gtc_type_ptr template - typename genType::value_type const * value_ptr(genType const & vec); + GLM_FUNC_DECL typename genType::value_type const * value_ptr(genType const & vec); /// Build a vector from a pointer. /// @see gtc_type_ptr template - detail::tvec2 make_vec2(T const * const ptr); + GLM_FUNC_DECL detail::tvec2 make_vec2(T const * const ptr); /// Build a vector from a pointer. /// @see gtc_type_ptr template - detail::tvec3 make_vec3(T const * const ptr); + GLM_FUNC_DECL detail::tvec3 make_vec3(T const * const ptr); /// Build a vector from a pointer. /// @see gtc_type_ptr template - detail::tvec4 make_vec4(T const * const ptr); + GLM_FUNC_DECL detail::tvec4 make_vec4(T const * const ptr); /// Build a matrix from a pointer. /// @see gtc_type_ptr template - detail::tmat2x2 make_mat2x2(T const * const ptr); + GLM_FUNC_DECL detail::tmat2x2 make_mat2x2(T const * const ptr); /// Build a matrix from a pointer. /// @see gtc_type_ptr template - detail::tmat2x3 make_mat2x3(T const * const ptr); + GLM_FUNC_DECL detail::tmat2x3 make_mat2x3(T const * const ptr); /// Build a matrix from a pointer. /// @see gtc_type_ptr template - detail::tmat2x4 make_mat2x4(T const * const ptr); + GLM_FUNC_DECL detail::tmat2x4 make_mat2x4(T const * const ptr); /// Build a matrix from a pointer. /// @see gtc_type_ptr template - detail::tmat3x2 make_mat3x2(T const * const ptr); + GLM_FUNC_DECL detail::tmat3x2 make_mat3x2(T const * const ptr); /// Build a matrix from a pointer. /// @see gtc_type_ptr template - detail::tmat3x3 make_mat3x3(T const * const ptr); + GLM_FUNC_DECL detail::tmat3x3 make_mat3x3(T const * const ptr); /// Build a matrix from a pointer. /// @see gtc_type_ptr template - detail::tmat3x4 make_mat3x4(T const * const ptr); + GLM_FUNC_DECL detail::tmat3x4 make_mat3x4(T const * const ptr); /// Build a matrix from a pointer. /// @see gtc_type_ptr template - detail::tmat4x2 make_mat4x2( + GLM_FUNC_DECL detail::tmat4x2 make_mat4x2( T const * const ptr); /// Build a matrix from a pointer. /// @see gtc_type_ptr template - detail::tmat4x3 make_mat4x3(T const * const ptr); + GLM_FUNC_DECL detail::tmat4x3 make_mat4x3(T const * const ptr); /// Build a matrix from a pointer. /// @see gtc_type_ptr template - detail::tmat4x4 make_mat4x4(T const * const ptr); + GLM_FUNC_DECL detail::tmat4x4 make_mat4x4(T const * const ptr); /// Build a matrix from a pointer. /// @see gtc_type_ptr template - detail::tmat2x2 make_mat2(T const * const ptr); + GLM_FUNC_DECL detail::tmat2x2 make_mat2(T const * const ptr); /// Build a matrix from a pointer. /// @see gtc_type_ptr template - detail::tmat3x3 make_mat3(T const * const ptr); + GLM_FUNC_DECL detail::tmat3x3 make_mat3(T const * const ptr); /// Build a matrix from a pointer. /// @see gtc_type_ptr template - detail::tmat4x4 make_mat4(T const * const ptr); + GLM_FUNC_DECL detail::tmat4x4 make_mat4(T const * const ptr); /// Build a quaternion from a pointer. /// @see gtc_type_ptr template - detail::tquat make_quat(T const * const ptr); + GLM_FUNC_DECL detail::tquat make_quat(T const * const ptr); /// @} }//namespace glm diff --git a/glm/gtc/ulp.hpp b/glm/gtc/ulp.hpp index 5bbc1bc5..4cbb175d 100644 --- a/glm/gtc/ulp.hpp +++ b/glm/gtc/ulp.hpp @@ -54,32 +54,32 @@ namespace glm /// Return the next ULP value(s) after the input value(s). /// @see gtc_ulp template - genType next_float(genType const & x); + GLM_FUNC_DECL genType next_float(genType const & x); /// Return the previous ULP value(s) before the input value(s). /// @see gtc_ulp template - genType prev_float(genType const & x); + GLM_FUNC_DECL genType prev_float(genType const & x); /// Return the value(s) ULP distance after the input value(s). /// @see gtc_ulp template - genType next_float(genType const & x, uint const & Distance); + GLM_FUNC_DECL genType next_float(genType const & x, uint const & Distance); /// Return the value(s) ULP distance before the input value(s). /// @see gtc_ulp template - genType prev_float(genType const & x, uint const & Distance); + GLM_FUNC_DECL genType prev_float(genType const & x, uint const & Distance); /// Return the distance in the number of ULP between 2 scalars. /// @see gtc_ulp template - uint float_distance(T const & x, T const & y); + GLM_FUNC_DECL uint float_distance(T const & x, T const & y); /// Return the distance in the number of ULP between 2 vectors. /// @see gtc_ulp template class vecType> - vecType float_distance(vecType const & x, vecType const & y); + GLM_FUNC_DECL vecType float_distance(vecType const & x, vecType const & y); /// @} }// namespace glm