diff --git a/glm/gtc/bitfield.hpp b/glm/gtc/bitfield.hpp index c875d033..1291479f 100644 --- a/glm/gtc/bitfield.hpp +++ b/glm/gtc/bitfield.hpp @@ -62,173 +62,173 @@ namespace glm /// /// @see gtc_bitfield template - GLM_FUNC_DECL genIUType mask(genIUType Bits); + GLM_FUNC_DECL genIUType mask(genIUType Bits) GLM_NOEXCEPT; /// Build a mask of 'count' bits /// /// @see gtc_bitfield template class vecIUType> - GLM_FUNC_DECL vecIUType mask(vecIUType const & v); + GLM_FUNC_DECL vecIUType mask(vecIUType const & v) GLM_NOEXCEPT; /// Rotate all bits to the right. All the bits dropped in the right side are inserted back on the left side. /// /// @see gtc_bitfield template - GLM_FUNC_DECL genIUType bitfieldRotateRight(genIUType In, int Shift); + GLM_FUNC_DECL genIUType bitfieldRotateRight(genIUType In, int Shift) GLM_NOEXCEPT; /// Rotate all bits to the right. All the bits dropped in the right side are inserted back on the left side. /// /// @see gtc_bitfield template class vecType> - GLM_FUNC_DECL vecType bitfieldRotateRight(vecType const & In, int Shift); + GLM_FUNC_DECL vecType bitfieldRotateRight(vecType const & In, int Shift) GLM_NOEXCEPT; /// Rotate all bits to the left. All the bits dropped in the left side are inserted back on the right side. /// /// @see gtc_bitfield template - GLM_FUNC_DECL genIUType bitfieldRotateLeft(genIUType In, int Shift); + GLM_FUNC_DECL genIUType bitfieldRotateLeft(genIUType In, int Shift) GLM_NOEXCEPT; /// Rotate all bits to the left. All the bits dropped in the left side are inserted back on the right side. /// /// @see gtc_bitfield template class vecType> - GLM_FUNC_DECL vecType bitfieldRotateLeft(vecType const & In, int Shift); + GLM_FUNC_DECL vecType bitfieldRotateLeft(vecType const & In, int Shift) GLM_NOEXCEPT; /// Set to 1 a range of bits. /// /// @see gtc_bitfield template - GLM_FUNC_DECL genIUType bitfieldFillOne(genIUType Value, int FirstBit, int BitCount); + GLM_FUNC_DECL genIUType bitfieldFillOne(genIUType Value, int FirstBit, int BitCount) GLM_NOEXCEPT; /// Set to 1 a range of bits. /// /// @see gtc_bitfield template class vecType> - GLM_FUNC_DECL vecType bitfieldFillOne(vecType const & Value, int FirstBit, int BitCount); + GLM_FUNC_DECL vecType bitfieldFillOne(vecType const & Value, int FirstBit, int BitCount) GLM_NOEXCEPT; /// Set to 0 a range of bits. /// /// @see gtc_bitfield template - GLM_FUNC_DECL genIUType bitfieldFillZero(genIUType Value, int FirstBit, int BitCount); + GLM_FUNC_DECL genIUType bitfieldFillZero(genIUType Value, int FirstBit, int BitCount) GLM_NOEXCEPT; /// Set to 0 a range of bits. /// /// @see gtc_bitfield template class vecType> - GLM_FUNC_DECL vecType bitfieldFillZero(vecType const & Value, int FirstBit, int BitCount); + GLM_FUNC_DECL vecType bitfieldFillZero(vecType const & Value, int FirstBit, int BitCount) GLM_NOEXCEPT; /// Interleaves the bits of x and y. /// The first bit is the first bit of x followed by the first bit of y. /// The other bits are interleaved following the previous sequence. /// /// @see gtc_bitfield - GLM_FUNC_DECL int16 bitfieldInterleave(int8 x, int8 y); + GLM_FUNC_DECL int16 bitfieldInterleave(int8 x, int8 y) GLM_NOEXCEPT; /// Interleaves the bits of x and y. /// The first bit is the first bit of x followed by the first bit of y. /// The other bits are interleaved following the previous sequence. /// /// @see gtc_bitfield - GLM_FUNC_DECL uint16 bitfieldInterleave(uint8 x, uint8 y); + GLM_FUNC_DECL uint16 bitfieldInterleave(uint8 x, uint8 y) GLM_NOEXCEPT; /// Interleaves the bits of x and y. /// The first bit is the first bit of x followed by the first bit of y. /// The other bits are interleaved following the previous sequence. /// /// @see gtc_bitfield - GLM_FUNC_DECL int32 bitfieldInterleave(int16 x, int16 y); + GLM_FUNC_DECL int32 bitfieldInterleave(int16 x, int16 y) GLM_NOEXCEPT; /// Interleaves the bits of x and y. /// The first bit is the first bit of x followed by the first bit of y. /// The other bits are interleaved following the previous sequence. /// /// @see gtc_bitfield - GLM_FUNC_DECL uint32 bitfieldInterleave(uint16 x, uint16 y); + GLM_FUNC_DECL uint32 bitfieldInterleave(uint16 x, uint16 y) GLM_NOEXCEPT; /// Interleaves the bits of x and y. /// The first bit is the first bit of x followed by the first bit of y. /// The other bits are interleaved following the previous sequence. /// /// @see gtc_bitfield - GLM_FUNC_DECL int64 bitfieldInterleave(int32 x, int32 y); + GLM_FUNC_DECL int64 bitfieldInterleave(int32 x, int32 y) GLM_NOEXCEPT; /// Interleaves the bits of x and y. /// The first bit is the first bit of x followed by the first bit of y. /// The other bits are interleaved following the previous sequence. /// /// @see gtc_bitfield - GLM_FUNC_DECL uint64 bitfieldInterleave(uint32 x, uint32 y); + GLM_FUNC_DECL uint64 bitfieldInterleave(uint32 x, uint32 y) GLM_NOEXCEPT; /// Interleaves the bits of x, y and z. /// The first bit is the first bit of x followed by the first bit of y and the first bit of z. /// The other bits are interleaved following the previous sequence. /// /// @see gtc_bitfield - GLM_FUNC_DECL int32 bitfieldInterleave(int8 x, int8 y, int8 z); + GLM_FUNC_DECL int32 bitfieldInterleave(int8 x, int8 y, int8 z) GLM_NOEXCEPT; /// Interleaves the bits of x, y and z. /// The first bit is the first bit of x followed by the first bit of y and the first bit of z. /// The other bits are interleaved following the previous sequence. /// /// @see gtc_bitfield - GLM_FUNC_DECL uint32 bitfieldInterleave(uint8 x, uint8 y, uint8 z); + GLM_FUNC_DECL uint32 bitfieldInterleave(uint8 x, uint8 y, uint8 z) GLM_NOEXCEPT; /// Interleaves the bits of x, y and z. /// The first bit is the first bit of x followed by the first bit of y and the first bit of z. /// The other bits are interleaved following the previous sequence. /// /// @see gtc_bitfield - GLM_FUNC_DECL int64 bitfieldInterleave(int16 x, int16 y, int16 z); + GLM_FUNC_DECL int64 bitfieldInterleave(int16 x, int16 y, int16 z) GLM_NOEXCEPT; /// Interleaves the bits of x, y and z. /// The first bit is the first bit of x followed by the first bit of y and the first bit of z. /// The other bits are interleaved following the previous sequence. /// /// @see gtc_bitfield - GLM_FUNC_DECL uint64 bitfieldInterleave(uint16 x, uint16 y, uint16 z); + GLM_FUNC_DECL uint64 bitfieldInterleave(uint16 x, uint16 y, uint16 z) GLM_NOEXCEPT; /// Interleaves the bits of x, y and z. /// The first bit is the first bit of x followed by the first bit of y and the first bit of z. /// The other bits are interleaved following the previous sequence. /// /// @see gtc_bitfield - GLM_FUNC_DECL int64 bitfieldInterleave(int32 x, int32 y, int32 z); + GLM_FUNC_DECL int64 bitfieldInterleave(int32 x, int32 y, int32 z) GLM_NOEXCEPT; /// Interleaves the bits of x, y and z. /// The first bit is the first bit of x followed by the first bit of y and the first bit of z. /// The other bits are interleaved following the previous sequence. /// /// @see gtc_bitfield - GLM_FUNC_DECL uint64 bitfieldInterleave(uint32 x, uint32 y, uint32 z); + GLM_FUNC_DECL uint64 bitfieldInterleave(uint32 x, uint32 y, uint32 z) GLM_NOEXCEPT; /// Interleaves the bits of x, y, z and w. /// The first bit is the first bit of x followed by the first bit of y, the first bit of z and finally the first bit of w. /// The other bits are interleaved following the previous sequence. /// /// @see gtc_bitfield - GLM_FUNC_DECL int32 bitfieldInterleave(int8 x, int8 y, int8 z, int8 w); + GLM_FUNC_DECL int32 bitfieldInterleave(int8 x, int8 y, int8 z, int8 w) GLM_NOEXCEPT; /// Interleaves the bits of x, y, z and w. /// The first bit is the first bit of x followed by the first bit of y, the first bit of z and finally the first bit of w. /// The other bits are interleaved following the previous sequence. /// /// @see gtc_bitfield - GLM_FUNC_DECL uint32 bitfieldInterleave(uint8 x, uint8 y, uint8 z, uint8 w); + GLM_FUNC_DECL uint32 bitfieldInterleave(uint8 x, uint8 y, uint8 z, uint8 w) GLM_NOEXCEPT; /// Interleaves the bits of x, y, z and w. /// The first bit is the first bit of x followed by the first bit of y, the first bit of z and finally the first bit of w. /// The other bits are interleaved following the previous sequence. /// /// @see gtc_bitfield - GLM_FUNC_DECL int64 bitfieldInterleave(int16 x, int16 y, int16 z, int16 w); + GLM_FUNC_DECL int64 bitfieldInterleave(int16 x, int16 y, int16 z, int16 w) GLM_NOEXCEPT; /// Interleaves the bits of x, y, z and w. /// The first bit is the first bit of x followed by the first bit of y, the first bit of z and finally the first bit of w. /// The other bits are interleaved following the previous sequence. /// /// @see gtc_bitfield - GLM_FUNC_DECL uint64 bitfieldInterleave(uint16 x, uint16 y, uint16 z, uint16 w); + GLM_FUNC_DECL uint64 bitfieldInterleave(uint16 x, uint16 y, uint16 z, uint16 w) GLM_NOEXCEPT; /// @} } //namespace glm diff --git a/glm/gtc/bitfield.inl b/glm/gtc/bitfield.inl index 11702627..96a84d96 100644 --- a/glm/gtc/bitfield.inl +++ b/glm/gtc/bitfield.inl @@ -34,16 +34,16 @@ namespace glm{ namespace detail { template - GLM_FUNC_DECL RET bitfieldInterleave(PARAM x, PARAM y); + GLM_FUNC_DECL RET bitfieldInterleave(PARAM x, PARAM y) GLM_NOEXCEPT; template - GLM_FUNC_DECL RET bitfieldInterleave(PARAM x, PARAM y, PARAM z); + GLM_FUNC_DECL RET bitfieldInterleave(PARAM x, PARAM y, PARAM z) GLM_NOEXCEPT; template - GLM_FUNC_DECL RET bitfieldInterleave(PARAM x, PARAM y, PARAM z, PARAM w); + GLM_FUNC_DECL RET bitfieldInterleave(PARAM x, PARAM y, PARAM z, PARAM w) GLM_NOEXCEPT; template <> - GLM_FUNC_QUALIFIER glm::uint16 bitfieldInterleave(glm::uint8 x, glm::uint8 y) + GLM_FUNC_QUALIFIER glm::uint16 bitfieldInterleave(glm::uint8 x, glm::uint8 y) GLM_NOEXCEPT { glm::uint16 REG1(x); glm::uint16 REG2(y); @@ -61,7 +61,7 @@ namespace detail } template <> - GLM_FUNC_QUALIFIER glm::uint32 bitfieldInterleave(glm::uint16 x, glm::uint16 y) + GLM_FUNC_QUALIFIER glm::uint32 bitfieldInterleave(glm::uint16 x, glm::uint16 y) GLM_NOEXCEPT { glm::uint32 REG1(x); glm::uint32 REG2(y); @@ -82,7 +82,7 @@ namespace detail } template <> - GLM_FUNC_QUALIFIER glm::uint64 bitfieldInterleave(glm::uint32 x, glm::uint32 y) + GLM_FUNC_QUALIFIER glm::uint64 bitfieldInterleave(glm::uint32 x, glm::uint32 y) GLM_NOEXCEPT { glm::uint64 REG1(x); glm::uint64 REG2(y); @@ -106,7 +106,7 @@ namespace detail } template <> - GLM_FUNC_QUALIFIER glm::uint32 bitfieldInterleave(glm::uint8 x, glm::uint8 y, glm::uint8 z) + GLM_FUNC_QUALIFIER glm::uint32 bitfieldInterleave(glm::uint8 x, glm::uint8 y, glm::uint8 z) GLM_NOEXCEPT { glm::uint32 REG1(x); glm::uint32 REG2(y); @@ -130,9 +130,9 @@ namespace detail return REG1 | (REG2 << 1) | (REG3 << 2); } - + template <> - GLM_FUNC_QUALIFIER glm::uint64 bitfieldInterleave(glm::uint16 x, glm::uint16 y, glm::uint16 z) + GLM_FUNC_QUALIFIER glm::uint64 bitfieldInterleave(glm::uint16 x, glm::uint16 y, glm::uint16 z) GLM_NOEXCEPT { glm::uint64 REG1(x); glm::uint64 REG2(y); @@ -162,7 +162,7 @@ namespace detail } template <> - GLM_FUNC_QUALIFIER glm::uint64 bitfieldInterleave(glm::uint32 x, glm::uint32 y, glm::uint32 z) + GLM_FUNC_QUALIFIER glm::uint64 bitfieldInterleave(glm::uint32 x, glm::uint32 y, glm::uint32 z) GLM_NOEXCEPT { glm::uint64 REG1(x); glm::uint64 REG2(y); @@ -192,7 +192,7 @@ namespace detail } template <> - GLM_FUNC_QUALIFIER glm::uint32 bitfieldInterleave(glm::uint8 x, glm::uint8 y, glm::uint8 z, glm::uint8 w) + GLM_FUNC_QUALIFIER glm::uint32 bitfieldInterleave(glm::uint8 x, glm::uint8 y, glm::uint8 z, glm::uint8 w) GLM_NOEXCEPT { glm::uint32 REG1(x); glm::uint32 REG2(y); @@ -218,7 +218,7 @@ namespace detail } template <> - GLM_FUNC_QUALIFIER glm::uint64 bitfieldInterleave(glm::uint16 x, glm::uint16 y, glm::uint16 z, glm::uint16 w) + GLM_FUNC_QUALIFIER glm::uint64 bitfieldInterleave(glm::uint16 x, glm::uint16 y, glm::uint16 z, glm::uint16 w) GLM_NOEXCEPT { glm::uint64 REG1(x); glm::uint64 REG2(y); @@ -250,7 +250,7 @@ namespace detail }//namespace detail template - GLM_FUNC_QUALIFIER genIUType mask(genIUType Bits) + GLM_FUNC_QUALIFIER genIUType mask(genIUType Bits) GLM_NOEXCEPT { GLM_STATIC_ASSERT(std::numeric_limits::is_integer, "'mask' accepts only integer values"); @@ -258,7 +258,7 @@ namespace detail } template class vecIUType> - GLM_FUNC_QUALIFIER vecIUType mask(vecIUType const & v) + GLM_FUNC_QUALIFIER vecIUType mask(vecIUType const & v) GLM_NOEXCEPT { GLM_STATIC_ASSERT(std::numeric_limits::is_integer, "'mask' accepts only integer values"); @@ -266,7 +266,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER genIType bitfieldRotateRight(genIType In, int Shift) + GLM_FUNC_QUALIFIER genIType bitfieldRotateRight(genIType In, int Shift) GLM_NOEXCEPT { GLM_STATIC_ASSERT(std::numeric_limits::is_integer, "'bitfieldRotateRight' accepts only integer values"); @@ -275,7 +275,7 @@ namespace detail } template class vecType> - GLM_FUNC_QUALIFIER vecType bitfieldRotateRight(vecType const & In, int Shift) + GLM_FUNC_QUALIFIER vecType bitfieldRotateRight(vecType const & In, int Shift) GLM_NOEXCEPT { GLM_STATIC_ASSERT(std::numeric_limits::is_integer, "'bitfieldRotateRight' accepts only integer values"); @@ -284,7 +284,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER genIType bitfieldRotateLeft(genIType In, int Shift) + GLM_FUNC_QUALIFIER genIType bitfieldRotateLeft(genIType In, int Shift) GLM_NOEXCEPT { GLM_STATIC_ASSERT(std::numeric_limits::is_integer, "'bitfieldRotateLeft' accepts only integer values"); @@ -293,7 +293,7 @@ namespace detail } template class vecType> - GLM_FUNC_QUALIFIER vecType bitfieldRotateLeft(vecType const & In, int Shift) + GLM_FUNC_QUALIFIER vecType bitfieldRotateLeft(vecType const & In, int Shift) GLM_NOEXCEPT { GLM_STATIC_ASSERT(std::numeric_limits::is_integer, "'bitfieldRotateLeft' accepts only integer values"); @@ -302,30 +302,30 @@ namespace detail } template - GLM_FUNC_QUALIFIER genIUType bitfieldFillOne(genIUType Value, int FirstBit, int BitCount) + GLM_FUNC_QUALIFIER genIUType bitfieldFillOne(genIUType Value, int FirstBit, int BitCount) GLM_NOEXCEPT { return Value | static_cast(mask(BitCount) << FirstBit); } template class vecType> - GLM_FUNC_QUALIFIER vecType bitfieldFillOne(vecType const & Value, int FirstBit, int BitCount) + GLM_FUNC_QUALIFIER vecType bitfieldFillOne(vecType const & Value, int FirstBit, int BitCount) GLM_NOEXCEPT { return Value | static_cast(mask(BitCount) << FirstBit); } template - GLM_FUNC_QUALIFIER genIUType bitfieldFillZero(genIUType Value, int FirstBit, int BitCount) + GLM_FUNC_QUALIFIER genIUType bitfieldFillZero(genIUType Value, int FirstBit, int BitCount) GLM_NOEXCEPT { return Value & static_cast(~(mask(BitCount) << FirstBit)); } template class vecType> - GLM_FUNC_QUALIFIER vecType bitfieldFillZero(vecType const & Value, int FirstBit, int BitCount) + GLM_FUNC_QUALIFIER vecType bitfieldFillZero(vecType const & Value, int FirstBit, int BitCount) GLM_NOEXCEPT { return Value & static_cast(~(mask(BitCount) << FirstBit)); } - GLM_FUNC_QUALIFIER int16 bitfieldInterleave(int8 x, int8 y) + GLM_FUNC_QUALIFIER int16 bitfieldInterleave(int8 x, int8 y) GLM_NOEXCEPT { union sign8 { @@ -346,12 +346,12 @@ namespace detail return result.i; } - GLM_FUNC_QUALIFIER uint16 bitfieldInterleave(uint8 x, uint8 y) + GLM_FUNC_QUALIFIER uint16 bitfieldInterleave(uint8 x, uint8 y) GLM_NOEXCEPT { return detail::bitfieldInterleave(x, y); } - GLM_FUNC_QUALIFIER int32 bitfieldInterleave(int16 x, int16 y) + GLM_FUNC_QUALIFIER int32 bitfieldInterleave(int16 x, int16 y) GLM_NOEXCEPT { union sign16 { @@ -372,12 +372,12 @@ namespace detail return result.i; } - GLM_FUNC_QUALIFIER uint32 bitfieldInterleave(uint16 x, uint16 y) + GLM_FUNC_QUALIFIER uint32 bitfieldInterleave(uint16 x, uint16 y) GLM_NOEXCEPT { return detail::bitfieldInterleave(x, y); } - GLM_FUNC_QUALIFIER int64 bitfieldInterleave(int32 x, int32 y) + GLM_FUNC_QUALIFIER int64 bitfieldInterleave(int32 x, int32 y) GLM_NOEXCEPT { union sign32 { @@ -398,12 +398,12 @@ namespace detail return result.i; } - GLM_FUNC_QUALIFIER uint64 bitfieldInterleave(uint32 x, uint32 y) + GLM_FUNC_QUALIFIER uint64 bitfieldInterleave(uint32 x, uint32 y) GLM_NOEXCEPT { return detail::bitfieldInterleave(x, y); } - GLM_FUNC_QUALIFIER int32 bitfieldInterleave(int8 x, int8 y, int8 z) + GLM_FUNC_QUALIFIER int32 bitfieldInterleave(int8 x, int8 y, int8 z) GLM_NOEXCEPT { union sign8 { @@ -425,12 +425,12 @@ namespace detail return result.i; } - GLM_FUNC_QUALIFIER uint32 bitfieldInterleave(uint8 x, uint8 y, uint8 z) + GLM_FUNC_QUALIFIER uint32 bitfieldInterleave(uint8 x, uint8 y, uint8 z) GLM_NOEXCEPT { return detail::bitfieldInterleave(x, y, z); } - GLM_FUNC_QUALIFIER int64 bitfieldInterleave(int16 x, int16 y, int16 z) + GLM_FUNC_QUALIFIER int64 bitfieldInterleave(int16 x, int16 y, int16 z) GLM_NOEXCEPT { union sign16 { @@ -452,12 +452,12 @@ namespace detail return result.i; } - GLM_FUNC_QUALIFIER uint64 bitfieldInterleave(uint16 x, uint16 y, uint16 z) + GLM_FUNC_QUALIFIER uint64 bitfieldInterleave(uint16 x, uint16 y, uint16 z) GLM_NOEXCEPT { return detail::bitfieldInterleave(x, y, z); } - GLM_FUNC_QUALIFIER int64 bitfieldInterleave(int32 x, int32 y, int32 z) + GLM_FUNC_QUALIFIER int64 bitfieldInterleave(int32 x, int32 y, int32 z) GLM_NOEXCEPT { union sign16 { @@ -479,12 +479,12 @@ namespace detail return result.i; } - GLM_FUNC_QUALIFIER uint64 bitfieldInterleave(uint32 x, uint32 y, uint32 z) + GLM_FUNC_QUALIFIER uint64 bitfieldInterleave(uint32 x, uint32 y, uint32 z) GLM_NOEXCEPT { return detail::bitfieldInterleave(x, y, z); } - GLM_FUNC_QUALIFIER int32 bitfieldInterleave(int8 x, int8 y, int8 z, int8 w) + GLM_FUNC_QUALIFIER int32 bitfieldInterleave(int8 x, int8 y, int8 z, int8 w) GLM_NOEXCEPT { union sign8 { @@ -507,12 +507,12 @@ namespace detail return result.i; } - GLM_FUNC_QUALIFIER uint32 bitfieldInterleave(uint8 x, uint8 y, uint8 z, uint8 w) + GLM_FUNC_QUALIFIER uint32 bitfieldInterleave(uint8 x, uint8 y, uint8 z, uint8 w) GLM_NOEXCEPT { return detail::bitfieldInterleave(x, y, z, w); } - GLM_FUNC_QUALIFIER int64 bitfieldInterleave(int16 x, int16 y, int16 z, int16 w) + GLM_FUNC_QUALIFIER int64 bitfieldInterleave(int16 x, int16 y, int16 z, int16 w) GLM_NOEXCEPT { union sign16 { @@ -535,7 +535,7 @@ namespace detail return result.i; } - GLM_FUNC_QUALIFIER uint64 bitfieldInterleave(uint16 x, uint16 y, uint16 z, uint16 w) + GLM_FUNC_QUALIFIER uint64 bitfieldInterleave(uint16 x, uint16 y, uint16 z, uint16 w) GLM_NOEXCEPT { return detail::bitfieldInterleave(x, y, z, w); } diff --git a/glm/gtc/color_space.hpp b/glm/gtc/color_space.hpp index 8a35a4e6..1863c96f 100644 --- a/glm/gtc/color_space.hpp +++ b/glm/gtc/color_space.hpp @@ -61,19 +61,19 @@ namespace glm /// Convert a linear color to sRGB color using a standard gamma correction template class vecType> - GLM_FUNC_DECL vecType convertLinearToSRGB(vecType const & ColorLinear); + GLM_FUNC_DECL vecType convertLinearToSRGB(vecType const & ColorLinear) GLM_NOEXCEPT; - /// Convert a linear color to sRGB color using a custom gamma correction + /// Convert a linear color to sRGB color using a custom gamma correction template class vecType> - GLM_FUNC_DECL vecType convertLinearToSRGB(vecType const & ColorLinear, T Gamma); + GLM_FUNC_DECL vecType convertLinearToSRGB(vecType const & ColorLinear, T Gamma) GLM_NOEXCEPT; /// Convert a sRGB color to linear color using a standard gamma correction template class vecType> - GLM_FUNC_DECL vecType convertSRGBToLinear(vecType const & ColorSRGB); + GLM_FUNC_DECL vecType convertSRGBToLinear(vecType const & ColorSRGB) GLM_NOEXCEPT; /// Convert a sRGB color to linear color using a custom gamma correction template class vecType> - GLM_FUNC_DECL vecType convertSRGBToLinear(vecType const & ColorSRGB, T Gamma); + GLM_FUNC_DECL vecType convertSRGBToLinear(vecType const & ColorSRGB, T Gamma) GLM_NOEXCEPT; /// @} } //namespace glm diff --git a/glm/gtc/color_space.inl b/glm/gtc/color_space.inl index 3561045d..478f363a 100644 --- a/glm/gtc/color_space.inl +++ b/glm/gtc/color_space.inl @@ -36,7 +36,7 @@ namespace detail template class vecType> struct compute_rgbToSrgb { - GLM_FUNC_QUALIFIER static vecType call(vecType const & ColorRGB, T GammaCorrection) + GLM_FUNC_QUALIFIER static vecType call(vecType const & ColorRGB, T GammaCorrection) GLM_NOEXCEPT { vecType const ClampedColor(clamp(ColorRGB, static_cast(0), static_cast(1))); @@ -50,7 +50,7 @@ namespace detail template struct compute_rgbToSrgb { - GLM_FUNC_QUALIFIER static tvec4 call(tvec4 const & ColorRGB, T GammaCorrection) + GLM_FUNC_QUALIFIER static tvec4 call(tvec4 const & ColorRGB, T GammaCorrection) GLM_NOEXCEPT { return tvec4(compute_rgbToSrgb::call(tvec3(ColorRGB), GammaCorrection), ColorRGB.a); } @@ -59,7 +59,7 @@ namespace detail template class vecType> struct compute_srgbToRgb { - GLM_FUNC_QUALIFIER static vecType call(vecType const & ColorSRGB, T Gamma) + GLM_FUNC_QUALIFIER static vecType call(vecType const & ColorSRGB, T Gamma) GLM_NOEXCEPT { return mix( pow((ColorSRGB + static_cast(0.055)) * static_cast(0.94786729857819905213270142180095), vecType(Gamma)), @@ -71,7 +71,7 @@ namespace detail template struct compute_srgbToRgb { - GLM_FUNC_QUALIFIER static tvec4 call(tvec4 const & ColorSRGB, T Gamma) + GLM_FUNC_QUALIFIER static tvec4 call(tvec4 const & ColorSRGB, T Gamma) GLM_NOEXCEPT { return tvec4(compute_srgbToRgb::call(tvec3(ColorSRGB), Gamma), ColorSRGB.a); } @@ -79,25 +79,25 @@ namespace detail }//namespace detail template class vecType> - GLM_FUNC_QUALIFIER vecType convertLinearToSRGB(vecType const & ColorLinear) + GLM_FUNC_QUALIFIER vecType convertLinearToSRGB(vecType const & ColorLinear) GLM_NOEXCEPT { return detail::compute_rgbToSrgb::call(ColorLinear, static_cast(0.41666)); } template class vecType> - GLM_FUNC_QUALIFIER vecType convertLinearToSRGB(vecType const & ColorLinear, T Gamma) + GLM_FUNC_QUALIFIER vecType convertLinearToSRGB(vecType const & ColorLinear, T Gamma) GLM_NOEXCEPT { return detail::compute_rgbToSrgb::call(ColorLinear, static_cast(1) / Gamma); } template class vecType> - GLM_FUNC_QUALIFIER vecType convertSRGBToLinear(vecType const & ColorSRGB) + GLM_FUNC_QUALIFIER vecType convertSRGBToLinear(vecType const & ColorSRGB) GLM_NOEXCEPT { return detail::compute_srgbToRgb::call(ColorSRGB, static_cast(2.4)); } - + template class vecType> - GLM_FUNC_QUALIFIER vecType convertSRGBToLinear(vecType const & ColorSRGB, T Gamma) + GLM_FUNC_QUALIFIER vecType convertSRGBToLinear(vecType const & ColorSRGB, T Gamma) GLM_NOEXCEPT { return detail::compute_srgbToRgb::call(ColorSRGB, Gamma); } diff --git a/glm/gtc/constants.hpp b/glm/gtc/constants.hpp index 786467ad..80558a13 100644 --- a/glm/gtc/constants.hpp +++ b/glm/gtc/constants.hpp @@ -57,147 +57,147 @@ namespace glm /// Return the epsilon constant for floating point types. /// @see gtc_constants template - GLM_FUNC_DECL GLM_CONSTEXPR genType epsilon(); + GLM_FUNC_DECL GLM_CONSTEXPR genType epsilon() GLM_NOEXCEPT; /// Return 0. /// @see gtc_constants template - GLM_FUNC_DECL GLM_CONSTEXPR genType zero(); + GLM_FUNC_DECL GLM_CONSTEXPR genType zero() GLM_NOEXCEPT; /// Return 1. /// @see gtc_constants template - GLM_FUNC_DECL GLM_CONSTEXPR genType one(); + GLM_FUNC_DECL GLM_CONSTEXPR genType one() GLM_NOEXCEPT; /// Return the pi constant. /// @see gtc_constants template - GLM_FUNC_DECL GLM_CONSTEXPR genType pi(); + GLM_FUNC_DECL GLM_CONSTEXPR genType pi() GLM_NOEXCEPT; /// Return pi * 2. /// @see gtc_constants template - GLM_FUNC_DECL GLM_CONSTEXPR genType two_pi(); + GLM_FUNC_DECL GLM_CONSTEXPR genType two_pi() GLM_NOEXCEPT; /// Return square root of pi. /// @see gtc_constants template - GLM_FUNC_DECL GLM_CONSTEXPR genType root_pi(); + GLM_FUNC_DECL GLM_CONSTEXPR genType root_pi() GLM_NOEXCEPT; /// Return pi / 2. /// @see gtc_constants template - GLM_FUNC_DECL GLM_CONSTEXPR genType half_pi(); + GLM_FUNC_DECL GLM_CONSTEXPR genType half_pi() GLM_NOEXCEPT; /// Return pi / 2 * 3. /// @see gtc_constants template - GLM_FUNC_DECL GLM_CONSTEXPR genType three_over_two_pi(); + GLM_FUNC_DECL GLM_CONSTEXPR genType three_over_two_pi() GLM_NOEXCEPT; /// Return pi / 4. /// @see gtc_constants template - GLM_FUNC_DECL GLM_CONSTEXPR genType quarter_pi(); + GLM_FUNC_DECL GLM_CONSTEXPR genType quarter_pi() GLM_NOEXCEPT; /// Return 1 / pi. /// @see gtc_constants template - GLM_FUNC_DECL GLM_CONSTEXPR genType one_over_pi(); + GLM_FUNC_DECL GLM_CONSTEXPR genType one_over_pi() GLM_NOEXCEPT; /// Return 1 / (pi * 2). /// @see gtc_constants template - GLM_FUNC_DECL GLM_CONSTEXPR genType one_over_two_pi(); + GLM_FUNC_DECL GLM_CONSTEXPR genType one_over_two_pi() GLM_NOEXCEPT; /// Return 2 / pi. /// @see gtc_constants template - GLM_FUNC_DECL GLM_CONSTEXPR genType two_over_pi(); + GLM_FUNC_DECL GLM_CONSTEXPR genType two_over_pi() GLM_NOEXCEPT; /// Return 4 / pi. /// @see gtc_constants template - GLM_FUNC_DECL GLM_CONSTEXPR genType four_over_pi(); + GLM_FUNC_DECL GLM_CONSTEXPR genType four_over_pi() GLM_NOEXCEPT; /// Return 2 / sqrt(pi). /// @see gtc_constants template - GLM_FUNC_DECL GLM_CONSTEXPR genType two_over_root_pi(); + GLM_FUNC_DECL GLM_CONSTEXPR genType two_over_root_pi() GLM_NOEXCEPT; /// Return 1 / sqrt(2). /// @see gtc_constants template - GLM_FUNC_DECL GLM_CONSTEXPR genType one_over_root_two(); + GLM_FUNC_DECL GLM_CONSTEXPR genType one_over_root_two() GLM_NOEXCEPT; /// Return sqrt(pi / 2). /// @see gtc_constants template - GLM_FUNC_DECL GLM_CONSTEXPR genType root_half_pi(); + GLM_FUNC_DECL GLM_CONSTEXPR genType root_half_pi() GLM_NOEXCEPT; /// Return sqrt(2 * pi). /// @see gtc_constants template - GLM_FUNC_DECL GLM_CONSTEXPR genType root_two_pi(); + GLM_FUNC_DECL GLM_CONSTEXPR genType root_two_pi() GLM_NOEXCEPT; /// Return sqrt(ln(4)). /// @see gtc_constants template - GLM_FUNC_DECL GLM_CONSTEXPR genType root_ln_four(); + GLM_FUNC_DECL GLM_CONSTEXPR genType root_ln_four() GLM_NOEXCEPT; /// Return e constant. /// @see gtc_constants template - GLM_FUNC_DECL GLM_CONSTEXPR genType e(); + GLM_FUNC_DECL GLM_CONSTEXPR genType e() GLM_NOEXCEPT; /// Return Euler's constant. /// @see gtc_constants template - GLM_FUNC_DECL GLM_CONSTEXPR genType euler(); + GLM_FUNC_DECL GLM_CONSTEXPR genType euler() GLM_NOEXCEPT; /// Return sqrt(2). /// @see gtc_constants template - GLM_FUNC_DECL GLM_CONSTEXPR genType root_two(); + GLM_FUNC_DECL GLM_CONSTEXPR genType root_two() GLM_NOEXCEPT; /// Return sqrt(3). /// @see gtc_constants template - GLM_FUNC_DECL GLM_CONSTEXPR genType root_three(); + GLM_FUNC_DECL GLM_CONSTEXPR genType root_three() GLM_NOEXCEPT; /// Return sqrt(5). /// @see gtc_constants template - GLM_FUNC_DECL GLM_CONSTEXPR genType root_five(); + GLM_FUNC_DECL GLM_CONSTEXPR genType root_five() GLM_NOEXCEPT; /// Return ln(2). /// @see gtc_constants template - GLM_FUNC_DECL GLM_CONSTEXPR genType ln_two(); + GLM_FUNC_DECL GLM_CONSTEXPR genType ln_two() GLM_NOEXCEPT; /// Return ln(10). /// @see gtc_constants template - GLM_FUNC_DECL GLM_CONSTEXPR genType ln_ten(); + GLM_FUNC_DECL GLM_CONSTEXPR genType ln_ten() GLM_NOEXCEPT; /// Return ln(ln(2)). /// @see gtc_constants template - GLM_FUNC_DECL GLM_CONSTEXPR genType ln_ln_two(); + GLM_FUNC_DECL GLM_CONSTEXPR genType ln_ln_two() GLM_NOEXCEPT; /// Return 1 / 3. /// @see gtc_constants template - GLM_FUNC_DECL GLM_CONSTEXPR genType third(); + GLM_FUNC_DECL GLM_CONSTEXPR genType third() GLM_NOEXCEPT; /// Return 2 / 3. /// @see gtc_constants template - GLM_FUNC_DECL GLM_CONSTEXPR genType two_thirds(); + GLM_FUNC_DECL GLM_CONSTEXPR genType two_thirds() GLM_NOEXCEPT; /// Return the golden ratio constant. /// @see gtc_constants template - GLM_FUNC_DECL GLM_CONSTEXPR genType golden_ratio(); + GLM_FUNC_DECL GLM_CONSTEXPR genType golden_ratio() GLM_NOEXCEPT; /// @} } //namespace glm diff --git a/glm/gtc/constants.inl b/glm/gtc/constants.inl index 8214f606..2b85a36f 100644 --- a/glm/gtc/constants.inl +++ b/glm/gtc/constants.inl @@ -35,175 +35,175 @@ namespace glm { template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType epsilon() + GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType epsilon() GLM_NOEXCEPT { return std::numeric_limits::epsilon(); } template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType zero() + GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType zero() GLM_NOEXCEPT { return genType(0); } template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType one() + GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType one() GLM_NOEXCEPT { return genType(1); } template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType pi() + GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType pi() GLM_NOEXCEPT { return genType(3.14159265358979323846264338327950288); } template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType two_pi() + GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType two_pi() GLM_NOEXCEPT { return genType(6.28318530717958647692528676655900576); } template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType root_pi() + GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType root_pi() GLM_NOEXCEPT { return genType(1.772453850905516027); } template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType half_pi() + GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType half_pi() GLM_NOEXCEPT { return genType(1.57079632679489661923132169163975144); } template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType three_over_two_pi() + GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType three_over_two_pi() GLM_NOEXCEPT { - return genType(4.71238898038468985769396507491925432); + return genType(4.71238898038468985769396507491925432); } template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType quarter_pi() + GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType quarter_pi() GLM_NOEXCEPT { return genType(0.785398163397448309615660845819875721); } template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType one_over_pi() + GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType one_over_pi() GLM_NOEXCEPT { return genType(0.318309886183790671537767526745028724); } template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType one_over_two_pi() + GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType one_over_two_pi() GLM_NOEXCEPT { return genType(0.159154943091895335768883763372514362); } template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType two_over_pi() + GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType two_over_pi() GLM_NOEXCEPT { return genType(0.636619772367581343075535053490057448); } template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType four_over_pi() + GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType four_over_pi() GLM_NOEXCEPT { return genType(1.273239544735162686151070106980114898); } template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType two_over_root_pi() + GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType two_over_root_pi() GLM_NOEXCEPT { return genType(1.12837916709551257389615890312154517); } template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType one_over_root_two() + GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType one_over_root_two() GLM_NOEXCEPT { return genType(0.707106781186547524400844362104849039); } template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType root_half_pi() + GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType root_half_pi() GLM_NOEXCEPT { return genType(1.253314137315500251); } template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType root_two_pi() + GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType root_two_pi() GLM_NOEXCEPT { return genType(2.506628274631000502); } template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType root_ln_four() + GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType root_ln_four() GLM_NOEXCEPT { return genType(1.17741002251547469); } template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType e() + GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType e() GLM_NOEXCEPT { return genType(2.71828182845904523536); } template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType euler() + GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType euler() GLM_NOEXCEPT { return genType(0.577215664901532860606); } template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType root_two() + GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType root_two() GLM_NOEXCEPT { return genType(1.41421356237309504880168872420969808); } template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType root_three() + GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType root_three() GLM_NOEXCEPT { return genType(1.73205080756887729352744634150587236); } template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType root_five() + GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType root_five() GLM_NOEXCEPT { return genType(2.23606797749978969640917366873127623); } template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType ln_two() + GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType ln_two() GLM_NOEXCEPT { return genType(0.693147180559945309417232121458176568); } template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType ln_ten() + GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType ln_ten() GLM_NOEXCEPT { return genType(2.30258509299404568401799145468436421); } template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType ln_ln_two() + GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType ln_ln_two() GLM_NOEXCEPT { return genType(-0.3665129205816643); } template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType third() + GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType third() GLM_NOEXCEPT { return genType(0.3333333333333333333333333333333333333333); } template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType two_thirds() + GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType two_thirds() GLM_NOEXCEPT { return genType(0.666666666666666666666666666666666666667); } template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType golden_ratio() + GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType golden_ratio() GLM_NOEXCEPT { return genType(1.61803398874989484820458683436563811); } diff --git a/glm/gtc/integer.hpp b/glm/gtc/integer.hpp index 96c19348..171b5b30 100644 --- a/glm/gtc/integer.hpp +++ b/glm/gtc/integer.hpp @@ -62,7 +62,7 @@ namespace glm /// Returns the log2 of x for integer values. Can be reliably using to compute mipmap count from the texture size. /// @see gtc_integer template - GLM_FUNC_DECL genIUType log2(genIUType x); + GLM_FUNC_DECL genIUType log2(genIUType x) GLM_NOEXCEPT; /// Modulus. Returns x % y /// for each component in x using the floating point value y. @@ -73,7 +73,7 @@ namespace glm /// @see GLSL mod man page /// @see GLSL 4.20.8 specification, section 8.3 Common Functions template - GLM_FUNC_DECL genIUType mod(genIUType x, genIUType y); + GLM_FUNC_DECL genIUType mod(genIUType x, genIUType y) GLM_NOEXCEPT; /// Modulus. Returns x % y /// for each component in x using the floating point value y. @@ -85,7 +85,7 @@ namespace glm /// @see GLSL mod man page /// @see GLSL 4.20.8 specification, section 8.3 Common Functions template class vecType> - GLM_FUNC_DECL vecType mod(vecType const & x, T y); + GLM_FUNC_DECL vecType mod(vecType const & x, T y) GLM_NOEXCEPT; /// Modulus. Returns x % y /// for each component in x using the floating point value y. @@ -97,7 +97,7 @@ namespace glm /// @see GLSL mod man page /// @see GLSL 4.20.8 specification, section 8.3 Common Functions template class vecType> - GLM_FUNC_DECL vecType mod(vecType const & x, vecType const & y); + GLM_FUNC_DECL vecType mod(vecType const & x, vecType const & y) GLM_NOEXCEPT; /// @} } //namespace glm diff --git a/glm/gtc/integer.inl b/glm/gtc/integer.inl index 8ddf1238..072d2897 100644 --- a/glm/gtc/integer.inl +++ b/glm/gtc/integer.inl @@ -36,7 +36,7 @@ namespace detail template class vecType> struct compute_log2 { - GLM_FUNC_QUALIFIER static vecType call(vecType const & vec) + GLM_FUNC_QUALIFIER static vecType call(vecType const & vec) GLM_NOEXCEPT { //Equivalent to return findMSB(vec); but save one function call in ASM with VC //return findMSB(vec); @@ -48,7 +48,7 @@ namespace detail template struct compute_log2 { - GLM_FUNC_QUALIFIER static tvec4 call(tvec4 const & vec) + GLM_FUNC_QUALIFIER static tvec4 call(tvec4 const & vec) GLM_NOEXCEPT { tvec4 Result(glm::uninitialize); diff --git a/glm/gtc/matrix_inverse.hpp b/glm/gtc/matrix_inverse.hpp index 9d9bd845..42d28256 100644 --- a/glm/gtc/matrix_inverse.hpp +++ b/glm/gtc/matrix_inverse.hpp @@ -62,7 +62,7 @@ namespace glm /// @tparam genType Squared floating-point matrix: half, float or double. Inverse of matrix based of half-precision floating point value is highly innacurate. /// @see gtc_matrix_inverse template - GLM_FUNC_DECL genType affineInverse(genType const & m); + GLM_FUNC_DECL genType affineInverse(genType const & m) GLM_NOEXCEPT; /// Compute the inverse transpose of a matrix. /// @@ -70,7 +70,7 @@ namespace glm /// @tparam genType Squared floating-point matrix: half, float or double. Inverse of matrix based of half-precision floating point value is highly innacurate. /// @see gtc_matrix_inverse template - GLM_FUNC_DECL genType inverseTranspose(genType const & m); + GLM_FUNC_DECL genType inverseTranspose(genType const & m) GLM_NOEXCEPT; /// @} }//namespace glm diff --git a/glm/gtc/matrix_inverse.inl b/glm/gtc/matrix_inverse.inl index d88a3319..bc070280 100644 --- a/glm/gtc/matrix_inverse.inl +++ b/glm/gtc/matrix_inverse.inl @@ -33,7 +33,7 @@ namespace glm { template - GLM_FUNC_QUALIFIER tmat3x3 affineInverse(tmat3x3 const & m) + GLM_FUNC_QUALIFIER tmat3x3 affineInverse(tmat3x3 const & m) GLM_NOEXCEPT { tmat3x3 Result(m); Result[2] = tvec3(0, 0, 1); @@ -44,7 +44,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat4x4 affineInverse(tmat4x4 const & m) + GLM_FUNC_QUALIFIER tmat4x4 affineInverse(tmat4x4 const & m) GLM_NOEXCEPT { tmat4x4 Result(m); Result[3] = tvec4(0, 0, 0, 1); @@ -55,7 +55,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat2x2 inverseTranspose(tmat2x2 const & m) + GLM_FUNC_QUALIFIER tmat2x2 inverseTranspose(tmat2x2 const & m) GLM_NOEXCEPT { T Determinant = m[0][0] * m[1][1] - m[1][0] * m[0][1]; @@ -69,7 +69,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat3x3 inverseTranspose(tmat3x3 const & m) + GLM_FUNC_QUALIFIER tmat3x3 inverseTranspose(tmat3x3 const & m) GLM_NOEXCEPT { T Determinant = + m[0][0] * (m[1][1] * m[2][2] - m[1][2] * m[2][1]) @@ -92,7 +92,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat4x4 inverseTranspose(tmat4x4 const & m) + GLM_FUNC_QUALIFIER tmat4x4 inverseTranspose(tmat4x4 const & m) GLM_NOEXCEPT { T SubFactor00 = m[2][2] * m[3][3] - m[3][2] * m[2][3]; T SubFactor01 = m[2][1] * m[3][3] - m[3][1] * m[2][3]; diff --git a/glm/gtc/noise.hpp b/glm/gtc/noise.hpp index 9bab7ba6..356e0375 100644 --- a/glm/gtc/noise.hpp +++ b/glm/gtc/noise.hpp @@ -68,20 +68,20 @@ namespace glm /// @see gtc_noise template class vecType> GLM_FUNC_DECL T perlin( - vecType const & p); + vecType const & p) GLM_NOEXCEPT; /// Periodic perlin noise. /// @see gtc_noise template class vecType> GLM_FUNC_DECL T perlin( vecType const & p, - vecType const & rep); + vecType const & rep) GLM_NOEXCEPT; /// Simplex noise. /// @see gtc_noise template class vecType> GLM_FUNC_DECL T simplex( - vecType const & p); + vecType const & p) GLM_NOEXCEPT; /// @} }//namespace glm diff --git a/glm/gtc/noise.inl b/glm/gtc/noise.inl index 126c7dcc..93acb9de 100644 --- a/glm/gtc/noise.inl +++ b/glm/gtc/noise.inl @@ -39,7 +39,7 @@ namespace glm{ namespace gtc { template - GLM_FUNC_QUALIFIER tvec4 grad4(T const & j, tvec4 const & ip) + GLM_FUNC_QUALIFIER tvec4 grad4(T const & j, tvec4 const & ip) GLM_NOEXCEPT { tvec3 pXYZ = floor(fract(tvec3(j) * tvec3(ip)) * T(7)) * ip[2] - T(1); T pW = static_cast(1.5) - dot(abs(pXYZ), tvec3(1)); @@ -51,7 +51,7 @@ namespace gtc // Classic Perlin noise template - GLM_FUNC_QUALIFIER T perlin(tvec2 const & Position) + GLM_FUNC_QUALIFIER T perlin(tvec2 const & Position) GLM_NOEXCEPT { tvec4 Pi = glm::floor(tvec4(Position.x, Position.y, Position.x, Position.y)) + tvec4(0.0, 0.0, 1.0, 1.0); tvec4 Pf = glm::fract(tvec4(Position.x, Position.y, Position.x, Position.y)) - tvec4(0.0, 0.0, 1.0, 1.0); @@ -92,7 +92,7 @@ namespace gtc // Classic Perlin noise template - GLM_FUNC_QUALIFIER T perlin(tvec3 const & Position) + GLM_FUNC_QUALIFIER T perlin(tvec3 const & Position) GLM_NOEXCEPT { tvec3 Pi0 = floor(Position); // Integer part for indexing tvec3 Pi1 = Pi0 + T(1); // Integer part + 1 @@ -163,7 +163,7 @@ namespace gtc /* // Classic Perlin noise template - GLM_FUNC_QUALIFIER T perlin(tvec3 const & P) + GLM_FUNC_QUALIFIER T perlin(tvec3 const & P) GLM_NOEXCEPT { tvec3 Pi0 = floor(P); // Integer part for indexing tvec3 Pi1 = Pi0 + T(1); // Integer part + 1 @@ -236,7 +236,7 @@ namespace gtc */ // Classic Perlin noise template - GLM_FUNC_QUALIFIER T perlin(tvec4 const & Position) + GLM_FUNC_QUALIFIER T perlin(tvec4 const & Position) GLM_NOEXCEPT { tvec4 Pi0 = floor(Position); // Integer part for indexing tvec4 Pi1 = Pi0 + T(1); // Integer part + 1 @@ -372,7 +372,7 @@ namespace gtc // Classic Perlin noise, periodic variant template - GLM_FUNC_QUALIFIER T perlin(tvec2 const & Position, tvec2 const & rep) + GLM_FUNC_QUALIFIER T perlin(tvec2 const & Position, tvec2 const & rep) GLM_NOEXCEPT { tvec4 Pi = floor(tvec4(Position.x, Position.y, Position.x, Position.y)) + tvec4(0.0, 0.0, 1.0, 1.0); tvec4 Pf = fract(tvec4(Position.x, Position.y, Position.x, Position.y)) - tvec4(0.0, 0.0, 1.0, 1.0); @@ -414,7 +414,7 @@ namespace gtc // Classic Perlin noise, periodic variant template - GLM_FUNC_QUALIFIER T perlin(tvec3 const & Position, tvec3 const & rep) + GLM_FUNC_QUALIFIER T perlin(tvec3 const & Position, tvec3 const & rep) GLM_NOEXCEPT { tvec3 Pi0 = mod(floor(Position), rep); // Integer part, modulo period tvec3 Pi1 = mod(Pi0 + tvec3(T(1)), rep); // Integer part + 1, mod period @@ -485,7 +485,7 @@ namespace gtc // Classic Perlin noise, periodic version template - GLM_FUNC_QUALIFIER T perlin(tvec4 const & Position, tvec4 const & rep) + GLM_FUNC_QUALIFIER T perlin(tvec4 const & Position, tvec4 const & rep) GLM_NOEXCEPT { tvec4 Pi0 = mod(floor(Position), rep); // Integer part modulo rep tvec4 Pi1 = mod(Pi0 + T(1), rep); // Integer part + 1 mod rep @@ -618,7 +618,7 @@ namespace gtc } template - GLM_FUNC_QUALIFIER T simplex(glm::tvec2 const & v) + GLM_FUNC_QUALIFIER T simplex(glm::tvec2 const & v) GLM_NOEXCEPT { tvec4 const C = tvec4( T( 0.211324865405187), // (3.0 - sqrt(3.0)) / 6.0 @@ -675,7 +675,7 @@ namespace gtc } template - GLM_FUNC_QUALIFIER T simplex(tvec3 const & v) + GLM_FUNC_QUALIFIER T simplex(tvec3 const & v) GLM_NOEXCEPT { tvec2 const C(1.0 / 6.0, 1.0 / 3.0); tvec4 const D(0.0, 0.5, 1.0, 2.0); @@ -750,7 +750,7 @@ namespace gtc } template - GLM_FUNC_QUALIFIER T simplex(tvec4 const & v) + GLM_FUNC_QUALIFIER T simplex(tvec4 const & v) GLM_NOEXCEPT { tvec4 const C( 0.138196601125011, // (5 - sqrt(5))/20 G4 diff --git a/glm/gtc/packing.hpp b/glm/gtc/packing.hpp index 8808aa4f..ab77d755 100644 --- a/glm/gtc/packing.hpp +++ b/glm/gtc/packing.hpp @@ -65,7 +65,7 @@ namespace glm /// @see uint32 packUnorm4x8(vec4 const & v) /// @see GLSL packUnorm4x8 man page /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions - GLM_FUNC_DECL uint8 packUnorm1x8(float v); + GLM_FUNC_DECL uint8 packUnorm1x8(float v) GLM_NOEXCEPT; /// Convert a single 8-bit integer to a normalized floating-point value. /// @@ -77,7 +77,7 @@ namespace glm /// @see vec4 unpackUnorm4x8(uint32 p) /// @see GLSL unpackUnorm4x8 man page /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions - GLM_FUNC_DECL float unpackUnorm1x8(uint8 p); + GLM_FUNC_DECL float unpackUnorm1x8(uint8 p) GLM_NOEXCEPT; /// First, converts each component of the normalized floating-point value v into 8-bit integer values. /// Then, the results are packed into the returned 16-bit unsigned integer. @@ -93,7 +93,7 @@ namespace glm /// @see uint32 packUnorm4x8(vec4 const & v) /// @see GLSL packUnorm4x8 man page /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions - GLM_FUNC_DECL uint16 packUnorm2x8(vec2 const & v); + GLM_FUNC_DECL uint16 packUnorm2x8(vec2 const & v) GLM_NOEXCEPT; /// First, unpacks a single 16-bit unsigned integer p into a pair of 8-bit unsigned integers. /// Then, each component is converted to a normalized floating-point value to generate the returned two-component vector. @@ -109,8 +109,8 @@ namespace glm /// @see vec4 unpackUnorm4x8(uint32 p) /// @see GLSL unpackUnorm4x8 man page /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions - GLM_FUNC_DECL vec2 unpackUnorm2x8(uint16 p); + GLM_FUNC_DECL vec2 unpackUnorm2x8(uint16 p) GLM_NOEXCEPT; /// First, converts the normalized floating-point value v into 8-bit integer value. /// Then, the results are packed into the returned 8-bit unsigned integer. /// @@ -122,7 +122,7 @@ namespace glm /// @see uint32 packSnorm4x8(vec4 const & v) /// @see GLSL packSnorm4x8 man page /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions - GLM_FUNC_DECL uint8 packSnorm1x8(float s); + GLM_FUNC_DECL uint8 packSnorm1x8(float s) GLM_NOEXCEPT; /// First, unpacks a single 8-bit unsigned integer p into a single 8-bit signed integers. /// Then, the value is converted to a normalized floating-point value to generate the returned scalar. @@ -135,8 +135,8 @@ namespace glm /// @see vec4 unpackSnorm4x8(uint32 p) /// @see GLSL unpackSnorm4x8 man page /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions - GLM_FUNC_DECL float unpackSnorm1x8(uint8 p); - + GLM_FUNC_DECL float unpackSnorm1x8(uint8 p) GLM_NOEXCEPT; + /// First, converts each component of the normalized floating-point value v into 8-bit integer values. /// Then, the results are packed into the returned 16-bit unsigned integer. /// @@ -151,7 +151,7 @@ namespace glm /// @see uint32 packSnorm4x8(vec4 const & v) /// @see GLSL packSnorm4x8 man page /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions - GLM_FUNC_DECL uint16 packSnorm2x8(vec2 const & v); + GLM_FUNC_DECL uint16 packSnorm2x8(vec2 const & v) GLM_NOEXCEPT; /// First, unpacks a single 16-bit unsigned integer p into a pair of 8-bit signed integers. /// Then, each component is converted to a normalized floating-point value to generate the returned two-component vector. @@ -167,8 +167,8 @@ namespace glm /// @see vec4 unpackSnorm4x8(uint32 p) /// @see GLSL unpackSnorm4x8 man page /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions - GLM_FUNC_DECL vec2 unpackSnorm2x8(uint16 p); - + GLM_FUNC_DECL vec2 unpackSnorm2x8(uint16 p) GLM_NOEXCEPT; + /// First, converts the normalized floating-point value v into a 16-bit integer value. /// Then, the results are packed into the returned 16-bit unsigned integer. /// @@ -180,7 +180,7 @@ namespace glm /// @see uint64 packSnorm4x16(vec4 const & v) /// @see GLSL packUnorm4x8 man page /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions - GLM_FUNC_DECL uint16 packUnorm1x16(float v); + GLM_FUNC_DECL uint16 packUnorm1x16(float v) GLM_NOEXCEPT; /// First, unpacks a single 16-bit unsigned integer p into a of 16-bit unsigned integers. /// Then, the value is converted to a normalized floating-point value to generate the returned scalar. @@ -193,7 +193,7 @@ namespace glm /// @see vec4 unpackUnorm4x16(uint64 p) /// @see GLSL unpackUnorm2x16 man page /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions - GLM_FUNC_DECL float unpackUnorm1x16(uint16 p); + GLM_FUNC_DECL float unpackUnorm1x16(uint16 p) GLM_NOEXCEPT; /// First, converts each component of the normalized floating-point value v into 16-bit integer values. /// Then, the results are packed into the returned 64-bit unsigned integer. @@ -209,7 +209,7 @@ namespace glm /// @see uint32 packUnorm2x16(vec2 const & v) /// @see GLSL packUnorm4x8 man page /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions - GLM_FUNC_DECL uint64 packUnorm4x16(vec4 const & v); + GLM_FUNC_DECL uint64 packUnorm4x16(vec4 const & v) GLM_NOEXCEPT; /// First, unpacks a single 64-bit unsigned integer p into four 16-bit unsigned integers. /// Then, each component is converted to a normalized floating-point value to generate the returned four-component vector. @@ -225,7 +225,7 @@ namespace glm /// @see vec2 unpackUnorm2x16(uint32 p) /// @see GLSL unpackUnorm2x16 man page /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions - GLM_FUNC_DECL vec4 unpackUnorm4x16(uint64 p); + GLM_FUNC_DECL vec4 unpackUnorm4x16(uint64 p) GLM_NOEXCEPT; /// First, converts the normalized floating-point value v into 16-bit integer value. /// Then, the results are packed into the returned 16-bit unsigned integer. @@ -238,7 +238,7 @@ namespace glm /// @see uint64 packSnorm4x16(vec4 const & v) /// @see GLSL packSnorm4x8 man page /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions - GLM_FUNC_DECL uint16 packSnorm1x16(float v); + GLM_FUNC_DECL uint16 packSnorm1x16(float v) GLM_NOEXCEPT; /// First, unpacks a single 16-bit unsigned integer p into a single 16-bit signed integers. /// Then, each component is converted to a normalized floating-point value to generate the returned scalar. @@ -251,7 +251,7 @@ namespace glm /// @see vec4 unpackSnorm4x16(uint64 p) /// @see GLSL unpackSnorm4x8 man page /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions - GLM_FUNC_DECL float unpackSnorm1x16(uint16 p); + GLM_FUNC_DECL float unpackSnorm1x16(uint16 p) GLM_NOEXCEPT; /// First, converts each component of the normalized floating-point value v into 16-bit integer values. /// Then, the results are packed into the returned 64-bit unsigned integer. @@ -267,7 +267,7 @@ namespace glm /// @see uint32 packSnorm2x16(vec2 const & v) /// @see GLSL packSnorm4x8 man page /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions - GLM_FUNC_DECL uint64 packSnorm4x16(vec4 const & v); + GLM_FUNC_DECL uint64 packSnorm4x16(vec4 const & v) GLM_NOEXCEPT; /// First, unpacks a single 64-bit unsigned integer p into four 16-bit signed integers. /// Then, each component is converted to a normalized floating-point value to generate the returned four-component vector. @@ -283,8 +283,8 @@ namespace glm /// @see vec2 unpackSnorm2x16(uint32 p) /// @see GLSL unpackSnorm4x8 man page /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions - GLM_FUNC_DECL vec4 unpackSnorm4x16(uint64 p); - + GLM_FUNC_DECL vec4 unpackSnorm4x16(uint64 p) GLM_NOEXCEPT; + /// Returns an unsigned integer obtained by converting the components of a floating-point scalar /// to the 16-bit floating-point representation found in the OpenGL Specification, /// and then packing this 16-bit value into a 16-bit unsigned integer. @@ -294,8 +294,8 @@ namespace glm /// @see uint64 packHalf4x16(vec4 const & v) /// @see GLSL packHalf2x16 man page /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions - GLM_FUNC_DECL uint16 packHalf1x16(float v); - + GLM_FUNC_DECL uint16 packHalf1x16(float v) GLM_NOEXCEPT; + /// Returns a floating-point scalar with components obtained by unpacking a 16-bit unsigned integer into a 16-bit value, /// interpreted as a 16-bit floating-point number according to the OpenGL Specification, /// and converting it to 32-bit floating-point values. @@ -305,7 +305,7 @@ namespace glm /// @see vec4 unpackHalf4x16(uint64 const & v) /// @see GLSL unpackHalf2x16 man page /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions - GLM_FUNC_DECL float unpackHalf1x16(uint16 v); + GLM_FUNC_DECL float unpackHalf1x16(uint16 v) GLM_NOEXCEPT; /// Returns an unsigned integer obtained by converting the components of a four-component floating-point vector /// to the 16-bit floating-point representation found in the OpenGL Specification, @@ -318,8 +318,8 @@ namespace glm /// @see uint32 packHalf2x16(vec2 const & v) /// @see GLSL packHalf2x16 man page /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions - GLM_FUNC_DECL uint64 packHalf4x16(vec4 const & v); - + GLM_FUNC_DECL uint64 packHalf4x16(vec4 const & v) GLM_NOEXCEPT; + /// Returns a four-component floating-point vector with components obtained by unpacking a 64-bit unsigned integer into four 16-bit values, /// interpreting those values as 16-bit floating-point numbers according to the OpenGL Specification, /// and converting them to 32-bit floating-point values. @@ -331,7 +331,7 @@ namespace glm /// @see vec2 unpackHalf2x16(uint32 const & v) /// @see GLSL unpackHalf2x16 man page /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions - GLM_FUNC_DECL vec4 unpackHalf4x16(uint64 p); + GLM_FUNC_DECL vec4 unpackHalf4x16(uint64 p) GLM_NOEXCEPT; /// Returns an unsigned integer obtained by converting the components of a four-component signed integer vector /// to the 10-10-10-2-bit signed integer representation found in the OpenGL Specification, @@ -344,7 +344,7 @@ namespace glm /// @see uint32 packSnorm3x10_1x2(vec4 const & v) /// @see uint32 packUnorm3x10_1x2(vec4 const & v) /// @see ivec4 unpackI3x10_1x2(uint32 const & p) - GLM_FUNC_DECL uint32 packI3x10_1x2(ivec4 const & v); + GLM_FUNC_DECL uint32 packI3x10_1x2(ivec4 const & v) GLM_NOEXCEPT; /// Unpacks a single 32-bit unsigned integer p into three 10-bit and one 2-bit signed integers. /// @@ -355,7 +355,7 @@ namespace glm /// @see uint32 packU3x10_1x2(uvec4 const & v) /// @see vec4 unpackSnorm3x10_1x2(uint32 const & p); /// @see uvec4 unpackI3x10_1x2(uint32 const & p); - GLM_FUNC_DECL ivec4 unpackI3x10_1x2(uint32 p); + GLM_FUNC_DECL ivec4 unpackI3x10_1x2(uint32 p) GLM_NOEXCEPT; /// Returns an unsigned integer obtained by converting the components of a four-component unsigned integer vector /// to the 10-10-10-2-bit unsigned integer representation found in the OpenGL Specification, @@ -368,7 +368,7 @@ namespace glm /// @see uint32 packSnorm3x10_1x2(vec4 const & v) /// @see uint32 packUnorm3x10_1x2(vec4 const & v) /// @see ivec4 unpackU3x10_1x2(uint32 const & p) - GLM_FUNC_DECL uint32 packU3x10_1x2(uvec4 const & v); + GLM_FUNC_DECL uint32 packU3x10_1x2(uvec4 const & v) GLM_NOEXCEPT; /// Unpacks a single 32-bit unsigned integer p into three 10-bit and one 2-bit unsigned integers. /// @@ -379,7 +379,7 @@ namespace glm /// @see uint32 packU3x10_1x2(uvec4 const & v) /// @see vec4 unpackSnorm3x10_1x2(uint32 const & p); /// @see uvec4 unpackI3x10_1x2(uint32 const & p); - GLM_FUNC_DECL uvec4 unpackU3x10_1x2(uint32 p); + GLM_FUNC_DECL uvec4 unpackU3x10_1x2(uint32 p) GLM_NOEXCEPT; /// First, converts the first three components of the normalized floating-point value v into 10-bit signed integer values. /// Then, converts the forth component of the normalized floating-point value v into 2-bit signed integer values. @@ -397,7 +397,7 @@ namespace glm /// @see uint32 packUnorm3x10_1x2(vec4 const & v) /// @see uint32 packU3x10_1x2(uvec4 const & v) /// @see uint32 packI3x10_1x2(ivec4 const & v) - GLM_FUNC_DECL uint32 packSnorm3x10_1x2(vec4 const & v); + GLM_FUNC_DECL uint32 packSnorm3x10_1x2(vec4 const & v) GLM_NOEXCEPT; /// First, unpacks a single 32-bit unsigned integer p into four 16-bit signed integers. /// Then, each component is converted to a normalized floating-point value to generate the returned four-component vector. @@ -414,7 +414,7 @@ namespace glm /// @see vec4 unpackUnorm3x10_1x2(uint32 const & p)) /// @see uvec4 unpackI3x10_1x2(uint32 const & p) /// @see uvec4 unpackU3x10_1x2(uint32 const & p) - GLM_FUNC_DECL vec4 unpackSnorm3x10_1x2(uint32 p); + GLM_FUNC_DECL vec4 unpackSnorm3x10_1x2(uint32 p) GLM_NOEXCEPT; /// First, converts the first three components of the normalized floating-point value v into 10-bit unsigned integer values. /// Then, converts the forth component of the normalized floating-point value v into 2-bit signed uninteger values. @@ -432,7 +432,7 @@ namespace glm /// @see uint32 packUnorm3x10_1x2(vec4 const & v) /// @see uint32 packU3x10_1x2(uvec4 const & v) /// @see uint32 packI3x10_1x2(ivec4 const & v) - GLM_FUNC_DECL uint32 packUnorm3x10_1x2(vec4 const & v); + GLM_FUNC_DECL uint32 packUnorm3x10_1x2(vec4 const & v) GLM_NOEXCEPT; /// First, unpacks a single 32-bit unsigned integer p into four 16-bit signed integers. /// Then, each component is converted to a normalized floating-point value to generate the returned four-component vector. @@ -449,7 +449,7 @@ namespace glm /// @see vec4 unpackInorm3x10_1x2(uint32 const & p)) /// @see uvec4 unpackI3x10_1x2(uint32 const & p) /// @see uvec4 unpackU3x10_1x2(uint32 const & p) - GLM_FUNC_DECL vec4 unpackUnorm3x10_1x2(uint32 p); + GLM_FUNC_DECL vec4 unpackUnorm3x10_1x2(uint32 p) GLM_NOEXCEPT; /// First, converts the first two components of the normalized floating-point value v into 11-bit signless floating-point values. /// Then, converts the third component of the normalized floating-point value v into a 10-bit signless floating-point value. @@ -460,7 +460,7 @@ namespace glm /// /// @see gtc_packing /// @see vec3 unpackF2x11_1x10(uint32 const & p) - GLM_FUNC_DECL uint32 packF2x11_1x10(vec3 const & v); + GLM_FUNC_DECL uint32 packF2x11_1x10(vec3 const & v) GLM_NOEXCEPT; /// First, unpacks a single 32-bit unsigned integer p into two 11-bit signless floating-point values and one 10-bit signless floating-point value . /// Then, each component is converted to a normalized floating-point value to generate the returned three-component vector. @@ -470,7 +470,7 @@ namespace glm /// /// @see gtc_packing /// @see uint32 packF2x11_1x10(vec3 const & v) - GLM_FUNC_DECL vec3 unpackF2x11_1x10(uint32 p); + GLM_FUNC_DECL vec3 unpackF2x11_1x10(uint32 p) GLM_NOEXCEPT; /// @} }// namespace glm diff --git a/glm/gtc/packing.inl b/glm/gtc/packing.inl index 58b1d59b..5deebb4c 100644 --- a/glm/gtc/packing.inl +++ b/glm/gtc/packing.inl @@ -40,7 +40,7 @@ namespace glm{ namespace detail { - GLM_FUNC_QUALIFIER glm::uint16 float2half(glm::uint32 f) + GLM_FUNC_QUALIFIER glm::uint16 float2half(glm::uint32 f) GLM_NOEXCEPT { // 10 bits => EE EEEFFFFF // 11 bits => EEE EEFFFFFF @@ -58,7 +58,7 @@ namespace detail ((f >> 13) & 0x03ff); // Mantissa } - GLM_FUNC_QUALIFIER glm::uint32 float2packed11(glm::uint32 f) + GLM_FUNC_QUALIFIER glm::uint32 float2packed11(glm::uint32 f) GLM_NOEXCEPT { // 10 bits => EE EEEFFFFF // 11 bits => EEE EEFFFFFF @@ -76,7 +76,7 @@ namespace detail ((f >> 17) & 0x003f); // Mantissa } - GLM_FUNC_QUALIFIER glm::uint32 packed11ToFloat(glm::uint32 p) + GLM_FUNC_QUALIFIER glm::uint32 packed11ToFloat(glm::uint32 p) GLM_NOEXCEPT { // 10 bits => EE EEEFFFFF // 11 bits => EEE EEFFFFFF @@ -94,7 +94,7 @@ namespace detail ((p & 0x003f) << 17); // Mantissa } - GLM_FUNC_QUALIFIER glm::uint32 float2packed10(glm::uint32 f) + GLM_FUNC_QUALIFIER glm::uint32 float2packed10(glm::uint32 f) GLM_NOEXCEPT { // 10 bits => EE EEEFFFFF // 11 bits => EEE EEFFFFFF @@ -115,7 +115,7 @@ namespace detail ((f >> 18) & 0x001f); // Mantissa } - GLM_FUNC_QUALIFIER glm::uint32 packed10ToFloat(glm::uint32 p) + GLM_FUNC_QUALIFIER glm::uint32 packed10ToFloat(glm::uint32 p) GLM_NOEXCEPT { // 10 bits => EE EEEFFFFF // 11 bits => EEE EEFFFFFF @@ -136,12 +136,12 @@ namespace detail ((p & 0x001f) << 18); // Mantissa } - GLM_FUNC_QUALIFIER glm::uint half2float(glm::uint h) + GLM_FUNC_QUALIFIER glm::uint half2float(glm::uint h) GLM_NOEXCEPT { return ((h & 0x8000) << 16) | ((( h & 0x7c00) + 0x1C000) << 13) | ((h & 0x03FF) << 13); } - GLM_FUNC_QUALIFIER glm::uint floatTo11bit(float x) + GLM_FUNC_QUALIFIER glm::uint floatTo11bit(float x) GLM_NOEXCEPT { if(x == 0.0f) return 0u; @@ -160,7 +160,7 @@ namespace detail return float2packed11(Pack); } - GLM_FUNC_QUALIFIER float packed11bitToFloat(glm::uint x) + GLM_FUNC_QUALIFIER float packed11bitToFloat(glm::uint x) GLM_NOEXCEPT { if(x == 0) return 0.0f; @@ -180,7 +180,7 @@ namespace detail # endif } - GLM_FUNC_QUALIFIER glm::uint floatTo10bit(float x) + GLM_FUNC_QUALIFIER glm::uint floatTo10bit(float x) GLM_NOEXCEPT { if(x == 0.0f) return 0u; @@ -199,7 +199,7 @@ namespace detail return float2packed10(Pack); } - GLM_FUNC_QUALIFIER float packed10bitToFloat(glm::uint x) + GLM_FUNC_QUALIFIER float packed10bitToFloat(glm::uint x) GLM_NOEXCEPT { if(x == 0) return 0.0f; @@ -219,7 +219,7 @@ namespace detail # endif } -// GLM_FUNC_QUALIFIER glm::uint f11_f11_f10(float x, float y, float z) +// GLM_FUNC_QUALIFIER glm::uint f11_f11_f10(float x, float y, float z) GLM_NOEXCEPT // { // return ((floatTo11bit(x) & ((1 << 11) - 1)) << 0) | ((floatTo11bit(y) & ((1 << 11) - 1)) << 11) | ((floatTo10bit(z) & ((1 << 10) - 1)) << 22); // } @@ -250,87 +250,87 @@ namespace detail }//namespace detail - GLM_FUNC_QUALIFIER uint8 packUnorm1x8(float v) + GLM_FUNC_QUALIFIER uint8 packUnorm1x8(float v) GLM_NOEXCEPT { return static_cast(round(clamp(v, 0.0f, 1.0f) * 255.0f)); } - - GLM_FUNC_QUALIFIER float unpackUnorm1x8(uint8 p) + + GLM_FUNC_QUALIFIER float unpackUnorm1x8(uint8 p) GLM_NOEXCEPT { float const Unpack(p); return Unpack * static_cast(0.0039215686274509803921568627451); // 1 / 255 } - - GLM_FUNC_QUALIFIER uint16 packUnorm2x8(vec2 const & v) + + GLM_FUNC_QUALIFIER uint16 packUnorm2x8(vec2 const & v) GLM_NOEXCEPT { u8vec2 const Topack(round(clamp(v, 0.0f, 1.0f) * 255.0f)); return reinterpret_cast(Topack); } - - GLM_FUNC_QUALIFIER vec2 unpackUnorm2x8(uint16 p) + + GLM_FUNC_QUALIFIER vec2 unpackUnorm2x8(uint16 p) GLM_NOEXCEPT { vec2 const Unpack(reinterpret_cast(p)); return Unpack * float(0.0039215686274509803921568627451); // 1 / 255 } - GLM_FUNC_QUALIFIER uint8 packSnorm1x8(float v) + GLM_FUNC_QUALIFIER uint8 packSnorm1x8(float v) GLM_NOEXCEPT { int8 const Topack(static_cast(round(clamp(v ,-1.0f, 1.0f) * 127.0f))); return reinterpret_cast(Topack); } - - GLM_FUNC_QUALIFIER float unpackSnorm1x8(uint8 p) + + GLM_FUNC_QUALIFIER float unpackSnorm1x8(uint8 p) GLM_NOEXCEPT { float const Unpack(reinterpret_cast(p)); return clamp( Unpack * 0.00787401574803149606299212598425f, // 1.0f / 127.0f -1.0f, 1.0f); } - - GLM_FUNC_QUALIFIER uint16 packSnorm2x8(vec2 const & v) + + GLM_FUNC_QUALIFIER uint16 packSnorm2x8(vec2 const & v) GLM_NOEXCEPT { i8vec2 const Topack(round(clamp(v, -1.0f, 1.0f) * 127.0f)); return reinterpret_cast(Topack); } - - GLM_FUNC_QUALIFIER vec2 unpackSnorm2x8(uint16 p) + + GLM_FUNC_QUALIFIER vec2 unpackSnorm2x8(uint16 p) GLM_NOEXCEPT { vec2 const Unpack(reinterpret_cast(p)); return clamp( Unpack * 0.00787401574803149606299212598425f, // 1.0f / 127.0f -1.0f, 1.0f); } - - GLM_FUNC_QUALIFIER uint16 packUnorm1x16(float s) + + GLM_FUNC_QUALIFIER uint16 packUnorm1x16(float s) GLM_NOEXCEPT { return static_cast(round(clamp(s, 0.0f, 1.0f) * 65535.0f)); } - GLM_FUNC_QUALIFIER float unpackUnorm1x16(uint16 p) + GLM_FUNC_QUALIFIER float unpackUnorm1x16(uint16 p) GLM_NOEXCEPT { float const Unpack(p); return Unpack * 1.5259021896696421759365224689097e-5f; // 1.0 / 65535.0 } - GLM_FUNC_QUALIFIER uint64 packUnorm4x16(vec4 const & v) + GLM_FUNC_QUALIFIER uint64 packUnorm4x16(vec4 const & v) GLM_NOEXCEPT { u16vec4 const Topack(round(clamp(v , 0.0f, 1.0f) * 65535.0f)); return reinterpret_cast(Topack); } - GLM_FUNC_QUALIFIER vec4 unpackUnorm4x16(uint64 p) + GLM_FUNC_QUALIFIER vec4 unpackUnorm4x16(uint64 p) GLM_NOEXCEPT { vec4 const Unpack(reinterpret_cast(p)); return Unpack * 1.5259021896696421759365224689097e-5f; // 1.0 / 65535.0 } - GLM_FUNC_QUALIFIER uint16 packSnorm1x16(float v) + GLM_FUNC_QUALIFIER uint16 packSnorm1x16(float v) GLM_NOEXCEPT { int16 const Topack = static_cast(round(clamp(v ,-1.0f, 1.0f) * 32767.0f)); return reinterpret_cast(Topack); } - GLM_FUNC_QUALIFIER float unpackSnorm1x16(uint16 p) + GLM_FUNC_QUALIFIER float unpackSnorm1x16(uint16 p) GLM_NOEXCEPT { float const Unpack(reinterpret_cast(p)); return clamp( @@ -338,13 +338,13 @@ namespace detail -1.0f, 1.0f); } - GLM_FUNC_QUALIFIER uint64 packSnorm4x16(vec4 const & v) + GLM_FUNC_QUALIFIER uint64 packSnorm4x16(vec4 const & v) GLM_NOEXCEPT { i16vec4 const Topack(round(clamp(v ,-1.0f, 1.0f) * 32767.0f)); return reinterpret_cast(Topack); } - GLM_FUNC_QUALIFIER vec4 unpackSnorm4x16(uint64 p) + GLM_FUNC_QUALIFIER vec4 unpackSnorm4x16(uint64 p) GLM_NOEXCEPT { vec4 const Unpack(reinterpret_cast(p)); return clamp( @@ -352,18 +352,18 @@ namespace detail -1.0f, 1.0f); } - GLM_FUNC_QUALIFIER uint16 packHalf1x16(float v) + GLM_FUNC_QUALIFIER uint16 packHalf1x16(float v) GLM_NOEXCEPT { int16 const Topack(detail::toFloat16(v)); return reinterpret_cast(Topack); } - GLM_FUNC_QUALIFIER float unpackHalf1x16(uint16 v) + GLM_FUNC_QUALIFIER float unpackHalf1x16(uint16 v) GLM_NOEXCEPT { return detail::toFloat32(reinterpret_cast(v)); } - GLM_FUNC_QUALIFIER uint64 packHalf4x16(glm::vec4 const & v) + GLM_FUNC_QUALIFIER uint64 packHalf4x16(glm::vec4 const & v) GLM_NOEXCEPT { i16vec4 Unpack( detail::toFloat16(v.x), @@ -374,10 +374,10 @@ namespace detail return reinterpret_cast(Unpack); } - GLM_FUNC_QUALIFIER glm::vec4 unpackHalf4x16(uint64 v) + GLM_FUNC_QUALIFIER glm::vec4 unpackHalf4x16(uint64 v) GLM_NOEXCEPT { i16vec4 Unpack(reinterpret_cast(v)); - + return vec4( detail::toFloat32(Unpack.x), detail::toFloat32(Unpack.y), @@ -385,7 +385,7 @@ namespace detail detail::toFloat32(Unpack.w)); } - GLM_FUNC_QUALIFIER uint32 packI3x10_1x2(ivec4 const & v) + GLM_FUNC_QUALIFIER uint32 packI3x10_1x2(ivec4 const & v) GLM_NOEXCEPT { detail::i10i10i10i2 Result; Result.data.x = v.x; @@ -395,7 +395,7 @@ namespace detail return Result.pack; } - GLM_FUNC_QUALIFIER ivec4 unpackI3x10_1x2(uint32 v) + GLM_FUNC_QUALIFIER ivec4 unpackI3x10_1x2(uint32 v) GLM_NOEXCEPT { detail::i10i10i10i2 Unpack; Unpack.pack = v; @@ -406,7 +406,7 @@ namespace detail Unpack.data.w); } - GLM_FUNC_QUALIFIER uint32 packU3x10_1x2(uvec4 const & v) + GLM_FUNC_QUALIFIER uint32 packU3x10_1x2(uvec4 const & v) GLM_NOEXCEPT { detail::u10u10u10u2 Result; Result.data.x = v.x; @@ -416,7 +416,7 @@ namespace detail return Result.pack; } - GLM_FUNC_QUALIFIER uvec4 unpackU3x10_1x2(uint32 v) + GLM_FUNC_QUALIFIER uvec4 unpackU3x10_1x2(uint32 v) GLM_NOEXCEPT { detail::u10u10u10u2 Unpack; Unpack.pack = v; @@ -427,7 +427,7 @@ namespace detail Unpack.data.w); } - GLM_FUNC_QUALIFIER uint32 packSnorm3x10_1x2(vec4 const & v) + GLM_FUNC_QUALIFIER uint32 packSnorm3x10_1x2(vec4 const & v) GLM_NOEXCEPT { detail::i10i10i10i2 Result; Result.data.x = int(round(clamp(v.x,-1.0f, 1.0f) * 511.f)); @@ -437,7 +437,7 @@ namespace detail return Result.pack; } - GLM_FUNC_QUALIFIER vec4 unpackSnorm3x10_1x2(uint32 v) + GLM_FUNC_QUALIFIER vec4 unpackSnorm3x10_1x2(uint32 v) GLM_NOEXCEPT { detail::i10i10i10i2 Unpack; Unpack.pack = v; @@ -449,7 +449,7 @@ namespace detail return Result; } - GLM_FUNC_QUALIFIER uint32 packUnorm3x10_1x2(vec4 const & v) + GLM_FUNC_QUALIFIER uint32 packUnorm3x10_1x2(vec4 const & v) GLM_NOEXCEPT { detail::i10i10i10i2 Result; Result.data.x = int(round(clamp(v.x, 0.0f, 1.0f) * 1023.f)); @@ -459,7 +459,7 @@ namespace detail return Result.pack; } - GLM_FUNC_QUALIFIER vec4 unpackUnorm3x10_1x2(uint32 v) + GLM_FUNC_QUALIFIER vec4 unpackUnorm3x10_1x2(uint32 v) GLM_NOEXCEPT { detail::i10i10i10i2 Unpack; Unpack.pack = v; @@ -471,7 +471,7 @@ namespace detail return Result; } - GLM_FUNC_QUALIFIER uint32 packF2x11_1x10(vec3 const & v) + GLM_FUNC_QUALIFIER uint32 packF2x11_1x10(vec3 const & v) GLM_NOEXCEPT { return ((detail::floatTo11bit(v.x) & ((1 << 11) - 1)) << 0) | @@ -479,7 +479,7 @@ namespace detail ((detail::floatTo10bit(v.z) & ((1 << 10) - 1)) << 22); } - GLM_FUNC_QUALIFIER vec3 unpackF2x11_1x10(uint32 v) + GLM_FUNC_QUALIFIER vec3 unpackF2x11_1x10(uint32 v) GLM_NOEXCEPT { return vec3( detail::packed11bitToFloat(v >> 0), diff --git a/glm/gtc/quaternion.hpp b/glm/gtc/quaternion.hpp index 71817dfa..8c4a4fee 100644 --- a/glm/gtc/quaternion.hpp +++ b/glm/gtc/quaternion.hpp @@ -197,7 +197,7 @@ namespace glm /// /// @see gtc_quaternion template class quatType> - GLM_FUNC_DECL T dot(quatType const & x, quatType const & y); + GLM_FUNC_DECL T dot(quatType const & x, quatType const & y) GLM_NOEXCEPT; /// Spherical linear interpolation of two quaternions. /// The interpolation is oriented and the rotation is performed at constant speed. diff --git a/glm/gtc/random.hpp b/glm/gtc/random.hpp index a9254c01..39ca3e89 100644 --- a/glm/gtc/random.hpp +++ b/glm/gtc/random.hpp @@ -65,12 +65,12 @@ namespace glm template GLM_FUNC_DECL genTYpe linearRand( genTYpe Min, - genTYpe Max); + genTYpe Max) GLM_NOEXCEPT; template class vecType> GLM_FUNC_DECL vecType linearRand( vecType const & Min, - vecType const & Max); + vecType const & Max) GLM_NOEXCEPT; /// Generate random numbers in the interval [Min, Max], according a gaussian distribution /// @@ -80,40 +80,40 @@ namespace glm template GLM_FUNC_DECL genType gaussRand( genType Mean, - genType Deviation); - + genType Deviation) GLM_NOEXCEPT; + /// Generate a random 2D vector which coordinates are regulary distributed on a circle of a given radius - /// - /// @param Radius + /// + /// @param Radius /// @see gtc_random template GLM_FUNC_DECL tvec2 circularRand( - T Radius); - + T Radius) GLM_NOEXCEPT; + /// Generate a random 3D vector which coordinates are regulary distributed on a sphere of a given radius - /// + /// /// @param Radius /// @see gtc_random template GLM_FUNC_DECL tvec3 sphericalRand( - T Radius); - + T Radius) GLM_NOEXCEPT; + /// Generate a random 2D vector which coordinates are regulary distributed within the area of a disk of a given radius - /// + /// /// @param Radius /// @see gtc_random template GLM_FUNC_DECL tvec2 diskRand( - T Radius); - + T Radius) GLM_NOEXCEPT; + /// Generate a random 3D vector which coordinates are regulary distributed within the volume of a ball of a given radius - /// + /// /// @param Radius /// @see gtc_random template GLM_FUNC_DECL tvec3 ballRand( - T Radius); - + T Radius) GLM_NOEXCEPT; + /// @} }//namespace glm diff --git a/glm/gtc/random.inl b/glm/gtc/random.inl index d299af2f..fe76077a 100644 --- a/glm/gtc/random.inl +++ b/glm/gtc/random.inl @@ -42,13 +42,13 @@ namespace detail template class vecType> struct compute_rand { - GLM_FUNC_QUALIFIER static vecType call(); + GLM_FUNC_QUALIFIER static vecType call() GLM_NOEXCEPT; }; template struct compute_rand { - GLM_FUNC_QUALIFIER static tvec1 call() + GLM_FUNC_QUALIFIER static tvec1 call() GLM_NOEXCEPT { return tvec1( std::rand() % std::numeric_limits::max()); @@ -58,7 +58,7 @@ namespace detail template struct compute_rand { - GLM_FUNC_QUALIFIER static tvec2 call() + GLM_FUNC_QUALIFIER static tvec2 call() GLM_NOEXCEPT { return tvec2( std::rand() % std::numeric_limits::max(), @@ -69,7 +69,7 @@ namespace detail template struct compute_rand { - GLM_FUNC_QUALIFIER static tvec3 call() + GLM_FUNC_QUALIFIER static tvec3 call() GLM_NOEXCEPT { return tvec3( std::rand() % std::numeric_limits::max(), @@ -81,7 +81,7 @@ namespace detail template struct compute_rand { - GLM_FUNC_QUALIFIER static tvec4 call() + GLM_FUNC_QUALIFIER static tvec4 call() GLM_NOEXCEPT { return tvec4( std::rand() % std::numeric_limits::max(), @@ -94,7 +94,7 @@ namespace detail template class vecType> struct compute_rand { - GLM_FUNC_QUALIFIER static vecType call() + GLM_FUNC_QUALIFIER static vecType call() GLM_NOEXCEPT { return (vecType(compute_rand::call()) << static_cast(8)) | @@ -105,7 +105,7 @@ namespace detail template class vecType> struct compute_rand { - GLM_FUNC_QUALIFIER static vecType call() + GLM_FUNC_QUALIFIER static vecType call() GLM_NOEXCEPT { return (vecType(compute_rand::call()) << static_cast(16)) | @@ -116,7 +116,7 @@ namespace detail template class vecType> struct compute_rand { - GLM_FUNC_QUALIFIER static vecType call() + GLM_FUNC_QUALIFIER static vecType call() GLM_NOEXCEPT { return (vecType(compute_rand::call()) << static_cast(32)) | @@ -127,13 +127,13 @@ namespace detail template class vecType> struct compute_linearRand { - GLM_FUNC_QUALIFIER static vecType call(vecType const & Min, vecType const & Max); + GLM_FUNC_QUALIFIER static vecType call(vecType const & Min, vecType const & Max) GLM_NOEXCEPT; }; template class vecType> struct compute_linearRand { - GLM_FUNC_QUALIFIER static vecType call(vecType const & Min, vecType const & Max) + GLM_FUNC_QUALIFIER static vecType call(vecType const & Min, vecType const & Max) GLM_NOEXCEPT { return (vecType(compute_rand::call() % vecType(Max + static_cast(1) - Min))) + Min; } @@ -142,7 +142,7 @@ namespace detail template class vecType> struct compute_linearRand { - GLM_FUNC_QUALIFIER static vecType call(vecType const & Min, vecType const & Max) + GLM_FUNC_QUALIFIER static vecType call(vecType const & Min, vecType const & Max) GLM_NOEXCEPT { return (compute_rand::call() % (Max + static_cast(1) - Min)) + Min; } @@ -151,7 +151,7 @@ namespace detail template class vecType> struct compute_linearRand { - GLM_FUNC_QUALIFIER static vecType call(vecType const & Min, vecType const & Max) + GLM_FUNC_QUALIFIER static vecType call(vecType const & Min, vecType const & Max) GLM_NOEXCEPT { return (vecType(compute_rand::call() % vecType(Max + static_cast(1) - Min))) + Min; } @@ -160,7 +160,7 @@ namespace detail template class vecType> struct compute_linearRand { - GLM_FUNC_QUALIFIER static vecType call(vecType const & Min, vecType const & Max) + GLM_FUNC_QUALIFIER static vecType call(vecType const & Min, vecType const & Max) GLM_NOEXCEPT { return (compute_rand::call() % (Max + static_cast(1) - Min)) + Min; } @@ -169,7 +169,7 @@ namespace detail template class vecType> struct compute_linearRand { - GLM_FUNC_QUALIFIER static vecType call(vecType const & Min, vecType const & Max) + GLM_FUNC_QUALIFIER static vecType call(vecType const & Min, vecType const & Max) GLM_NOEXCEPT { return (vecType(compute_rand::call() % vecType(Max + static_cast(1) - Min))) + Min; } @@ -178,7 +178,7 @@ namespace detail template class vecType> struct compute_linearRand { - GLM_FUNC_QUALIFIER static vecType call(vecType const & Min, vecType const & Max) + GLM_FUNC_QUALIFIER static vecType call(vecType const & Min, vecType const & Max) GLM_NOEXCEPT { return (compute_rand::call() % (Max + static_cast(1) - Min)) + Min; } @@ -187,7 +187,7 @@ namespace detail template class vecType> struct compute_linearRand { - GLM_FUNC_QUALIFIER static vecType call(vecType const & Min, vecType const & Max) + GLM_FUNC_QUALIFIER static vecType call(vecType const & Min, vecType const & Max) GLM_NOEXCEPT { return (vecType(compute_rand::call() % vecType(Max + static_cast(1) - Min))) + Min; } @@ -196,7 +196,7 @@ namespace detail template class vecType> struct compute_linearRand { - GLM_FUNC_QUALIFIER static vecType call(vecType const & Min, vecType const & Max) + GLM_FUNC_QUALIFIER static vecType call(vecType const & Min, vecType const & Max) GLM_NOEXCEPT { return (compute_rand::call() % (Max + static_cast(1) - Min)) + Min; } @@ -205,7 +205,7 @@ namespace detail template