diff --git a/glm/gtx/associated_min_max.hpp b/glm/gtx/associated_min_max.hpp index 84c13222..ce00179a 100644 --- a/glm/gtx/associated_min_max.hpp +++ b/glm/gtx/associated_min_max.hpp @@ -56,28 +56,28 @@ namespace glm /// Minimum comparison between 2 variables and returns 2 associated variable values /// @see gtx_associated_min_max template - GLM_FUNC_DECL U associatedMin(T x, U a, T y, U b); + GLM_FUNC_DECL U associatedMin(T x, U a, T y, U b) GLM_NOEXCEPT; /// Minimum comparison between 2 variables and returns 2 associated variable values /// @see gtx_associated_min_max template class vecType> GLM_FUNC_DECL tvec2 associatedMin( vecType const & x, vecType const & a, - vecType const & y, vecType const & b); + vecType const & y, vecType const & b) GLM_NOEXCEPT; /// Minimum comparison between 2 variables and returns 2 associated variable values /// @see gtx_associated_min_max template class vecType> GLM_FUNC_DECL vecType associatedMin( T x, const vecType& a, - T y, const vecType& b); + T y, const vecType& b) GLM_NOEXCEPT; /// Minimum comparison between 2 variables and returns 2 associated variable values /// @see gtx_associated_min_max template class vecType> GLM_FUNC_DECL vecType associatedMin( vecType const & x, U a, - vecType const & y, U b); + vecType const & y, U b) GLM_NOEXCEPT; /// Minimum comparison between 3 variables and returns 3 associated variable values /// @see gtx_associated_min_max @@ -85,7 +85,7 @@ namespace glm GLM_FUNC_DECL U associatedMin( T x, U a, T y, U b, - T z, U c); + T z, U c) GLM_NOEXCEPT; /// Minimum comparison between 3 variables and returns 3 associated variable values /// @see gtx_associated_min_max @@ -93,7 +93,7 @@ namespace glm GLM_FUNC_DECL vecType associatedMin( vecType const & x, vecType const & a, vecType const & y, vecType const & b, - vecType const & z, vecType const & c); + vecType const & z, vecType const & c) GLM_NOEXCEPT; /// Minimum comparison between 4 variables and returns 4 associated variable values /// @see gtx_associated_min_max @@ -102,7 +102,7 @@ namespace glm T x, U a, T y, U b, T z, U c, - T w, U d); + T w, U d) GLM_NOEXCEPT; /// Minimum comparison between 4 variables and returns 4 associated variable values /// @see gtx_associated_min_max @@ -111,7 +111,7 @@ namespace glm vecType const & x, vecType const & a, vecType const & y, vecType const & b, vecType const & z, vecType const & c, - vecType const & w, vecType const & d); + vecType const & w, vecType const & d) GLM_NOEXCEPT; /// Minimum comparison between 4 variables and returns 4 associated variable values /// @see gtx_associated_min_max @@ -120,7 +120,7 @@ namespace glm T x, vecType const & a, T y, vecType const & b, T z, vecType const & c, - T w, vecType const & d); + T w, vecType const & d) GLM_NOEXCEPT; /// Minimum comparison between 4 variables and returns 4 associated variable values /// @see gtx_associated_min_max @@ -129,33 +129,33 @@ namespace glm vecType const & x, U a, vecType const & y, U b, vecType const & z, U c, - vecType const & w, U d); + vecType const & w, U d) GLM_NOEXCEPT; /// Maximum comparison between 2 variables and returns 2 associated variable values /// @see gtx_associated_min_max template - GLM_FUNC_DECL U associatedMax(T x, U a, T y, U b); + GLM_FUNC_DECL U associatedMax(T x, U a, T y, U b) GLM_NOEXCEPT; /// Maximum comparison between 2 variables and returns 2 associated variable values /// @see gtx_associated_min_max template class vecType> GLM_FUNC_DECL tvec2 associatedMax( vecType const & x, vecType const & a, - vecType const & y, vecType const & b); + vecType const & y, vecType const & b) GLM_NOEXCEPT; /// Maximum comparison between 2 variables and returns 2 associated variable values /// @see gtx_associated_min_max template class vecType> GLM_FUNC_DECL vecType associatedMax( T x, vecType const & a, - T y, vecType const & b); + T y, vecType const & b) GLM_NOEXCEPT; /// Maximum comparison between 2 variables and returns 2 associated variable values /// @see gtx_associated_min_max template class vecType> GLM_FUNC_DECL vecType associatedMax( vecType const & x, U a, - vecType const & y, U b); + vecType const & y, U b) GLM_NOEXCEPT; /// Maximum comparison between 3 variables and returns 3 associated variable values /// @see gtx_associated_min_max @@ -163,7 +163,7 @@ namespace glm GLM_FUNC_DECL U associatedMax( T x, U a, T y, U b, - T z, U c); + T z, U c) GLM_NOEXCEPT; /// Maximum comparison between 3 variables and returns 3 associated variable values /// @see gtx_associated_min_max @@ -171,7 +171,7 @@ namespace glm GLM_FUNC_DECL vecType associatedMax( vecType const & x, vecType const & a, vecType const & y, vecType const & b, - vecType const & z, vecType const & c); + vecType const & z, vecType const & c) GLM_NOEXCEPT; /// Maximum comparison between 3 variables and returns 3 associated variable values /// @see gtx_associated_min_max @@ -179,7 +179,7 @@ namespace glm GLM_FUNC_DECL vecType associatedMax( T x, vecType const & a, T y, vecType const & b, - T z, vecType const & c); + T z, vecType const & c) GLM_NOEXCEPT; /// Maximum comparison between 3 variables and returns 3 associated variable values /// @see gtx_associated_min_max @@ -187,7 +187,7 @@ namespace glm GLM_FUNC_DECL vecType associatedMax( vecType const & x, U a, vecType const & y, U b, - vecType const & z, U c); + vecType const & z, U c) GLM_NOEXCEPT; /// Maximum comparison between 4 variables and returns 4 associated variable values /// @see gtx_associated_min_max @@ -196,7 +196,7 @@ namespace glm T x, U a, T y, U b, T z, U c, - T w, U d); + T w, U d) GLM_NOEXCEPT; /// Maximum comparison between 4 variables and returns 4 associated variable values /// @see gtx_associated_min_max @@ -205,7 +205,7 @@ namespace glm vecType const & x, vecType const & a, vecType const & y, vecType const & b, vecType const & z, vecType const & c, - vecType const & w, vecType const & d); + vecType const & w, vecType const & d) GLM_NOEXCEPT; /// Maximum comparison between 4 variables and returns 4 associated variable values /// @see gtx_associated_min_max @@ -214,7 +214,7 @@ namespace glm T x, vecType const & a, T y, vecType const & b, T z, vecType const & c, - T w, vecType const & d); + T w, vecType const & d) GLM_NOEXCEPT; /// Maximum comparison between 4 variables and returns 4 associated variable values /// @see gtx_associated_min_max @@ -223,7 +223,7 @@ namespace glm vecType const & x, U a, vecType const & y, U b, vecType const & z, U c, - vecType const & w, U d); + vecType const & w, U d) GLM_NOEXCEPT; /// @} } //namespace glm diff --git a/glm/gtx/associated_min_max.inl b/glm/gtx/associated_min_max.inl index 41f08b46..3acaa176 100644 --- a/glm/gtx/associated_min_max.inl +++ b/glm/gtx/associated_min_max.inl @@ -34,7 +34,7 @@ namespace glm{ // Min comparison between 2 variables template -GLM_FUNC_QUALIFIER U associatedMin(T x, U a, T y, U b) +GLM_FUNC_QUALIFIER U associatedMin(T x, U a, T y, U b) GLM_NOEXCEPT { return x < y ? a : b; } @@ -44,7 +44,7 @@ GLM_FUNC_QUALIFIER tvec2 associatedMin ( vecType const & x, vecType const & a, vecType const & y, vecType const & b -) +) GLM_NOEXCEPT { vecType Result(uninitialize); for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i) @@ -57,7 +57,7 @@ GLM_FUNC_QUALIFIER vecType associatedMin ( T x, const vecType& a, T y, const vecType& b -) +) GLM_NOEXCEPT { vecType Result(uninitialize); for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i) @@ -70,7 +70,7 @@ GLM_FUNC_QUALIFIER vecType associatedMin ( vecType const & x, U a, vecType const & y, U b -) +) GLM_NOEXCEPT { vecType Result(uninitialize); for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i) @@ -85,7 +85,7 @@ GLM_FUNC_QUALIFIER U associatedMin T x, U a, T y, U b, T z, U c -) +) GLM_NOEXCEPT { U Result = x < y ? (x < z ? a : c) : (y < z ? b : c); return Result; @@ -97,7 +97,7 @@ GLM_FUNC_QUALIFIER vecType associatedMin vecType const & x, vecType const & a, vecType const & y, vecType const & b, vecType const & z, vecType const & c -) +) GLM_NOEXCEPT { vecType Result(uninitialize); for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i) @@ -113,7 +113,7 @@ GLM_FUNC_QUALIFIER U associatedMin T y, U b, T z, U c, T w, U d -) +) GLM_NOEXCEPT { T Test1 = min(x, y); T Test2 = min(z, w);; @@ -131,7 +131,7 @@ GLM_FUNC_QUALIFIER vecType associatedMin vecType const & y, vecType const & b, vecType const & z, vecType const & c, vecType const & w, vecType const & d -) +) GLM_NOEXCEPT { vecType Result(uninitialize); for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i) @@ -153,7 +153,7 @@ GLM_FUNC_QUALIFIER vecType associatedMin T y, vecType const & b, T z, vecType const & c, T w, vecType const & d -) +) GLM_NOEXCEPT { T Test1 = min(x, y); T Test2 = min(z, w); @@ -176,7 +176,7 @@ GLM_FUNC_QUALIFIER vecType associatedMin vecType const & y, U b, vecType const & z, U c, vecType const & w, U d -) +) GLM_NOEXCEPT { vecType Result(uninitialize); for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i) @@ -192,7 +192,7 @@ GLM_FUNC_QUALIFIER vecType associatedMin // Max comparison between 2 variables template -GLM_FUNC_QUALIFIER U associatedMax(T x, U a, T y, U b) +GLM_FUNC_QUALIFIER U associatedMax(T x, U a, T y, U b) GLM_NOEXCEPT { return x > y ? a : b; } @@ -203,7 +203,7 @@ GLM_FUNC_QUALIFIER tvec2 associatedMax ( vecType const & x, vecType const & a, vecType const & y, vecType const & b -) +) GLM_NOEXCEPT { vecType Result(uninitialize); for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i) @@ -217,7 +217,7 @@ GLM_FUNC_QUALIFIER vecType associatedMax ( T x, vecType const & a, T y, vecType const & b -) +) GLM_NOEXCEPT { vecType Result(uninitialize); for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i) @@ -231,7 +231,7 @@ GLM_FUNC_QUALIFIER vecType associatedMax ( vecType const & x, U a, vecType const & y, U b -) +) GLM_NOEXCEPT { vecType Result(uninitialize); for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i) @@ -246,7 +246,7 @@ GLM_FUNC_QUALIFIER U associatedMax T x, U a, T y, U b, T z, U c -) +) GLM_NOEXCEPT { U Result = x > y ? (x > z ? a : c) : (y > z ? b : c); return Result; @@ -259,7 +259,7 @@ GLM_FUNC_QUALIFIER vecType associatedMax vecType const & x, vecType const & a, vecType const & y, vecType const & b, vecType const & z, vecType const & c -) +) GLM_NOEXCEPT { vecType Result(uninitialize); for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i) @@ -274,7 +274,7 @@ GLM_FUNC_QUALIFIER vecType associatedMax T x, vecType const & a, T y, vecType const & b, T z, vecType const & c -) +) GLM_NOEXCEPT { vecType Result(uninitialize); for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i) @@ -289,7 +289,7 @@ GLM_FUNC_QUALIFIER vecType associatedMax vecType const & x, U a, vecType const & y, U b, vecType const & z, U c -) +) GLM_NOEXCEPT { vecType Result(uninitialize); for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i) @@ -305,7 +305,7 @@ GLM_FUNC_QUALIFIER U associatedMax T y, U b, T z, U c, T w, U d -) +) GLM_NOEXCEPT { T Test1 = max(x, y); T Test2 = max(z, w);; @@ -323,7 +323,7 @@ GLM_FUNC_QUALIFIER vecType associatedMax vecType const & y, vecType const & b, vecType const & z, vecType const & c, vecType const & w, vecType const & d -) +) GLM_NOEXCEPT { vecType Result(uninitialize); for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i) @@ -345,7 +345,7 @@ GLM_FUNC_QUALIFIER vecType associatedMax T y, vecType const & b, T z, vecType const & c, T w, vecType const & d -) +) GLM_NOEXCEPT { T Test1 = max(x, y); T Test2 = max(z, w); @@ -368,7 +368,7 @@ GLM_FUNC_QUALIFIER vecType associatedMax vecType const & y, U b, vecType const & z, U c, vecType const & w, U d -) +) GLM_NOEXCEPT { vecType Result(uninitialize); for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i) diff --git a/glm/gtx/bit.hpp b/glm/gtx/bit.hpp index 126fc223..5b3e3be1 100644 --- a/glm/gtx/bit.hpp +++ b/glm/gtx/bit.hpp @@ -56,13 +56,13 @@ namespace glm /// @see gtx_bit template - GLM_FUNC_DECL genIUType highestBitValue(genIUType Value); + GLM_FUNC_DECL genIUType highestBitValue(genIUType Value) GLM_NOEXCEPT; /// Find the highest bit set to 1 in a integer variable and return its value. /// /// @see gtx_bit template class vecType> - GLM_FUNC_DECL vecType highestBitValue(vecType const & value); + GLM_FUNC_DECL vecType highestBitValue(vecType const & value) GLM_NOEXCEPT; /// Return the power of two number which value is just higher the input value. /// Deprecated, use ceilPowerOfTwo from GTC_round instead @@ -70,7 +70,7 @@ namespace glm /// @see gtc_round /// @see gtx_bit template - GLM_DEPRECATED GLM_FUNC_DECL genIUType powerOfTwoAbove(genIUType Value); + GLM_DEPRECATED GLM_FUNC_DECL genIUType powerOfTwoAbove(genIUType Value) GLM_NOEXCEPT; /// Return the power of two number which value is just higher the input value. /// Deprecated, use ceilPowerOfTwo from GTC_round instead @@ -78,7 +78,7 @@ namespace glm /// @see gtc_round /// @see gtx_bit template class vecType> - GLM_DEPRECATED GLM_FUNC_DECL vecType powerOfTwoAbove(vecType const & value); + GLM_DEPRECATED GLM_FUNC_DECL vecType powerOfTwoAbove(vecType const & value) GLM_NOEXCEPT; /// Return the power of two number which value is just lower the input value. /// Deprecated, use floorPowerOfTwo from GTC_round instead @@ -86,7 +86,7 @@ namespace glm /// @see gtc_round /// @see gtx_bit template - GLM_DEPRECATED GLM_FUNC_DECL genIUType powerOfTwoBelow(genIUType Value); + GLM_DEPRECATED GLM_FUNC_DECL genIUType powerOfTwoBelow(genIUType Value) GLM_NOEXCEPT; /// Return the power of two number which value is just lower the input value. /// Deprecated, use floorPowerOfTwo from GTC_round instead @@ -94,7 +94,7 @@ namespace glm /// @see gtc_round /// @see gtx_bit template class vecType> - GLM_DEPRECATED GLM_FUNC_DECL vecType powerOfTwoBelow(vecType const & value); + GLM_DEPRECATED GLM_FUNC_DECL vecType powerOfTwoBelow(vecType const & value) GLM_NOEXCEPT; /// Return the power of two number which value is the closet to the input value. /// Deprecated, use roundPowerOfTwo from GTC_round instead @@ -102,7 +102,7 @@ namespace glm /// @see gtc_round /// @see gtx_bit template - GLM_DEPRECATED GLM_FUNC_DECL genIUType powerOfTwoNearest(genIUType Value); + GLM_DEPRECATED GLM_FUNC_DECL genIUType powerOfTwoNearest(genIUType Value) GLM_NOEXCEPT; /// Return the power of two number which value is the closet to the input value. /// Deprecated, use roundPowerOfTwo from GTC_round instead @@ -110,7 +110,7 @@ namespace glm /// @see gtc_round /// @see gtx_bit template class vecType> - GLM_DEPRECATED GLM_FUNC_DECL vecType powerOfTwoNearest(vecType const & value); + GLM_DEPRECATED GLM_FUNC_DECL vecType powerOfTwoNearest(vecType const & value) GLM_NOEXCEPT; /// @} } //namespace glm diff --git a/glm/gtx/bit.inl b/glm/gtx/bit.inl index 5178a123..bddfca3b 100644 --- a/glm/gtx/bit.inl +++ b/glm/gtx/bit.inl @@ -36,7 +36,7 @@ namespace glm // highestBitValue template - GLM_FUNC_QUALIFIER genIUType highestBitValue(genIUType Value) + GLM_FUNC_QUALIFIER genIUType highestBitValue(genIUType Value) GLM_NOEXCEPT { genIUType tmp = Value; genIUType result = genIUType(0); @@ -49,7 +49,7 @@ namespace glm } template class vecType> - GLM_FUNC_QUALIFIER vecType highestBitValue(vecType const & v) + GLM_FUNC_QUALIFIER vecType highestBitValue(vecType const & v) GLM_NOEXCEPT { return detail::functor1::call(highestBitValue, v); } @@ -58,13 +58,13 @@ namespace glm // powerOfTwoAbove template - GLM_FUNC_QUALIFIER genType powerOfTwoAbove(genType value) + GLM_FUNC_QUALIFIER genType powerOfTwoAbove(genType value) GLM_NOEXCEPT { return isPowerOfTwo(value) ? value : highestBitValue(value) << 1; } template class vecType> - GLM_FUNC_QUALIFIER vecType powerOfTwoAbove(vecType const & v) + GLM_FUNC_QUALIFIER vecType powerOfTwoAbove(vecType const & v) GLM_NOEXCEPT { return detail::functor1::call(powerOfTwoAbove, v); } @@ -73,13 +73,13 @@ namespace glm // powerOfTwoBelow template - GLM_FUNC_QUALIFIER genType powerOfTwoBelow(genType value) + GLM_FUNC_QUALIFIER genType powerOfTwoBelow(genType value) GLM_NOEXCEPT { return isPowerOfTwo(value) ? value : highestBitValue(value); } template class vecType> - GLM_FUNC_QUALIFIER vecType powerOfTwoBelow(vecType const & v) + GLM_FUNC_QUALIFIER vecType powerOfTwoBelow(vecType const & v) GLM_NOEXCEPT { return detail::functor1::call(powerOfTwoBelow, v); } @@ -88,7 +88,7 @@ namespace glm // powerOfTwoNearest template - GLM_FUNC_QUALIFIER genType powerOfTwoNearest(genType value) + GLM_FUNC_QUALIFIER genType powerOfTwoNearest(genType value) GLM_NOEXCEPT { if(isPowerOfTwo(value)) return value; @@ -99,7 +99,7 @@ namespace glm } template class vecType> - GLM_FUNC_QUALIFIER vecType powerOfTwoNearest(vecType const & v) + GLM_FUNC_QUALIFIER vecType powerOfTwoNearest(vecType const & v) GLM_NOEXCEPT { return detail::functor1::call(powerOfTwoNearest, v); } diff --git a/glm/gtx/closest_point.hpp b/glm/gtx/closest_point.hpp index 0e5a1874..0075fb81 100644 --- a/glm/gtx/closest_point.hpp +++ b/glm/gtx/closest_point.hpp @@ -53,20 +53,20 @@ namespace glm /// @addtogroup gtx_closest_point /// @{ - /// Find the point on a straight line which is the closet of a point. + /// Find the point on a straight line which is the closet of a point. /// @see gtx_closest_point template GLM_FUNC_DECL tvec3 closestPointOnLine( tvec3 const & point, - tvec3 const & a, - tvec3 const & b); - - /// 2d lines work as well + tvec3 const & a, + tvec3 const & b) GLM_NOEXCEPT; + + /// 2d lines work as well template GLM_FUNC_DECL tvec2 closestPointOnLine( tvec2 const & point, - tvec2 const & a, - tvec2 const & b); + tvec2 const & a, + tvec2 const & b) GLM_NOEXCEPT; /// @} }// namespace glm diff --git a/glm/gtx/closest_point.inl b/glm/gtx/closest_point.inl index 89bb1a88..e4db9183 100644 --- a/glm/gtx/closest_point.inl +++ b/glm/gtx/closest_point.inl @@ -38,7 +38,7 @@ namespace glm tvec3 const & point, tvec3 const & a, tvec3 const & b - ) + ) GLM_NOEXCEPT { T LineLength = distance(a, b); tvec3 Vector = point - a; @@ -51,14 +51,14 @@ namespace glm if(Distance >= LineLength) return b; return a + LineDirection * Distance; } - + template GLM_FUNC_QUALIFIER tvec2 closestPointOnLine ( tvec2 const & point, tvec2 const & a, tvec2 const & b - ) + ) GLM_NOEXCEPT { T LineLength = distance(a, b); tvec2 Vector = point - a; @@ -71,5 +71,5 @@ namespace glm if(Distance >= LineLength) return b; return a + LineDirection * Distance; } - + }//namespace glm diff --git a/glm/gtx/color_space.hpp b/glm/gtx/color_space.hpp index 16b9d894..56b199d9 100644 --- a/glm/gtx/color_space.hpp +++ b/glm/gtx/color_space.hpp @@ -57,39 +57,39 @@ namespace glm /// @see gtx_color_space template GLM_FUNC_DECL tvec3 rgbColor( - tvec3 const & hsvValue); + tvec3 const & hsvValue) GLM_NOEXCEPT; /// Converts a color from RGB color space to its color in HSV color space. /// @see gtx_color_space template GLM_FUNC_DECL tvec3 hsvColor( - tvec3 const & rgbValue); - + tvec3 const & rgbValue) GLM_NOEXCEPT; + /// Build a saturation matrix. /// @see gtx_color_space template GLM_FUNC_DECL tmat4x4 saturation( - T const s); + T const s) GLM_NOEXCEPT; /// Modify the saturation of a color. /// @see gtx_color_space template GLM_FUNC_DECL tvec3 saturation( T const s, - tvec3 const & color); - + tvec3 const & color) GLM_NOEXCEPT; + /// Modify the saturation of a color. /// @see gtx_color_space template GLM_FUNC_DECL tvec4 saturation( T const s, - tvec4 const & color); - + tvec4 const & color) GLM_NOEXCEPT; + /// Compute color luminosity associating ratios (0.33, 0.59, 0.11) to RGB canals. /// @see gtx_color_space template GLM_FUNC_DECL T luminosity( - tvec3 const & color); + tvec3 const & color) GLM_NOEXCEPT; /// @} }//namespace glm diff --git a/glm/gtx/color_space.inl b/glm/gtx/color_space.inl index 76333b76..b23c9e53 100644 --- a/glm/gtx/color_space.inl +++ b/glm/gtx/color_space.inl @@ -33,7 +33,7 @@ namespace glm { template - GLM_FUNC_QUALIFIER tvec3 rgbColor(const tvec3& hsvColor) + GLM_FUNC_QUALIFIER tvec3 rgbColor(const tvec3& hsvColor) GLM_NOEXCEPT { tvec3 hsv = hsvColor; tvec3 rgbColor; @@ -90,7 +90,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tvec3 hsvColor(const tvec3& rgbColor) + GLM_FUNC_QUALIFIER tvec3 hsvColor(const tvec3& rgbColor) GLM_NOEXCEPT { tvec3 hsv = rgbColor; float Min = min(min(rgbColor.r, rgbColor.g), rgbColor.b); @@ -130,7 +130,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat4x4 saturation(T const s) + GLM_FUNC_QUALIFIER tmat4x4 saturation(T const s) GLM_NOEXCEPT { tvec3 rgbw = tvec3(T(0.2126), T(0.7152), T(0.0722)); @@ -152,19 +152,19 @@ namespace glm } template - GLM_FUNC_QUALIFIER tvec3 saturation(const T s, const tvec3& color) + GLM_FUNC_QUALIFIER tvec3 saturation(const T s, const tvec3& color) GLM_NOEXCEPT { return tvec3(saturation(s) * tvec4(color, T(0))); } template - GLM_FUNC_QUALIFIER tvec4 saturation(const T s, const tvec4& color) + GLM_FUNC_QUALIFIER tvec4 saturation(const T s, const tvec4& color) GLM_NOEXCEPT { return saturation(s) * color; } - template - GLM_FUNC_QUALIFIER T luminosity(const tvec3& color) + template + GLM_FUNC_QUALIFIER T luminosity(const tvec3& color) GLM_NOEXCEPT { const tvec3 tmp = tvec3(0.33, 0.59, 0.11); return dot(color, tmp); diff --git a/glm/gtx/color_space_YCoCg.hpp b/glm/gtx/color_space_YCoCg.hpp index 4fbbf820..c6ab238e 100644 --- a/glm/gtx/color_space_YCoCg.hpp +++ b/glm/gtx/color_space_YCoCg.hpp @@ -57,27 +57,27 @@ namespace glm /// @see gtx_color_space_YCoCg template GLM_FUNC_DECL tvec3 rgb2YCoCg( - tvec3 const & rgbColor); + tvec3 const & rgbColor) GLM_NOEXCEPT; /// Convert a color from YCoCg color space to RGB color space. /// @see gtx_color_space_YCoCg template GLM_FUNC_DECL tvec3 YCoCg2rgb( - tvec3 const & YCoCgColor); + tvec3 const & YCoCgColor) GLM_NOEXCEPT; /// Convert a color from RGB color space to YCoCgR color space. /// @see "YCoCg-R: A Color Space with RGB Reversibility and Low Dynamic Range" /// @see gtx_color_space_YCoCg template GLM_FUNC_DECL tvec3 rgb2YCoCgR( - tvec3 const & rgbColor); + tvec3 const & rgbColor) GLM_NOEXCEPT; /// Convert a color from YCoCgR color space to RGB color space. /// @see "YCoCg-R: A Color Space with RGB Reversibility and Low Dynamic Range" /// @see gtx_color_space_YCoCg template GLM_FUNC_DECL tvec3 YCoCgR2rgb( - tvec3 const & YCoCgColor); + tvec3 const & YCoCgColor) GLM_NOEXCEPT; /// @} }//namespace glm diff --git a/glm/gtx/color_space_YCoCg.inl b/glm/gtx/color_space_YCoCg.inl index 45e41671..f8555ed3 100644 --- a/glm/gtx/color_space_YCoCg.inl +++ b/glm/gtx/color_space_YCoCg.inl @@ -36,7 +36,7 @@ namespace glm GLM_FUNC_QUALIFIER tvec3 rgb2YCoCg ( tvec3 const & rgbColor - ) + ) GLM_NOEXCEPT { tvec3 result; result.x/*Y */ = rgbColor.r / T(4) + rgbColor.g / T(2) + rgbColor.b / T(4); @@ -49,7 +49,7 @@ namespace glm GLM_FUNC_QUALIFIER tvec3 YCoCg2rgb ( tvec3 const & YCoCgColor - ) + ) GLM_NOEXCEPT { tvec3 result; result.r = YCoCgColor.x + YCoCgColor.y - YCoCgColor.z; @@ -64,7 +64,7 @@ namespace glm static GLM_FUNC_QUALIFIER tvec3 rgb2YCoCgR ( tvec3 const & rgbColor - ) + ) GLM_NOEXCEPT { tvec3 result; result.x/*Y */ = rgbColor.g / T(2) + (rgbColor.r + rgbColor.b) / T(4); @@ -76,7 +76,7 @@ namespace glm static GLM_FUNC_QUALIFIER tvec3 YCoCgR2rgb ( tvec3 const & YCoCgRColor - ) + ) GLM_NOEXCEPT { tvec3 result; T tmp = YCoCgRColor.x - (YCoCgRColor.z / T(2)); @@ -93,7 +93,7 @@ namespace glm static GLM_FUNC_QUALIFIER tvec3 rgb2YCoCgR ( tvec3 const & rgbColor - ) + ) GLM_NOEXCEPT { tvec3 result; result.y/*Co*/ = rgbColor.r - rgbColor.b; @@ -106,7 +106,7 @@ namespace glm static GLM_FUNC_QUALIFIER tvec3 YCoCgR2rgb ( tvec3 const & YCoCgRColor - ) + ) GLM_NOEXCEPT { tvec3 result; T tmp = YCoCgRColor.x - (YCoCgRColor.z >> 1); @@ -121,7 +121,7 @@ namespace glm GLM_FUNC_QUALIFIER tvec3 rgb2YCoCgR ( tvec3 const & rgbColor - ) + ) GLM_NOEXCEPT { return compute_YCoCgR::is_integer>::rgb2YCoCgR(rgbColor); } @@ -130,7 +130,7 @@ namespace glm GLM_FUNC_QUALIFIER tvec3 YCoCgR2rgb ( tvec3 const & YCoCgRColor - ) + ) GLM_NOEXCEPT { return compute_YCoCgR::is_integer>::YCoCgR2rgb(YCoCgRColor); } diff --git a/glm/gtx/common.hpp b/glm/gtx/common.hpp index 0c11f843..bfa53df4 100644 --- a/glm/gtx/common.hpp +++ b/glm/gtx/common.hpp @@ -65,8 +65,8 @@ namespace glm /// /// @see GLSL isnan man page /// @see GLSL 4.20.8 specification, section 8.3 Common Functions - template - GLM_FUNC_DECL typename genType::bool_type isdenormal(genType const & x); + template + GLM_FUNC_DECL typename genType::bool_type isdenormal(genType const & x) GLM_NOEXCEPT; /// Similiar to 'mod' but with a different rounding and integer support. /// Returns 'x - y * trunc(x/y)' instead of 'x - y * floor(x/y)' @@ -74,7 +74,7 @@ namespace glm /// @see GLSL mod vs HLSL fmod /// @see GLSL mod man page template class vecType> - GLM_FUNC_DECL vecType fmod(vecType const & v); + GLM_FUNC_DECL vecType fmod(vecType const & v) GLM_NOEXCEPT; /// @} }//namespace glm diff --git a/glm/gtx/common.inl b/glm/gtx/common.inl index 337abfeb..deaa4612 100644 --- a/glm/gtx/common.inl +++ b/glm/gtx/common.inl @@ -38,7 +38,7 @@ namespace detail template class vecType, bool isFloat = true> struct compute_fmod { - GLM_FUNC_QUALIFIER static vecType call(vecType const & a, vecType const & b) + GLM_FUNC_QUALIFIER static vecType call(vecType const & a, vecType const & b) GLM_NOEXCEPT { return detail::functor2::call(std::fmod, a, b); } @@ -47,15 +47,15 @@ namespace detail template class vecType> struct compute_fmod { - GLM_FUNC_QUALIFIER static vecType call(vecType const & a, vecType const & b) + GLM_FUNC_QUALIFIER static vecType call(vecType const & a, vecType const & b) GLM_NOEXCEPT { return a % b; } }; }//namespace detail - template - GLM_FUNC_QUALIFIER bool isdenormal(T const & x) + template + GLM_FUNC_QUALIFIER bool isdenormal(T const & x) GLM_NOEXCEPT { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'isdenormal' only accept floating-point inputs"); @@ -70,7 +70,7 @@ namespace detail GLM_FUNC_QUALIFIER typename tvec1::bool_type isdenormal ( tvec1 const & x - ) + ) GLM_NOEXCEPT { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'isdenormal' only accept floating-point inputs"); @@ -82,7 +82,7 @@ namespace detail GLM_FUNC_QUALIFIER typename tvec2::bool_type isdenormal ( tvec2 const & x - ) + ) GLM_NOEXCEPT { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'isdenormal' only accept floating-point inputs"); @@ -95,7 +95,7 @@ namespace detail GLM_FUNC_QUALIFIER typename tvec3::bool_type isdenormal ( tvec3 const & x - ) + ) GLM_NOEXCEPT { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'isdenormal' only accept floating-point inputs"); @@ -109,7 +109,7 @@ namespace detail GLM_FUNC_QUALIFIER typename tvec4::bool_type isdenormal ( tvec4 const & x - ) + ) GLM_NOEXCEPT { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'isdenormal' only accept floating-point inputs"); @@ -122,19 +122,19 @@ namespace detail // fmod template - GLM_FUNC_QUALIFIER genType fmod(genType x, genType y) + GLM_FUNC_QUALIFIER genType fmod(genType x, genType y) GLM_NOEXCEPT { return fmod(tvec1(x), y).x; } template class vecType> - GLM_FUNC_QUALIFIER vecType fmod(vecType const & x, T y) + GLM_FUNC_QUALIFIER vecType fmod(vecType const & x, T y) GLM_NOEXCEPT { return detail::compute_fmod::is_iec559>::call(x, vecType(y)); } template class vecType> - GLM_FUNC_QUALIFIER vecType fmod(vecType const & x, vecType const & y) + GLM_FUNC_QUALIFIER vecType fmod(vecType const & x, vecType const & y) GLM_NOEXCEPT { return detail::compute_fmod::is_iec559>::call(x, y); } diff --git a/glm/gtx/compatibility.hpp b/glm/gtx/compatibility.hpp index 5b3f0513..fe7e5760 100644 --- a/glm/gtx/compatibility.hpp +++ b/glm/gtx/compatibility.hpp @@ -64,30 +64,30 @@ namespace glm /// @addtogroup gtx_compatibility /// @{ - template GLM_FUNC_QUALIFIER T lerp(T x, T y, T a){return mix(x, y, a);} //!< \brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) - template GLM_FUNC_QUALIFIER tvec2 lerp(const tvec2& x, const tvec2& y, T a){return mix(x, y, a);} //!< \brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) + template GLM_FUNC_QUALIFIER T lerp(T x, T y, T a) GLM_NOEXCEPT {return mix(x, y, a);} //!< \brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) + template GLM_FUNC_QUALIFIER tvec2 lerp(const tvec2& x, const tvec2& y, T a) GLM_NOEXCEPT {return mix(x, y, a);} //!< \brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) - template GLM_FUNC_QUALIFIER tvec3 lerp(const tvec3& x, const tvec3& y, T a){return mix(x, y, a);} //!< \brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) - template GLM_FUNC_QUALIFIER tvec4 lerp(const tvec4& x, const tvec4& y, T a){return mix(x, y, a);} //!< \brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) - template GLM_FUNC_QUALIFIER tvec2 lerp(const tvec2& x, const tvec2& y, const tvec2& a){return mix(x, y, a);} //!< \brief Returns the component-wise result of x * (1.0 - a) + y * a, i.e., the linear blend of x and y using vector a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) - template GLM_FUNC_QUALIFIER tvec3 lerp(const tvec3& x, const tvec3& y, const tvec3& a){return mix(x, y, a);} //!< \brief Returns the component-wise result of x * (1.0 - a) + y * a, i.e., the linear blend of x and y using vector a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) - template GLM_FUNC_QUALIFIER tvec4 lerp(const tvec4& x, const tvec4& y, const tvec4& a){return mix(x, y, a);} //!< \brief Returns the component-wise result of x * (1.0 - a) + y * a, i.e., the linear blend of x and y using vector a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) + template GLM_FUNC_QUALIFIER tvec3 lerp(const tvec3& x, const tvec3& y, T a) GLM_NOEXCEPT {return mix(x, y, a);} //!< \brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) + template GLM_FUNC_QUALIFIER tvec4 lerp(const tvec4& x, const tvec4& y, T a) GLM_NOEXCEPT {return mix(x, y, a);} //!< \brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) + template GLM_FUNC_QUALIFIER tvec2 lerp(const tvec2& x, const tvec2& y, const tvec2& a) GLM_NOEXCEPT {return mix(x, y, a);} //!< \brief Returns the component-wise result of x * (1.0 - a) + y * a, i.e., the linear blend of x and y using vector a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) + template GLM_FUNC_QUALIFIER tvec3 lerp(const tvec3& x, const tvec3& y, const tvec3& a) GLM_NOEXCEPT {return mix(x, y, a);} //!< \brief Returns the component-wise result of x * (1.0 - a) + y * a, i.e., the linear blend of x and y using vector a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) + template GLM_FUNC_QUALIFIER tvec4 lerp(const tvec4& x, const tvec4& y, const tvec4& a) GLM_NOEXCEPT {return mix(x, y, a);} //!< \brief Returns the component-wise result of x * (1.0 - a) + y * a, i.e., the linear blend of x and y using vector a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) - template GLM_FUNC_QUALIFIER T saturate(T x){return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility) - template GLM_FUNC_QUALIFIER tvec2 saturate(const tvec2& x){return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility) - template GLM_FUNC_QUALIFIER tvec3 saturate(const tvec3& x){return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility) - template GLM_FUNC_QUALIFIER tvec4 saturate(const tvec4& x){return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility) + template GLM_FUNC_QUALIFIER T saturate(T x) GLM_NOEXCEPT {return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility) + template GLM_FUNC_QUALIFIER tvec2 saturate(const tvec2& x) GLM_NOEXCEPT {return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility) + template GLM_FUNC_QUALIFIER tvec3 saturate(const tvec3& x) GLM_NOEXCEPT {return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility) + template GLM_FUNC_QUALIFIER tvec4 saturate(const tvec4& x) GLM_NOEXCEPT {return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility) - template GLM_FUNC_QUALIFIER T atan2(T x, T y){return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility) - template GLM_FUNC_QUALIFIER tvec2 atan2(const tvec2& x, const tvec2& y){return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility) - template GLM_FUNC_QUALIFIER tvec3 atan2(const tvec3& x, const tvec3& y){return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility) - template GLM_FUNC_QUALIFIER tvec4 atan2(const tvec4& x, const tvec4& y){return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility) + template GLM_FUNC_QUALIFIER T atan2(T x, T y) GLM_NOEXCEPT {return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility) + template GLM_FUNC_QUALIFIER tvec2 atan2(const tvec2& x, const tvec2& y) GLM_NOEXCEPT {return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility) + template GLM_FUNC_QUALIFIER tvec3 atan2(const tvec3& x, const tvec3& y) GLM_NOEXCEPT {return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility) + template GLM_FUNC_QUALIFIER tvec4 atan2(const tvec4& x, const tvec4& y) GLM_NOEXCEPT {return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility) - template GLM_FUNC_DECL bool isfinite(genType const & x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility) - template GLM_FUNC_DECL tvec1 isfinite(const tvec1& x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility) - template GLM_FUNC_DECL tvec2 isfinite(const tvec2& x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility) - template GLM_FUNC_DECL tvec3 isfinite(const tvec3& x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility) - template GLM_FUNC_DECL tvec4 isfinite(const tvec4& x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility) + template GLM_FUNC_DECL bool isfinite(genType const & x) GLM_NOEXCEPT; //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility) + template GLM_FUNC_DECL tvec1 isfinite(const tvec1& x) GLM_NOEXCEPT; //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility) + template GLM_FUNC_DECL tvec2 isfinite(const tvec2& x) GLM_NOEXCEPT; //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility) + template GLM_FUNC_DECL tvec3 isfinite(const tvec3& x) GLM_NOEXCEPT; //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility) + template GLM_FUNC_DECL tvec4 isfinite(const tvec4& x) GLM_NOEXCEPT; //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility) typedef bool bool1; //!< \brief boolean type with 1 component. (From GLM_GTX_compatibility extension) typedef tvec2 bool2; //!< \brief boolean type with 2 components. (From GLM_GTX_compatibility extension) diff --git a/glm/gtx/compatibility.inl b/glm/gtx/compatibility.inl index 77f99d13..b1476889 100644 --- a/glm/gtx/compatibility.inl +++ b/glm/gtx/compatibility.inl @@ -37,7 +37,7 @@ namespace glm // isfinite template GLM_FUNC_QUALIFIER bool isfinite( - genType const & x) + genType const & x) GLM_NOEXCEPT { # if GLM_HAS_CXX11_STL return std::isfinite(x) != 0; @@ -55,7 +55,7 @@ namespace glm template GLM_FUNC_QUALIFIER tvec1 isfinite( - tvec1 const & x) + tvec1 const & x) GLM_NOEXCEPT { return tvec1( isfinite(x.x)); @@ -63,7 +63,7 @@ namespace glm template GLM_FUNC_QUALIFIER tvec2 isfinite( - tvec2 const & x) + tvec2 const & x) GLM_NOEXCEPT { return tvec2( isfinite(x.x), @@ -72,7 +72,7 @@ namespace glm template GLM_FUNC_QUALIFIER tvec3 isfinite( - tvec3 const & x) + tvec3 const & x) GLM_NOEXCEPT { return tvec3( isfinite(x.x), @@ -82,7 +82,7 @@ namespace glm template GLM_FUNC_QUALIFIER tvec4 isfinite( - tvec4 const & x) + tvec4 const & x) GLM_NOEXCEPT { return tvec4( isfinite(x.x), diff --git a/glm/gtx/component_wise.hpp b/glm/gtx/component_wise.hpp index d5b3d818..6873271c 100644 --- a/glm/gtx/component_wise.hpp +++ b/glm/gtx/component_wise.hpp @@ -54,29 +54,29 @@ namespace glm /// @addtogroup gtx_component_wise /// @{ - /// Add all vector components together. + /// Add all vector components together. /// @see gtx_component_wise - template + template GLM_FUNC_DECL typename genType::value_type compAdd( - genType const & v); + genType const & v) GLM_NOEXCEPT; - /// Multiply all vector components together. + /// Multiply all vector components together. /// @see gtx_component_wise - template + template GLM_FUNC_DECL typename genType::value_type compMul( - genType const & v); + genType const & v) GLM_NOEXCEPT; /// Find the minimum value between single vector components. /// @see gtx_component_wise - template + template GLM_FUNC_DECL typename genType::value_type compMin( - genType const & v); + genType const & v) GLM_NOEXCEPT; /// Find the maximum value between single vector components. /// @see gtx_component_wise - template + template GLM_FUNC_DECL typename genType::value_type compMax( - genType const & v); + genType const & v) GLM_NOEXCEPT; /// @} }//namespace glm diff --git a/glm/gtx/component_wise.inl b/glm/gtx/component_wise.inl index f944faeb..0213b7a9 100644 --- a/glm/gtx/component_wise.inl +++ b/glm/gtx/component_wise.inl @@ -33,7 +33,7 @@ namespace glm { template class vecType> - GLM_FUNC_QUALIFIER T compAdd(vecType const & v) + GLM_FUNC_QUALIFIER T compAdd(vecType const & v) GLM_NOEXCEPT { T result(0); for(detail::component_count_t i = 0; i < detail::component_count(v); ++i) @@ -42,7 +42,7 @@ namespace glm } template class vecType> - GLM_FUNC_QUALIFIER T compMul(vecType const & v) + GLM_FUNC_QUALIFIER T compMul(vecType const & v) GLM_NOEXCEPT { T result(1); for(detail::component_count_t i = 0; i < detail::component_count(v); ++i) @@ -51,7 +51,7 @@ namespace glm } template class vecType> - GLM_FUNC_QUALIFIER T compMin(vecType const & v) + GLM_FUNC_QUALIFIER T compMin(vecType const & v) GLM_NOEXCEPT { T result(v[0]); for(detail::component_count_t i = 1; i < detail::component_count(v); ++i) @@ -60,7 +60,7 @@ namespace glm } template class vecType> - GLM_FUNC_QUALIFIER T compMax(vecType const & v) + GLM_FUNC_QUALIFIER T compMax(vecType const & v) GLM_NOEXCEPT { T result(v[0]); for(detail::component_count_t i = 1; i < detail::component_count(v); ++i) diff --git a/glm/gtx/euler_angles.hpp b/glm/gtx/euler_angles.hpp index e772bbf0..c588f1c6 100644 --- a/glm/gtx/euler_angles.hpp +++ b/glm/gtx/euler_angles.hpp @@ -58,114 +58,114 @@ namespace glm /// @see gtx_euler_angles template GLM_FUNC_DECL tmat4x4 eulerAngleX( - T const & angleX); + T const & angleX) GLM_NOEXCEPT; /// Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle Y. /// @see gtx_euler_angles template GLM_FUNC_DECL tmat4x4 eulerAngleY( - T const & angleY); + T const & angleY) GLM_NOEXCEPT; /// Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle Z. /// @see gtx_euler_angles template GLM_FUNC_DECL tmat4x4 eulerAngleZ( - T const & angleZ); + T const & angleZ) GLM_NOEXCEPT; /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Y). /// @see gtx_euler_angles template GLM_FUNC_DECL tmat4x4 eulerAngleXY( T const & angleX, - T const & angleY); + T const & angleY) GLM_NOEXCEPT; /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X). /// @see gtx_euler_angles template GLM_FUNC_DECL tmat4x4 eulerAngleYX( T const & angleY, - T const & angleX); + T const & angleX) GLM_NOEXCEPT; /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Z). /// @see gtx_euler_angles template GLM_FUNC_DECL tmat4x4 eulerAngleXZ( T const & angleX, - T const & angleZ); + T const & angleZ) GLM_NOEXCEPT; /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Z * X). /// @see gtx_euler_angles template GLM_FUNC_DECL tmat4x4 eulerAngleZX( T const & angle, - T const & angleX); + T const & angleX) GLM_NOEXCEPT; /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * Z). /// @see gtx_euler_angles template GLM_FUNC_DECL tmat4x4 eulerAngleYZ( T const & angleY, - T const & angleZ); + T const & angleZ) GLM_NOEXCEPT; /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Z * Y). /// @see gtx_euler_angles template GLM_FUNC_DECL tmat4x4 eulerAngleZY( T const & angleZ, - T const & angleY); + T const & angleY) GLM_NOEXCEPT; + + /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Y * Z). + /// @see gtx_euler_angles + template + GLM_FUNC_DECL tmat4x4 eulerAngleXYZ( + T const & t1, + T const & t2, + T const & t3) GLM_NOEXCEPT; - /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Y * Z). - /// @see gtx_euler_angles - template - GLM_FUNC_DECL tmat4x4 eulerAngleXYZ( - T const & t1, - T const & t2, - T const & t3); - /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z). /// @see gtx_euler_angles template GLM_FUNC_DECL tmat4x4 eulerAngleYXZ( T const & yaw, T const & pitch, - T const & roll); - + T const & roll) GLM_NOEXCEPT; + /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z). /// @see gtx_euler_angles template GLM_FUNC_DECL tmat4x4 yawPitchRoll( T const & yaw, T const & pitch, - T const & roll); + T const & roll) GLM_NOEXCEPT; /// Creates a 2D 2 * 2 rotation matrix from an euler angle. /// @see gtx_euler_angles template - GLM_FUNC_DECL tmat2x2 orientate2(T const & angle); + GLM_FUNC_DECL tmat2x2 orientate2(T const & angle) GLM_NOEXCEPT; /// Creates a 2D 4 * 4 homogeneous rotation matrix from an euler angle. /// @see gtx_euler_angles template - GLM_FUNC_DECL tmat3x3 orientate3(T const & angle); + GLM_FUNC_DECL tmat3x3 orientate3(T const & angle) GLM_NOEXCEPT; - /// Creates a 3D 3 * 3 rotation matrix from euler angles (Y * X * Z). + /// Creates a 3D 3 * 3 rotation matrix from euler angles (Y * X * Z). /// @see gtx_euler_angles template - GLM_FUNC_DECL tmat3x3 orientate3(tvec3 const & angles); - + GLM_FUNC_DECL tmat3x3 orientate3(tvec3 const & angles) GLM_NOEXCEPT; + /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z). /// @see gtx_euler_angles template - GLM_FUNC_DECL tmat4x4 orientate4(tvec3 const & angles); + GLM_FUNC_DECL tmat4x4 orientate4(tvec3 const & angles) GLM_NOEXCEPT; + + /// Extracts the (X * Y * Z) Euler angles from the rotation matrix M + /// @see gtx_euler_angles + template + GLM_FUNC_DECL void extractEulerAngleXYZ(tmat4x4 & M, + T & t1, + T & t2, + T & t3) GLM_NOEXCEPT; - /// Extracts the (X * Y * Z) Euler angles from the rotation matrix M - /// @see gtx_euler_angles - template - GLM_FUNC_DECL void extractEulerAngleXYZ(tmat4x4 & M, - T & t1, - T & t2, - T & t3); - /// @} }//namespace glm diff --git a/glm/gtx/euler_angles.inl b/glm/gtx/euler_angles.inl index 80b30dbe..6aa2604e 100644 --- a/glm/gtx/euler_angles.inl +++ b/glm/gtx/euler_angles.inl @@ -38,7 +38,7 @@ namespace glm GLM_FUNC_QUALIFIER tmat4x4 eulerAngleX ( T const & angleX - ) + ) GLM_NOEXCEPT { T cosX = glm::cos(angleX); T sinX = glm::sin(angleX); @@ -54,7 +54,7 @@ namespace glm GLM_FUNC_QUALIFIER tmat4x4 eulerAngleY ( T const & angleY - ) + ) GLM_NOEXCEPT { T cosY = glm::cos(angleY); T sinY = glm::sin(angleY); @@ -70,7 +70,7 @@ namespace glm GLM_FUNC_QUALIFIER tmat4x4 eulerAngleZ ( T const & angleZ - ) + ) GLM_NOEXCEPT { T cosZ = glm::cos(angleZ); T sinZ = glm::sin(angleZ); @@ -87,7 +87,7 @@ namespace glm ( T const & angleX, T const & angleY - ) + ) GLM_NOEXCEPT { T cosX = glm::cos(angleX); T sinX = glm::sin(angleX); @@ -106,7 +106,7 @@ namespace glm ( T const & angleY, T const & angleX - ) + ) GLM_NOEXCEPT { T cosX = glm::cos(angleX); T sinX = glm::sin(angleX); @@ -125,7 +125,7 @@ namespace glm ( T const & angleX, T const & angleZ - ) + ) GLM_NOEXCEPT { return eulerAngleX(angleX) * eulerAngleZ(angleZ); } @@ -135,7 +135,7 @@ namespace glm ( T const & angleZ, T const & angleX - ) + ) GLM_NOEXCEPT { return eulerAngleZ(angleZ) * eulerAngleX(angleX); } @@ -145,7 +145,7 @@ namespace glm ( T const & angleY, T const & angleZ - ) + ) GLM_NOEXCEPT { return eulerAngleY(angleY) * eulerAngleZ(angleZ); } @@ -155,53 +155,53 @@ namespace glm ( T const & angleZ, T const & angleY - ) + ) GLM_NOEXCEPT { return eulerAngleZ(angleZ) * eulerAngleY(angleY); } - - template - GLM_FUNC_QUALIFIER tmat4x4 eulerAngleXYZ - ( - T const & t1, - T const & t2, - T const & t3 - ) - { - T c1 = glm::cos(-t1); - T c2 = glm::cos(-t2); - T c3 = glm::cos(-t3); - T s1 = glm::sin(-t1); - T s2 = glm::sin(-t2); - T s3 = glm::sin(-t3); - - tmat4x4 Result; - Result[0][0] = c2 * c3; - Result[0][1] =-c1 * s3 + s1 * s2 * c3; - Result[0][2] = s1 * s3 + c1 * s2 * c3; - Result[0][3] = static_cast(0); - Result[1][0] = c2 * s3; - Result[1][1] = c1 * c3 + s1 * s2 * s3; - Result[1][2] =-s1 * c3 + c1 * s2 * s3; - Result[1][3] = static_cast(0); - Result[2][0] =-s2; - Result[2][1] = s1 * c2; - Result[2][2] = c1 * c2; - Result[2][3] = static_cast(0); - Result[3][0] = static_cast(0); - Result[3][1] = static_cast(0); - Result[3][2] = static_cast(0); - Result[3][3] = static_cast(1); - return Result; - } - + + template + GLM_FUNC_QUALIFIER tmat4x4 eulerAngleXYZ + ( + T const & t1, + T const & t2, + T const & t3 + ) GLM_NOEXCEPT + { + T c1 = glm::cos(-t1); + T c2 = glm::cos(-t2); + T c3 = glm::cos(-t3); + T s1 = glm::sin(-t1); + T s2 = glm::sin(-t2); + T s3 = glm::sin(-t3); + + tmat4x4 Result; + Result[0][0] = c2 * c3; + Result[0][1] =-c1 * s3 + s1 * s2 * c3; + Result[0][2] = s1 * s3 + c1 * s2 * c3; + Result[0][3] = static_cast(0); + Result[1][0] = c2 * s3; + Result[1][1] = c1 * c3 + s1 * s2 * s3; + Result[1][2] =-s1 * c3 + c1 * s2 * s3; + Result[1][3] = static_cast(0); + Result[2][0] =-s2; + Result[2][1] = s1 * c2; + Result[2][2] = c1 * c2; + Result[2][3] = static_cast(0); + Result[3][0] = static_cast(0); + Result[3][1] = static_cast(0); + Result[3][2] = static_cast(0); + Result[3][3] = static_cast(1); + return Result; + } + template GLM_FUNC_QUALIFIER tmat4x4 eulerAngleYXZ ( T const & yaw, T const & pitch, T const & roll - ) + ) GLM_NOEXCEPT { T tmp_ch = glm::cos(yaw); T tmp_sh = glm::sin(yaw); @@ -236,7 +236,7 @@ namespace glm T const & yaw, T const & pitch, T const & roll - ) + ) GLM_NOEXCEPT { T tmp_ch = glm::cos(yaw); T tmp_sh = glm::sin(yaw); @@ -269,7 +269,7 @@ namespace glm GLM_FUNC_QUALIFIER tmat2x2 orientate2 ( T const & angle - ) + ) GLM_NOEXCEPT { T c = glm::cos(angle); T s = glm::sin(angle); @@ -286,7 +286,7 @@ namespace glm GLM_FUNC_QUALIFIER tmat3x3 orientate3 ( T const & angle - ) + ) GLM_NOEXCEPT { T c = glm::cos(angle); T s = glm::sin(angle); @@ -308,7 +308,7 @@ namespace glm GLM_FUNC_QUALIFIER tmat3x3 orientate3 ( tvec3 const & angles - ) + ) GLM_NOEXCEPT { return tmat3x3(yawPitchRoll(angles.z, angles.x, angles.y)); } @@ -317,25 +317,25 @@ namespace glm GLM_FUNC_QUALIFIER tmat4x4 orientate4 ( tvec3 const & angles - ) + ) GLM_NOEXCEPT { return yawPitchRoll(angles.z, angles.x, angles.y); } - - template - GLM_FUNC_DECL void extractEulerAngleXYZ(tmat4x4 & M, - T & t1, - T & t2, - T & t3) - { - float T1 = glm::atan2(M[2][1], M[2][2]); - float C2 = glm::sqrt(M[0][0]*M[0][0] + M[1][0]*M[1][0]); - float T2 = glm::atan2(-M[2][0], C2); - float S1 = glm::sin(T1); - float C1 = glm::cos(T1); - float T3 = glm::atan2(S1*M[0][2] - C1*M[0][1], C1*M[1][1] - S1*M[1][2 ]); - t1 = -T1; - t2 = -T2; - t3 = -T3; - } + + template + GLM_FUNC_DECL void extractEulerAngleXYZ(tmat4x4 & M, + T & t1, + T & t2, + T & t3) GLM_NOEXCEPT + { + float T1 = glm::atan2(M[2][1], M[2][2]); + float C2 = glm::sqrt(M[0][0]*M[0][0] + M[1][0]*M[1][0]); + float T2 = glm::atan2(-M[2][0], C2); + float S1 = glm::sin(T1); + float C1 = glm::cos(T1); + float T3 = glm::atan2(S1*M[0][2] - C1*M[0][1], C1*M[1][1] - S1*M[1][2 ]); + t1 = -T1; + t2 = -T2; + t3 = -T3; + } }//namespace glm diff --git a/glm/gtx/extend.hpp b/glm/gtx/extend.hpp index ad3a50a4..8b1a2f5b 100644 --- a/glm/gtx/extend.hpp +++ b/glm/gtx/extend.hpp @@ -55,11 +55,11 @@ namespace glm /// Extends of Length the Origin position using the (Source - Origin) direction. /// @see gtx_extend - template + template GLM_FUNC_DECL genType extend( - genType const & Origin, - genType const & Source, - typename genType::value_type const Length); + genType const & Origin, + genType const & Source, + typename genType::value_type const Length) GLM_NOEXCEPT; /// @} }//namespace glm diff --git a/glm/gtx/extend.inl b/glm/gtx/extend.inl index c8768e26..a2a78fe1 100644 --- a/glm/gtx/extend.inl +++ b/glm/gtx/extend.inl @@ -38,7 +38,7 @@ namespace glm genType const & Origin, genType const & Source, genType const & Distance - ) + ) GLM_NOEXCEPT { return Origin + (Source - Origin) * Distance; } @@ -49,7 +49,7 @@ namespace glm tvec2 const & Origin, tvec2 const & Source, T const & Distance - ) + ) GLM_NOEXCEPT { return Origin + (Source - Origin) * Distance; } @@ -60,7 +60,7 @@ namespace glm tvec3 const & Origin, tvec3 const & Source, T const & Distance - ) + ) GLM_NOEXCEPT { return Origin + (Source - Origin) * Distance; } @@ -71,7 +71,7 @@ namespace glm tvec4 const & Origin, tvec4 const & Source, T const & Distance - ) + ) GLM_NOEXCEPT { return Origin + (Source - Origin) * Distance; } diff --git a/glm/gtx/extented_min_max.hpp b/glm/gtx/extented_min_max.hpp index 08d56f17..900ba7d6 100644 --- a/glm/gtx/extented_min_max.hpp +++ b/glm/gtx/extented_min_max.hpp @@ -58,103 +58,103 @@ namespace glm /// @see gtx_extented_min_max template GLM_FUNC_DECL T min( - T const & x, - T const & y, - T const & z); + T const & x, + T const & y, + T const & z) GLM_NOEXCEPT; /// Return the minimum component-wise values of 3 inputs /// @see gtx_extented_min_max template class C> GLM_FUNC_DECL C min( - C const & x, - typename C::T const & y, - typename C::T const & z); + C const & x, + typename C::T const & y, + typename C::T const & z) GLM_NOEXCEPT; /// Return the minimum component-wise values of 3 inputs /// @see gtx_extented_min_max template class C> GLM_FUNC_DECL C min( - C const & x, - C const & y, - C const & z); + C const & x, + C const & y, + C const & z) GLM_NOEXCEPT; - /// Return the minimum component-wise values of 4 inputs + /// Return the minimum component-wise values of 4 inputs /// @see gtx_extented_min_max template GLM_FUNC_DECL T min( - T const & x, - T const & y, - T const & z, - T const & w); - - /// Return the minimum component-wise values of 4 inputs - /// @see gtx_extented_min_max - template class C> - GLM_FUNC_DECL C min( - C const & x, - typename C::T const & y, - typename C::T const & z, - typename C::T const & w); + T const & x, + T const & y, + T const & z, + T const & w) GLM_NOEXCEPT; /// Return the minimum component-wise values of 4 inputs /// @see gtx_extented_min_max template class C> GLM_FUNC_DECL C min( - C const & x, - C const & y, - C const & z, - C const & w); + C const & x, + typename C::T const & y, + typename C::T const & z, + typename C::T const & w) GLM_NOEXCEPT; - /// Return the maximum component-wise values of 3 inputs + /// Return the minimum component-wise values of 4 inputs + /// @see gtx_extented_min_max + template class C> + GLM_FUNC_DECL C min( + C const & x, + C const & y, + C const & z, + C const & w) GLM_NOEXCEPT; + + /// Return the maximum component-wise values of 3 inputs /// @see gtx_extented_min_max template GLM_FUNC_DECL T max( - T const & x, - T const & y, - T const & z); + T const & x, + T const & y, + T const & z) GLM_NOEXCEPT; /// Return the maximum component-wise values of 3 inputs /// @see gtx_extented_min_max template class C> GLM_FUNC_DECL C max( - C const & x, - typename C::T const & y, - typename C::T const & z); + C const & x, + typename C::T const & y, + typename C::T const & z) GLM_NOEXCEPT; - /// Return the maximum component-wise values of 3 inputs + /// Return the maximum component-wise values of 3 inputs /// @see gtx_extented_min_max template class C> GLM_FUNC_DECL C max( - C const & x, - C const & y, - C const & z); + C const & x, + C const & y, + C const & z) GLM_NOEXCEPT; /// Return the maximum component-wise values of 4 inputs /// @see gtx_extented_min_max template GLM_FUNC_DECL T max( - T const & x, - T const & y, - T const & z, - T const & w); + T const & x, + T const & y, + T const & z, + T const & w) GLM_NOEXCEPT; - /// Return the maximum component-wise values of 4 inputs + /// Return the maximum component-wise values of 4 inputs /// @see gtx_extented_min_max template class C> GLM_FUNC_DECL C max( - C const & x, - typename C::T const & y, - typename C::T const & z, - typename C::T const & w); + C const & x, + typename C::T const & y, + typename C::T const & z, + typename C::T const & w) GLM_NOEXCEPT; - /// Return the maximum component-wise values of 4 inputs + /// Return the maximum component-wise values of 4 inputs /// @see gtx_extented_min_max template class C> GLM_FUNC_DECL C max( - C const & x, - C const & y, - C const & z, - C const & w); + C const & x, + C const & y, + C const & z, + C const & w) GLM_NOEXCEPT; /// @} }//namespace glm diff --git a/glm/gtx/extented_min_max.inl b/glm/gtx/extented_min_max.inl index e54c8479..044e318c 100644 --- a/glm/gtx/extented_min_max.inl +++ b/glm/gtx/extented_min_max.inl @@ -34,9 +34,9 @@ namespace glm { template GLM_FUNC_QUALIFIER T min( - T const & x, - T const & y, - T const & z) + T const & x, + T const & y, + T const & z) GLM_NOEXCEPT { return glm::min(glm::min(x, y), z); } @@ -47,7 +47,7 @@ namespace glm C const & x, typename C::T const & y, typename C::T const & z - ) + ) GLM_NOEXCEPT { return glm::min(glm::min(x, y), z); } @@ -58,7 +58,7 @@ namespace glm C const & x, C const & y, C const & z - ) + ) GLM_NOEXCEPT { return glm::min(glm::min(x, y), z); } @@ -70,7 +70,7 @@ namespace glm T const & y, T const & z, T const & w - ) + ) GLM_NOEXCEPT { return glm::min(glm::min(x, y), glm::min(z, w)); } @@ -82,7 +82,7 @@ namespace glm typename C::T const & y, typename C::T const & z, typename C::T const & w - ) + ) GLM_NOEXCEPT { return glm::min(glm::min(x, y), glm::min(z, w)); } @@ -94,16 +94,16 @@ namespace glm C const & y, C const & z, C const & w - ) + ) GLM_NOEXCEPT { return glm::min(glm::min(x, y), glm::min(z, w)); } template GLM_FUNC_QUALIFIER T max( - T const & x, - T const & y, - T const & z) + T const & x, + T const & y, + T const & z) GLM_NOEXCEPT { return glm::max(glm::max(x, y), z); } @@ -114,7 +114,7 @@ namespace glm C const & x, typename C::T const & y, typename C::T const & z - ) + ) GLM_NOEXCEPT { return glm::max(glm::max(x, y), z); } @@ -125,7 +125,7 @@ namespace glm C const & x, C const & y, C const & z - ) + ) GLM_NOEXCEPT { return glm::max(glm::max(x, y), z); } @@ -137,7 +137,7 @@ namespace glm T const & y, T const & z, T const & w - ) + ) GLM_NOEXCEPT { return glm::max(glm::max(x, y), glm::max(z, w)); } @@ -149,7 +149,7 @@ namespace glm typename C::T const & y, typename C::T const & z, typename C::T const & w - ) + ) GLM_NOEXCEPT { return glm::max(glm::max(x, y), glm::max(z, w)); } @@ -161,7 +161,7 @@ namespace glm C const & y, C const & z, C const & w - ) + ) GLM_NOEXCEPT { return glm::max(glm::max(x, y), glm::max(z, w)); } diff --git a/glm/gtx/fast_exponential.hpp b/glm/gtx/fast_exponential.hpp index 15b7d1da..83166263 100644 --- a/glm/gtx/fast_exponential.hpp +++ b/glm/gtx/fast_exponential.hpp @@ -57,62 +57,62 @@ namespace glm /// Faster than the common pow function but less accurate. /// @see gtx_fast_exponential template - GLM_FUNC_DECL genType fastPow(genType x, genType y); + GLM_FUNC_DECL genType fastPow(genType x, genType y) GLM_NOEXCEPT; /// Faster than the common pow function but less accurate. /// @see gtx_fast_exponential template class vecType> - GLM_FUNC_DECL vecType fastPow(vecType const & x, vecType const & y); + GLM_FUNC_DECL vecType fastPow(vecType const & x, vecType const & y) GLM_NOEXCEPT; /// Faster than the common pow function but less accurate. /// @see gtx_fast_exponential template - GLM_FUNC_DECL genTypeT fastPow(genTypeT x, genTypeU y); + GLM_FUNC_DECL genTypeT fastPow(genTypeT x, genTypeU y) GLM_NOEXCEPT; /// Faster than the common pow function but less accurate. /// @see gtx_fast_exponential template class vecType> - GLM_FUNC_DECL vecType fastPow(vecType const & x); + GLM_FUNC_DECL vecType fastPow(vecType const & x) GLM_NOEXCEPT; /// Faster than the common exp function but less accurate. /// @see gtx_fast_exponential template - GLM_FUNC_DECL T fastExp(T x); + GLM_FUNC_DECL T fastExp(T x) GLM_NOEXCEPT; /// Faster than the common exp function but less accurate. /// @see gtx_fast_exponential template class vecType> - GLM_FUNC_DECL vecType fastExp(vecType const & x); + GLM_FUNC_DECL vecType fastExp(vecType const & x) GLM_NOEXCEPT; /// Faster than the common log function but less accurate. /// @see gtx_fast_exponential template - GLM_FUNC_DECL T fastLog(T x); + GLM_FUNC_DECL T fastLog(T x) GLM_NOEXCEPT; /// Faster than the common exp2 function but less accurate. /// @see gtx_fast_exponential template class vecType> - GLM_FUNC_DECL vecType fastLog(vecType const & x); + GLM_FUNC_DECL vecType fastLog(vecType const & x) GLM_NOEXCEPT; /// Faster than the common exp2 function but less accurate. /// @see gtx_fast_exponential template - GLM_FUNC_DECL T fastExp2(T x); + GLM_FUNC_DECL T fastExp2(T x) GLM_NOEXCEPT; /// Faster than the common exp2 function but less accurate. /// @see gtx_fast_exponential template class vecType> - GLM_FUNC_DECL vecType fastExp2(vecType const & x); + GLM_FUNC_DECL vecType fastExp2(vecType const & x) GLM_NOEXCEPT; /// Faster than the common log2 function but less accurate. /// @see gtx_fast_exponential template - GLM_FUNC_DECL T fastLog2(T x); + GLM_FUNC_DECL T fastLog2(T x) GLM_NOEXCEPT; /// Faster than the common log2 function but less accurate. /// @see gtx_fast_exponential template class vecType> - GLM_FUNC_DECL vecType fastLog2(vecType const & x); + GLM_FUNC_DECL vecType fastLog2(vecType const & x) GLM_NOEXCEPT; /// @} }//namespace glm diff --git a/glm/gtx/fast_exponential.inl b/glm/gtx/fast_exponential.inl index 9cf882c2..e00e47ce 100644 --- a/glm/gtx/fast_exponential.inl +++ b/glm/gtx/fast_exponential.inl @@ -34,19 +34,19 @@ namespace glm { // fastPow: template - GLM_FUNC_QUALIFIER genType fastPow(genType x, genType y) + GLM_FUNC_QUALIFIER genType fastPow(genType x, genType y) GLM_NOEXCEPT { return exp(y * log(x)); } template class vecType> - GLM_FUNC_QUALIFIER vecType fastPow(vecType const & x, vecType const & y) + GLM_FUNC_QUALIFIER vecType fastPow(vecType const & x, vecType const & y) GLM_NOEXCEPT { return exp(y * log(x)); } template - GLM_FUNC_QUALIFIER T fastPow(T x, int y) + GLM_FUNC_QUALIFIER T fastPow(T x, int y) GLM_NOEXCEPT { T f = static_cast(1); for(int i = 0; i < y; ++i) @@ -55,7 +55,7 @@ namespace glm } template class vecType> - GLM_FUNC_QUALIFIER vecType fastPow(vecType const & x, vecType const & y) + GLM_FUNC_QUALIFIER vecType fastPow(vecType const & x, vecType const & y) GLM_NOEXCEPT { vecType Result(uninitialize); for(detail::component_count_t i = 0; i < detail::component_count(x); ++i) @@ -66,7 +66,7 @@ namespace glm // fastExp // Note: This function provides accurate results only for value between -1 and 1, else avoid it. template - GLM_FUNC_QUALIFIER T fastExp(T x) + GLM_FUNC_QUALIFIER T fastExp(T x) GLM_NOEXCEPT { // This has a better looking and same performance in release mode than the following code. However, in debug mode it's slower. // return 1.0f + x * (1.0f + x * 0.5f * (1.0f + x * 0.3333333333f * (1.0f + x * 0.25 * (1.0f + x * 0.2f)))); @@ -77,7 +77,7 @@ namespace glm return T(1) + x + (x2 * T(0.5)) + (x3 * T(0.1666666667)) + (x4 * T(0.041666667)) + (x5 * T(0.008333333333)); } /* // Try to handle all values of float... but often shower than std::exp, glm::floor and the loop kill the performance - GLM_FUNC_QUALIFIER float fastExp(float x) + GLM_FUNC_QUALIFIER float fastExp(float x) GLM_NOEXCEPT { const float e = 2.718281828f; const float IntegerPart = floor(x); @@ -95,7 +95,7 @@ namespace glm } // Increase accuracy on number bigger that 1 and smaller than -1 but it's not enough for high and negative numbers - GLM_FUNC_QUALIFIER float fastExp(float x) + GLM_FUNC_QUALIFIER float fastExp(float x) GLM_NOEXCEPT { // This has a better looking and same performance in release mode than the following code. However, in debug mode it's slower. // return 1.0f + x * (1.0f + x * 0.5f * (1.0f + x * 0.3333333333f * (1.0f + x * 0.25 * (1.0f + x * 0.2f)))); @@ -111,20 +111,20 @@ namespace glm */ template class vecType> - GLM_FUNC_QUALIFIER vecType fastExp(vecType const & x) + GLM_FUNC_QUALIFIER vecType fastExp(vecType const & x) GLM_NOEXCEPT { return detail::functor1::call(fastExp, x); } // fastLog template - GLM_FUNC_QUALIFIER genType fastLog(genType x) + GLM_FUNC_QUALIFIER genType fastLog(genType x) GLM_NOEXCEPT { return std::log(x); } /* Slower than the VC7.1 function... - GLM_FUNC_QUALIFIER float fastLog(float x) + GLM_FUNC_QUALIFIER float fastLog(float x) GLM_NOEXCEPT { float y1 = (x - 1.0f) / (x + 1.0f); float y2 = y1 * y1; @@ -133,33 +133,33 @@ namespace glm */ template class vecType> - GLM_FUNC_QUALIFIER vecType fastLog(vecType const & x) + GLM_FUNC_QUALIFIER vecType fastLog(vecType const & x) GLM_NOEXCEPT { return detail::functor1::call(fastLog, x); } //fastExp2, ln2 = 0.69314718055994530941723212145818f template - GLM_FUNC_QUALIFIER genType fastExp2(genType x) + GLM_FUNC_QUALIFIER genType fastExp2(genType x) GLM_NOEXCEPT { return fastExp(0.69314718055994530941723212145818f * x); } template class vecType> - GLM_FUNC_QUALIFIER vecType fastExp2(vecType const & x) + GLM_FUNC_QUALIFIER vecType fastExp2(vecType const & x) GLM_NOEXCEPT { return detail::functor1::call(fastExp2, x); } // fastLog2, ln2 = 0.69314718055994530941723212145818f template - GLM_FUNC_QUALIFIER genType fastLog2(genType x) + GLM_FUNC_QUALIFIER genType fastLog2(genType x) GLM_NOEXCEPT { return fastLog(x) / 0.69314718055994530941723212145818f; } template class vecType> - GLM_FUNC_QUALIFIER vecType fastLog2(vecType const & x) + GLM_FUNC_QUALIFIER vecType fastLog2(vecType const & x) GLM_NOEXCEPT { return detail::functor1::call(fastLog2, x); } diff --git a/glm/gtx/fast_square_root.hpp b/glm/gtx/fast_square_root.hpp index 2073df41..de622b23 100644 --- a/glm/gtx/fast_square_root.hpp +++ b/glm/gtx/fast_square_root.hpp @@ -60,56 +60,56 @@ namespace glm /// Faster than the common sqrt function but less accurate. /// /// @see gtx_fast_square_root extension. - template - GLM_FUNC_DECL genType fastSqrt(genType x); + template + GLM_FUNC_DECL genType fastSqrt(genType x) GLM_NOEXCEPT; /// Faster than the common sqrt function but less accurate. /// /// @see gtx_fast_square_root extension. template class vecType> - GLM_FUNC_DECL vecType fastSqrt(vecType const & x); + GLM_FUNC_DECL vecType fastSqrt(vecType const & x) GLM_NOEXCEPT; /// Faster than the common inversesqrt function but less accurate. /// /// @see gtx_fast_square_root extension. - template - GLM_FUNC_DECL genType fastInverseSqrt(genType x); + template + GLM_FUNC_DECL genType fastInverseSqrt(genType x) GLM_NOEXCEPT; /// Faster than the common inversesqrt function but less accurate. /// /// @see gtx_fast_square_root extension. template class vecType> - GLM_FUNC_DECL vecType fastInverseSqrt(vecType const & x); + GLM_FUNC_DECL vecType fastInverseSqrt(vecType const & x) GLM_NOEXCEPT; /// Faster than the common length function but less accurate. /// /// @see gtx_fast_square_root extension. template - GLM_FUNC_DECL genType fastLength(genType x); + GLM_FUNC_DECL genType fastLength(genType x) GLM_NOEXCEPT; /// Faster than the common length function but less accurate. /// /// @see gtx_fast_square_root extension. template class vecType> - GLM_FUNC_DECL T fastLength(vecType const & x); + GLM_FUNC_DECL T fastLength(vecType const & x) GLM_NOEXCEPT; /// Faster than the common distance function but less accurate. /// /// @see gtx_fast_square_root extension. template - GLM_FUNC_DECL genType fastDistance(genType x, genType y); + GLM_FUNC_DECL genType fastDistance(genType x, genType y) GLM_NOEXCEPT; /// Faster than the common distance function but less accurate. /// /// @see gtx_fast_square_root extension. template class vecType> - GLM_FUNC_DECL T fastDistance(vecType const & x, vecType const & y); + GLM_FUNC_DECL T fastDistance(vecType const & x, vecType const & y) GLM_NOEXCEPT; /// Faster than the common normalize function but less accurate. /// /// @see gtx_fast_square_root extension. - template - GLM_FUNC_DECL genType fastNormalize(genType const & x); + template + GLM_FUNC_DECL genType fastNormalize(genType const & x) GLM_NOEXCEPT; /// @} }// namespace glm diff --git a/glm/gtx/fast_square_root.inl b/glm/gtx/fast_square_root.inl index 9db769dd..81854f65 100644 --- a/glm/gtx/fast_square_root.inl +++ b/glm/gtx/fast_square_root.inl @@ -34,7 +34,7 @@ namespace glm { // fastSqrt template - GLM_FUNC_QUALIFIER genType fastSqrt(genType x) + GLM_FUNC_QUALIFIER genType fastSqrt(genType x) GLM_NOEXCEPT { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'fastSqrt' only accept floating-point input"); @@ -42,14 +42,14 @@ namespace glm } template class vecType> - GLM_FUNC_QUALIFIER vecType fastSqrt(vecType const & x) + GLM_FUNC_QUALIFIER vecType fastSqrt(vecType const & x) GLM_NOEXCEPT { return detail::functor1::call(fastSqrt, x); } // fastInversesqrt template - GLM_FUNC_QUALIFIER genType fastInverseSqrt(genType x) + GLM_FUNC_QUALIFIER genType fastInverseSqrt(genType x) GLM_NOEXCEPT { # ifdef __CUDACC__ // Wordaround for a CUDA compiler bug up to CUDA6 tvec1 tmp(detail::compute_inversesqrt::call(tvec1(x))); @@ -60,14 +60,14 @@ namespace glm } template class vecType> - GLM_FUNC_QUALIFIER vecType fastInverseSqrt(vecType const & x) + GLM_FUNC_QUALIFIER vecType fastInverseSqrt(vecType const & x) GLM_NOEXCEPT { return detail::compute_inversesqrt::call(x); } // fastLength template - GLM_FUNC_QUALIFIER genType fastLength(genType x) + GLM_FUNC_QUALIFIER genType fastLength(genType x) GLM_NOEXCEPT { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'fastLength' only accept floating-point inputs"); @@ -75,7 +75,7 @@ namespace glm } template class vecType> - GLM_FUNC_QUALIFIER T fastLength(vecType const & x) + GLM_FUNC_QUALIFIER T fastLength(vecType const & x) GLM_NOEXCEPT { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'fastLength' only accept floating-point inputs"); @@ -84,26 +84,26 @@ namespace glm // fastDistance template - GLM_FUNC_QUALIFIER genType fastDistance(genType x, genType y) + GLM_FUNC_QUALIFIER genType fastDistance(genType x, genType y) GLM_NOEXCEPT { return fastLength(y - x); } template class vecType> - GLM_FUNC_QUALIFIER T fastDistance(vecType const & x, vecType const & y) + GLM_FUNC_QUALIFIER T fastDistance(vecType const & x, vecType const & y) GLM_NOEXCEPT { return fastLength(y - x); } // fastNormalize template - GLM_FUNC_QUALIFIER genType fastNormalize(genType x) + GLM_FUNC_QUALIFIER genType fastNormalize(genType x) GLM_NOEXCEPT { return x > genType(0) ? genType(1) : -genType(1); } template class vecType> - GLM_FUNC_QUALIFIER vecType fastNormalize(vecType const & x) + GLM_FUNC_QUALIFIER vecType fastNormalize(vecType const & x) GLM_NOEXCEPT { return x * fastInverseSqrt(dot(x, x)); } diff --git a/glm/gtx/fast_trigonometry.hpp b/glm/gtx/fast_trigonometry.hpp index 93c38ab2..8313a222 100644 --- a/glm/gtx/fast_trigonometry.hpp +++ b/glm/gtx/fast_trigonometry.hpp @@ -55,48 +55,48 @@ namespace glm /// Wrap an angle to [0 2pi[ /// From GLM_GTX_fast_trigonometry extension. - template - GLM_FUNC_DECL T wrapAngle(T angle); + template + GLM_FUNC_DECL T wrapAngle(T angle) GLM_NOEXCEPT; /// Faster than the common sin function but less accurate. /// From GLM_GTX_fast_trigonometry extension. template - GLM_FUNC_DECL T fastSin(T angle); + GLM_FUNC_DECL T fastSin(T angle) GLM_NOEXCEPT; /// Faster than the common cos function but less accurate. /// From GLM_GTX_fast_trigonometry extension. - template - GLM_FUNC_DECL T fastCos(T angle); + template + GLM_FUNC_DECL T fastCos(T angle) GLM_NOEXCEPT; /// Faster than the common tan function but less accurate. /// Defined between -2pi and 2pi. /// From GLM_GTX_fast_trigonometry extension. - template - GLM_FUNC_DECL T fastTan(T angle); + template + GLM_FUNC_DECL T fastTan(T angle) GLM_NOEXCEPT; /// Faster than the common asin function but less accurate. /// Defined between -2pi and 2pi. /// From GLM_GTX_fast_trigonometry extension. - template - GLM_FUNC_DECL T fastAsin(T angle); + template + GLM_FUNC_DECL T fastAsin(T angle) GLM_NOEXCEPT; /// Faster than the common acos function but less accurate. /// Defined between -2pi and 2pi. /// From GLM_GTX_fast_trigonometry extension. - template - GLM_FUNC_DECL T fastAcos(T angle); + template + GLM_FUNC_DECL T fastAcos(T angle) GLM_NOEXCEPT; /// Faster than the common atan function but less accurate. /// Defined between -2pi and 2pi. /// From GLM_GTX_fast_trigonometry extension. - template - GLM_FUNC_DECL T fastAtan(T y, T x); + template + GLM_FUNC_DECL T fastAtan(T y, T x) GLM_NOEXCEPT; /// Faster than the common atan function but less accurate. /// Defined between -2pi and 2pi. /// From GLM_GTX_fast_trigonometry extension. - template - GLM_FUNC_DECL T fastAtan(T angle); + template + GLM_FUNC_DECL T fastAtan(T angle) GLM_NOEXCEPT; /// @} }//namespace glm diff --git a/glm/gtx/fast_trigonometry.inl b/glm/gtx/fast_trigonometry.inl index b8c65810..7561625f 100644 --- a/glm/gtx/fast_trigonometry.inl +++ b/glm/gtx/fast_trigonometry.inl @@ -34,7 +34,7 @@ namespace glm{ namespace detail { template class vecType> - GLM_FUNC_QUALIFIER vecType taylorCos(vecType const & x) + GLM_FUNC_QUALIFIER vecType taylorCos(vecType const & x) GLM_NOEXCEPT { return static_cast(1) - (x * x) / 2.f @@ -44,14 +44,14 @@ namespace detail } template - GLM_FUNC_QUALIFIER T cos_52s(T x) + GLM_FUNC_QUALIFIER T cos_52s(T x) GLM_NOEXCEPT { T const xx(x * x); return (T(0.9999932946) + xx * (T(-0.4999124376) + xx * (T(0.0414877472) + xx * T(-0.0012712095)))); } template class vecType> - GLM_FUNC_QUALIFIER vecType cos_52s(vecType const & x) + GLM_FUNC_QUALIFIER vecType cos_52s(vecType const & x) GLM_NOEXCEPT { return detail::functor1::call(cos_52s, x); } @@ -59,20 +59,20 @@ namespace detail // wrapAngle template - GLM_FUNC_QUALIFIER T wrapAngle(T angle) + GLM_FUNC_QUALIFIER T wrapAngle(T angle) GLM_NOEXCEPT { return abs(mod(angle, two_pi())); } template class vecType> - GLM_FUNC_QUALIFIER vecType wrapAngle(vecType const & x) + GLM_FUNC_QUALIFIER vecType wrapAngle(vecType const & x) GLM_NOEXCEPT { return detail::functor1::call(wrapAngle, x); } // cos - template - GLM_FUNC_QUALIFIER T fastCos(T x) + template + GLM_FUNC_QUALIFIER T fastCos(T x) GLM_NOEXCEPT { T const angle(wrapAngle(x)); @@ -87,85 +87,85 @@ namespace detail } template class vecType> - GLM_FUNC_QUALIFIER vecType fastCos(vecType const & x) + GLM_FUNC_QUALIFIER vecType fastCos(vecType const & x) GLM_NOEXCEPT { return detail::functor1::call(fastCos, x); } // sin - template - GLM_FUNC_QUALIFIER T fastSin(T x) + template + GLM_FUNC_QUALIFIER T fastSin(T x) GLM_NOEXCEPT { return fastCos(half_pi() - x); } template class vecType> - GLM_FUNC_QUALIFIER vecType fastSin(vecType const & x) + GLM_FUNC_QUALIFIER vecType fastSin(vecType const & x) GLM_NOEXCEPT { return detail::functor1::call(fastSin, x); } // tan - template - GLM_FUNC_QUALIFIER T fastTan(T x) + template + GLM_FUNC_QUALIFIER T fastTan(T x) GLM_NOEXCEPT { return x + (x * x * x * T(0.3333333333)) + (x * x * x * x * x * T(0.1333333333333)) + (x * x * x * x * x * x * x * T(0.0539682539)); } template class vecType> - GLM_FUNC_QUALIFIER vecType fastTan(vecType const & x) + GLM_FUNC_QUALIFIER vecType fastTan(vecType const & x) GLM_NOEXCEPT { return detail::functor1::call(fastTan, x); } // asin - template - GLM_FUNC_QUALIFIER T fastAsin(T x) + template + GLM_FUNC_QUALIFIER T fastAsin(T x) GLM_NOEXCEPT { return x + (x * x * x * T(0.166666667)) + (x * x * x * x * x * T(0.075)) + (x * x * x * x * x * x * x * T(0.0446428571)) + (x * x * x * x * x * x * x * x * x * T(0.0303819444));// + (x * x * x * x * x * x * x * x * x * x * x * T(0.022372159)); } template class vecType> - GLM_FUNC_QUALIFIER vecType fastAsin(vecType const & x) + GLM_FUNC_QUALIFIER vecType fastAsin(vecType const & x) GLM_NOEXCEPT { return detail::functor1::call(fastAsin, x); } // acos - template - GLM_FUNC_QUALIFIER T fastAcos(T x) + template + GLM_FUNC_QUALIFIER T fastAcos(T x) GLM_NOEXCEPT { return T(1.5707963267948966192313216916398) - fastAsin(x); //(PI / 2) } template class vecType> - GLM_FUNC_QUALIFIER vecType fastAcos(vecType const & x) + GLM_FUNC_QUALIFIER vecType fastAcos(vecType const & x) GLM_NOEXCEPT { return detail::functor1::call(fastAcos, x); } // atan - template - GLM_FUNC_QUALIFIER T fastAtan(T y, T x) + template + GLM_FUNC_QUALIFIER T fastAtan(T y, T x) GLM_NOEXCEPT { T sgn = sign(y) * sign(x); return abs(fastAtan(y / x)) * sgn; } template class vecType> - GLM_FUNC_QUALIFIER vecType fastAtan(vecType const & y, vecType const & x) + GLM_FUNC_QUALIFIER vecType fastAtan(vecType const & y, vecType const & x) GLM_NOEXCEPT { return detail::functor2::call(fastAtan, y, x); } - template - GLM_FUNC_QUALIFIER T fastAtan(T x) + template + GLM_FUNC_QUALIFIER T fastAtan(T x) GLM_NOEXCEPT { return x - (x * x * x * T(0.333333333333)) + (x * x * x * x * x * T(0.2)) - (x * x * x * x * x * x * x * T(0.1428571429)) + (x * x * x * x * x * x * x * x * x * T(0.111111111111)) - (x * x * x * x * x * x * x * x * x * x * x * T(0.0909090909)); } template class vecType> - GLM_FUNC_QUALIFIER vecType fastAtan(vecType const & x) + GLM_FUNC_QUALIFIER vecType fastAtan(vecType const & x) GLM_NOEXCEPT { return detail::functor1::call(fastAtan, x); } diff --git a/glm/gtx/gradient_paint.hpp b/glm/gtx/gradient_paint.hpp index 8e734294..87672814 100644 --- a/glm/gtx/gradient_paint.hpp +++ b/glm/gtx/gradient_paint.hpp @@ -61,7 +61,7 @@ namespace glm tvec2 const & Center, T const & Radius, tvec2 const & Focal, - tvec2 const & Position); + tvec2 const & Position) GLM_NOEXCEPT; /// Return a color from a linear gradient. /// @see - gtx_gradient_paint @@ -69,7 +69,7 @@ namespace glm GLM_FUNC_DECL T linearGradient( tvec2 const & Point0, tvec2 const & Point1, - tvec2 const & Position); + tvec2 const & Position) GLM_NOEXCEPT; /// @} }// namespace glm diff --git a/glm/gtx/gradient_paint.inl b/glm/gtx/gradient_paint.inl index 9a2305fe..c47d6d99 100644 --- a/glm/gtx/gradient_paint.inl +++ b/glm/gtx/gradient_paint.inl @@ -39,7 +39,7 @@ namespace glm T const & Radius, tvec2 const & Focal, tvec2 const & Position - ) + ) GLM_NOEXCEPT { tvec2 F = Focal - Center; tvec2 D = Position - Focal; @@ -58,7 +58,7 @@ namespace glm tvec2 const & Point0, tvec2 const & Point1, tvec2 const & Position - ) + ) GLM_NOEXCEPT { tvec2 Dist = Point1 - Point0; return (Dist.x * (Position.x - Point0.x) + Dist.y * (Position.y - Point0.y)) / glm::dot(Dist, Dist); diff --git a/glm/gtx/handed_coordinate_space.hpp b/glm/gtx/handed_coordinate_space.hpp index d4020af9..dc032c41 100644 --- a/glm/gtx/handed_coordinate_space.hpp +++ b/glm/gtx/handed_coordinate_space.hpp @@ -59,7 +59,7 @@ namespace glm GLM_FUNC_DECL bool rightHanded( tvec3 const & tangent, tvec3 const & binormal, - tvec3 const & normal); + tvec3 const & normal) GLM_NOEXCEPT; //! Return if a trihedron left handed or not. //! From GLM_GTX_handed_coordinate_space extension. @@ -67,7 +67,7 @@ namespace glm GLM_FUNC_DECL bool leftHanded( tvec3 const & tangent, tvec3 const & binormal, - tvec3 const & normal); + tvec3 const & normal) GLM_NOEXCEPT; /// @} }// namespace glm diff --git a/glm/gtx/handed_coordinate_space.inl b/glm/gtx/handed_coordinate_space.inl index 86e9faff..38dc92c8 100644 --- a/glm/gtx/handed_coordinate_space.inl +++ b/glm/gtx/handed_coordinate_space.inl @@ -38,7 +38,7 @@ namespace glm tvec3 const & tangent, tvec3 const & binormal, tvec3 const & normal - ) + ) GLM_NOEXCEPT { return dot(cross(normal, tangent), binormal) > T(0); } @@ -49,7 +49,7 @@ namespace glm tvec3 const & tangent, tvec3 const & binormal, tvec3 const & normal - ) + ) GLM_NOEXCEPT { return dot(cross(normal, tangent), binormal) < T(0); } diff --git a/glm/gtx/integer.hpp b/glm/gtx/integer.hpp index f22850a0..d17e3b8d 100644 --- a/glm/gtx/integer.hpp +++ b/glm/gtx/integer.hpp @@ -56,44 +56,44 @@ namespace glm //! Returns x raised to the y power. //! From GLM_GTX_integer extension. - GLM_FUNC_DECL int pow(int x, int y); + GLM_FUNC_DECL int pow(int x, int y) GLM_NOEXCEPT; //! Returns the positive square root of x. //! From GLM_GTX_integer extension. - GLM_FUNC_DECL int sqrt(int x); + GLM_FUNC_DECL int sqrt(int x) GLM_NOEXCEPT; //! Returns the floor log2 of x. //! From GLM_GTX_integer extension. - GLM_FUNC_DECL unsigned int floor_log2(unsigned int x); + GLM_FUNC_DECL unsigned int floor_log2(unsigned int x) GLM_NOEXCEPT; //! Modulus. Returns x - y * floor(x / y) for each component in x using the floating point value y. //! From GLM_GTX_integer extension. - GLM_FUNC_DECL int mod(int x, int y); + GLM_FUNC_DECL int mod(int x, int y) GLM_NOEXCEPT; //! Return the factorial value of a number (!12 max, integer only) //! From GLM_GTX_integer extension. - template - GLM_FUNC_DECL genType factorial(genType const & x); + template + GLM_FUNC_DECL genType factorial(genType const & x) GLM_NOEXCEPT; - //! 32bit signed integer. + //! 32bit signed integer. //! From GLM_GTX_integer extension. typedef signed int sint; //! Returns x raised to the y power. //! From GLM_GTX_integer extension. - GLM_FUNC_DECL uint pow(uint x, uint y); + GLM_FUNC_DECL uint pow(uint x, uint y) GLM_NOEXCEPT; - //! Returns the positive square root of x. + //! Returns the positive square root of x. //! From GLM_GTX_integer extension. - GLM_FUNC_DECL uint sqrt(uint x); + GLM_FUNC_DECL uint sqrt(uint x) GLM_NOEXCEPT; //! Modulus. Returns x - y * floor(x / y) for each component in x using the floating point value y. //! From GLM_GTX_integer extension. - GLM_FUNC_DECL uint mod(uint x, uint y); + GLM_FUNC_DECL uint mod(uint x, uint y) GLM_NOEXCEPT; //! Returns the number of leading zeros. //! From GLM_GTX_integer extension. - GLM_FUNC_DECL uint nlz(uint x); + GLM_FUNC_DECL uint nlz(uint x) GLM_NOEXCEPT; /// @} }//namespace glm diff --git a/glm/gtx/integer.inl b/glm/gtx/integer.inl index 360818b1..ddfe5748 100644 --- a/glm/gtx/integer.inl +++ b/glm/gtx/integer.inl @@ -33,7 +33,7 @@ namespace glm { // pow - GLM_FUNC_QUALIFIER int pow(int x, int y) + GLM_FUNC_QUALIFIER int pow(int x, int y) GLM_NOEXCEPT { if(y == 0) return 1; @@ -44,7 +44,7 @@ namespace glm } // sqrt: From Christopher J. Musial, An integer square root, Graphics Gems, 1990, page 387 - GLM_FUNC_QUALIFIER int sqrt(int x) + GLM_FUNC_QUALIFIER int sqrt(int x) GLM_NOEXCEPT { if(x <= 1) return x; @@ -63,7 +63,7 @@ namespace glm // Henry Gordon Dietz: http://aggregate.org/MAGIC/ namespace detail { - GLM_FUNC_QUALIFIER unsigned int ones32(unsigned int x) + GLM_FUNC_QUALIFIER unsigned int ones32(unsigned int x) GLM_NOEXCEPT { /* 32-bit recursive reduction using SWAR... but first step is mapping 2-bit values @@ -80,7 +80,7 @@ namespace detail // Henry Gordon Dietz: http://aggregate.org/MAGIC/ /* - GLM_FUNC_QUALIFIER unsigned int floor_log2(unsigned int x) + GLM_FUNC_QUALIFIER unsigned int floor_log2(unsigned int x) GLM_NOEXCEPT { x |= (x >> 1); x |= (x >> 2); @@ -92,14 +92,14 @@ namespace detail } */ // mod - GLM_FUNC_QUALIFIER int mod(int x, int y) + GLM_FUNC_QUALIFIER int mod(int x, int y) GLM_NOEXCEPT { return x - y * (x / y); } // factorial (!12 max, integer only) template - GLM_FUNC_QUALIFIER genType factorial(genType const & x) + GLM_FUNC_QUALIFIER genType factorial(genType const & x) GLM_NOEXCEPT { genType Temp = x; genType Result; @@ -110,7 +110,7 @@ namespace detail template GLM_FUNC_QUALIFIER tvec2 factorial( - tvec2 const & x) + tvec2 const & x) GLM_NOEXCEPT { return tvec2( factorial(x.x), @@ -119,7 +119,7 @@ namespace detail template GLM_FUNC_QUALIFIER tvec3 factorial( - tvec3 const & x) + tvec3 const & x) GLM_NOEXCEPT { return tvec3( factorial(x.x), @@ -129,7 +129,7 @@ namespace detail template GLM_FUNC_QUALIFIER tvec4 factorial( - tvec4 const & x) + tvec4 const & x) GLM_NOEXCEPT { return tvec4( factorial(x.x), @@ -138,7 +138,7 @@ namespace detail factorial(x.w)); } - GLM_FUNC_QUALIFIER uint pow(uint x, uint y) + GLM_FUNC_QUALIFIER uint pow(uint x, uint y) GLM_NOEXCEPT { uint result = x; for(uint i = 1; i < y; ++i) @@ -146,7 +146,7 @@ namespace detail return result; } - GLM_FUNC_QUALIFIER uint sqrt(uint x) + GLM_FUNC_QUALIFIER uint sqrt(uint x) GLM_NOEXCEPT { if(x <= 1) return x; @@ -162,14 +162,14 @@ namespace detail return CurrentAnswer; } - GLM_FUNC_QUALIFIER uint mod(uint x, uint y) + GLM_FUNC_QUALIFIER uint mod(uint x, uint y) GLM_NOEXCEPT { return x - y * (x / y); } #if(GLM_COMPILER & (GLM_COMPILER_VC | GLM_COMPILER_GCC)) - GLM_FUNC_QUALIFIER unsigned int nlz(unsigned int x) + GLM_FUNC_QUALIFIER unsigned int nlz(unsigned int x) GLM_NOEXCEPT { return 31u - findMSB(x); } @@ -177,7 +177,7 @@ namespace detail #else // Hackers Delight: http://www.hackersdelight.org/HDcode/nlz.c.txt - GLM_FUNC_QUALIFIER unsigned int nlz(unsigned int x) + GLM_FUNC_QUALIFIER unsigned int nlz(unsigned int x) GLM_NOEXCEPT { int y, m, n; diff --git a/glm/gtx/intersect.hpp b/glm/gtx/intersect.hpp index d35b4c54..ff7eacfc 100644 --- a/glm/gtx/intersect.hpp +++ b/glm/gtx/intersect.hpp @@ -62,7 +62,7 @@ namespace glm GLM_FUNC_DECL bool intersectRayPlane( genType const & orig, genType const & dir, genType const & planeOrig, genType const & planeNormal, - typename genType::value_type & intersectionDistance); + typename genType::value_type & intersectionDistance) GLM_NOEXCEPT; //! Compute the intersection of a ray and a triangle. //! From GLM_GTX_intersect extension. @@ -70,7 +70,7 @@ namespace glm GLM_FUNC_DECL bool intersectRayTriangle( genType const & orig, genType const & dir, genType const & vert0, genType const & vert1, genType const & vert2, - genType & baryPosition); + genType & baryPosition) GLM_NOEXCEPT; //! Compute the intersection of a line and a triangle. //! From GLM_GTX_intersect extension. @@ -78,7 +78,7 @@ namespace glm GLM_FUNC_DECL bool intersectLineTriangle( genType const & orig, genType const & dir, genType const & vert0, genType const & vert1, genType const & vert2, - genType & position); + genType & position) GLM_NOEXCEPT; //! Compute the intersection distance of a ray and a sphere. //! The ray direction vector is unit length. @@ -87,7 +87,7 @@ namespace glm GLM_FUNC_DECL bool intersectRaySphere( genType const & rayStarting, genType const & rayNormalizedDirection, genType const & sphereCenter, typename genType::value_type const sphereRadiusSquered, - typename genType::value_type & intersectionDistance); + typename genType::value_type & intersectionDistance) GLM_NOEXCEPT; //! Compute the intersection of a ray and a sphere. //! From GLM_GTX_intersect extension. @@ -95,7 +95,7 @@ namespace glm GLM_FUNC_DECL bool intersectRaySphere( genType const & rayStarting, genType const & rayNormalizedDirection, genType const & sphereCenter, const typename genType::value_type sphereRadius, - genType & intersectionPosition, genType & intersectionNormal); + genType & intersectionPosition, genType & intersectionNormal) GLM_NOEXCEPT; //! Compute the intersection of a line and a sphere. //! From GLM_GTX_intersect extension @@ -103,8 +103,8 @@ namespace glm GLM_FUNC_DECL bool intersectLineSphere( genType const & point0, genType const & point1, genType const & sphereCenter, typename genType::value_type sphereRadius, - genType & intersectionPosition1, genType & intersectionNormal1, - genType & intersectionPosition2 = genType(), genType & intersectionNormal2 = genType()); + genType & intersectionPosition1, genType & intersectionNormal1, + genType & intersectionPosition2 = genType(), genType & intersectionNormal2 = genType()) GLM_NOEXCEPT; /// @} }//namespace glm diff --git a/glm/gtx/intersect.inl b/glm/gtx/intersect.inl index 0c1cc935..f8eb0dfd 100644 --- a/glm/gtx/intersect.inl +++ b/glm/gtx/intersect.inl @@ -19,7 +19,7 @@ namespace glm genType const & orig, genType const & dir, genType const & planeOrig, genType const & planeNormal, typename genType::value_type & intersectionDistance - ) + ) GLM_NOEXCEPT { typename genType::value_type d = glm::dot(dir, planeNormal); typename genType::value_type Epsilon = std::numeric_limits::epsilon(); @@ -39,7 +39,7 @@ namespace glm genType const & orig, genType const & dir, genType const & v0, genType const & v1, genType const & v2, genType & baryPosition - ) + ) GLM_NOEXCEPT { genType e1 = v1 - v0; genType e2 = v2 - v0; @@ -79,7 +79,7 @@ namespace glm // genType const & orig, genType const & dir, // genType const & vert0, genType const & vert1, genType const & vert2, // genType & position - //) + //) GLM_NOEXCEPT //{ // typename genType::value_type Epsilon = std::numeric_limits::epsilon(); // @@ -116,7 +116,7 @@ namespace glm genType const & orig, genType const & dir, genType const & vert0, genType const & vert1, genType const & vert2, genType & position - ) + ) GLM_NOEXCEPT { typename genType::value_type Epsilon = std::numeric_limits::epsilon(); @@ -154,7 +154,7 @@ namespace glm genType const & rayStarting, genType const & rayNormalizedDirection, genType const & sphereCenter, const typename genType::value_type sphereRadiusSquered, typename genType::value_type & intersectionDistance - ) + ) GLM_NOEXCEPT { typename genType::value_type Epsilon = std::numeric_limits::epsilon(); genType diff = sphereCenter - rayStarting; @@ -175,7 +175,7 @@ namespace glm genType const & rayStarting, genType const & rayNormalizedDirection, genType const & sphereCenter, const typename genType::value_type sphereRadius, genType & intersectionPosition, genType & intersectionNormal - ) + ) GLM_NOEXCEPT { typename genType::value_type distance; if( intersectRaySphere( rayStarting, rayNormalizedDirection, sphereCenter, sphereRadius * sphereRadius, distance ) ) @@ -194,7 +194,7 @@ namespace glm genType const & sphereCenter, typename genType::value_type sphereRadius, genType & intersectionPoint1, genType & intersectionNormal1, genType & intersectionPoint2, genType & intersectionNormal2 - ) + ) GLM_NOEXCEPT { typename genType::value_type Epsilon = std::numeric_limits::epsilon(); genType dir = normalize(point1 - point0); diff --git a/glm/gtx/log_base.hpp b/glm/gtx/log_base.hpp index 94d03472..671e9f36 100644 --- a/glm/gtx/log_base.hpp +++ b/glm/gtx/log_base.hpp @@ -58,14 +58,14 @@ namespace glm template GLM_FUNC_DECL genType log( genType x, - genType base); + genType base) GLM_NOEXCEPT; //! Logarithm for any base. //! From GLM_GTX_log_base. template class vecType> GLM_FUNC_DECL vecType sign( vecType const & x, - vecType const & base); + vecType const & base) GLM_NOEXCEPT; /// @} }//namespace glm diff --git a/glm/gtx/log_base.inl b/glm/gtx/log_base.inl index 95b8dfaa..f991dcba 100644 --- a/glm/gtx/log_base.inl +++ b/glm/gtx/log_base.inl @@ -32,15 +32,15 @@ namespace glm { - template - GLM_FUNC_QUALIFIER genType log(genType const & x, genType const & base) + template + GLM_FUNC_QUALIFIER genType log(genType const & x, genType const & base) GLM_NOEXCEPT { assert(x != genType(0)); return glm::log(x) / glm::log(base); } template class vecType> - GLM_FUNC_QUALIFIER vecType log(vecType const & x, vecType const & base) + GLM_FUNC_QUALIFIER vecType log(vecType const & x, vecType const & base) GLM_NOEXCEPT { return glm::log(x) / glm::log(base); } diff --git a/glm/gtx/matrix_cross_product.hpp b/glm/gtx/matrix_cross_product.hpp index f4fd54fa..38bc4da0 100644 --- a/glm/gtx/matrix_cross_product.hpp +++ b/glm/gtx/matrix_cross_product.hpp @@ -58,13 +58,13 @@ namespace glm //! From GLM_GTX_matrix_cross_product extension. template GLM_FUNC_DECL tmat3x3 matrixCross3( - tvec3 const & x); - + tvec3 const & x) GLM_NOEXCEPT; + //! Build a cross product matrix. //! From GLM_GTX_matrix_cross_product extension. template GLM_FUNC_DECL tmat4x4 matrixCross4( - tvec3 const & x); + tvec3 const & x) GLM_NOEXCEPT; /// @} }//namespace glm diff --git a/glm/gtx/matrix_cross_product.inl b/glm/gtx/matrix_cross_product.inl index 9665b067..82792746 100644 --- a/glm/gtx/matrix_cross_product.inl +++ b/glm/gtx/matrix_cross_product.inl @@ -36,7 +36,7 @@ namespace glm GLM_FUNC_QUALIFIER tmat3x3 matrixCross3 ( tvec3 const & x - ) + ) GLM_NOEXCEPT { tmat3x3 Result(T(0)); Result[0][1] = x.z; @@ -52,7 +52,7 @@ namespace glm GLM_FUNC_QUALIFIER tmat4x4 matrixCross4 ( tvec3 const & x - ) + ) GLM_NOEXCEPT { tmat4x4 Result(T(0)); Result[0][1] = x.z; diff --git a/glm/gtx/matrix_decompose.hpp b/glm/gtx/matrix_decompose.hpp index e7fc83e2..61665386 100644 --- a/glm/gtx/matrix_decompose.hpp +++ b/glm/gtx/matrix_decompose.hpp @@ -62,7 +62,7 @@ namespace glm template GLM_FUNC_DECL bool decompose( tmat4x4 const & modelMatrix, - tvec3 & scale, tquat & orientation, tvec3 & translation, tvec3 & skew, tvec4 & perspective); + tvec3 & scale, tquat & orientation, tvec3 & translation, tvec3 & skew, tvec4 & perspective) GLM_NOEXCEPT; /// @} }//namespace glm diff --git a/glm/gtx/matrix_decompose.inl b/glm/gtx/matrix_decompose.inl index dec79572..d5e0bc9e 100644 --- a/glm/gtx/matrix_decompose.inl +++ b/glm/gtx/matrix_decompose.inl @@ -38,13 +38,13 @@ namespace glm GLM_FUNC_QUALIFIER tvec3 combine( tvec3 const & a, tvec3 const & b, - T ascl, T bscl) + T ascl, T bscl) GLM_NOEXCEPT { return (a * ascl) + (b * bscl); } template - GLM_FUNC_QUALIFIER void v3Scale(tvec3 & v, T desiredLength) + GLM_FUNC_QUALIFIER void v3Scale(tvec3 & v, T desiredLength) GLM_NOEXCEPT { T len = glm::length(v); if(len != 0) @@ -64,7 +64,7 @@ namespace glm */ template - GLM_FUNC_QUALIFIER bool decompose(tmat4x4 const & ModelMatrix, tvec3 & Scale, tquat & Orientation, tvec3 & Translation, tvec3 & Skew, tvec4 & Perspective) + GLM_FUNC_QUALIFIER bool decompose(tmat4x4 const & ModelMatrix, tvec3 & Scale, tquat & Orientation, tvec3 & Translation, tvec3 & Skew, tvec4 & Perspective) GLM_NOEXCEPT { tmat4x4 LocalMatrix(ModelMatrix); diff --git a/glm/gtx/matrix_interpolation.hpp b/glm/gtx/matrix_interpolation.hpp index d00b722a..0adaa335 100644 --- a/glm/gtx/matrix_interpolation.hpp +++ b/glm/gtx/matrix_interpolation.hpp @@ -59,20 +59,20 @@ namespace glm GLM_FUNC_DECL void axisAngle( tmat4x4 const & mat, tvec3 & axis, - T & angle); + T & angle) GLM_NOEXCEPT; /// Build a matrix from axis and angle. /// From GLM_GTX_matrix_interpolation extension. template GLM_FUNC_DECL tmat4x4 axisAngleMatrix( tvec3 const & axis, - T const angle); + T const angle) GLM_NOEXCEPT; /// Extracts the rotation part of a matrix. /// From GLM_GTX_matrix_interpolation extension. template GLM_FUNC_DECL tmat4x4 extractMatrixRotation( - tmat4x4 const & mat); + tmat4x4 const & mat) GLM_NOEXCEPT; /// Build a interpolation of 4 * 4 matrixes. /// From GLM_GTX_matrix_interpolation extension. @@ -81,7 +81,7 @@ namespace glm GLM_FUNC_DECL tmat4x4 interpolate( tmat4x4 const & m1, tmat4x4 const & m2, - T const delta); + T const delta) GLM_NOEXCEPT; /// @} }//namespace glm diff --git a/glm/gtx/matrix_interpolation.inl b/glm/gtx/matrix_interpolation.inl index 5112d1ac..24438c91 100644 --- a/glm/gtx/matrix_interpolation.inl +++ b/glm/gtx/matrix_interpolation.inl @@ -38,7 +38,7 @@ namespace glm tmat4x4 const & mat, tvec3 & axis, T & angle - ) + ) GLM_NOEXCEPT { T epsilon = (T)0.01; T epsilon2 = (T)0.1; @@ -112,7 +112,7 @@ namespace glm ( tvec3 const & axis, T const angle - ) + ) GLM_NOEXCEPT { T c = cos(angle); T s = sin(angle); @@ -131,7 +131,7 @@ namespace glm GLM_FUNC_QUALIFIER tmat4x4 extractMatrixRotation ( tmat4x4 const & mat - ) + ) GLM_NOEXCEPT { return tmat4x4( mat[0][0], mat[0][1], mat[0][2], 0.0, @@ -147,7 +147,7 @@ namespace glm tmat4x4 const & m1, tmat4x4 const & m2, T const delta - ) + ) GLM_NOEXCEPT { tmat4x4 m1rot = extractMatrixRotation(m1); tmat4x4 dltRotation = m2 * transpose(m1rot); diff --git a/glm/gtx/matrix_major_storage.hpp b/glm/gtx/matrix_major_storage.hpp index a098a55d..e9ff0bc8 100644 --- a/glm/gtx/matrix_major_storage.hpp +++ b/glm/gtx/matrix_major_storage.hpp @@ -58,85 +58,85 @@ namespace glm //! From GLM_GTX_matrix_major_storage extension. template GLM_FUNC_DECL tmat2x2 rowMajor2( - tvec2 const & v1, - tvec2 const & v2); - + tvec2 const & v1, + tvec2 const & v2) GLM_NOEXCEPT; + //! Build a row major matrix from other matrix. //! From GLM_GTX_matrix_major_storage extension. template GLM_FUNC_DECL tmat2x2 rowMajor2( - tmat2x2 const & m); + tmat2x2 const & m) GLM_NOEXCEPT; //! Build a row major matrix from row vectors. //! From GLM_GTX_matrix_major_storage extension. template GLM_FUNC_DECL tmat3x3 rowMajor3( - tvec3 const & v1, - tvec3 const & v2, - tvec3 const & v3); + tvec3 const & v1, + tvec3 const & v2, + tvec3 const & v3) GLM_NOEXCEPT; //! Build a row major matrix from other matrix. //! From GLM_GTX_matrix_major_storage extension. template GLM_FUNC_DECL tmat3x3 rowMajor3( - tmat3x3 const & m); + tmat3x3 const & m) GLM_NOEXCEPT; //! Build a row major matrix from row vectors. //! From GLM_GTX_matrix_major_storage extension. template GLM_FUNC_DECL tmat4x4 rowMajor4( - tvec4 const & v1, + tvec4 const & v1, tvec4 const & v2, - tvec4 const & v3, - tvec4 const & v4); + tvec4 const & v3, + tvec4 const & v4) GLM_NOEXCEPT; //! Build a row major matrix from other matrix. //! From GLM_GTX_matrix_major_storage extension. template GLM_FUNC_DECL tmat4x4 rowMajor4( - tmat4x4 const & m); + tmat4x4 const & m) GLM_NOEXCEPT; //! Build a column major matrix from column vectors. //! From GLM_GTX_matrix_major_storage extension. template GLM_FUNC_DECL tmat2x2 colMajor2( - tvec2 const & v1, - tvec2 const & v2); - + tvec2 const & v1, + tvec2 const & v2) GLM_NOEXCEPT; + //! Build a column major matrix from other matrix. //! From GLM_GTX_matrix_major_storage extension. template GLM_FUNC_DECL tmat2x2 colMajor2( - tmat2x2 const & m); + tmat2x2 const & m) GLM_NOEXCEPT; //! Build a column major matrix from column vectors. //! From GLM_GTX_matrix_major_storage extension. template GLM_FUNC_DECL tmat3x3 colMajor3( - tvec3 const & v1, - tvec3 const & v2, - tvec3 const & v3); - + tvec3 const & v1, + tvec3 const & v2, + tvec3 const & v3) GLM_NOEXCEPT; + //! Build a column major matrix from other matrix. //! From GLM_GTX_matrix_major_storage extension. template GLM_FUNC_DECL tmat3x3 colMajor3( - tmat3x3 const & m); - + tmat3x3 const & m) GLM_NOEXCEPT; + //! Build a column major matrix from column vectors. //! From GLM_GTX_matrix_major_storage extension. template GLM_FUNC_DECL tmat4x4 colMajor4( - tvec4 const & v1, - tvec4 const & v2, - tvec4 const & v3, - tvec4 const & v4); - + tvec4 const & v1, + tvec4 const & v2, + tvec4 const & v3, + tvec4 const & v4) GLM_NOEXCEPT; + //! Build a column major matrix from other matrix. //! From GLM_GTX_matrix_major_storage extension. - template + template GLM_FUNC_DECL tmat4x4 colMajor4( - tmat4x4 const & m); + tmat4x4 const & m) GLM_NOEXCEPT; /// @} }//namespace glm diff --git a/glm/gtx/matrix_major_storage.inl b/glm/gtx/matrix_major_storage.inl index 5166a667..310f1afd 100644 --- a/glm/gtx/matrix_major_storage.inl +++ b/glm/gtx/matrix_major_storage.inl @@ -37,7 +37,7 @@ namespace glm ( tvec2 const & v1, tvec2 const & v2 - ) + ) GLM_NOEXCEPT { tmat2x2 Result; Result[0][0] = v1.x; @@ -49,7 +49,7 @@ namespace glm template GLM_FUNC_QUALIFIER tmat2x2 rowMajor2( - const tmat2x2& m) + const tmat2x2& m) GLM_NOEXCEPT { tmat2x2 Result; Result[0][0] = m[0][0]; @@ -59,11 +59,11 @@ namespace glm return Result; } - template + template GLM_FUNC_QUALIFIER tmat3x3 rowMajor3( - const tvec3& v1, - const tvec3& v2, - const tvec3& v3) + const tvec3& v1, + const tvec3& v2, + const tvec3& v3) GLM_NOEXCEPT { tmat3x3 Result; Result[0][0] = v1.x; @@ -78,9 +78,9 @@ namespace glm return Result; } - template + template GLM_FUNC_QUALIFIER tmat3x3 rowMajor3( - const tmat3x3& m) + const tmat3x3& m) GLM_NOEXCEPT { tmat3x3 Result; Result[0][0] = m[0][0]; @@ -95,12 +95,12 @@ namespace glm return Result; } - template + template GLM_FUNC_QUALIFIER tmat4x4 rowMajor4( - const tvec4& v1, - const tvec4& v2, - const tvec4& v3, - const tvec4& v4) + const tvec4& v1, + const tvec4& v2, + const tvec4& v3, + const tvec4& v4) GLM_NOEXCEPT { tmat4x4 Result; Result[0][0] = v1.x; @@ -122,9 +122,9 @@ namespace glm return Result; } - template + template GLM_FUNC_QUALIFIER tmat4x4 rowMajor4( - const tmat4x4& m) + const tmat4x4& m) GLM_NOEXCEPT { tmat4x4 Result; Result[0][0] = m[0][0]; @@ -146,50 +146,50 @@ namespace glm return Result; } - template + template GLM_FUNC_QUALIFIER tmat2x2 colMajor2( - const tvec2& v1, - const tvec2& v2) + const tvec2& v1, + const tvec2& v2) GLM_NOEXCEPT { return tmat2x2(v1, v2); } - template + template GLM_FUNC_QUALIFIER tmat2x2 colMajor2( - const tmat2x2& m) + const tmat2x2& m) GLM_NOEXCEPT { return tmat2x2(m); } - template + template GLM_FUNC_QUALIFIER tmat3x3 colMajor3( - const tvec3& v1, - const tvec3& v2, - const tvec3& v3) + const tvec3& v1, + const tvec3& v2, + const tvec3& v3) GLM_NOEXCEPT { return tmat3x3(v1, v2, v3); } - template + template GLM_FUNC_QUALIFIER tmat3x3 colMajor3( - const tmat3x3& m) + const tmat3x3& m) GLM_NOEXCEPT { return tmat3x3(m); } - template + template GLM_FUNC_QUALIFIER tmat4x4 colMajor4( - const tvec4& v1, - const tvec4& v2, - const tvec4& v3, - const tvec4& v4) + const tvec4& v1, + const tvec4& v2, + const tvec4& v3, + const tvec4& v4) GLM_NOEXCEPT { return tmat4x4(v1, v2, v3, v4); } - template + template GLM_FUNC_QUALIFIER tmat4x4 colMajor4( - const tmat4x4& m) + const tmat4x4& m) GLM_NOEXCEPT { return tmat4x4(m); } diff --git a/glm/gtx/matrix_operation.hpp b/glm/gtx/matrix_operation.hpp index 3c06b942..4ee967fe 100644 --- a/glm/gtx/matrix_operation.hpp +++ b/glm/gtx/matrix_operation.hpp @@ -57,55 +57,55 @@ namespace glm //! From GLM_GTX_matrix_operation extension. template GLM_FUNC_DECL tmat2x2 diagonal2x2( - tvec2 const & v); + tvec2 const & v) GLM_NOEXCEPT; //! Build a diagonal matrix. //! From GLM_GTX_matrix_operation extension. template GLM_FUNC_DECL tmat2x3 diagonal2x3( - tvec2 const & v); + tvec2 const & v) GLM_NOEXCEPT; //! Build a diagonal matrix. //! From GLM_GTX_matrix_operation extension. template GLM_FUNC_DECL tmat2x4 diagonal2x4( - tvec2 const & v); + tvec2 const & v) GLM_NOEXCEPT; //! Build a diagonal matrix. //! From GLM_GTX_matrix_operation extension. template GLM_FUNC_DECL tmat3x2 diagonal3x2( - tvec2 const & v); + tvec2 const & v) GLM_NOEXCEPT; //! Build a diagonal matrix. //! From GLM_GTX_matrix_operation extension. template GLM_FUNC_DECL tmat3x3 diagonal3x3( - tvec3 const & v); + tvec3 const & v) GLM_NOEXCEPT; //! Build a diagonal matrix. //! From GLM_GTX_matrix_operation extension. template GLM_FUNC_DECL tmat3x4 diagonal3x4( - tvec3 const & v); + tvec3 const & v) GLM_NOEXCEPT; //! Build a diagonal matrix. //! From GLM_GTX_matrix_operation extension. template GLM_FUNC_DECL tmat4x2 diagonal4x2( - tvec2 const & v); + tvec2 const & v) GLM_NOEXCEPT; //! Build a diagonal matrix. //! From GLM_GTX_matrix_operation extension. template GLM_FUNC_DECL tmat4x3 diagonal4x3( - tvec3 const & v); + tvec3 const & v) GLM_NOEXCEPT; //! Build a diagonal matrix. //! From GLM_GTX_matrix_operation extension. template GLM_FUNC_DECL tmat4x4 diagonal4x4( - tvec4 const & v); + tvec4 const & v) GLM_NOEXCEPT; /// @} }//namespace glm diff --git a/glm/gtx/matrix_operation.inl b/glm/gtx/matrix_operation.inl index 20c1496d..75da6ec9 100644 --- a/glm/gtx/matrix_operation.inl +++ b/glm/gtx/matrix_operation.inl @@ -36,7 +36,7 @@ namespace glm GLM_FUNC_QUALIFIER tmat2x2 diagonal2x2 ( tvec2 const & v - ) + ) GLM_NOEXCEPT { tmat2x2 Result(static_cast(1)); Result[0][0] = v[0]; @@ -48,7 +48,7 @@ namespace glm GLM_FUNC_QUALIFIER tmat2x3 diagonal2x3 ( tvec2 const & v - ) + ) GLM_NOEXCEPT { tmat2x3 Result(static_cast(1)); Result[0][0] = v[0]; @@ -60,7 +60,7 @@ namespace glm GLM_FUNC_QUALIFIER tmat2x4 diagonal2x4 ( tvec2 const & v - ) + ) GLM_NOEXCEPT { tmat2x4 Result(static_cast(1)); Result[0][0] = v[0]; @@ -72,7 +72,7 @@ namespace glm GLM_FUNC_QUALIFIER tmat3x2 diagonal3x2 ( tvec2 const & v - ) + ) GLM_NOEXCEPT { tmat3x2 Result(static_cast(1)); Result[0][0] = v[0]; @@ -84,7 +84,7 @@ namespace glm GLM_FUNC_QUALIFIER tmat3x3 diagonal3x3 ( tvec3 const & v - ) + ) GLM_NOEXCEPT { tmat3x3 Result(static_cast(1)); Result[0][0] = v[0]; @@ -97,7 +97,7 @@ namespace glm GLM_FUNC_QUALIFIER tmat3x4 diagonal3x4 ( tvec3 const & v - ) + ) GLM_NOEXCEPT { tmat3x4 Result(static_cast(1)); Result[0][0] = v[0]; @@ -110,38 +110,38 @@ namespace glm GLM_FUNC_QUALIFIER tmat4x4 diagonal4x4 ( tvec4 const & v - ) + ) GLM_NOEXCEPT { tmat4x4 Result(static_cast(1)); Result[0][0] = v[0]; Result[1][1] = v[1]; Result[2][2] = v[2]; Result[3][3] = v[3]; - return Result; + return Result; } template GLM_FUNC_QUALIFIER tmat4x3 diagonal4x3 ( tvec3 const & v - ) + ) GLM_NOEXCEPT { tmat4x3 Result(static_cast(1)); Result[0][0] = v[0]; Result[1][1] = v[1]; Result[2][2] = v[2]; - return Result; + return Result; } template GLM_FUNC_QUALIFIER tmat4x2 diagonal4x2 ( tvec2 const & v - ) + ) GLM_NOEXCEPT { tmat4x2 Result(static_cast(1)); Result[0][0] = v[0]; Result[1][1] = v[1]; - return Result; + return Result; } }//namespace glm diff --git a/glm/gtx/matrix_query.hpp b/glm/gtx/matrix_query.hpp index 0be1e54f..ca38abab 100644 --- a/glm/gtx/matrix_query.hpp +++ b/glm/gtx/matrix_query.hpp @@ -59,42 +59,42 @@ namespace glm /// Return whether a matrix a null matrix. /// From GLM_GTX_matrix_query extension. template - GLM_FUNC_DECL bool isNull(tmat2x2 const & m, T const & epsilon); - + GLM_FUNC_DECL bool isNull(tmat2x2 const & m, T const & epsilon) GLM_NOEXCEPT; + /// Return whether a matrix a null matrix. /// From GLM_GTX_matrix_query extension. template - GLM_FUNC_DECL bool isNull(tmat3x3 const & m, T const & epsilon); - + GLM_FUNC_DECL bool isNull(tmat3x3 const & m, T const & epsilon) GLM_NOEXCEPT; + /// Return whether a matrix is a null matrix. /// From GLM_GTX_matrix_query extension. template - GLM_FUNC_DECL bool isNull(tmat4x4 const & m, T const & epsilon); - + GLM_FUNC_DECL bool isNull(tmat4x4 const & m, T const & epsilon) GLM_NOEXCEPT; + /// Return whether a matrix is an identity matrix. /// From GLM_GTX_matrix_query extension. template class matType> - GLM_FUNC_DECL bool isIdentity(matType const & m, T const & epsilon); + GLM_FUNC_DECL bool isIdentity(matType const & m, T const & epsilon) GLM_NOEXCEPT; /// Return whether a matrix is a normalized matrix. /// From GLM_GTX_matrix_query extension. template - GLM_FUNC_DECL bool isNormalized(tmat2x2 const & m, T const & epsilon); + GLM_FUNC_DECL bool isNormalized(tmat2x2 const & m, T const & epsilon) GLM_NOEXCEPT; /// Return whether a matrix is a normalized matrix. /// From GLM_GTX_matrix_query extension. template - GLM_FUNC_DECL bool isNormalized(tmat3x3 const & m, T const & epsilon); + GLM_FUNC_DECL bool isNormalized(tmat3x3 const & m, T const & epsilon) GLM_NOEXCEPT; /// Return whether a matrix is a normalized matrix. /// From GLM_GTX_matrix_query extension. template - GLM_FUNC_DECL bool isNormalized(tmat4x4 const & m, T const & epsilon); + GLM_FUNC_DECL bool isNormalized(tmat4x4 const & m, T const & epsilon) GLM_NOEXCEPT; /// Return whether a matrix is an orthonormalized matrix. /// From GLM_GTX_matrix_query extension. template class matType> - GLM_FUNC_DECL bool isOrthogonal(matType const & m, T const & epsilon); + GLM_FUNC_DECL bool isOrthogonal(matType const & m, T const & epsilon) GLM_NOEXCEPT; /// @} }//namespace glm diff --git a/glm/gtx/matrix_query.inl b/glm/gtx/matrix_query.inl index d913116f..ac2a3cca 100644 --- a/glm/gtx/matrix_query.inl +++ b/glm/gtx/matrix_query.inl @@ -33,7 +33,7 @@ namespace glm { template - GLM_FUNC_QUALIFIER bool isNull(tmat2x2 const & m, T const & epsilon) + GLM_FUNC_QUALIFIER bool isNull(tmat2x2 const & m, T const & epsilon) GLM_NOEXCEPT { bool result = true; for(detail::component_count_t i = 0; result && i < 2 ; ++i) @@ -42,7 +42,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER bool isNull(tmat3x3 const & m, T const & epsilon) + GLM_FUNC_QUALIFIER bool isNull(tmat3x3 const & m, T const & epsilon) GLM_NOEXCEPT { bool result = true; for(detail::component_count_t i = 0; result && i < 3 ; ++i) @@ -51,7 +51,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER bool isNull(tmat4x4 const & m, T const & epsilon) + GLM_FUNC_QUALIFIER bool isNull(tmat4x4 const & m, T const & epsilon) GLM_NOEXCEPT { bool result = true; for(detail::component_count_t i = 0; result && i < 4 ; ++i) @@ -60,7 +60,7 @@ namespace glm } template class matType> - GLM_FUNC_QUALIFIER bool isIdentity(matType const & m, T const & epsilon) + GLM_FUNC_QUALIFIER bool isIdentity(matType const & m, T const & epsilon) GLM_NOEXCEPT { bool result = true; for(detail::component_count_t i(0); result && i < detail::component_count(m[0]); ++i) @@ -76,7 +76,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER bool isNormalized(tmat2x2 const & m, T const & epsilon) + GLM_FUNC_QUALIFIER bool isNormalized(tmat2x2 const & m, T const & epsilon) GLM_NOEXCEPT { bool result(true); for(detail::component_count_t i(0); result && i < detail::component_count(m); ++i) @@ -92,7 +92,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER bool isNormalized(tmat3x3 const & m, T const & epsilon) + GLM_FUNC_QUALIFIER bool isNormalized(tmat3x3 const & m, T const & epsilon) GLM_NOEXCEPT { bool result(true); for(detail::component_count_t i(0); result && i < detail::component_count(m); ++i) @@ -108,7 +108,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER bool isNormalized(tmat4x4 const & m, T const & epsilon) + GLM_FUNC_QUALIFIER bool isNormalized(tmat4x4 const & m, T const & epsilon) GLM_NOEXCEPT { bool result(true); for(detail::component_count_t i(0); result && i < detail::component_count(m); ++i) @@ -124,7 +124,7 @@ namespace glm } template class matType> - GLM_FUNC_QUALIFIER bool isOrthogonal(matType const & m, T const & epsilon) + GLM_FUNC_QUALIFIER bool isOrthogonal(matType const & m, T const & epsilon) GLM_NOEXCEPT { bool result(true); for(detail::component_count_t i(0); result && i < detail::component_count(m) - 1; ++i) diff --git a/glm/gtx/matrix_transform_2d.hpp b/glm/gtx/matrix_transform_2d.hpp index 010a437b..e32e87fd 100644 --- a/glm/gtx/matrix_transform_2d.hpp +++ b/glm/gtx/matrix_transform_2d.hpp @@ -62,7 +62,7 @@ namespace glm template GLM_FUNC_QUALIFIER tmat3x3 translate( tmat3x3 const & m, - tvec2 const & v); + tvec2 const & v) GLM_NOEXCEPT; /// Builds a rotation 3 * 3 matrix created from an angle. /// @@ -71,7 +71,7 @@ namespace glm template GLM_FUNC_QUALIFIER tmat3x3 rotate( tmat3x3 const & m, - T angle); + T angle) GLM_NOEXCEPT; /// Builds a scale 3 * 3 matrix created from a vector of 2 components. /// @@ -80,7 +80,7 @@ namespace glm template GLM_FUNC_QUALIFIER tmat3x3 scale( tmat3x3 const & m, - tvec2 const & v); + tvec2 const & v) GLM_NOEXCEPT; /// Builds an horizontal (parallel to the x axis) shear 3 * 3 matrix. /// @@ -89,7 +89,7 @@ namespace glm template GLM_FUNC_QUALIFIER tmat3x3 shearX( tmat3x3 const & m, - T y); + T y) GLM_NOEXCEPT; /// Builds a vertical (parallel to the y axis) shear 3 * 3 matrix. /// @@ -98,7 +98,7 @@ namespace glm template GLM_FUNC_QUALIFIER tmat3x3 shearY( tmat3x3 const & m, - T x); + T x) GLM_NOEXCEPT; /// @} }//namespace glm diff --git a/glm/gtx/matrix_transform_2d.inl b/glm/gtx/matrix_transform_2d.inl index 0c97161b..a2665ea8 100644 --- a/glm/gtx/matrix_transform_2d.inl +++ b/glm/gtx/matrix_transform_2d.inl @@ -34,11 +34,11 @@ namespace glm { - - template + + template GLM_FUNC_QUALIFIER tmat3x3 translate( tmat3x3 const & m, - tvec2 const & v) + tvec2 const & v) GLM_NOEXCEPT { tmat3x3 Result(m); Result[2] = m[0] * v[0] + m[1] * v[1] + m[2]; @@ -46,10 +46,10 @@ namespace glm } - template + template GLM_FUNC_QUALIFIER tmat3x3 rotate( tmat3x3 const & m, - T angle) + T angle) GLM_NOEXCEPT { T const a = angle; T const c = cos(a); @@ -62,10 +62,10 @@ namespace glm return Result; } - template + template GLM_FUNC_QUALIFIER tmat3x3 scale( tmat3x3 const & m, - tvec2 const & v) + tvec2 const & v) GLM_NOEXCEPT { tmat3x3 Result(uninitialize); Result[0] = m[0] * v[0]; @@ -74,20 +74,20 @@ namespace glm return Result; } - template + template GLM_FUNC_QUALIFIER tmat3x3 shearX( tmat3x3 const & m, - T y) + T y) GLM_NOEXCEPT { tmat3x3 Result(1); Result[0][1] = y; return m * Result; } - template + template GLM_FUNC_QUALIFIER tmat3x3 shearY( tmat3x3 const & m, - T x) + T x) GLM_NOEXCEPT { tmat3x3 Result(1); Result[1][0] = x; diff --git a/glm/gtx/mixed_product.hpp b/glm/gtx/mixed_product.hpp index 91286408..e63e7816 100644 --- a/glm/gtx/mixed_product.hpp +++ b/glm/gtx/mixed_product.hpp @@ -54,11 +54,11 @@ namespace glm /// @{ /// @brief Mixed product of 3 vectors (from GLM_GTX_mixed_product extension) - template + template GLM_FUNC_DECL T mixedProduct( - tvec3 const & v1, - tvec3 const & v2, - tvec3 const & v3); + tvec3 const & v1, + tvec3 const & v2, + tvec3 const & v3) GLM_NOEXCEPT; /// @} }// namespace glm diff --git a/glm/gtx/mixed_product.inl b/glm/gtx/mixed_product.inl index 36ef8142..15934104 100644 --- a/glm/gtx/mixed_product.inl +++ b/glm/gtx/mixed_product.inl @@ -38,7 +38,7 @@ namespace glm tvec3 const & v1, tvec3 const & v2, tvec3 const & v3 - ) + ) GLM_NOEXCEPT { return dot(cross(v1, v2), v3); } diff --git a/glm/gtx/norm.hpp b/glm/gtx/norm.hpp index f1d8d1b2..f18d06ed 100644 --- a/glm/gtx/norm.hpp +++ b/glm/gtx/norm.hpp @@ -59,68 +59,68 @@ namespace glm //! From GLM_GTX_norm extension. template GLM_FUNC_DECL T length2( - T const & x); + T const & x) GLM_NOEXCEPT; //! Returns the squared length of x. //! From GLM_GTX_norm extension. template GLM_FUNC_DECL typename genType::value_type length2( - genType const & x); - + genType const & x) GLM_NOEXCEPT; + //! Returns the squared distance between p0 and p1, i.e., length2(p0 - p1). //! From GLM_GTX_norm extension. template GLM_FUNC_DECL T distance2( T const & p0, - T const & p1); - + T const & p1) GLM_NOEXCEPT; + //! Returns the squared distance between p0 and p1, i.e., length2(p0 - p1). //! From GLM_GTX_norm extension. template GLM_FUNC_DECL typename genType::value_type distance2( genType const & p0, - genType const & p1); + genType const & p1) GLM_NOEXCEPT; //! Returns the L1 norm between x and y. //! From GLM_GTX_norm extension. template GLM_FUNC_DECL T l1Norm( tvec3 const & x, - tvec3 const & y); - + tvec3 const & y) GLM_NOEXCEPT; + //! Returns the L1 norm of v. //! From GLM_GTX_norm extension. template GLM_FUNC_DECL T l1Norm( - tvec3 const & v); - + tvec3 const & v) GLM_NOEXCEPT; + //! Returns the L2 norm between x and y. //! From GLM_GTX_norm extension. template GLM_FUNC_DECL T l2Norm( tvec3 const & x, - tvec3 const & y); - + tvec3 const & y) GLM_NOEXCEPT; + //! Returns the L2 norm of v. //! From GLM_GTX_norm extension. template GLM_FUNC_DECL T l2Norm( - tvec3 const & x); - + tvec3 const & x) GLM_NOEXCEPT; + //! Returns the L norm between x and y. //! From GLM_GTX_norm extension. template GLM_FUNC_DECL T lxNorm( tvec3 const & x, tvec3 const & y, - unsigned int Depth); + unsigned int Depth) GLM_NOEXCEPT; //! Returns the L norm of v. //! From GLM_GTX_norm extension. template GLM_FUNC_DECL T lxNorm( tvec3 const & x, - unsigned int Depth); + unsigned int Depth) GLM_NOEXCEPT; /// @} }//namespace glm diff --git a/glm/gtx/norm.inl b/glm/gtx/norm.inl index 2b8e9820..aa46ac2c 100644 --- a/glm/gtx/norm.inl +++ b/glm/gtx/norm.inl @@ -36,7 +36,7 @@ namespace glm GLM_FUNC_QUALIFIER T length2 ( T const & x - ) + ) GLM_NOEXCEPT { return x * x; } @@ -45,7 +45,7 @@ namespace glm GLM_FUNC_QUALIFIER T length2 ( tvec2 const & x - ) + ) GLM_NOEXCEPT { return dot(x, x); } @@ -54,7 +54,7 @@ namespace glm GLM_FUNC_QUALIFIER T length2 ( tvec3 const & x - ) + ) GLM_NOEXCEPT { return dot(x, x); } @@ -63,7 +63,7 @@ namespace glm GLM_FUNC_QUALIFIER T length2 ( tvec4 const & x - ) + ) GLM_NOEXCEPT { return dot(x, x); } @@ -73,7 +73,7 @@ namespace glm ( T const & p0, T const & p1 - ) + ) GLM_NOEXCEPT { return length2(p1 - p0); } @@ -83,7 +83,7 @@ namespace glm ( tvec2 const & p0, tvec2 const & p1 - ) + ) GLM_NOEXCEPT { return length2(p1 - p0); } @@ -93,7 +93,7 @@ namespace glm ( tvec3 const & p0, tvec3 const & p1 - ) + ) GLM_NOEXCEPT { return length2(p1 - p0); } @@ -103,7 +103,7 @@ namespace glm ( tvec4 const & p0, tvec4 const & p1 - ) + ) GLM_NOEXCEPT { return length2(p1 - p0); } @@ -113,7 +113,7 @@ namespace glm ( tvec3 const & a, tvec3 const & b - ) + ) GLM_NOEXCEPT { return abs(b.x - a.x) + abs(b.y - a.y) + abs(b.z - a.z); } @@ -122,7 +122,7 @@ namespace glm GLM_FUNC_QUALIFIER T l1Norm ( tvec3 const & v - ) + ) GLM_NOEXCEPT { return abs(v.x) + abs(v.y) + abs(v.z); } @@ -132,7 +132,7 @@ namespace glm ( tvec3 const & a, tvec3 const & b - ) + ) GLM_NOEXCEPT { return length(b - a); } @@ -141,7 +141,7 @@ namespace glm GLM_FUNC_QUALIFIER T l2Norm ( tvec3 const & v - ) + ) GLM_NOEXCEPT { return length(v); } @@ -152,7 +152,7 @@ namespace glm tvec3 const & x, tvec3 const & y, unsigned int Depth - ) + ) GLM_NOEXCEPT { return pow(pow(y.x - x.x, T(Depth)) + pow(y.y - x.y, T(Depth)) + pow(y.z - x.z, T(Depth)), T(1) / T(Depth)); } @@ -162,7 +162,7 @@ namespace glm ( tvec3 const & v, unsigned int Depth - ) + ) GLM_NOEXCEPT { return pow(pow(v.x, T(Depth)) + pow(v.y, T(Depth)) + pow(v.z, T(Depth)), T(1) / T(Depth)); } diff --git a/glm/gtx/normal.hpp b/glm/gtx/normal.hpp index 7ddb002d..f6f824b1 100644 --- a/glm/gtx/normal.hpp +++ b/glm/gtx/normal.hpp @@ -58,9 +58,9 @@ namespace glm //! From GLM_GTX_normal extension. template GLM_FUNC_DECL tvec3 triangleNormal( - tvec3 const & p1, - tvec3 const & p2, - tvec3 const & p3); + tvec3 const & p1, + tvec3 const & p2, + tvec3 const & p3) GLM_NOEXCEPT; /// @} }//namespace glm diff --git a/glm/gtx/normal.inl b/glm/gtx/normal.inl index 153e9a47..428bd281 100644 --- a/glm/gtx/normal.inl +++ b/glm/gtx/normal.inl @@ -38,7 +38,7 @@ namespace glm tvec3 const & p1, tvec3 const & p2, tvec3 const & p3 - ) + ) GLM_NOEXCEPT { return normalize(cross(p1 - p2, p1 - p3)); } diff --git a/glm/gtx/normalize_dot.hpp b/glm/gtx/normalize_dot.hpp index 1429c48d..d4fce5ec 100644 --- a/glm/gtx/normalize_dot.hpp +++ b/glm/gtx/normalize_dot.hpp @@ -59,14 +59,14 @@ namespace glm /// /// @see gtx_normalize_dot extension. template class vecType> - GLM_FUNC_DECL T normalizeDot(vecType const & x, vecType const & y); + GLM_FUNC_DECL T normalizeDot(vecType const & x, vecType const & y) GLM_NOEXCEPT; /// Normalize parameters and returns the dot product of x and y. /// Faster that dot(fastNormalize(x), fastNormalize(y)). /// /// @see gtx_normalize_dot extension. template class vecType> - GLM_FUNC_DECL T fastNormalizeDot(vecType const & x, vecType const & y); + GLM_FUNC_DECL T fastNormalizeDot(vecType const & x, vecType const & y) GLM_NOEXCEPT; /// @} }//namespace glm diff --git a/glm/gtx/normalize_dot.inl b/glm/gtx/normalize_dot.inl index 80df8dd1..84c0eaf7 100644 --- a/glm/gtx/normalize_dot.inl +++ b/glm/gtx/normalize_dot.inl @@ -33,13 +33,13 @@ namespace glm { template class vecType> - GLM_FUNC_QUALIFIER T normalizeDot(vecType const & x, vecType const & y) + GLM_FUNC_QUALIFIER T normalizeDot(vecType const & x, vecType const & y) GLM_NOEXCEPT { return glm::dot(x, y) * glm::inversesqrt(glm::dot(x, x) * glm::dot(y, y)); } template class vecType> - GLM_FUNC_QUALIFIER T fastNormalizeDot(vecType const & x, vecType const & y) + GLM_FUNC_QUALIFIER T fastNormalizeDot(vecType const & x, vecType const & y) GLM_NOEXCEPT { return glm::dot(x, y) * glm::fastInverseSqrt(glm::dot(x, x) * glm::dot(y, y)); } diff --git a/glm/gtx/optimum_pow.hpp b/glm/gtx/optimum_pow.hpp index e958de40..576bfadd 100644 --- a/glm/gtx/optimum_pow.hpp +++ b/glm/gtx/optimum_pow.hpp @@ -58,19 +58,19 @@ namespace gtx /// /// @see gtx_optimum_pow template - GLM_FUNC_DECL genType pow2(genType const & x); + GLM_FUNC_DECL genType pow2(genType const & x) GLM_NOEXCEPT; /// Returns x raised to the power of 3. /// /// @see gtx_optimum_pow template - GLM_FUNC_DECL genType pow3(genType const & x); + GLM_FUNC_DECL genType pow3(genType const & x) GLM_NOEXCEPT; /// Returns x raised to the power of 4. /// /// @see gtx_optimum_pow template - GLM_FUNC_DECL genType pow4(genType const & x); + GLM_FUNC_DECL genType pow4(genType const & x) GLM_NOEXCEPT; /// @} }//namespace gtx diff --git a/glm/gtx/optimum_pow.inl b/glm/gtx/optimum_pow.inl index d0c22ab9..91657385 100644 --- a/glm/gtx/optimum_pow.inl +++ b/glm/gtx/optimum_pow.inl @@ -33,19 +33,19 @@ namespace glm { template - GLM_FUNC_QUALIFIER genType pow2(genType const & x) + GLM_FUNC_QUALIFIER genType pow2(genType const & x) GLM_NOEXCEPT { return x * x; } template - GLM_FUNC_QUALIFIER genType pow3(genType const & x) + GLM_FUNC_QUALIFIER genType pow3(genType const & x) GLM_NOEXCEPT { return x * x * x; } template - GLM_FUNC_QUALIFIER genType pow4(genType const & x) + GLM_FUNC_QUALIFIER genType pow4(genType const & x) GLM_NOEXCEPT { return (x * x) * (x * x); } diff --git a/glm/gtx/orthonormalize.hpp b/glm/gtx/orthonormalize.hpp index d9f031d3..1b8841d8 100644 --- a/glm/gtx/orthonormalize.hpp +++ b/glm/gtx/orthonormalize.hpp @@ -59,14 +59,14 @@ namespace glm /// Returns the orthonormalized matrix of m. /// /// @see gtx_orthonormalize - template - GLM_FUNC_DECL tmat3x3 orthonormalize(tmat3x3 const & m); - + template + GLM_FUNC_DECL tmat3x3 orthonormalize(tmat3x3 const & m) GLM_NOEXCEPT; + /// Orthonormalizes x according y. /// /// @see gtx_orthonormalize - template - GLM_FUNC_DECL tvec3 orthonormalize(tvec3 const & x, tvec3 const & y); + template + GLM_FUNC_DECL tvec3 orthonormalize(tvec3 const & x, tvec3 const & y) GLM_NOEXCEPT; /// @} }//namespace glm diff --git a/glm/gtx/orthonormalize.inl b/glm/gtx/orthonormalize.inl index 07491a36..763d1f25 100644 --- a/glm/gtx/orthonormalize.inl +++ b/glm/gtx/orthonormalize.inl @@ -33,7 +33,7 @@ namespace glm { template - GLM_FUNC_QUALIFIER tmat3x3 orthonormalize(tmat3x3 const & m) + GLM_FUNC_QUALIFIER tmat3x3 orthonormalize(tmat3x3 const & m) GLM_NOEXCEPT { tmat3x3 r = m; @@ -51,8 +51,8 @@ namespace glm return r; } - template - GLM_FUNC_QUALIFIER tvec3 orthonormalize(tvec3 const & x, tvec3 const & y) + template + GLM_FUNC_QUALIFIER tvec3 orthonormalize(tvec3 const & x, tvec3 const & y) GLM_NOEXCEPT { return normalize(x - y * dot(y, x)); } diff --git a/glm/gtx/perpendicular.hpp b/glm/gtx/perpendicular.hpp index e8c7fc03..525c76b5 100644 --- a/glm/gtx/perpendicular.hpp +++ b/glm/gtx/perpendicular.hpp @@ -57,10 +57,10 @@ namespace glm //! Projects x a perpendicular axis of Normal. //! From GLM_GTX_perpendicular extension. - template + template GLM_FUNC_DECL vecType perp( - vecType const & x, - vecType const & Normal); + vecType const & x, + vecType const & Normal) GLM_NOEXCEPT; /// @} }//namespace glm diff --git a/glm/gtx/perpendicular.inl b/glm/gtx/perpendicular.inl index 4c321b74..273a38db 100644 --- a/glm/gtx/perpendicular.inl +++ b/glm/gtx/perpendicular.inl @@ -32,12 +32,12 @@ namespace glm { - template + template GLM_FUNC_QUALIFIER vecType perp ( - vecType const & x, + vecType const & x, vecType const & Normal - ) + ) GLM_NOEXCEPT { return x - proj(x, Normal); } diff --git a/glm/gtx/polar_coordinates.hpp b/glm/gtx/polar_coordinates.hpp index c5e3d8f5..811184dd 100644 --- a/glm/gtx/polar_coordinates.hpp +++ b/glm/gtx/polar_coordinates.hpp @@ -58,14 +58,14 @@ namespace glm /// @see gtx_polar_coordinates template GLM_FUNC_DECL tvec3 polar( - tvec3 const & euclidean); + tvec3 const & euclidean) GLM_NOEXCEPT; /// Convert Polar to Euclidean coordinates. /// /// @see gtx_polar_coordinates template GLM_FUNC_DECL tvec3 euclidean( - tvec2 const & polar); + tvec2 const & polar) GLM_NOEXCEPT; /// @} }//namespace glm diff --git a/glm/gtx/polar_coordinates.inl b/glm/gtx/polar_coordinates.inl index d1afbb23..2de2e783 100644 --- a/glm/gtx/polar_coordinates.inl +++ b/glm/gtx/polar_coordinates.inl @@ -36,7 +36,7 @@ namespace glm GLM_FUNC_QUALIFIER tvec3 polar ( tvec3 const & euclidean - ) + ) GLM_NOEXCEPT { T const Length(length(euclidean)); tvec3 const tmp(euclidean / Length); @@ -52,7 +52,7 @@ namespace glm GLM_FUNC_QUALIFIER tvec3 euclidean ( tvec2 const & polar - ) + ) GLM_NOEXCEPT { T const latitude(polar.x); T const longitude(polar.y); diff --git a/glm/gtx/projection.hpp b/glm/gtx/projection.hpp index e64065b6..e4c7af87 100644 --- a/glm/gtx/projection.hpp +++ b/glm/gtx/projection.hpp @@ -57,7 +57,7 @@ namespace glm /// /// @see gtx_projection template - GLM_FUNC_DECL vecType proj(vecType const & x, vecType const & Normal); + GLM_FUNC_DECL vecType proj(vecType const & x, vecType const & Normal) GLM_NOEXCEPT; /// @} }//namespace glm diff --git a/glm/gtx/projection.inl b/glm/gtx/projection.inl index c46b96a2..52db3a27 100644 --- a/glm/gtx/projection.inl +++ b/glm/gtx/projection.inl @@ -33,7 +33,7 @@ namespace glm { template - GLM_FUNC_QUALIFIER vecType proj(vecType const & x, vecType const & Normal) + GLM_FUNC_QUALIFIER vecType proj(vecType const & x, vecType const & Normal) GLM_NOEXCEPT { return glm::dot(x, Normal) / glm::dot(Normal, Normal) * Normal; } diff --git a/glm/gtx/quaternion.hpp b/glm/gtx/quaternion.hpp index 34d940a1..1dd010f9 100644 --- a/glm/gtx/quaternion.hpp +++ b/glm/gtx/quaternion.hpp @@ -63,7 +63,7 @@ namespace glm template GLM_FUNC_DECL tvec3 cross( tquat const & q, - tvec3 const & v); + tvec3 const & v) GLM_NOEXCEPT; //! Compute a cross product between a vector and a quaternion. /// @@ -71,7 +71,7 @@ namespace glm template GLM_FUNC_DECL tvec3 cross( tvec3 const & v, - tquat const & q); + tquat const & q) GLM_NOEXCEPT; //! Compute a point on a path according squad equation. //! q1 and q2 are control points; s1 and s2 are intermediate control points. @@ -83,7 +83,7 @@ namespace glm tquat const & q2, tquat const & s1, tquat const & s2, - T const & h); + T const & h) GLM_NOEXCEPT; //! Returns an intermediate control point for squad interpolation. /// @@ -92,21 +92,21 @@ namespace glm GLM_FUNC_DECL tquat intermediate( tquat const & prev, tquat const & curr, - tquat const & next); + tquat const & next) GLM_NOEXCEPT; //! Returns a exp of a quaternion. /// /// @see gtx_quaternion template GLM_FUNC_DECL tquat exp( - tquat const & q); + tquat const & q) GLM_NOEXCEPT; //! Returns a log of a quaternion. /// /// @see gtx_quaternion template GLM_FUNC_DECL tquat log( - tquat const & q); + tquat const & q) GLM_NOEXCEPT; /// Returns x raised to the y power. /// @@ -114,14 +114,14 @@ namespace glm template GLM_FUNC_DECL tquat pow( tquat const & x, - T const & y); + T const & y) GLM_NOEXCEPT; //! Returns quarternion square root. /// /// @see gtx_quaternion //template //tquat sqrt( - // tquat const & q); + // tquat const & q) GLM_NOEXCEPT; //! Rotates a 3 components vector by a quaternion. /// @@ -129,7 +129,7 @@ namespace glm template GLM_FUNC_DECL tvec3 rotate( tquat const & q, - tvec3 const & v); + tvec3 const & v) GLM_NOEXCEPT; /// Rotates a 4 components vector by a quaternion. /// @@ -137,42 +137,42 @@ namespace glm template GLM_FUNC_DECL tvec4 rotate( tquat const & q, - tvec4 const & v); + tvec4 const & v) GLM_NOEXCEPT; /// Extract the real component of a quaternion. /// /// @see gtx_quaternion template GLM_FUNC_DECL T extractRealComponent( - tquat const & q); + tquat const & q) GLM_NOEXCEPT; /// Converts a quaternion to a 3 * 3 matrix. /// /// @see gtx_quaternion template GLM_FUNC_DECL tmat3x3 toMat3( - tquat const & x){return mat3_cast(x);} + tquat const & x) GLM_NOEXCEPT {return mat3_cast(x);} /// Converts a quaternion to a 4 * 4 matrix. /// /// @see gtx_quaternion template GLM_FUNC_DECL tmat4x4 toMat4( - tquat const & x){return mat4_cast(x);} + tquat const & x) GLM_NOEXCEPT {return mat4_cast(x);} /// Converts a 3 * 3 matrix to a quaternion. /// /// @see gtx_quaternion template GLM_FUNC_DECL tquat toQuat( - tmat3x3 const & x){return quat_cast(x);} + tmat3x3 const & x) GLM_NOEXCEPT {return quat_cast(x);} /// Converts a 4 * 4 matrix to a quaternion. /// /// @see gtx_quaternion template GLM_FUNC_DECL tquat toQuat( - tmat4x4 const & x){return quat_cast(x);} + tmat4x4 const & x) GLM_NOEXCEPT {return quat_cast(x);} /// Quaternion interpolation using the rotation short path. /// @@ -181,7 +181,7 @@ namespace glm GLM_FUNC_DECL tquat shortMix( tquat const & x, tquat const & y, - T const & a); + T const & a) GLM_NOEXCEPT; /// Quaternion normalized linear interpolation. /// @@ -190,7 +190,7 @@ namespace glm GLM_FUNC_DECL tquat fastMix( tquat const & x, tquat const & y, - T const & a); + T const & a) GLM_NOEXCEPT; /// Compute the rotation between two vectors. /// param orig vector, needs to be normalized @@ -199,14 +199,14 @@ namespace glm /// @see gtx_quaternion template GLM_FUNC_DECL tquat rotation( - tvec3 const & orig, - tvec3 const & dest); + tvec3 const & orig, + tvec3 const & dest) GLM_NOEXCEPT; /// Returns the squared length of x. - /// + /// /// @see gtx_quaternion template - GLM_FUNC_DECL T length2(tquat const & q); + GLM_FUNC_DECL T length2(tquat const & q) GLM_NOEXCEPT; /// @} }//namespace glm diff --git a/glm/gtx/quaternion.inl b/glm/gtx/quaternion.inl index b405cc5e..ef70ac1a 100644 --- a/glm/gtx/quaternion.inl +++ b/glm/gtx/quaternion.inl @@ -40,7 +40,7 @@ namespace glm ( tvec3 const & v, tquat const & q - ) + ) GLM_NOEXCEPT { return inverse(q) * v; } @@ -50,7 +50,7 @@ namespace glm ( tquat const & q, tvec3 const & v - ) + ) GLM_NOEXCEPT { return q * v; } @@ -62,7 +62,7 @@ namespace glm tquat const & q2, tquat const & s1, tquat const & s2, - T const & h) + T const & h) GLM_NOEXCEPT { return mix(mix(q1, q2, h), mix(s1, s2, h), static_cast(2) * (static_cast(1) - h) * h); } @@ -73,7 +73,7 @@ namespace glm tquat const & prev, tquat const & curr, tquat const & next - ) + ) GLM_NOEXCEPT { tquat invQuat = inverse(curr); return exp((log(next + invQuat) + log(prev + invQuat)) / static_cast(-4)) * curr; @@ -83,7 +83,7 @@ namespace glm GLM_FUNC_QUALIFIER tquat exp ( tquat const & q - ) + ) GLM_NOEXCEPT { tvec3 u(q.x, q.y, q.z); T Angle = glm::length(u); @@ -98,7 +98,7 @@ namespace glm GLM_FUNC_QUALIFIER tquat log ( tquat const & q - ) + ) GLM_NOEXCEPT { tvec3 u(q.x, q.y, q.z); T Vec3Len = length(u); @@ -121,7 +121,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tquat pow(tquat const & x, T const & y) + GLM_FUNC_QUALIFIER tquat pow(tquat const & x, T const & y) GLM_NOEXCEPT { //Raising to the power of 0 should yield 1 //Needed to prevent a division by 0 error later on @@ -149,7 +149,7 @@ namespace glm ( tquat const & q, tvec3 const & v - ) + ) GLM_NOEXCEPT { return q * v; } @@ -159,7 +159,7 @@ namespace glm ( tquat const & q, tvec4 const & v - ) + ) GLM_NOEXCEPT { return q * v; } @@ -168,7 +168,7 @@ namespace glm GLM_FUNC_QUALIFIER T extractRealComponent ( tquat const & q - ) + ) GLM_NOEXCEPT { T w = static_cast(1) - q.x * q.x - q.y * q.y - q.z * q.z; if(w < T(0)) @@ -181,7 +181,7 @@ namespace glm GLM_FUNC_QUALIFIER T length2 ( tquat const & q - ) + ) GLM_NOEXCEPT { return q.x * q.x + q.y * q.y + q.z * q.z + q.w * q.w; } @@ -192,7 +192,7 @@ namespace glm tquat const & x, tquat const & y, T const & a - ) + ) GLM_NOEXCEPT { if(a <= static_cast(0)) return x; if(a >= static_cast(1)) return y; @@ -234,7 +234,7 @@ namespace glm tquat const & x, tquat const & y, T const & a - ) + ) GLM_NOEXCEPT { return glm::normalize(x * (static_cast(1) - a) + (y * a)); } @@ -244,7 +244,7 @@ namespace glm ( tvec3 const & orig, tvec3 const & dest - ) + ) GLM_NOEXCEPT { T cosTheta = dot(orig, dest); tvec3 rotationAxis; @@ -274,7 +274,7 @@ namespace glm T invs = static_cast(1) / s; return tquat( - s * static_cast(0.5f), + s * static_cast(0.5f), rotationAxis.x * invs, rotationAxis.y * invs, rotationAxis.z * invs); diff --git a/glm/gtx/range.hpp b/glm/gtx/range.hpp index 19ae2409..ffc4aee6 100644 --- a/glm/gtx/range.hpp +++ b/glm/gtx/range.hpp @@ -55,22 +55,22 @@ namespace detail /* The glm types provide a .length() member, but for matrices this only defines the number of columns, so we need to work around this */ template - detail::component_count_t number_of_elements_(tvec2 const & v){ + detail::component_count_t number_of_elements_(tvec2 const & v) GLM_NOEXCEPT { return detail::component_count(v); } template - detail::component_count_t number_of_elements_(tvec3 const & v){ + detail::component_count_t number_of_elements_(tvec3 const & v) GLM_NOEXCEPT { return detail::component_count(v); } template - detail::component_count_t number_of_elements_(tvec4 const & v){ + detail::component_count_t number_of_elements_(tvec4 const & v) GLM_NOEXCEPT { return detail::component_count(v); } template - detail::component_count_t number_of_elements_(genType const & m){ + detail::component_count_t number_of_elements_(genType const & m) GLM_NOEXCEPT { return detail::component_count(m) * detail::component_count(m[0]); } }//namespace @@ -79,22 +79,22 @@ namespace detail /// @{ template - const typename genType::value_type * begin(genType const & v){ + const typename genType::value_type * begin(genType const & v) GLM_NOEXCEPT { return value_ptr(v); } template - const typename genType::value_type * end(genType const & v){ + const typename genType::value_type * end(genType const & v) GLM_NOEXCEPT { return begin(v) + detail::number_of_elements_(v); } template - typename genType::value_type * begin(genType& v){ + typename genType::value_type * begin(genType& v) GLM_NOEXCEPT { return value_ptr(v); } template - typename genType::value_type * end(genType& v){ + typename genType::value_type * end(genType& v) GLM_NOEXCEPT { return begin(v) + detail::number_of_elements_(v); } diff --git a/glm/gtx/rotate_normalized_axis.hpp b/glm/gtx/rotate_normalized_axis.hpp index 9deba38f..ca6ffc13 100644 --- a/glm/gtx/rotate_normalized_axis.hpp +++ b/glm/gtx/rotate_normalized_axis.hpp @@ -72,7 +72,7 @@ namespace glm GLM_FUNC_DECL tmat4x4 rotateNormalizedAxis( tmat4x4 const & m, T const & angle, - tvec3 const & axis); + tvec3 const & axis) GLM_NOEXCEPT; /// Rotates a quaternion from a vector of 3 components normalized axis and an angle. /// @@ -85,7 +85,7 @@ namespace glm GLM_FUNC_DECL tquat rotateNormalizedAxis( tquat const & q, T const & angle, - tvec3 const & axis); + tvec3 const & axis) GLM_NOEXCEPT; /// @} }//namespace glm diff --git a/glm/gtx/rotate_normalized_axis.inl b/glm/gtx/rotate_normalized_axis.inl index 9bb257ca..89d129c8 100644 --- a/glm/gtx/rotate_normalized_axis.inl +++ b/glm/gtx/rotate_normalized_axis.inl @@ -38,7 +38,7 @@ namespace glm tmat4x4 const & m, T const & angle, tvec3 const & v - ) + ) GLM_NOEXCEPT { T const a = angle; T const c = cos(a); @@ -72,10 +72,10 @@ namespace glm template GLM_FUNC_QUALIFIER tquat rotateNormalizedAxis ( - tquat const & q, + tquat const & q, T const & angle, tvec3 const & v - ) + ) GLM_NOEXCEPT { tvec3 const Tmp(v); diff --git a/glm/gtx/rotate_vector.hpp b/glm/gtx/rotate_vector.hpp index 36a45d5f..3c2bbb7d 100644 --- a/glm/gtx/rotate_vector.hpp +++ b/glm/gtx/rotate_vector.hpp @@ -66,79 +66,79 @@ namespace glm GLM_FUNC_DECL tvec3 slerp( tvec3 const & x, tvec3 const & y, - T const & a); + T const & a) GLM_NOEXCEPT; //! Rotate a two dimensional vector. //! From GLM_GTX_rotate_vector extension. template GLM_FUNC_DECL tvec2 rotate( tvec2 const & v, - T const & angle); - + T const & angle) GLM_NOEXCEPT; + //! Rotate a three dimensional vector around an axis. //! From GLM_GTX_rotate_vector extension. template GLM_FUNC_DECL tvec3 rotate( tvec3 const & v, T const & angle, - tvec3 const & normal); - + tvec3 const & normal) GLM_NOEXCEPT; + //! Rotate a four dimensional vector around an axis. //! From GLM_GTX_rotate_vector extension. template GLM_FUNC_DECL tvec4 rotate( tvec4 const & v, T const & angle, - tvec3 const & normal); - + tvec3 const & normal) GLM_NOEXCEPT; + //! Rotate a three dimensional vector around the X axis. //! From GLM_GTX_rotate_vector extension. template GLM_FUNC_DECL tvec3 rotateX( tvec3 const & v, - T const & angle); + T const & angle) GLM_NOEXCEPT; //! Rotate a three dimensional vector around the Y axis. //! From GLM_GTX_rotate_vector extension. template GLM_FUNC_DECL tvec3 rotateY( tvec3 const & v, - T const & angle); - + T const & angle) GLM_NOEXCEPT; + //! Rotate a three dimensional vector around the Z axis. //! From GLM_GTX_rotate_vector extension. template GLM_FUNC_DECL tvec3 rotateZ( tvec3 const & v, - T const & angle); - + T const & angle) GLM_NOEXCEPT; + //! Rotate a four dimentionnals vector around the X axis. //! From GLM_GTX_rotate_vector extension. template GLM_FUNC_DECL tvec4 rotateX( tvec4 const & v, - T const & angle); - + T const & angle) GLM_NOEXCEPT; + //! Rotate a four dimensional vector around the X axis. //! From GLM_GTX_rotate_vector extension. template GLM_FUNC_DECL tvec4 rotateY( tvec4 const & v, - T const & angle); - + T const & angle) GLM_NOEXCEPT; + //! Rotate a four dimensional vector around the X axis. //! From GLM_GTX_rotate_vector extension. template GLM_FUNC_DECL tvec4 rotateZ( tvec4 const & v, - T const & angle); - + T const & angle) GLM_NOEXCEPT; + //! Build a rotation matrix from a normal and a up vector. //! From GLM_GTX_rotate_vector extension. template GLM_FUNC_DECL tmat4x4 orientation( tvec3 const & Normal, - tvec3 const & Up); + tvec3 const & Up) GLM_NOEXCEPT; /// @} }//namespace glm diff --git a/glm/gtx/rotate_vector.inl b/glm/gtx/rotate_vector.inl index cdac5744..0b96427e 100644 --- a/glm/gtx/rotate_vector.inl +++ b/glm/gtx/rotate_vector.inl @@ -38,7 +38,7 @@ namespace glm tvec3 const & x, tvec3 const & y, T const & a - ) + ) GLM_NOEXCEPT { // get cosine of angle between vectors (-1 -> 1) T CosAlpha = dot(x, y); @@ -59,7 +59,7 @@ namespace glm ( tvec2 const & v, T const & angle - ) + ) GLM_NOEXCEPT { tvec2 Result; T const Cos(cos(angle)); @@ -76,7 +76,7 @@ namespace glm tvec3 const & v, T const & angle, tvec3 const & normal - ) + ) GLM_NOEXCEPT { return tmat3x3(glm::rotate(angle, normal)) * v; } @@ -98,7 +98,7 @@ namespace glm tvec4 const & v, T const & angle, tvec3 const & normal - ) + ) GLM_NOEXCEPT { return rotate(angle, normal) * v; } @@ -108,7 +108,7 @@ namespace glm ( tvec3 const & v, T const & angle - ) + ) GLM_NOEXCEPT { tvec3 Result(v); T const Cos(cos(angle)); @@ -124,7 +124,7 @@ namespace glm ( tvec3 const & v, T const & angle - ) + ) GLM_NOEXCEPT { tvec3 Result = v; T const Cos(cos(angle)); @@ -140,7 +140,7 @@ namespace glm ( tvec3 const & v, T const & angle - ) + ) GLM_NOEXCEPT { tvec3 Result = v; T const Cos(cos(angle)); @@ -156,7 +156,7 @@ namespace glm ( tvec4 const & v, T const & angle - ) + ) GLM_NOEXCEPT { tvec4 Result = v; T const Cos(cos(angle)); @@ -172,7 +172,7 @@ namespace glm ( tvec4 const & v, T const & angle - ) + ) GLM_NOEXCEPT { tvec4 Result = v; T const Cos(cos(angle)); @@ -188,7 +188,7 @@ namespace glm ( tvec4 const & v, T const & angle - ) + ) GLM_NOEXCEPT { tvec4 Result = v; T const Cos(cos(angle)); @@ -204,7 +204,7 @@ namespace glm ( tvec3 const & Normal, tvec3 const & Up - ) + ) GLM_NOEXCEPT { if(all(equal(Normal, Up))) return tmat4x4(T(1)); diff --git a/glm/gtx/scalar_multiplication.hpp b/glm/gtx/scalar_multiplication.hpp index 3b34d2b3..dc0650be 100644 --- a/glm/gtx/scalar_multiplication.hpp +++ b/glm/gtx/scalar_multiplication.hpp @@ -64,19 +64,19 @@ namespace glm #define GLM_IMPLEMENT_SCAL_MULT(Vec) \ template \ return_type_scalar_multiplication \ - operator*(T const & s, Vec rh){ \ + operator*(T const & s, Vec rh) GLM_NOEXCEPT { \ return rh *= static_cast(s); \ } \ \ template \ return_type_scalar_multiplication \ - operator*(Vec lh, T const & s){ \ + operator*(Vec lh, T const & s) GLM_NOEXCEPT { \ return lh *= static_cast(s); \ } \ \ template \ return_type_scalar_multiplication \ - operator/(Vec lh, T const & s){ \ + operator/(Vec lh, T const & s) GLM_NOEXCEPT { \ return lh *= 1.0f / s; \ } diff --git a/glm/gtx/scalar_relational.inl b/glm/gtx/scalar_relational.inl index b28c8cfe..24f48e6b 100644 --- a/glm/gtx/scalar_relational.inl +++ b/glm/gtx/scalar_relational.inl @@ -35,9 +35,9 @@ namespace glm template GLM_FUNC_QUALIFIER bool lessThan ( - T const & x, + T const & x, T const & y - ) + ) GLM_NOEXCEPT { return x < y; } @@ -45,9 +45,9 @@ namespace glm template GLM_FUNC_QUALIFIER bool lessThanEqual ( - T const & x, + T const & x, T const & y - ) + ) GLM_NOEXCEPT { return x <= y; } @@ -55,9 +55,9 @@ namespace glm template GLM_FUNC_QUALIFIER bool greaterThan ( - T const & x, + T const & x, T const & y - ) + ) GLM_NOEXCEPT { return x > y; } @@ -65,9 +65,9 @@ namespace glm template GLM_FUNC_QUALIFIER bool greaterThanEqual ( - T const & x, + T const & x, T const & y - ) + ) GLM_NOEXCEPT { return x >= y; } @@ -75,9 +75,9 @@ namespace glm template GLM_FUNC_QUALIFIER bool equal ( - T const & x, + T const & x, T const & y - ) + ) GLM_NOEXCEPT { return x == y; } @@ -85,9 +85,9 @@ namespace glm template GLM_FUNC_QUALIFIER bool notEqual ( - T const & x, + T const & x, T const & y - ) + ) GLM_NOEXCEPT { return x != y; } @@ -95,7 +95,7 @@ namespace glm GLM_FUNC_QUALIFIER bool any ( bool const & x - ) + ) GLM_NOEXCEPT { return x; } @@ -103,7 +103,7 @@ namespace glm GLM_FUNC_QUALIFIER bool all ( bool const & x - ) + ) GLM_NOEXCEPT { return x; } @@ -111,7 +111,7 @@ namespace glm GLM_FUNC_QUALIFIER bool not_ ( bool const & x - ) + ) GLM_NOEXCEPT { return !x; } diff --git a/glm/gtx/spline.hpp b/glm/gtx/spline.hpp index 09fcf4e1..b86bd4ea 100644 --- a/glm/gtx/spline.hpp +++ b/glm/gtx/spline.hpp @@ -56,33 +56,33 @@ namespace glm /// Return a point from a catmull rom curve. /// @see gtx_spline extension. - template + template GLM_FUNC_DECL genType catmullRom( - genType const & v1, - genType const & v2, - genType const & v3, - genType const & v4, - typename genType::value_type const & s); - + genType const & v1, + genType const & v2, + genType const & v3, + genType const & v4, + typename genType::value_type const & s) GLM_NOEXCEPT; + /// Return a point from a hermite curve. /// @see gtx_spline extension. - template + template GLM_FUNC_DECL genType hermite( - genType const & v1, - genType const & t1, - genType const & v2, - genType const & t2, - typename genType::value_type const & s); - - /// Return a point from a cubic curve. + genType const & v1, + genType const & t1, + genType const & v2, + genType const & t2, + typename genType::value_type const & s) GLM_NOEXCEPT; + + /// Return a point from a cubic curve. /// @see gtx_spline extension. - template + template GLM_FUNC_DECL genType cubic( - genType const & v1, - genType const & v2, - genType const & v3, - genType const & v4, - typename genType::value_type const & s); + genType const & v1, + genType const & v2, + genType const & v3, + genType const & v4, + typename genType::value_type const & s) GLM_NOEXCEPT; /// @} }//namespace glm diff --git a/glm/gtx/spline.inl b/glm/gtx/spline.inl index befdc3c6..8e653c4f 100644 --- a/glm/gtx/spline.inl +++ b/glm/gtx/spline.inl @@ -40,7 +40,7 @@ namespace glm genType const & v3, genType const & v4, typename genType::value_type const & s - ) + ) GLM_NOEXCEPT { typename genType::value_type s1 = s; typename genType::value_type s2 = pow2(s); @@ -63,7 +63,7 @@ namespace glm genType const & v2, genType const & t2, typename genType::value_type const & s - ) + ) GLM_NOEXCEPT { typename genType::value_type s1 = s; typename genType::value_type s2 = pow2(s); @@ -85,7 +85,7 @@ namespace glm genType const & v3, genType const & v4, typename genType::value_type const & s - ) + ) GLM_NOEXCEPT { return ((v1 * s + v2) * s + v3) * s + v4; } diff --git a/glm/gtx/string_cast.hpp b/glm/gtx/string_cast.hpp index c292efd1..0a185654 100644 --- a/glm/gtx/string_cast.hpp +++ b/glm/gtx/string_cast.hpp @@ -68,7 +68,7 @@ namespace glm /// Create a string from a GLM vector or matrix typed variable. /// @see gtx_string_cast extension. template