(GLM) Remove GLM_FUNC_DECL

This commit is contained in:
twinaphex 2016-11-01 07:40:33 +01:00
parent fd1b57fb1a
commit bc90cdef8b
83 changed files with 1336 additions and 1382 deletions

View File

@ -53,7 +53,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/abs.xml">GLSL abs man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/abs.xml">GLSL abs man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType abs(genType const & x); genType abs(genType const & x);
/// Returns 1.0 if x > 0, 0.0 if x == 0, or -1.0 if x < 0. /// Returns 1.0 if x > 0, 0.0 if x == 0, or -1.0 if x < 0.
/// ///
@ -62,7 +62,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/sign.xml">GLSL sign man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/sign.xml">GLSL sign man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType sign(genType const & x); genType sign(genType const & x);
/// Returns a value equal to the nearest integer that is less then or equal to x. /// Returns a value equal to the nearest integer that is less then or equal to x.
/// ///
@ -71,7 +71,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/floor.xml">GLSL floor man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/floor.xml">GLSL floor man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType floor(genType const & x); genType floor(genType const & x);
/// Returns a value equal to the nearest integer to x /// Returns a value equal to the nearest integer to x
/// whose absolute value is not larger than the absolute value of x. /// whose absolute value is not larger than the absolute value of x.
@ -81,7 +81,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/trunc.xml">GLSL trunc man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/trunc.xml">GLSL trunc man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType trunc(genType const & x); genType trunc(genType const & x);
/// Returns a value equal to the nearest integer to x. /// Returns a value equal to the nearest integer to x.
/// The fraction 0.5 will round in a direction chosen by the /// The fraction 0.5 will round in a direction chosen by the
@ -94,7 +94,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/round.xml">GLSL round man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/round.xml">GLSL round man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType round(genType const & x); genType round(genType const & x);
/// Returns a value equal to the nearest integer to x. /// Returns a value equal to the nearest integer to x.
/// A fractional part of 0.5 will round toward the nearest even /// A fractional part of 0.5 will round toward the nearest even
@ -106,7 +106,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
/// @see <a href="http://developer.amd.com/documentation/articles/pages/New-Round-to-Even-Technique.aspx">New round to even technique</a> /// @see <a href="http://developer.amd.com/documentation/articles/pages/New-Round-to-Even-Technique.aspx">New round to even technique</a>
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType roundEven(genType const & x); genType roundEven(genType const & x);
/// Returns a value equal to the nearest integer /// Returns a value equal to the nearest integer
/// that is greater than or equal to x. /// that is greater than or equal to x.
@ -116,7 +116,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/ceil.xml">GLSL ceil man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/ceil.xml">GLSL ceil man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType ceil(genType const & x); genType ceil(genType const & x);
/// Return x - floor(x). /// Return x - floor(x).
/// ///
@ -125,7 +125,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/fract.xml">GLSL fract man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/fract.xml">GLSL fract man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType fract(genType const & x); genType fract(genType const & x);
/// Modulus. Returns x - y * floor(x / y) /// Modulus. Returns x - y * floor(x / y)
/// for each component in x using the floating point value y. /// for each component in x using the floating point value y.
@ -135,7 +135,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/mod.xml">GLSL mod man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/mod.xml">GLSL mod man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType mod( genType mod(
genType const & x, genType const & x,
genType const & y); genType const & y);
@ -147,7 +147,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/mod.xml">GLSL mod man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/mod.xml">GLSL mod man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType mod( genType mod(
genType const & x, genType const & x,
typename genType::value_type const & y); typename genType::value_type const & y);
@ -161,7 +161,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/modf.xml">GLSL modf man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/modf.xml">GLSL modf man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType modf( genType modf(
genType const & x, genType const & x,
genType & i); genType & i);
@ -172,12 +172,12 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/min.xml">GLSL min man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/min.xml">GLSL min man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a><<<<<<< HEAD /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a><<<<<<< HEAD
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType min( genType min(
genType const & x, genType const & x,
genType const & y); genType const & y);
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType min( genType min(
genType const & x, genType const & x,
typename genType::value_type const & y); typename genType::value_type const & y);
@ -188,12 +188,12 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/max.xml">GLSL max man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/max.xml">GLSL max man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType max( genType max(
genType const & x, genType const & x,
genType const & y); genType const & y);
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType max( genType max(
genType const & x, genType const & x,
typename genType::value_type const & y); typename genType::value_type const & y);
@ -205,13 +205,13 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/clamp.xml">GLSL clamp man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/clamp.xml">GLSL clamp man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType clamp( genType clamp(
genType const & x, genType const & x,
genType const & minVal, genType const & minVal,
genType const & maxVal); genType const & maxVal);
template <typename genType, precision P> template <typename genType, precision P>
GLM_FUNC_DECL genType clamp( genType clamp(
genType const & x, genType const & x,
typename genType::value_type const & minVal, typename genType::value_type const & minVal,
typename genType::value_type const & maxVal); typename genType::value_type const & maxVal);
@ -259,19 +259,19 @@ namespace glm
/// glm::vec4 u = glm::mix(g, h, r); // Interpolations can be perform per component with a vector for the last parameter. /// glm::vec4 u = glm::mix(g, h, r); // Interpolations can be perform per component with a vector for the last parameter.
/// @endcode /// @endcode
template <typename T, typename U, precision P, template <typename, precision> class vecType> template <typename T, typename U, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL vecType<T, P> mix( vecType<T, P> mix(
vecType<T, P> const & x, vecType<T, P> const & x,
vecType<T, P> const & y, vecType<T, P> const & y,
vecType<U, P> const & a); vecType<U, P> const & a);
template <typename T, typename U, precision P, template <typename, precision> class vecType> template <typename T, typename U, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL vecType<T, P> mix( vecType<T, P> mix(
vecType<T, P> const & x, vecType<T, P> const & x,
vecType<T, P> const & y, vecType<T, P> const & y,
U const & a); U const & a);
template <typename genTypeT, typename genTypeU> template <typename genTypeT, typename genTypeU>
GLM_FUNC_DECL genTypeT mix( genTypeT mix(
genTypeT const & x, genTypeT const & x,
genTypeT const & y, genTypeT const & y,
genTypeU const & a); genTypeU const & a);
@ -281,7 +281,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/step.xml">GLSL step man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/step.xml">GLSL step man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType step( genType step(
genType const & edge, genType const & edge,
genType const & x); genType const & x);
@ -290,7 +290,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/step.xml">GLSL step man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/step.xml">GLSL step man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
template <template <typename, precision> class vecType, typename T, precision P> template <template <typename, precision> class vecType, typename T, precision P>
GLM_FUNC_DECL vecType<T, P> step( vecType<T, P> step(
T const & edge, T const & edge,
vecType<T, P> const & x); vecType<T, P> const & x);
@ -309,13 +309,13 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/smoothstep.xml">GLSL smoothstep man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/smoothstep.xml">GLSL smoothstep man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType smoothstep( genType smoothstep(
genType const & edge0, genType const & edge0,
genType const & edge1, genType const & edge1,
genType const & x); genType const & x);
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType smoothstep( genType smoothstep(
typename genType::value_type const & edge0, typename genType::value_type const & edge0,
typename genType::value_type const & edge1, typename genType::value_type const & edge1,
genType const & x); genType const & x);
@ -333,7 +333,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/isnan.xml">GLSL isnan man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/isnan.xml">GLSL isnan man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
template <typename genType> template <typename genType>
GLM_FUNC_DECL typename genType::bool_type isnan(genType const & x); typename genType::bool_type isnan(genType const & x);
/// Returns true if x holds a positive infinity or negative /// Returns true if x holds a positive infinity or negative
/// infinity representation in the underlying implementation's /// infinity representation in the underlying implementation's
@ -346,7 +346,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/isinf.xml">GLSL isinf man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/isinf.xml">GLSL isinf man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
template <typename genType> template <typename genType>
GLM_FUNC_DECL typename genType::bool_type isinf(genType const & x); typename genType::bool_type isinf(genType const & x);
/// Returns a signed integer value representing /// Returns a signed integer value representing
/// the encoding of a floating-point value. The floating-point /// the encoding of a floating-point value. The floating-point
@ -354,7 +354,7 @@ namespace glm
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/floatBitsToInt.xml">GLSL floatBitsToInt man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/floatBitsToInt.xml">GLSL floatBitsToInt man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
GLM_FUNC_DECL int floatBitsToInt(float const & v); int floatBitsToInt(float const & v);
/// Returns a signed integer value representing /// Returns a signed integer value representing
/// the encoding of a floating-point value. The floatingpoint /// the encoding of a floating-point value. The floatingpoint
@ -363,7 +363,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/floatBitsToInt.xml">GLSL floatBitsToInt man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/floatBitsToInt.xml">GLSL floatBitsToInt man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
template <template <typename, precision> class vecType, precision P> template <template <typename, precision> class vecType, precision P>
GLM_FUNC_DECL vecType<int, P> floatBitsToInt(vecType<float, P> const & v); vecType<int, P> floatBitsToInt(vecType<float, P> const & v);
/// Returns a unsigned integer value representing /// Returns a unsigned integer value representing
/// the encoding of a floating-point value. The floatingpoint /// the encoding of a floating-point value. The floatingpoint
@ -371,7 +371,7 @@ namespace glm
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/floatBitsToUint.xml">GLSL floatBitsToUint man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/floatBitsToUint.xml">GLSL floatBitsToUint man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
GLM_FUNC_DECL uint floatBitsToUint(float const & v); uint floatBitsToUint(float const & v);
/// Returns a unsigned integer value representing /// Returns a unsigned integer value representing
/// the encoding of a floating-point value. The floatingpoint /// the encoding of a floating-point value. The floatingpoint
@ -380,7 +380,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/floatBitsToUint.xml">GLSL floatBitsToUint man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/floatBitsToUint.xml">GLSL floatBitsToUint man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
template <template <typename, precision> class vecType, precision P> template <template <typename, precision> class vecType, precision P>
GLM_FUNC_DECL vecType<uint, P> floatBitsToUint(vecType<float, P> const & v); vecType<uint, P> floatBitsToUint(vecType<float, P> const & v);
/// Returns a floating-point value corresponding to a signed /// Returns a floating-point value corresponding to a signed
/// integer encoding of a floating-point value. /// integer encoding of a floating-point value.
@ -390,7 +390,7 @@ namespace glm
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/intBitsToFloat.xml">GLSL intBitsToFloat man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/intBitsToFloat.xml">GLSL intBitsToFloat man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
GLM_FUNC_DECL float intBitsToFloat(int const & v); float intBitsToFloat(int const & v);
/// Returns a floating-point value corresponding to a signed /// Returns a floating-point value corresponding to a signed
/// integer encoding of a floating-point value. /// integer encoding of a floating-point value.
@ -401,7 +401,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/intBitsToFloat.xml">GLSL intBitsToFloat man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/intBitsToFloat.xml">GLSL intBitsToFloat man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
template <template <typename, precision> class vecType, precision P> template <template <typename, precision> class vecType, precision P>
GLM_FUNC_DECL vecType<float, P> intBitsToFloat(vecType<int, P> const & v); vecType<float, P> intBitsToFloat(vecType<int, P> const & v);
/// Returns a floating-point value corresponding to a /// Returns a floating-point value corresponding to a
/// unsigned integer encoding of a floating-point value. /// unsigned integer encoding of a floating-point value.
@ -411,7 +411,7 @@ namespace glm
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/uintBitsToFloat.xml">GLSL uintBitsToFloat man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/uintBitsToFloat.xml">GLSL uintBitsToFloat man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
GLM_FUNC_DECL float uintBitsToFloat(uint const & v); float uintBitsToFloat(uint const & v);
/// Returns a floating-point value corresponding to a /// Returns a floating-point value corresponding to a
/// unsigned integer encoding of a floating-point value. /// unsigned integer encoding of a floating-point value.
@ -422,7 +422,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/uintBitsToFloat.xml">GLSL uintBitsToFloat man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/uintBitsToFloat.xml">GLSL uintBitsToFloat man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
template <template <typename, precision> class vecType, precision P> template <template <typename, precision> class vecType, precision P>
GLM_FUNC_DECL vecType<float, P> uintBitsToFloat(vecType<uint, P> const & v); vecType<float, P> uintBitsToFloat(vecType<uint, P> const & v);
/// Computes and returns a * b + c. /// Computes and returns a * b + c.
/// ///
@ -431,7 +431,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/fma.xml">GLSL fma man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/fma.xml">GLSL fma man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType fma(genType const & a, genType const & b, genType const & c); genType fma(genType const & a, genType const & b, genType const & c);
/// Splits x into a floating-point significand in the range /// Splits x into a floating-point significand in the range
/// [0.5, 1.0) and an integral exponent of two, such that: /// [0.5, 1.0) and an integral exponent of two, such that:
@ -448,7 +448,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/frexp.xml">GLSL frexp man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/frexp.xml">GLSL frexp man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
template <typename genType, typename genIType> template <typename genType, typename genIType>
GLM_FUNC_DECL genType frexp(genType const & x, genIType & exp); genType frexp(genType const & x, genIType & exp);
/// Builds a floating-point number from x and the /// Builds a floating-point number from x and the
/// corresponding integral exponent of two in exp, returning: /// corresponding integral exponent of two in exp, returning:
@ -462,7 +462,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/ldexp.xml">GLSL ldexp man page</a>; /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/ldexp.xml">GLSL ldexp man page</a>;
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
template <typename genType, typename genIType> template <typename genType, typename genIType>
GLM_FUNC_DECL genType ldexp(genType const & x, genIType const & exp); genType ldexp(genType const & x, genIType const & exp);
/// @} /// @}
}//namespace glm }//namespace glm

View File

@ -56,7 +56,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/pow.xml">GLSL pow man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/pow.xml">GLSL pow man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a>
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType pow(genType const & base, genType const & exponent); genType pow(genType const & base, genType const & exponent);
/// Returns the natural exponentiation of x, i.e., e^x. /// Returns the natural exponentiation of x, i.e., e^x.
/// ///
@ -66,7 +66,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/exp.xml">GLSL exp man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/exp.xml">GLSL exp man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a>
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType exp(genType const & x); genType exp(genType const & x);
/// Returns the natural logarithm of x, i.e., /// Returns the natural logarithm of x, i.e.,
/// returns the value y which satisfies the equation x = e^y. /// returns the value y which satisfies the equation x = e^y.
@ -78,7 +78,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/log.xml">GLSL log man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/log.xml">GLSL log man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a>
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType log(genType const & x); genType log(genType const & x);
/// Returns 2 raised to the x power. /// Returns 2 raised to the x power.
/// ///
@ -88,7 +88,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/exp2.xml">GLSL exp2 man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/exp2.xml">GLSL exp2 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a>
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType exp2(genType const & x); genType exp2(genType const & x);
/// Returns the base 2 log of x, i.e., returns the value y, /// Returns the base 2 log of x, i.e., returns the value y,
/// which satisfies the equation x = 2 ^ y. /// which satisfies the equation x = 2 ^ y.
@ -99,7 +99,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/log2.xml">GLSL log2 man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/log2.xml">GLSL log2 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a>
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType log2(genType x); genType log2(genType x);
/// Returns the positive square root of x. /// Returns the positive square root of x.
/// ///
@ -109,10 +109,10 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/sqrt.xml">GLSL sqrt man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/sqrt.xml">GLSL sqrt man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a>
//template <typename genType> //template <typename genType>
//GLM_FUNC_DECL genType sqrt(genType const & x); // genType sqrt(genType const & x);
template <typename T, precision P, template <typename, precision> class vecType> template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL vecType<T, P> sqrt(vecType<T, P> const & x); vecType<T, P> sqrt(vecType<T, P> const & x);
/// Returns the reciprocal of the positive square root of x. /// Returns the reciprocal of the positive square root of x.
/// ///
@ -122,7 +122,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/inversesqrt.xml">GLSL inversesqrt man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/inversesqrt.xml">GLSL inversesqrt man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a>
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType inversesqrt(genType const & x); genType inversesqrt(genType const & x);
/// @} /// @}
}//namespace glm }//namespace glm

View File

@ -50,7 +50,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/length.xml">GLSL length man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/length.xml">GLSL length man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a>
template <typename genType> template <typename genType>
GLM_FUNC_DECL typename genType::value_type length( typename genType::value_type length(
genType const & x); genType const & x);
/// Returns the distance betwwen p0 and p1, i.e., length(p0 - p1). /// Returns the distance betwwen p0 and p1, i.e., length(p0 - p1).
@ -60,7 +60,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/distance.xml">GLSL distance man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/distance.xml">GLSL distance man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a>
template <typename genType> template <typename genType>
GLM_FUNC_DECL typename genType::value_type distance( typename genType::value_type distance(
genType const & p0, genType const & p0,
genType const & p1); genType const & p1);
@ -71,7 +71,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/dot.xml">GLSL dot man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/dot.xml">GLSL dot man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a>
template <typename T, precision P, template <typename, precision> class vecType> template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL T dot( T dot(
vecType<T, P> const & x, vecType<T, P> const & x,
vecType<T, P> const & y); vecType<T, P> const & y);
@ -82,7 +82,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/dot.xml">GLSL dot man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/dot.xml">GLSL dot man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a>
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType dot( genType dot(
genType const & x, genType const & x,
genType const & y); genType const & y);
@ -93,7 +93,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/cross.xml">GLSL cross man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/cross.xml">GLSL cross man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a>
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tvec3<T, P> cross( detail::tvec3<T, P> cross(
detail::tvec3<T, P> const & x, detail::tvec3<T, P> const & x,
detail::tvec3<T, P> const & y); detail::tvec3<T, P> const & y);
@ -102,7 +102,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/normalize.xml">GLSL normalize man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/normalize.xml">GLSL normalize man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a>
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType normalize( genType normalize(
genType const & x); genType const & x);
/// If dot(Nref, I) < 0.0, return N, otherwise, return -N. /// If dot(Nref, I) < 0.0, return N, otherwise, return -N.
@ -112,7 +112,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/faceforward.xml">GLSL faceforward man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/faceforward.xml">GLSL faceforward man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a>
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType faceforward( genType faceforward(
genType const & N, genType const & N,
genType const & I, genType const & I,
genType const & Nref); genType const & Nref);
@ -125,7 +125,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/reflect.xml">GLSL reflect man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/reflect.xml">GLSL reflect man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a>
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType reflect( genType reflect(
genType const & I, genType const & I,
genType const & N); genType const & N);
@ -138,7 +138,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/refract.xml">GLSL refract man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/refract.xml">GLSL refract man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a>
template <typename T, precision P, template <typename, precision> class vecType> template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL vecType<T, P> refract( vecType<T, P> refract(
vecType<T, P> const & I, vecType<T, P> const & I,
vecType<T, P> const & N, vecType<T, P> const & N,
T const & eta); T const & eta);

View File

@ -54,7 +54,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/uaddCarry.xml">GLSL uaddCarry man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/uaddCarry.xml">GLSL uaddCarry man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>
template <typename genUType> template <typename genUType>
GLM_FUNC_DECL genUType uaddCarry( genUType uaddCarry(
genUType const & x, genUType const & x,
genUType const & y, genUType const & y,
genUType & carry); genUType & carry);
@ -68,7 +68,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/usubBorrow.xml">GLSL usubBorrow man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/usubBorrow.xml">GLSL usubBorrow man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>
template <typename genUType> template <typename genUType>
GLM_FUNC_DECL genUType usubBorrow( genUType usubBorrow(
genUType const & x, genUType const & x,
genUType const & y, genUType const & y,
genUType & borrow); genUType & borrow);
@ -82,7 +82,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/umulExtended.xml">GLSL umulExtended man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/umulExtended.xml">GLSL umulExtended man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>
template <typename genUType> template <typename genUType>
GLM_FUNC_DECL void umulExtended( void umulExtended(
genUType const & x, genUType const & x,
genUType const & y, genUType const & y,
genUType & msb, genUType & msb,
@ -97,7 +97,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/imulExtended.xml">GLSL imulExtended man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/imulExtended.xml">GLSL imulExtended man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>
template <typename genIType> template <typename genIType>
GLM_FUNC_DECL void imulExtended( void imulExtended(
genIType const & x, genIType const & x,
genIType const & y, genIType const & y,
genIType & msb, genIType & msb,
@ -119,7 +119,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/bitfieldExtract.xml">GLSL bitfieldExtract man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/bitfieldExtract.xml">GLSL bitfieldExtract man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>
template <typename genIUType> template <typename genIUType>
GLM_FUNC_DECL genIUType bitfieldExtract( genIUType bitfieldExtract(
genIUType const & Value, genIUType const & Value,
int const & Offset, int const & Offset,
int const & Bits); int const & Bits);
@ -139,7 +139,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/bitfieldInsert.xml">GLSL bitfieldInsert man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/bitfieldInsert.xml">GLSL bitfieldInsert man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>
template <typename genIUType> template <typename genIUType>
GLM_FUNC_DECL genIUType bitfieldInsert( genIUType bitfieldInsert(
genIUType const & Base, genIUType const & Base,
genIUType const & Insert, genIUType const & Insert,
int const & Offset, int const & Offset,
@ -154,7 +154,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/bitfieldReverse.xml">GLSL bitfieldReverse man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/bitfieldReverse.xml">GLSL bitfieldReverse man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>
template <typename genIUType> template <typename genIUType>
GLM_FUNC_DECL genIUType bitfieldReverse(genIUType const & Value); genIUType bitfieldReverse(genIUType const & Value);
/// Returns the number of bits set to 1 in the binary representation of value. /// Returns the number of bits set to 1 in the binary representation of value.
/// ///
@ -165,7 +165,7 @@ namespace glm
/// ///
/// @todo Clarify the declaration to specify that scalars are suported. /// @todo Clarify the declaration to specify that scalars are suported.
template <typename T, template <typename> class genIUType> template <typename T, template <typename> class genIUType>
GLM_FUNC_DECL typename genIUType<T>::signed_type bitCount(genIUType<T> const & Value); typename genIUType<T>::signed_type bitCount(genIUType<T> const & Value);
/// Returns the bit number of the least significant bit set to /// Returns the bit number of the least significant bit set to
/// 1 in the binary representation of value. /// 1 in the binary representation of value.
@ -178,7 +178,7 @@ namespace glm
/// ///
/// @todo Clarify the declaration to specify that scalars are suported. /// @todo Clarify the declaration to specify that scalars are suported.
template <typename T, template <typename> class genIUType> template <typename T, template <typename> class genIUType>
GLM_FUNC_DECL typename genIUType<T>::signed_type findLSB(genIUType<T> const & Value); typename genIUType<T>::signed_type findLSB(genIUType<T> const & Value);
/// Returns the bit number of the most significant bit in the binary representation of value. /// Returns the bit number of the most significant bit in the binary representation of value.
/// For positive integers, the result will be the bit number of the most significant bit set to 1. /// For positive integers, the result will be the bit number of the most significant bit set to 1.
@ -192,7 +192,7 @@ namespace glm
/// ///
/// @todo Clarify the declaration to specify that scalars are suported. /// @todo Clarify the declaration to specify that scalars are suported.
template <typename T, template <typename> class genIUType> template <typename T, template <typename> class genIUType>
GLM_FUNC_DECL typename genIUType<T>::signed_type findMSB(genIUType<T> const & Value); typename genIUType<T>::signed_type findMSB(genIUType<T> const & Value);
/// @} /// @}
}//namespace glm }//namespace glm

View File

@ -127,7 +127,7 @@ namespace detail
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/matrixCompMult.xml">GLSL matrixCompMult man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/matrixCompMult.xml">GLSL matrixCompMult man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.6 Matrix Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.6 Matrix Functions</a>
template <typename T, precision P, template <typename, precision> class matType> template <typename T, precision P, template <typename, precision> class matType>
GLM_FUNC_DECL matType<T, P> matrixCompMult(matType<T, P> const & x, matType<T, P> const & y); matType<T, P> matrixCompMult(matType<T, P> const & x, matType<T, P> const & y);
/// Treats the first parameter c as a column vector /// Treats the first parameter c as a column vector
/// and the second parameter r as a row vector /// and the second parameter r as a row vector
@ -140,7 +140,7 @@ namespace detail
/// ///
/// @todo Clarify the declaration to specify that matType doesn't have to be provided when used. /// @todo Clarify the declaration to specify that matType doesn't have to be provided when used.
template <typename T, precision P, template <typename, precision> class vecTypeA, template <typename, precision> class vecTypeB> template <typename T, precision P, template <typename, precision> class vecTypeA, template <typename, precision> class vecTypeB>
GLM_FUNC_DECL typename detail::outerProduct_trait<T, P, vecTypeA, vecTypeB>::type outerProduct(vecTypeA<T, P> const & c, vecTypeB<T, P> const & r); typename detail::outerProduct_trait<T, P, vecTypeA, vecTypeB>::type outerProduct(vecTypeA<T, P> const & c, vecTypeB<T, P> const & r);
/// Returns the transposed matrix of x /// Returns the transposed matrix of x
/// ///
@ -150,7 +150,7 @@ namespace detail
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.6 Matrix Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.6 Matrix Functions</a>
# if((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC11)) # if((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC11))
template <typename T, precision P, template <typename, precision> class matType> template <typename T, precision P, template <typename, precision> class matType>
GLM_FUNC_DECL typename matType<T, P>::transpose_type transpose(matType<T, P> const & x); typename matType<T, P>::transpose_type transpose(matType<T, P> const & x);
# endif # endif
/// Return the determinant of a squared matrix. /// Return the determinant of a squared matrix.
@ -160,7 +160,7 @@ namespace detail
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/determinant.xml">GLSL determinant man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/determinant.xml">GLSL determinant man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.6 Matrix Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.6 Matrix Functions</a>
template <typename T, precision P, template <typename, precision> class matType> template <typename T, precision P, template <typename, precision> class matType>
GLM_FUNC_DECL T determinant(matType<T, P> const & m); T determinant(matType<T, P> const & m);
/// Return the inverse of a squared matrix. /// Return the inverse of a squared matrix.
/// ///
@ -169,7 +169,7 @@ namespace detail
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/inverse.xml">GLSL inverse man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/inverse.xml">GLSL inverse man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.6 Matrix Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.6 Matrix Functions</a>
template <typename T, precision P, template <typename, precision> class matType> template <typename T, precision P, template <typename, precision> class matType>
GLM_FUNC_DECL matType<T, P> inverse(matType<T, P> const & m); matType<T, P> inverse(matType<T, P> const & m);
/// @} /// @}
}//namespace glm }//namespace glm

View File

@ -55,7 +55,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/noise1.xml">GLSL noise1 man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/noise1.xml">GLSL noise1 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.13 Noise Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.13 Noise Functions</a>
template <typename genType> template <typename genType>
GLM_FUNC_DECL typename genType::value_type noise1(genType const & x); typename genType::value_type noise1(genType const & x);
/// Returns a 2D noise value based on the input value x. /// Returns a 2D noise value based on the input value x.
/// ///
@ -64,7 +64,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/noise2.xml">GLSL noise2 man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/noise2.xml">GLSL noise2 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.13 Noise Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.13 Noise Functions</a>
template <typename genType> template <typename genType>
GLM_FUNC_DECL detail::tvec2<typename genType::value_type, defaultp> noise2(genType const & x); detail::tvec2<typename genType::value_type, defaultp> noise2(genType const & x);
/// Returns a 3D noise value based on the input value x. /// Returns a 3D noise value based on the input value x.
/// ///
@ -73,7 +73,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/noise3.xml">GLSL noise3 man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/noise3.xml">GLSL noise3 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.13 Noise Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.13 Noise Functions</a>
template <typename genType> template <typename genType>
GLM_FUNC_DECL detail::tvec3<typename genType::value_type, defaultp> noise3(genType const & x); detail::tvec3<typename genType::value_type, defaultp> noise3(genType const & x);
/// Returns a 4D noise value based on the input value x. /// Returns a 4D noise value based on the input value x.
/// ///
@ -82,7 +82,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/noise4.xml">GLSL noise4 man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/noise4.xml">GLSL noise4 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.13 Noise Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.13 Noise Functions</a>
template <typename genType> template <typename genType>
GLM_FUNC_DECL detail::tvec4<typename genType::value_type, defaultp> noise4(genType const & x); detail::tvec4<typename genType::value_type, defaultp> noise4(genType const & x);
/// @} /// @}
}//namespace glm }//namespace glm

View File

@ -55,7 +55,7 @@ namespace glm
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packUnorm2x16.xml">GLSL packUnorm2x16 man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packUnorm2x16.xml">GLSL packUnorm2x16 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
GLM_FUNC_DECL uint packUnorm2x16(vec2 const & v); uint packUnorm2x16(vec2 const & v);
/// First, converts each component of the normalized floating-point value v into 8- or 16-bit integer values. /// First, converts each component of the normalized floating-point value v into 8- or 16-bit integer values.
/// Then, the results are packed into the returned 32-bit unsigned integer. /// Then, the results are packed into the returned 32-bit unsigned integer.
@ -68,7 +68,7 @@ namespace glm
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packSnorm2x16.xml">GLSL packSnorm2x16 man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packSnorm2x16.xml">GLSL packSnorm2x16 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
GLM_FUNC_DECL uint packSnorm2x16(vec2 const & v); uint packSnorm2x16(vec2 const & v);
/// First, converts each component of the normalized floating-point value v into 8- or 16-bit integer values. /// First, converts each component of the normalized floating-point value v into 8- or 16-bit integer values.
/// Then, the results are packed into the returned 32-bit unsigned integer. /// Then, the results are packed into the returned 32-bit unsigned integer.
@ -81,7 +81,7 @@ namespace glm
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packUnorm4x8.xml">GLSL packUnorm4x8 man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packUnorm4x8.xml">GLSL packUnorm4x8 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
GLM_FUNC_DECL uint packUnorm4x8(vec4 const & v); uint packUnorm4x8(vec4 const & v);
/// First, converts each component of the normalized floating-point value v into 8- or 16-bit integer values. /// First, converts each component of the normalized floating-point value v into 8- or 16-bit integer values.
/// Then, the results are packed into the returned 32-bit unsigned integer. /// Then, the results are packed into the returned 32-bit unsigned integer.
@ -94,7 +94,7 @@ namespace glm
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packSnorm4x8.xml">GLSL packSnorm4x8 man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packSnorm4x8.xml">GLSL packSnorm4x8 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
GLM_FUNC_DECL uint packSnorm4x8(vec4 const & v); uint packSnorm4x8(vec4 const & v);
/// First, unpacks a single 32-bit unsigned integer p into a pair of 16-bit unsigned integers, four 8-bit unsigned integers, or four 8-bit signed integers. /// First, unpacks a single 32-bit unsigned integer p into a pair of 16-bit unsigned integers, four 8-bit unsigned integers, or four 8-bit signed integers.
/// Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector. /// Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector.
@ -107,7 +107,7 @@ namespace glm
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackUnorm2x16.xml">GLSL unpackUnorm2x16 man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackUnorm2x16.xml">GLSL unpackUnorm2x16 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
GLM_FUNC_DECL vec2 unpackUnorm2x16(uint const & p); vec2 unpackUnorm2x16(uint const & p);
/// First, unpacks a single 32-bit unsigned integer p into a pair of 16-bit unsigned integers, four 8-bit unsigned integers, or four 8-bit signed integers. /// First, unpacks a single 32-bit unsigned integer p into a pair of 16-bit unsigned integers, four 8-bit unsigned integers, or four 8-bit signed integers.
/// Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector. /// Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector.
@ -120,7 +120,7 @@ namespace glm
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackSnorm2x16.xml">GLSL unpackSnorm2x16 man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackSnorm2x16.xml">GLSL unpackSnorm2x16 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
GLM_FUNC_DECL vec2 unpackSnorm2x16(uint const & p); vec2 unpackSnorm2x16(uint const & p);
/// First, unpacks a single 32-bit unsigned integer p into a pair of 16-bit unsigned integers, four 8-bit unsigned integers, or four 8-bit signed integers. /// First, unpacks a single 32-bit unsigned integer p into a pair of 16-bit unsigned integers, four 8-bit unsigned integers, or four 8-bit signed integers.
/// Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector. /// Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector.
@ -133,7 +133,7 @@ namespace glm
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackUnorm4x8.xml">GLSL unpackUnorm4x8 man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackUnorm4x8.xml">GLSL unpackUnorm4x8 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
GLM_FUNC_DECL vec4 unpackUnorm4x8(uint const & p); vec4 unpackUnorm4x8(uint const & p);
/// First, unpacks a single 32-bit unsigned integer p into a pair of 16-bit unsigned integers, four 8-bit unsigned integers, or four 8-bit signed integers. /// First, unpacks a single 32-bit unsigned integer p into a pair of 16-bit unsigned integers, four 8-bit unsigned integers, or four 8-bit signed integers.
/// Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector. /// Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector.
@ -146,7 +146,7 @@ namespace glm
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackSnorm4x8.xml">GLSL unpackSnorm4x8 man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackSnorm4x8.xml">GLSL unpackSnorm4x8 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
GLM_FUNC_DECL vec4 unpackSnorm4x8(uint const & p); vec4 unpackSnorm4x8(uint const & p);
/// Returns a double-precision value obtained by packing the components of v into a 64-bit value. /// Returns a double-precision value obtained by packing the components of v into a 64-bit value.
/// If an IEEE 754 Inf or NaN is created, it will not signal, and the resulting floating point value is unspecified. /// If an IEEE 754 Inf or NaN is created, it will not signal, and the resulting floating point value is unspecified.
@ -156,7 +156,7 @@ namespace glm
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packDouble2x32.xml">GLSL packDouble2x32 man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packDouble2x32.xml">GLSL packDouble2x32 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
GLM_FUNC_DECL double packDouble2x32(uvec2 const & v); double packDouble2x32(uvec2 const & v);
/// Returns a two-component unsigned integer vector representation of v. /// Returns a two-component unsigned integer vector representation of v.
/// The bit-level representation of v is preserved. /// The bit-level representation of v is preserved.
@ -165,7 +165,7 @@ namespace glm
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackDouble2x32.xml">GLSL unpackDouble2x32 man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackDouble2x32.xml">GLSL unpackDouble2x32 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
GLM_FUNC_DECL uvec2 unpackDouble2x32(double const & v); uvec2 unpackDouble2x32(double const & v);
/// Returns an unsigned integer obtained by converting the components of a two-component floating-point vector /// Returns an unsigned integer obtained by converting the components of a two-component floating-point vector
/// to the 16-bit floating-point representation found in the OpenGL Specification, /// to the 16-bit floating-point representation found in the OpenGL Specification,
@ -175,7 +175,7 @@ namespace glm
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packHalf2x16.xml">GLSL packHalf2x16 man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packHalf2x16.xml">GLSL packHalf2x16 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
GLM_FUNC_DECL uint packHalf2x16(vec2 const & v); uint packHalf2x16(vec2 const & v);
/// Returns a two-component floating-point vector with components obtained by unpacking a 32-bit unsigned integer into a pair of 16-bit values, /// Returns a two-component floating-point vector with components obtained by unpacking a 32-bit unsigned integer into a pair of 16-bit values,
/// interpreting those values as 16-bit floating-point numbers according to the OpenGL Specification, /// interpreting those values as 16-bit floating-point numbers according to the OpenGL Specification,
@ -185,7 +185,7 @@ namespace glm
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackHalf2x16.xml">GLSL unpackHalf2x16 man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackHalf2x16.xml">GLSL unpackHalf2x16 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
GLM_FUNC_DECL vec2 unpackHalf2x16(uint const & v); vec2 unpackHalf2x16(uint const & v);
/// @} /// @}
}//namespace glm }//namespace glm

View File

@ -52,7 +52,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/radians.xml">GLSL radians man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/radians.xml">GLSL radians man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType radians(genType const & degrees); genType radians(genType const & degrees);
/// Converts radians to degrees and returns the result. /// Converts radians to degrees and returns the result.
/// ///
@ -61,7 +61,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/degrees.xml">GLSL degrees man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/degrees.xml">GLSL degrees man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType degrees(genType const & radians); genType degrees(genType const & radians);
/// The standard trigonometric sine function. /// The standard trigonometric sine function.
/// The values returned by this function will range from [-1, 1]. /// The values returned by this function will range from [-1, 1].
@ -71,7 +71,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/sin.xml">GLSL sin man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/sin.xml">GLSL sin man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType sin(genType const & angle); genType sin(genType const & angle);
/// The standard trigonometric cosine function. /// The standard trigonometric cosine function.
/// The values returned by this function will range from [-1, 1]. /// The values returned by this function will range from [-1, 1].
@ -81,7 +81,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/cos.xml">GLSL cos man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/cos.xml">GLSL cos man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType cos(genType const & angle); genType cos(genType const & angle);
/// The standard trigonometric tangent function. /// The standard trigonometric tangent function.
/// ///
@ -90,7 +90,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/tan.xml">GLSL tan man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/tan.xml">GLSL tan man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType tan(genType const & angle); genType tan(genType const & angle);
/// Arc sine. Returns an angle whose sine is x. /// Arc sine. Returns an angle whose sine is x.
/// The range of values returned by this function is [-PI/2, PI/2]. /// The range of values returned by this function is [-PI/2, PI/2].
@ -101,7 +101,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/asin.xml">GLSL asin man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/asin.xml">GLSL asin man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType asin(genType const & x); genType asin(genType const & x);
/// Arc cosine. Returns an angle whose sine is x. /// Arc cosine. Returns an angle whose sine is x.
/// The range of values returned by this function is [0, PI]. /// The range of values returned by this function is [0, PI].
@ -112,7 +112,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/acos.xml">GLSL acos man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/acos.xml">GLSL acos man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType acos(genType const & x); genType acos(genType const & x);
/// Arc tangent. Returns an angle whose tangent is y/x. /// Arc tangent. Returns an angle whose tangent is y/x.
/// The signs of x and y are used to determine what /// The signs of x and y are used to determine what
@ -125,7 +125,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/atan.xml">GLSL atan man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/atan.xml">GLSL atan man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType atan(genType const & y, genType const & x); genType atan(genType const & y, genType const & x);
/// Arc tangent. Returns an angle whose tangent is y_over_x. /// Arc tangent. Returns an angle whose tangent is y_over_x.
/// The range of values returned by this function is [-PI/2, PI/2]. /// The range of values returned by this function is [-PI/2, PI/2].
@ -135,7 +135,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/atan.xml">GLSL atan man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/atan.xml">GLSL atan man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType atan(genType const & y_over_x); genType atan(genType const & y_over_x);
/// Returns the hyperbolic sine function, (exp(x) - exp(-x)) / 2 /// Returns the hyperbolic sine function, (exp(x) - exp(-x)) / 2
/// ///
@ -144,7 +144,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/sinh.xml">GLSL sinh man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/sinh.xml">GLSL sinh man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType sinh(genType const & angle); genType sinh(genType const & angle);
/// Returns the hyperbolic cosine function, (exp(x) + exp(-x)) / 2 /// Returns the hyperbolic cosine function, (exp(x) + exp(-x)) / 2
/// ///
@ -153,7 +153,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/cosh.xml">GLSL cosh man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/cosh.xml">GLSL cosh man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType cosh(genType const & angle); genType cosh(genType const & angle);
/// Returns the hyperbolic tangent function, sinh(angle) / cosh(angle) /// Returns the hyperbolic tangent function, sinh(angle) / cosh(angle)
/// ///
@ -162,7 +162,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/tanh.xml">GLSL tanh man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/tanh.xml">GLSL tanh man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType tanh(genType const & angle); genType tanh(genType const & angle);
/// Arc hyperbolic sine; returns the inverse of sinh. /// Arc hyperbolic sine; returns the inverse of sinh.
/// ///
@ -171,7 +171,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/asinh.xml">GLSL asinh man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/asinh.xml">GLSL asinh man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType asinh(genType const & x); genType asinh(genType const & x);
/// Arc hyperbolic cosine; returns the non-negative inverse /// Arc hyperbolic cosine; returns the non-negative inverse
/// of cosh. Results are undefined if x < 1. /// of cosh. Results are undefined if x < 1.
@ -181,7 +181,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/acosh.xml">GLSL acosh man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/acosh.xml">GLSL acosh man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType acosh(genType const & x); genType acosh(genType const & x);
/// Arc hyperbolic tangent; returns the inverse of tanh. /// Arc hyperbolic tangent; returns the inverse of tanh.
/// Results are undefined if abs(x) >= 1. /// Results are undefined if abs(x) >= 1.
@ -191,7 +191,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/atanh.xml">GLSL atanh man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/atanh.xml">GLSL atanh man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType atanh(genType const & x); genType atanh(genType const & x);
/// @} /// @}
}//namespace glm }//namespace glm

View File

@ -59,7 +59,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>
// TODO: Mismatched // TODO: Mismatched
//template <typename T, precision P, template <typename, precision> class vecType> //template <typename T, precision P, template <typename, precision> class vecType>
//GLM_FUNC_DECL typename vecType<T, P>::bool_type lessThan(vecType<T, P> const & x, vecType<T, P> const & y); //typename vecType<T, P>::bool_type lessThan(vecType<T, P> const & x, vecType<T, P> const & y);
/// Returns the component-wise comparison of result x <= y. /// Returns the component-wise comparison of result x <= y.
/// ///
@ -68,7 +68,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/lessThanEqual.xml">GLSL lessThanEqual man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/lessThanEqual.xml">GLSL lessThanEqual man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>
template <typename T, precision P, template <typename, precision> class vecType> template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL typename vecType<T, P>::bool_type lessThanEqual(vecType<T, P> const & x, vecType<T, P> const & y); typename vecType<T, P>::bool_type lessThanEqual(vecType<T, P> const & x, vecType<T, P> const & y);
/// Returns the component-wise comparison of result x > y. /// Returns the component-wise comparison of result x > y.
/// ///
@ -77,7 +77,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/greaterThan.xml">GLSL greaterThan man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/greaterThan.xml">GLSL greaterThan man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>
template <typename T, precision P, template <typename, precision> class vecType> template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL typename vecType<T, P>::bool_type greaterThan(vecType<T, P> const & x, vecType<T, P> const & y); typename vecType<T, P>::bool_type greaterThan(vecType<T, P> const & x, vecType<T, P> const & y);
/// Returns the component-wise comparison of result x >= y. /// Returns the component-wise comparison of result x >= y.
/// ///
@ -86,7 +86,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/greaterThanEqual.xml">GLSL greaterThanEqual man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/greaterThanEqual.xml">GLSL greaterThanEqual man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>
template <typename T, precision P, template <typename, precision> class vecType> template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL typename vecType<T, P>::bool_type greaterThanEqual(vecType<T, P> const & x, vecType<T, P> const & y); typename vecType<T, P>::bool_type greaterThanEqual(vecType<T, P> const & x, vecType<T, P> const & y);
/// Returns the component-wise comparison of result x == y. /// Returns the component-wise comparison of result x == y.
/// ///
@ -96,7 +96,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>
//TODO: conflicts with definision //TODO: conflicts with definision
//template <typename T, precision P, template <typename, precision> class vecType> //template <typename T, precision P, template <typename, precision> class vecType>
//GLM_FUNC_DECL typename vecType<T, P>::bool_type equal(vecType<T, P> const & x, vecType<T, P> const & y); //typename vecType<T, P>::bool_type equal(vecType<T, P> const & x, vecType<T, P> const & y);
/// Returns the component-wise comparison of result x != y. /// Returns the component-wise comparison of result x != y.
/// ///
@ -105,7 +105,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/notEqual.xml">GLSL notEqual man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/notEqual.xml">GLSL notEqual man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>
template <typename T, precision P, template <typename, precision> class vecType> template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL typename vecType<T, P>::bool_type notEqual(vecType<T, P> const & x, vecType<T, P> const & y); typename vecType<T, P>::bool_type notEqual(vecType<T, P> const & x, vecType<T, P> const & y);
/// Returns true if any component of x is true. /// Returns true if any component of x is true.
/// ///
@ -114,7 +114,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/any.xml">GLSL any man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/any.xml">GLSL any man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>
template <precision P, template <typename, precision> class vecType> template <precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL bool any(vecType<bool, P> const & v); bool any(vecType<bool, P> const & v);
/// Returns true if all components of x are true. /// Returns true if all components of x are true.
/// ///
@ -123,7 +123,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/all.xml">GLSL all man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/all.xml">GLSL all man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>
template <precision P, template <typename, precision> class vecType> template <precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL bool all(vecType<bool, P> const & v); bool all(vecType<bool, P> const & v);
/// Returns the component-wise logical complement of x. /// Returns the component-wise logical complement of x.
/// /!\ Because of language incompatibilities between C++ and GLSL, GLM defines the function not but not_ instead. /// /!\ Because of language incompatibilities between C++ and GLSL, GLM defines the function not but not_ instead.
@ -133,7 +133,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/not.xml">GLSL not man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/not.xml">GLSL not man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>
template <precision P, template <typename, precision> class vecType> template <precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL vecType<bool, P> not_(vecType<bool, P> const & v); vecType<bool, P> not_(vecType<bool, P> const & v);
/// @} /// @}
}//namespace glm }//namespace glm

View File

@ -665,8 +665,7 @@
# define GLM_INLINE inline # define GLM_INLINE inline
#endif//defined(GLM_FORCE_INLINE) #endif//defined(GLM_FORCE_INLINE)
#define GLM_FUNC_DECL GLM_CUDA_FUNC_DECL #define GLM_FUNC_QUALIFIER GLM_INLINE
#define GLM_FUNC_QUALIFIER GLM_CUDA_FUNC_DEF GLM_INLINE
/////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////
// Swizzle operators // Swizzle operators

View File

@ -34,8 +34,8 @@
namespace glm{ namespace glm{
namespace detail namespace detail
{ {
GLM_FUNC_DECL float toFloat32(int16_t value); float toFloat32(int16_t value);
GLM_FUNC_DECL int16_t toFloat16(float const & value); int16_t toFloat16(float const & value);
}//namespace detail }//namespace detail
}//namespace glm }//namespace glm

View File

@ -48,7 +48,7 @@ namespace detail
typedef tmat2x2<T, P> type; typedef tmat2x2<T, P> type;
typedef tmat2x2<T, P> transpose_type; typedef tmat2x2<T, P> transpose_type;
GLM_FUNC_DECL length_t length() const; length_t length() const;
template <typename U, precision Q> template <typename U, precision Q>
friend tvec2<U, Q> operator/(tmat2x2<U, Q> const & m, tvec2<U, Q> const & v); friend tvec2<U, Q> operator/(tmat2x2<U, Q> const & m, tvec2<U, Q> const & v);
@ -63,181 +63,181 @@ namespace detail
public: public:
////////////////////////////////////// //////////////////////////////////////
// Constructors // Constructors
GLM_FUNC_DECL tmat2x2(); tmat2x2();
GLM_FUNC_DECL tmat2x2(tmat2x2<T, P> const & m); tmat2x2(tmat2x2<T, P> const & m);
template <precision Q> template <precision Q>
GLM_FUNC_DECL tmat2x2(tmat2x2<T, Q> const & m); tmat2x2(tmat2x2<T, Q> const & m);
GLM_FUNC_DECL explicit tmat2x2( explicit tmat2x2(
ctor Null); ctor Null);
GLM_FUNC_DECL explicit tmat2x2( explicit tmat2x2(
T const & x); T const & x);
GLM_FUNC_DECL tmat2x2( tmat2x2(
T const & x1, T const & y1, T const & x1, T const & y1,
T const & x2, T const & y2); T const & x2, T const & y2);
GLM_FUNC_DECL tmat2x2( tmat2x2(
col_type const & v1, col_type const & v1,
col_type const & v2); col_type const & v2);
////////////////////////////////////// //////////////////////////////////////
// Conversions // Conversions
template <typename U, typename V, typename M, typename N> template <typename U, typename V, typename M, typename N>
GLM_FUNC_DECL tmat2x2( tmat2x2(
U const & x1, V const & y1, U const & x1, V const & y1,
M const & x2, N const & y2); M const & x2, N const & y2);
template <typename U, typename V> template <typename U, typename V>
GLM_FUNC_DECL tmat2x2( tmat2x2(
tvec2<U, P> const & v1, tvec2<U, P> const & v1,
tvec2<V, P> const & v2); tvec2<V, P> const & v2);
////////////////////////////////////// //////////////////////////////////////
// Matrix conversions // Matrix conversions
template <typename U, precision Q> template <typename U, precision Q>
GLM_FUNC_DECL explicit tmat2x2(tmat2x2<U, Q> const & m); explicit tmat2x2(tmat2x2<U, Q> const & m);
GLM_FUNC_DECL explicit tmat2x2(tmat3x3<T, P> const & x); explicit tmat2x2(tmat3x3<T, P> const & x);
GLM_FUNC_DECL explicit tmat2x2(tmat4x4<T, P> const & x); explicit tmat2x2(tmat4x4<T, P> const & x);
GLM_FUNC_DECL explicit tmat2x2(tmat2x3<T, P> const & x); explicit tmat2x2(tmat2x3<T, P> const & x);
GLM_FUNC_DECL explicit tmat2x2(tmat3x2<T, P> const & x); explicit tmat2x2(tmat3x2<T, P> const & x);
GLM_FUNC_DECL explicit tmat2x2(tmat2x4<T, P> const & x); explicit tmat2x2(tmat2x4<T, P> const & x);
GLM_FUNC_DECL explicit tmat2x2(tmat4x2<T, P> const & x); explicit tmat2x2(tmat4x2<T, P> const & x);
GLM_FUNC_DECL explicit tmat2x2(tmat3x4<T, P> const & x); explicit tmat2x2(tmat3x4<T, P> const & x);
GLM_FUNC_DECL explicit tmat2x2(tmat4x3<T, P> const & x); explicit tmat2x2(tmat4x3<T, P> const & x);
////////////////////////////////////// //////////////////////////////////////
// Accesses // Accesses
GLM_FUNC_DECL col_type & operator[](length_t i); col_type & operator[](length_t i);
GLM_FUNC_DECL col_type const & operator[](length_t i) const; col_type const & operator[](length_t i) const;
// Unary updatable operators // Unary updatable operators
GLM_FUNC_DECL tmat2x2<T, P> & operator=(tmat2x2<T, P> const & m); tmat2x2<T, P> & operator=(tmat2x2<T, P> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x2<T, P> & operator=(tmat2x2<U, P> const & m); tmat2x2<T, P> & operator=(tmat2x2<U, P> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x2<T, P> & operator+=(U s); tmat2x2<T, P> & operator+=(U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x2<T, P> & operator+=(tmat2x2<U, P> const & m); tmat2x2<T, P> & operator+=(tmat2x2<U, P> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x2<T, P> & operator-=(U s); tmat2x2<T, P> & operator-=(U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x2<T, P> & operator-=(tmat2x2<U, P> const & m); tmat2x2<T, P> & operator-=(tmat2x2<U, P> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x2<T, P> & operator*=(U s); tmat2x2<T, P> & operator*=(U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x2<T, P> & operator*=(tmat2x2<U, P> const & m); tmat2x2<T, P> & operator*=(tmat2x2<U, P> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x2<T, P> & operator/=(U s); tmat2x2<T, P> & operator/=(U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x2<T, P> & operator/=(tmat2x2<U, P> const & m); tmat2x2<T, P> & operator/=(tmat2x2<U, P> const & m);
////////////////////////////////////// //////////////////////////////////////
// Increment and decrement operators // Increment and decrement operators
GLM_FUNC_DECL tmat2x2<T, P> & operator++ (); tmat2x2<T, P> & operator++ ();
GLM_FUNC_DECL tmat2x2<T, P> & operator-- (); tmat2x2<T, P> & operator-- ();
GLM_FUNC_DECL tmat2x2<T, P> operator++(int); tmat2x2<T, P> operator++(int);
GLM_FUNC_DECL tmat2x2<T, P> operator--(int); tmat2x2<T, P> operator--(int);
}; };
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat2x2<T, P> compute_inverse_mat2(tmat2x2<T, P> const & m); tmat2x2<T, P> compute_inverse_mat2(tmat2x2<T, P> const & m);
// Binary operators // Binary operators
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat2x2<T, P> operator+ ( tmat2x2<T, P> operator+ (
tmat2x2<T, P> const & m, tmat2x2<T, P> const & m,
T const & s); T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat2x2<T, P> operator+ ( tmat2x2<T, P> operator+ (
T const & s, T const & s,
tmat2x2<T, P> const & m); tmat2x2<T, P> const & m);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat2x2<T, P> operator+ ( tmat2x2<T, P> operator+ (
tmat2x2<T, P> const & m1, tmat2x2<T, P> const & m1,
tmat2x2<T, P> const & m2); tmat2x2<T, P> const & m2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat2x2<T, P> operator- ( tmat2x2<T, P> operator- (
tmat2x2<T, P> const & m, tmat2x2<T, P> const & m,
T const & s); T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat2x2<T, P> operator- ( tmat2x2<T, P> operator- (
T const & s, T const & s,
tmat2x2<T, P> const & m); tmat2x2<T, P> const & m);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat2x2<T, P> operator- ( tmat2x2<T, P> operator- (
tmat2x2<T, P> const & m1, tmat2x2<T, P> const & m1,
tmat2x2<T, P> const & m2); tmat2x2<T, P> const & m2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat2x2<T, P> operator* ( tmat2x2<T, P> operator* (
tmat2x2<T, P> const & m, tmat2x2<T, P> const & m,
T const & s); T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat2x2<T, P> operator* ( tmat2x2<T, P> operator* (
T const & s, T const & s,
tmat2x2<T, P> const & m); tmat2x2<T, P> const & m);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL typename tmat2x2<T, P>::col_type operator* ( typename tmat2x2<T, P>::col_type operator* (
tmat2x2<T, P> const & m, tmat2x2<T, P> const & m,
typename tmat2x2<T, P>::row_type const & v); typename tmat2x2<T, P>::row_type const & v);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL typename tmat2x2<T, P>::row_type operator* ( typename tmat2x2<T, P>::row_type operator* (
typename tmat2x2<T, P>::col_type const & v, typename tmat2x2<T, P>::col_type const & v,
tmat2x2<T, P> const & m); tmat2x2<T, P> const & m);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat2x2<T, P> operator* ( tmat2x2<T, P> operator* (
tmat2x2<T, P> const & m1, tmat2x2<T, P> const & m1,
tmat2x2<T, P> const & m2); tmat2x2<T, P> const & m2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x2<T, P> operator* ( tmat3x2<T, P> operator* (
tmat2x2<T, P> const & m1, tmat2x2<T, P> const & m1,
tmat3x2<T, P> const & m2); tmat3x2<T, P> const & m2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat4x2<T, P> operator* ( tmat4x2<T, P> operator* (
tmat2x2<T, P> const & m1, tmat2x2<T, P> const & m1,
tmat4x2<T, P> const & m2); tmat4x2<T, P> const & m2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat2x2<T, P> operator/ ( tmat2x2<T, P> operator/ (
tmat2x2<T, P> const & m, tmat2x2<T, P> const & m,
T const & s); T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat2x2<T, P> operator/ ( tmat2x2<T, P> operator/ (
T const & s, T const & s,
tmat2x2<T, P> const & m); tmat2x2<T, P> const & m);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL typename tmat2x2<T, P>::col_type operator/ ( typename tmat2x2<T, P>::col_type operator/ (
tmat2x2<T, P> const & m, tmat2x2<T, P> const & m,
typename tmat2x2<T, P>::row_type const & v); typename tmat2x2<T, P>::row_type const & v);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL typename tmat2x2<T, P>::row_type operator/ ( typename tmat2x2<T, P>::row_type operator/ (
typename tmat2x2<T, P>::col_type const & v, typename tmat2x2<T, P>::col_type const & v,
tmat2x2<T, P> const & m); tmat2x2<T, P> const & m);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat2x2<T, P> operator/ ( tmat2x2<T, P> operator/ (
tmat2x2<T, P> const & m1, tmat2x2<T, P> const & m1,
tmat2x2<T, P> const & m2); tmat2x2<T, P> const & m2);
// Unary constant operators // Unary constant operators
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat2x2<T, P> const operator-( tmat2x2<T, P> const operator-(
tmat2x2<T, P> const & m); tmat2x2<T, P> const & m);
} //namespace detail } //namespace detail
} //namespace glm } //namespace glm

View File

@ -49,7 +49,7 @@ namespace detail
typedef tmat2x3<T, P> type; typedef tmat2x3<T, P> type;
typedef tmat3x2<T, P> transpose_type; typedef tmat3x2<T, P> transpose_type;
GLM_FUNC_DECL length_t length() const; length_t length() const;
private: private:
// Data // Data
@ -57,148 +57,148 @@ namespace detail
public: public:
// Constructors // Constructors
GLM_FUNC_DECL tmat2x3(); tmat2x3();
GLM_FUNC_DECL tmat2x3(tmat2x3<T, P> const & m); tmat2x3(tmat2x3<T, P> const & m);
template <precision Q> template <precision Q>
GLM_FUNC_DECL tmat2x3(tmat2x3<T, Q> const & m); tmat2x3(tmat2x3<T, Q> const & m);
GLM_FUNC_DECL explicit tmat2x3( explicit tmat2x3(
ctor); ctor);
GLM_FUNC_DECL explicit tmat2x3( explicit tmat2x3(
T const & s); T const & s);
GLM_FUNC_DECL tmat2x3( tmat2x3(
T const & x0, T const & y0, T const & z0, T const & x0, T const & y0, T const & z0,
T const & x1, T const & y1, T const & z1); T const & x1, T const & y1, T const & z1);
GLM_FUNC_DECL tmat2x3( tmat2x3(
col_type const & v0, col_type const & v0,
col_type const & v1); col_type const & v1);
////////////////////////////////////// //////////////////////////////////////
// Conversions // Conversions
template <typename X1, typename Y1, typename Z1, typename X2, typename Y2, typename Z2> template <typename X1, typename Y1, typename Z1, typename X2, typename Y2, typename Z2>
GLM_FUNC_DECL tmat2x3( tmat2x3(
X1 const & x1, Y1 const & y1, Z1 const & z1, X1 const & x1, Y1 const & y1, Z1 const & z1,
X2 const & x2, Y2 const & y2, Z2 const & z2); X2 const & x2, Y2 const & y2, Z2 const & z2);
template <typename U, typename V> template <typename U, typename V>
GLM_FUNC_DECL tmat2x3( tmat2x3(
tvec3<U, P> const & v1, tvec3<U, P> const & v1,
tvec3<V, P> const & v2); tvec3<V, P> const & v2);
////////////////////////////////////// //////////////////////////////////////
// Matrix conversion // Matrix conversion
template <typename U, precision Q> template <typename U, precision Q>
GLM_FUNC_DECL explicit tmat2x3(tmat2x3<U, Q> const & m); explicit tmat2x3(tmat2x3<U, Q> const & m);
GLM_FUNC_DECL explicit tmat2x3(tmat2x2<T, P> const & x); explicit tmat2x3(tmat2x2<T, P> const & x);
GLM_FUNC_DECL explicit tmat2x3(tmat3x3<T, P> const & x); explicit tmat2x3(tmat3x3<T, P> const & x);
GLM_FUNC_DECL explicit tmat2x3(tmat4x4<T, P> const & x); explicit tmat2x3(tmat4x4<T, P> const & x);
GLM_FUNC_DECL explicit tmat2x3(tmat2x4<T, P> const & x); explicit tmat2x3(tmat2x4<T, P> const & x);
GLM_FUNC_DECL explicit tmat2x3(tmat3x2<T, P> const & x); explicit tmat2x3(tmat3x2<T, P> const & x);
GLM_FUNC_DECL explicit tmat2x3(tmat3x4<T, P> const & x); explicit tmat2x3(tmat3x4<T, P> const & x);
GLM_FUNC_DECL explicit tmat2x3(tmat4x2<T, P> const & x); explicit tmat2x3(tmat4x2<T, P> const & x);
GLM_FUNC_DECL explicit tmat2x3(tmat4x3<T, P> const & x); explicit tmat2x3(tmat4x3<T, P> const & x);
// Accesses // Accesses
GLM_FUNC_DECL col_type & operator[](length_t i); col_type & operator[](length_t i);
GLM_FUNC_DECL col_type const & operator[](length_t i) const; col_type const & operator[](length_t i) const;
// Unary updatable operators // Unary updatable operators
GLM_FUNC_DECL tmat2x3<T, P> & operator= (tmat2x3<T, P> const & m); tmat2x3<T, P> & operator= (tmat2x3<T, P> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x3<T, P> & operator= (tmat2x3<U, P> const & m); tmat2x3<T, P> & operator= (tmat2x3<U, P> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x3<T, P> & operator+= (U s); tmat2x3<T, P> & operator+= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x3<T, P> & operator+= (tmat2x3<U, P> const & m); tmat2x3<T, P> & operator+= (tmat2x3<U, P> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x3<T, P> & operator-= (U s); tmat2x3<T, P> & operator-= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x3<T, P> & operator-= (tmat2x3<U, P> const & m); tmat2x3<T, P> & operator-= (tmat2x3<U, P> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x3<T, P> & operator*= (U s); tmat2x3<T, P> & operator*= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x3<T, P> & operator/= (U s); tmat2x3<T, P> & operator/= (U s);
////////////////////////////////////// //////////////////////////////////////
// Increment and decrement operators // Increment and decrement operators
GLM_FUNC_DECL tmat2x3<T, P> & operator++ (); tmat2x3<T, P> & operator++ ();
GLM_FUNC_DECL tmat2x3<T, P> & operator-- (); tmat2x3<T, P> & operator-- ();
GLM_FUNC_DECL tmat2x3<T, P> operator++(int); tmat2x3<T, P> operator++(int);
GLM_FUNC_DECL tmat2x3<T, P> operator--(int); tmat2x3<T, P> operator--(int);
}; };
// Binary operators // Binary operators
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat2x3<T, P> operator+ ( tmat2x3<T, P> operator+ (
tmat2x3<T, P> const & m, tmat2x3<T, P> const & m,
T const & s); T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat2x3<T, P> operator+ ( tmat2x3<T, P> operator+ (
tmat2x3<T, P> const & m1, tmat2x3<T, P> const & m1,
tmat2x3<T, P> const & m2); tmat2x3<T, P> const & m2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat2x3<T, P> operator- ( tmat2x3<T, P> operator- (
tmat2x3<T, P> const & m, tmat2x3<T, P> const & m,
T const & s); T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat2x3<T, P> operator- ( tmat2x3<T, P> operator- (
tmat2x3<T, P> const & m1, tmat2x3<T, P> const & m1,
tmat2x3<T, P> const & m2); tmat2x3<T, P> const & m2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat2x3<T, P> operator* ( tmat2x3<T, P> operator* (
tmat2x3<T, P> const & m, tmat2x3<T, P> const & m,
T const & s); T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat2x3<T, P> operator* ( tmat2x3<T, P> operator* (
T const & s, T const & s,
tmat2x3<T, P> const & m); tmat2x3<T, P> const & m);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL typename tmat2x3<T, P>::col_type operator* ( typename tmat2x3<T, P>::col_type operator* (
tmat2x3<T, P> const & m, tmat2x3<T, P> const & m,
typename tmat2x3<T, P>::row_type const & v); typename tmat2x3<T, P>::row_type const & v);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL typename tmat2x3<T, P>::row_type operator* ( typename tmat2x3<T, P>::row_type operator* (
typename tmat2x3<T, P>::col_type const & v, typename tmat2x3<T, P>::col_type const & v,
tmat2x3<T, P> const & m); tmat2x3<T, P> const & m);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat2x3<T, P> operator* ( tmat2x3<T, P> operator* (
tmat2x3<T, P> const & m1, tmat2x3<T, P> const & m1,
tmat2x2<T, P> const & m2); tmat2x2<T, P> const & m2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x3<T, P> operator* ( tmat3x3<T, P> operator* (
tmat2x3<T, P> const & m1, tmat2x3<T, P> const & m1,
tmat3x2<T, P> const & m2); tmat3x2<T, P> const & m2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat4x3<T, P> operator* ( tmat4x3<T, P> operator* (
tmat2x3<T, P> const & m1, tmat2x3<T, P> const & m1,
tmat4x2<T, P> const & m2); tmat4x2<T, P> const & m2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat2x3<T, P> operator/ ( tmat2x3<T, P> operator/ (
tmat2x3<T, P> const & m, tmat2x3<T, P> const & m,
T const & s); T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat2x3<T, P> operator/ ( tmat2x3<T, P> operator/ (
T const & s, T const & s,
tmat2x3<T, P> const & m); tmat2x3<T, P> const & m);
// Unary constant operators // Unary constant operators
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat2x3<T, P> const operator- ( tmat2x3<T, P> const operator- (
tmat2x3<T, P> const & m); tmat2x3<T, P> const & m);
}//namespace detail }//namespace detail

View File

@ -49,7 +49,7 @@ namespace detail
typedef tmat2x4<T, P> type; typedef tmat2x4<T, P> type;
typedef tmat4x2<T, P> transpose_type; typedef tmat4x2<T, P> transpose_type;
GLM_FUNC_DECL length_t length() const; length_t length() const;
private: private:
// Data // Data
@ -57,19 +57,19 @@ namespace detail
public: public:
// Constructors // Constructors
GLM_FUNC_DECL tmat2x4(); tmat2x4();
GLM_FUNC_DECL tmat2x4(tmat2x4<T, P> const & m); tmat2x4(tmat2x4<T, P> const & m);
template <precision Q> template <precision Q>
GLM_FUNC_DECL tmat2x4(tmat2x4<T, Q> const & m); tmat2x4(tmat2x4<T, Q> const & m);
GLM_FUNC_DECL explicit tmat2x4( explicit tmat2x4(
ctor); ctor);
GLM_FUNC_DECL explicit tmat2x4( explicit tmat2x4(
T const & s); T const & s);
GLM_FUNC_DECL tmat2x4( tmat2x4(
T const & x0, T const & y0, T const & z0, T const & w0, T const & x0, T const & y0, T const & z0, T const & w0,
T const & x1, T const & y1, T const & z1, T const & w1); T const & x1, T const & y1, T const & z1, T const & w1);
GLM_FUNC_DECL tmat2x4( tmat2x4(
col_type const & v0, col_type const & v0,
col_type const & v1); col_type const & v1);
@ -78,129 +78,129 @@ namespace detail
template < template <
typename X1, typename Y1, typename Z1, typename W1, typename X1, typename Y1, typename Z1, typename W1,
typename X2, typename Y2, typename Z2, typename W2> typename X2, typename Y2, typename Z2, typename W2>
GLM_FUNC_DECL tmat2x4( tmat2x4(
X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1, X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1,
X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2); X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2);
template <typename U, typename V> template <typename U, typename V>
GLM_FUNC_DECL tmat2x4( tmat2x4(
tvec4<U, P> const & v1, tvec4<U, P> const & v1,
tvec4<V, P> const & v2); tvec4<V, P> const & v2);
////////////////////////////////////// //////////////////////////////////////
// Matrix conversions // Matrix conversions
template <typename U, precision Q> template <typename U, precision Q>
GLM_FUNC_DECL explicit tmat2x4(tmat2x4<U, Q> const & m); explicit tmat2x4(tmat2x4<U, Q> const & m);
GLM_FUNC_DECL explicit tmat2x4(tmat2x2<T, P> const & x); explicit tmat2x4(tmat2x2<T, P> const & x);
GLM_FUNC_DECL explicit tmat2x4(tmat3x3<T, P> const & x); explicit tmat2x4(tmat3x3<T, P> const & x);
GLM_FUNC_DECL explicit tmat2x4(tmat4x4<T, P> const & x); explicit tmat2x4(tmat4x4<T, P> const & x);
GLM_FUNC_DECL explicit tmat2x4(tmat2x3<T, P> const & x); explicit tmat2x4(tmat2x3<T, P> const & x);
GLM_FUNC_DECL explicit tmat2x4(tmat3x2<T, P> const & x); explicit tmat2x4(tmat3x2<T, P> const & x);
GLM_FUNC_DECL explicit tmat2x4(tmat3x4<T, P> const & x); explicit tmat2x4(tmat3x4<T, P> const & x);
GLM_FUNC_DECL explicit tmat2x4(tmat4x2<T, P> const & x); explicit tmat2x4(tmat4x2<T, P> const & x);
GLM_FUNC_DECL explicit tmat2x4(tmat4x3<T, P> const & x); explicit tmat2x4(tmat4x3<T, P> const & x);
// Accesses // Accesses
GLM_FUNC_DECL col_type & operator[](length_t i); col_type & operator[](length_t i);
GLM_FUNC_DECL col_type const & operator[](length_t i) const; col_type const & operator[](length_t i) const;
// Unary updatable operators // Unary updatable operators
GLM_FUNC_DECL tmat2x4<T, P>& operator= (tmat2x4<T, P> const & m); tmat2x4<T, P>& operator= (tmat2x4<T, P> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x4<T, P>& operator= (tmat2x4<U, P> const & m); tmat2x4<T, P>& operator= (tmat2x4<U, P> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x4<T, P>& operator+= (U s); tmat2x4<T, P>& operator+= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x4<T, P>& operator+= (tmat2x4<U, P> const & m); tmat2x4<T, P>& operator+= (tmat2x4<U, P> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x4<T, P>& operator-= (U s); tmat2x4<T, P>& operator-= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x4<T, P>& operator-= (tmat2x4<U, P> const & m); tmat2x4<T, P>& operator-= (tmat2x4<U, P> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x4<T, P>& operator*= (U s); tmat2x4<T, P>& operator*= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x4<T, P>& operator/= (U s); tmat2x4<T, P>& operator/= (U s);
////////////////////////////////////// //////////////////////////////////////
// Increment and decrement operators // Increment and decrement operators
GLM_FUNC_DECL tmat2x4<T, P> & operator++ (); tmat2x4<T, P> & operator++ ();
GLM_FUNC_DECL tmat2x4<T, P> & operator-- (); tmat2x4<T, P> & operator-- ();
GLM_FUNC_DECL tmat2x4<T, P> operator++(int); tmat2x4<T, P> operator++(int);
GLM_FUNC_DECL tmat2x4<T, P> operator--(int); tmat2x4<T, P> operator--(int);
}; };
// Binary operators // Binary operators
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat2x4<T, P> operator+ ( tmat2x4<T, P> operator+ (
tmat2x4<T, P> const & m, tmat2x4<T, P> const & m,
T const & s); T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat2x4<T, P> operator+ ( tmat2x4<T, P> operator+ (
tmat2x4<T, P> const & m1, tmat2x4<T, P> const & m1,
tmat2x4<T, P> const & m2); tmat2x4<T, P> const & m2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat2x4<T, P> operator- ( tmat2x4<T, P> operator- (
tmat2x4<T, P> const & m, tmat2x4<T, P> const & m,
T const & s); T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat2x4<T, P> operator- ( tmat2x4<T, P> operator- (
tmat2x4<T, P> const & m1, tmat2x4<T, P> const & m1,
tmat2x4<T, P> const & m2); tmat2x4<T, P> const & m2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat2x4<T, P> operator* ( tmat2x4<T, P> operator* (
tmat2x4<T, P> const & m, tmat2x4<T, P> const & m,
T const & s); T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat2x4<T, P> operator* ( tmat2x4<T, P> operator* (
T const & s, T const & s,
tmat2x4<T, P> const & m); tmat2x4<T, P> const & m);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL typename tmat2x4<T, P>::col_type operator* ( typename tmat2x4<T, P>::col_type operator* (
tmat2x4<T, P> const & m, tmat2x4<T, P> const & m,
typename tmat2x4<T, P>::row_type const & v); typename tmat2x4<T, P>::row_type const & v);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL typename tmat2x4<T, P>::row_type operator* ( typename tmat2x4<T, P>::row_type operator* (
typename tmat2x4<T, P>::col_type const & v, typename tmat2x4<T, P>::col_type const & v,
tmat2x4<T, P> const & m); tmat2x4<T, P> const & m);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat4x4<T, P> operator* ( tmat4x4<T, P> operator* (
tmat2x4<T, P> const & m1, tmat2x4<T, P> const & m1,
tmat4x2<T, P> const & m2); tmat4x2<T, P> const & m2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat2x4<T, P> operator* ( tmat2x4<T, P> operator* (
tmat2x4<T, P> const & m1, tmat2x4<T, P> const & m1,
tmat2x2<T, P> const & m2); tmat2x2<T, P> const & m2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x4<T, P> operator* ( tmat3x4<T, P> operator* (
tmat2x4<T, P> const & m1, tmat2x4<T, P> const & m1,
tmat3x2<T, P> const & m2); tmat3x2<T, P> const & m2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat2x4<T, P> operator/ ( tmat2x4<T, P> operator/ (
tmat2x4<T, P> const & m, tmat2x4<T, P> const & m,
T const & s); T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat2x4<T, P> operator/ ( tmat2x4<T, P> operator/ (
T const & s, T const & s,
tmat2x4<T, P> const & m); tmat2x4<T, P> const & m);
// Unary constant operators // Unary constant operators
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat2x4<T, P> const operator- ( tmat2x4<T, P> const operator- (
tmat2x4<T, P> const & m); tmat2x4<T, P> const & m);
}//namespace detail }//namespace detail

View File

@ -49,7 +49,7 @@ namespace detail
typedef tmat3x2<T, P> type; typedef tmat3x2<T, P> type;
typedef tmat2x3<T, P> transpose_type; typedef tmat2x3<T, P> transpose_type;
GLM_FUNC_DECL length_t length() const; length_t length() const;
private: private:
// Data // Data
@ -57,20 +57,20 @@ namespace detail
public: public:
// Constructors // Constructors
GLM_FUNC_DECL tmat3x2(); tmat3x2();
GLM_FUNC_DECL tmat3x2(tmat3x2<T, P> const & m); tmat3x2(tmat3x2<T, P> const & m);
template <precision Q> template <precision Q>
GLM_FUNC_DECL tmat3x2(tmat3x2<T, Q> const & m); tmat3x2(tmat3x2<T, Q> const & m);
GLM_FUNC_DECL explicit tmat3x2( explicit tmat3x2(
ctor); ctor);
GLM_FUNC_DECL explicit tmat3x2( explicit tmat3x2(
T const & s); T const & s);
GLM_FUNC_DECL tmat3x2( tmat3x2(
T const & x0, T const & y0, T const & x0, T const & y0,
T const & x1, T const & y1, T const & x1, T const & y1,
T const & x2, T const & y2); T const & x2, T const & y2);
GLM_FUNC_DECL tmat3x2( tmat3x2(
col_type const & v0, col_type const & v0,
col_type const & v1, col_type const & v1,
col_type const & v2); col_type const & v2);
@ -81,129 +81,129 @@ namespace detail
typename X1, typename Y1, typename X1, typename Y1,
typename X2, typename Y2, typename X2, typename Y2,
typename X3, typename Y3> typename X3, typename Y3>
GLM_FUNC_DECL tmat3x2( tmat3x2(
X1 const & x1, Y1 const & y1, X1 const & x1, Y1 const & y1,
X2 const & x2, Y2 const & y2, X2 const & x2, Y2 const & y2,
X3 const & x3, Y3 const & y3); X3 const & x3, Y3 const & y3);
template <typename V1, typename V2, typename V3> template <typename V1, typename V2, typename V3>
GLM_FUNC_DECL tmat3x2( tmat3x2(
tvec2<V1, P> const & v1, tvec2<V1, P> const & v1,
tvec2<V2, P> const & v2, tvec2<V2, P> const & v2,
tvec2<V3, P> const & v3); tvec2<V3, P> const & v3);
// Matrix conversions // Matrix conversions
template <typename U, precision Q> template <typename U, precision Q>
GLM_FUNC_DECL explicit tmat3x2(tmat3x2<U, Q> const & m); explicit tmat3x2(tmat3x2<U, Q> const & m);
GLM_FUNC_DECL explicit tmat3x2(tmat2x2<T, P> const & x); explicit tmat3x2(tmat2x2<T, P> const & x);
GLM_FUNC_DECL explicit tmat3x2(tmat3x3<T, P> const & x); explicit tmat3x2(tmat3x3<T, P> const & x);
GLM_FUNC_DECL explicit tmat3x2(tmat4x4<T, P> const & x); explicit tmat3x2(tmat4x4<T, P> const & x);
GLM_FUNC_DECL explicit tmat3x2(tmat2x3<T, P> const & x); explicit tmat3x2(tmat2x3<T, P> const & x);
GLM_FUNC_DECL explicit tmat3x2(tmat2x4<T, P> const & x); explicit tmat3x2(tmat2x4<T, P> const & x);
GLM_FUNC_DECL explicit tmat3x2(tmat3x4<T, P> const & x); explicit tmat3x2(tmat3x4<T, P> const & x);
GLM_FUNC_DECL explicit tmat3x2(tmat4x2<T, P> const & x); explicit tmat3x2(tmat4x2<T, P> const & x);
GLM_FUNC_DECL explicit tmat3x2(tmat4x3<T, P> const & x); explicit tmat3x2(tmat4x3<T, P> const & x);
// Accesses // Accesses
GLM_FUNC_DECL col_type & operator[](length_t i); col_type & operator[](length_t i);
GLM_FUNC_DECL col_type const & operator[](length_t i) const; col_type const & operator[](length_t i) const;
// Unary updatable operators // Unary updatable operators
GLM_FUNC_DECL tmat3x2<T, P> & operator= (tmat3x2<T, P> const & m); tmat3x2<T, P> & operator= (tmat3x2<T, P> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x2<T, P> & operator= (tmat3x2<U, P> const & m); tmat3x2<T, P> & operator= (tmat3x2<U, P> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x2<T, P> & operator+= (U s); tmat3x2<T, P> & operator+= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x2<T, P> & operator+= (tmat3x2<U, P> const & m); tmat3x2<T, P> & operator+= (tmat3x2<U, P> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x2<T, P> & operator-= (U s); tmat3x2<T, P> & operator-= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x2<T, P> & operator-= (tmat3x2<U, P> const & m); tmat3x2<T, P> & operator-= (tmat3x2<U, P> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x2<T, P> & operator*= (U s); tmat3x2<T, P> & operator*= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x2<T, P> & operator/= (U s); tmat3x2<T, P> & operator/= (U s);
////////////////////////////////////// //////////////////////////////////////
// Increment and decrement operators // Increment and decrement operators
GLM_FUNC_DECL tmat3x2<T, P> & operator++ (); tmat3x2<T, P> & operator++ ();
GLM_FUNC_DECL tmat3x2<T, P> & operator-- (); tmat3x2<T, P> & operator-- ();
GLM_FUNC_DECL tmat3x2<T, P> operator++(int); tmat3x2<T, P> operator++(int);
GLM_FUNC_DECL tmat3x2<T, P> operator--(int); tmat3x2<T, P> operator--(int);
}; };
// Binary operators // Binary operators
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x2<T, P> operator+ ( tmat3x2<T, P> operator+ (
tmat3x2<T, P> const & m, tmat3x2<T, P> const & m,
T const & s); T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x2<T, P> operator+ ( tmat3x2<T, P> operator+ (
tmat3x2<T, P> const & m1, tmat3x2<T, P> const & m1,
tmat3x2<T, P> const & m2); tmat3x2<T, P> const & m2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x2<T, P> operator- ( tmat3x2<T, P> operator- (
tmat3x2<T, P> const & m, tmat3x2<T, P> const & m,
T const & s); T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x2<T, P> operator- ( tmat3x2<T, P> operator- (
tmat3x2<T, P> const & m1, tmat3x2<T, P> const & m1,
tmat3x2<T, P> const & m2); tmat3x2<T, P> const & m2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x2<T, P> operator* ( tmat3x2<T, P> operator* (
tmat3x2<T, P> const & m, tmat3x2<T, P> const & m,
T const & s); T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x2<T, P> operator* ( tmat3x2<T, P> operator* (
T const & s, T const & s,
tmat3x2<T, P> const & m); tmat3x2<T, P> const & m);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL typename tmat3x2<T, P>::col_type operator* ( typename tmat3x2<T, P>::col_type operator* (
tmat3x2<T, P> const & m, tmat3x2<T, P> const & m,
typename tmat3x2<T, P>::row_type const & v); typename tmat3x2<T, P>::row_type const & v);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL typename tmat3x2<T, P>::row_type operator* ( typename tmat3x2<T, P>::row_type operator* (
typename tmat3x2<T, P>::col_type const & v, typename tmat3x2<T, P>::col_type const & v,
tmat3x2<T, P> const & m); tmat3x2<T, P> const & m);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat2x2<T, P> operator* ( tmat2x2<T, P> operator* (
tmat3x2<T, P> const & m1, tmat3x2<T, P> const & m1,
tmat2x3<T, P> const & m2); tmat2x3<T, P> const & m2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x2<T, P> operator* ( tmat3x2<T, P> operator* (
tmat3x2<T, P> const & m1, tmat3x2<T, P> const & m1,
tmat3x3<T, P> const & m2); tmat3x3<T, P> const & m2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat4x2<T, P> operator* ( tmat4x2<T, P> operator* (
tmat3x2<T, P> const & m1, tmat3x2<T, P> const & m1,
tmat4x3<T, P> const & m2); tmat4x3<T, P> const & m2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x2<T, P> operator/ ( tmat3x2<T, P> operator/ (
tmat3x2<T, P> const & m, tmat3x2<T, P> const & m,
T const & s); T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x2<T, P> operator/ ( tmat3x2<T, P> operator/ (
T const & s, T const & s,
tmat3x2<T, P> const & m); tmat3x2<T, P> const & m);
// Unary constant operators // Unary constant operators
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x2<T, P> const operator-( tmat3x2<T, P> const operator-(
tmat3x2<T, P> const & m); tmat3x2<T, P> const & m);
}//namespace detail }//namespace detail

View File

@ -48,7 +48,7 @@ namespace detail
typedef tmat3x3<T, P> type; typedef tmat3x3<T, P> type;
typedef tmat3x3<T, P> transpose_type; typedef tmat3x3<T, P> transpose_type;
GLM_FUNC_DECL length_t length() const; length_t length() const;
template <typename U, precision Q> template <typename U, precision Q>
friend tvec3<U, Q> operator/(tmat3x3<U, Q> const & m, tvec3<U, Q> const & v); friend tvec3<U, Q> operator/(tmat3x3<U, Q> const & m, tvec3<U, Q> const & v);
@ -62,20 +62,20 @@ namespace detail
public: public:
// Constructors // Constructors
GLM_FUNC_DECL tmat3x3(); tmat3x3();
GLM_FUNC_DECL tmat3x3(tmat3x3<T, P> const & m); tmat3x3(tmat3x3<T, P> const & m);
template <precision Q> template <precision Q>
GLM_FUNC_DECL tmat3x3(tmat3x3<T, Q> const & m); tmat3x3(tmat3x3<T, Q> const & m);
GLM_FUNC_DECL explicit tmat3x3( explicit tmat3x3(
ctor Null); ctor Null);
GLM_FUNC_DECL explicit tmat3x3( explicit tmat3x3(
T const & s); T const & s);
GLM_FUNC_DECL tmat3x3( tmat3x3(
T const & x0, T const & y0, T const & z0, T const & x0, T const & y0, T const & z0,
T const & x1, T const & y1, T const & z1, T const & x1, T const & y1, T const & z1,
T const & x2, T const & y2, T const & z2); T const & x2, T const & y2, T const & z2);
GLM_FUNC_DECL tmat3x3( tmat3x3(
col_type const & v0, col_type const & v0,
col_type const & v1, col_type const & v1,
col_type const & v2); col_type const & v2);
@ -86,161 +86,161 @@ namespace detail
typename X1, typename Y1, typename Z1, typename X1, typename Y1, typename Z1,
typename X2, typename Y2, typename Z2, typename X2, typename Y2, typename Z2,
typename X3, typename Y3, typename Z3> typename X3, typename Y3, typename Z3>
GLM_FUNC_DECL tmat3x3( tmat3x3(
X1 const & x1, Y1 const & y1, Z1 const & z1, X1 const & x1, Y1 const & y1, Z1 const & z1,
X2 const & x2, Y2 const & y2, Z2 const & z2, X2 const & x2, Y2 const & y2, Z2 const & z2,
X3 const & x3, Y3 const & y3, Z3 const & z3); X3 const & x3, Y3 const & y3, Z3 const & z3);
template <typename V1, typename V2, typename V3> template <typename V1, typename V2, typename V3>
GLM_FUNC_DECL tmat3x3( tmat3x3(
tvec3<V1, P> const & v1, tvec3<V1, P> const & v1,
tvec3<V2, P> const & v2, tvec3<V2, P> const & v2,
tvec3<V3, P> const & v3); tvec3<V3, P> const & v3);
// Matrix conversions // Matrix conversions
template <typename U, precision Q> template <typename U, precision Q>
GLM_FUNC_DECL explicit tmat3x3(tmat3x3<U, Q> const & m); explicit tmat3x3(tmat3x3<U, Q> const & m);
GLM_FUNC_DECL explicit tmat3x3(tmat2x2<T, P> const & x); explicit tmat3x3(tmat2x2<T, P> const & x);
GLM_FUNC_DECL explicit tmat3x3(tmat4x4<T, P> const & x); explicit tmat3x3(tmat4x4<T, P> const & x);
GLM_FUNC_DECL explicit tmat3x3(tmat2x3<T, P> const & x); explicit tmat3x3(tmat2x3<T, P> const & x);
GLM_FUNC_DECL explicit tmat3x3(tmat3x2<T, P> const & x); explicit tmat3x3(tmat3x2<T, P> const & x);
GLM_FUNC_DECL explicit tmat3x3(tmat2x4<T, P> const & x); explicit tmat3x3(tmat2x4<T, P> const & x);
GLM_FUNC_DECL explicit tmat3x3(tmat4x2<T, P> const & x); explicit tmat3x3(tmat4x2<T, P> const & x);
GLM_FUNC_DECL explicit tmat3x3(tmat3x4<T, P> const & x); explicit tmat3x3(tmat3x4<T, P> const & x);
GLM_FUNC_DECL explicit tmat3x3(tmat4x3<T, P> const & x); explicit tmat3x3(tmat4x3<T, P> const & x);
// Accesses // Accesses
GLM_FUNC_DECL col_type & operator[](length_t i); col_type & operator[](length_t i);
GLM_FUNC_DECL col_type const & operator[](length_t i) const; col_type const & operator[](length_t i) const;
// Unary updatable operators // Unary updatable operators
GLM_FUNC_DECL tmat3x3<T, P>& operator= (tmat3x3<T, P> const & m); tmat3x3<T, P>& operator= (tmat3x3<T, P> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x3<T, P>& operator= (tmat3x3<U, P> const & m); tmat3x3<T, P>& operator= (tmat3x3<U, P> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x3<T, P>& operator+= (U s); tmat3x3<T, P>& operator+= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x3<T, P>& operator+= (tmat3x3<U, P> const & m); tmat3x3<T, P>& operator+= (tmat3x3<U, P> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x3<T, P>& operator-= (U s); tmat3x3<T, P>& operator-= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x3<T, P>& operator-= (tmat3x3<U, P> const & m); tmat3x3<T, P>& operator-= (tmat3x3<U, P> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x3<T, P>& operator*= (U s); tmat3x3<T, P>& operator*= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x3<T, P>& operator*= (tmat3x3<U, P> const & m); tmat3x3<T, P>& operator*= (tmat3x3<U, P> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x3<T, P>& operator/= (U s); tmat3x3<T, P>& operator/= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x3<T, P>& operator/= (tmat3x3<U, P> const & m); tmat3x3<T, P>& operator/= (tmat3x3<U, P> const & m);
////////////////////////////////////// //////////////////////////////////////
// Increment and decrement operators // Increment and decrement operators
GLM_FUNC_DECL tmat3x3<T, P> & operator++ (); tmat3x3<T, P> & operator++ ();
GLM_FUNC_DECL tmat3x3<T, P> & operator-- (); tmat3x3<T, P> & operator-- ();
GLM_FUNC_DECL tmat3x3<T, P> operator++(int); tmat3x3<T, P> operator++(int);
GLM_FUNC_DECL tmat3x3<T, P> operator--(int); tmat3x3<T, P> operator--(int);
}; };
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x3<T, P> compute_inverse_mat3(tmat3x3<T, P> const & m); tmat3x3<T, P> compute_inverse_mat3(tmat3x3<T, P> const & m);
// Binary operators // Binary operators
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x3<T, P> operator+ ( tmat3x3<T, P> operator+ (
tmat3x3<T, P> const & m, tmat3x3<T, P> const & m,
T const & s); T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x3<T, P> operator+ ( tmat3x3<T, P> operator+ (
T const & s, T const & s,
tmat3x3<T, P> const & m); tmat3x3<T, P> const & m);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x3<T, P> operator+ ( tmat3x3<T, P> operator+ (
tmat3x3<T, P> const & m1, tmat3x3<T, P> const & m1,
tmat3x3<T, P> const & m2); tmat3x3<T, P> const & m2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x3<T, P> operator- ( tmat3x3<T, P> operator- (
tmat3x3<T, P> const & m, tmat3x3<T, P> const & m,
T const & s); T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x3<T, P> operator- ( tmat3x3<T, P> operator- (
T const & s, T const & s,
tmat3x3<T, P> const & m); tmat3x3<T, P> const & m);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x3<T, P> operator- ( tmat3x3<T, P> operator- (
tmat3x3<T, P> const & m1, tmat3x3<T, P> const & m1,
tmat3x3<T, P> const & m2); tmat3x3<T, P> const & m2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x3<T, P> operator* ( tmat3x3<T, P> operator* (
tmat3x3<T, P> const & m, tmat3x3<T, P> const & m,
T const & s); T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x3<T, P> operator* ( tmat3x3<T, P> operator* (
T const & s, T const & s,
tmat3x3<T, P> const & m); tmat3x3<T, P> const & m);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL typename tmat3x3<T, P>::col_type operator* ( typename tmat3x3<T, P>::col_type operator* (
tmat3x3<T, P> const & m, tmat3x3<T, P> const & m,
typename tmat3x3<T, P>::row_type const & v); typename tmat3x3<T, P>::row_type const & v);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL typename tmat3x3<T, P>::row_type operator* ( typename tmat3x3<T, P>::row_type operator* (
typename tmat3x3<T, P>::col_type const & v, typename tmat3x3<T, P>::col_type const & v,
tmat3x3<T, P> const & m); tmat3x3<T, P> const & m);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x3<T, P> operator* ( tmat3x3<T, P> operator* (
tmat3x3<T, P> const & m1, tmat3x3<T, P> const & m1,
tmat3x3<T, P> const & m2); tmat3x3<T, P> const & m2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat2x3<T, P> operator* ( tmat2x3<T, P> operator* (
tmat3x3<T, P> const & m1, tmat3x3<T, P> const & m1,
tmat2x3<T, P> const & m2); tmat2x3<T, P> const & m2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat4x3<T, P> operator* ( tmat4x3<T, P> operator* (
tmat3x3<T, P> const & m1, tmat3x3<T, P> const & m1,
tmat4x3<T, P> const & m2); tmat4x3<T, P> const & m2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x3<T, P> operator/ ( tmat3x3<T, P> operator/ (
tmat3x3<T, P> const & m, tmat3x3<T, P> const & m,
T const & s); T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x3<T, P> operator/ ( tmat3x3<T, P> operator/ (
T const & s, T const & s,
tmat3x3<T, P> const & m); tmat3x3<T, P> const & m);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL typename tmat3x3<T, P>::col_type operator/ ( typename tmat3x3<T, P>::col_type operator/ (
tmat3x3<T, P> const & m, tmat3x3<T, P> const & m,
typename tmat3x3<T, P>::row_type const & v); typename tmat3x3<T, P>::row_type const & v);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL typename tmat3x3<T, P>::row_type operator/ ( typename tmat3x3<T, P>::row_type operator/ (
typename tmat3x3<T, P>::col_type const & v, typename tmat3x3<T, P>::col_type const & v,
tmat3x3<T, P> const & m); tmat3x3<T, P> const & m);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x3<T, P> operator/ ( tmat3x3<T, P> operator/ (
tmat3x3<T, P> const & m1, tmat3x3<T, P> const & m1,
tmat3x3<T, P> const & m2); tmat3x3<T, P> const & m2);
// Unary constant operators // Unary constant operators
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x3<T, P> const operator-( tmat3x3<T, P> const operator-(
tmat3x3<T, P> const & m); tmat3x3<T, P> const & m);
}//namespace detail }//namespace detail

View File

@ -49,7 +49,7 @@ namespace detail
typedef tmat3x4<T, P> type; typedef tmat3x4<T, P> type;
typedef tmat4x3<T, P> transpose_type; typedef tmat4x3<T, P> transpose_type;
GLM_FUNC_DECL length_t length() const; length_t length() const;
private: private:
// Data // Data
@ -57,20 +57,20 @@ namespace detail
public: public:
// Constructors // Constructors
GLM_FUNC_DECL tmat3x4(); tmat3x4();
GLM_FUNC_DECL tmat3x4(tmat3x4<T, P> const & m); tmat3x4(tmat3x4<T, P> const & m);
template <precision Q> template <precision Q>
GLM_FUNC_DECL tmat3x4(tmat3x4<T, Q> const & m); tmat3x4(tmat3x4<T, Q> const & m);
GLM_FUNC_DECL explicit tmat3x4( explicit tmat3x4(
ctor Null); ctor Null);
GLM_FUNC_DECL explicit tmat3x4( explicit tmat3x4(
T const & s); T const & s);
GLM_FUNC_DECL tmat3x4( tmat3x4(
T const & x0, T const & y0, T const & z0, T const & w0, T const & x0, T const & y0, T const & z0, T const & w0,
T const & x1, T const & y1, T const & z1, T const & w1, T const & x1, T const & y1, T const & z1, T const & w1,
T const & x2, T const & y2, T const & z2, T const & w2); T const & x2, T const & y2, T const & z2, T const & w2);
GLM_FUNC_DECL tmat3x4( tmat3x4(
col_type const & v0, col_type const & v0,
col_type const & v1, col_type const & v1,
col_type const & v2); col_type const & v2);
@ -81,129 +81,129 @@ namespace detail
typename X1, typename Y1, typename Z1, typename W1, typename X1, typename Y1, typename Z1, typename W1,
typename X2, typename Y2, typename Z2, typename W2, typename X2, typename Y2, typename Z2, typename W2,
typename X3, typename Y3, typename Z3, typename W3> typename X3, typename Y3, typename Z3, typename W3>
GLM_FUNC_DECL tmat3x4( tmat3x4(
X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1, X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1,
X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2, X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2,
X3 const & x3, Y3 const & y3, Z3 const & z3, W3 const & w3); X3 const & x3, Y3 const & y3, Z3 const & z3, W3 const & w3);
template <typename V1, typename V2, typename V3> template <typename V1, typename V2, typename V3>
GLM_FUNC_DECL tmat3x4( tmat3x4(
tvec4<V1, P> const & v1, tvec4<V1, P> const & v1,
tvec4<V2, P> const & v2, tvec4<V2, P> const & v2,
tvec4<V3, P> const & v3); tvec4<V3, P> const & v3);
// Matrix conversion // Matrix conversion
template <typename U, precision Q> template <typename U, precision Q>
GLM_FUNC_DECL explicit tmat3x4(tmat3x4<U, Q> const & m); explicit tmat3x4(tmat3x4<U, Q> const & m);
GLM_FUNC_DECL explicit tmat3x4(tmat2x2<T, P> const & x); explicit tmat3x4(tmat2x2<T, P> const & x);
GLM_FUNC_DECL explicit tmat3x4(tmat3x3<T, P> const & x); explicit tmat3x4(tmat3x3<T, P> const & x);
GLM_FUNC_DECL explicit tmat3x4(tmat4x4<T, P> const & x); explicit tmat3x4(tmat4x4<T, P> const & x);
GLM_FUNC_DECL explicit tmat3x4(tmat2x3<T, P> const & x); explicit tmat3x4(tmat2x3<T, P> const & x);
GLM_FUNC_DECL explicit tmat3x4(tmat3x2<T, P> const & x); explicit tmat3x4(tmat3x2<T, P> const & x);
GLM_FUNC_DECL explicit tmat3x4(tmat2x4<T, P> const & x); explicit tmat3x4(tmat2x4<T, P> const & x);
GLM_FUNC_DECL explicit tmat3x4(tmat4x2<T, P> const & x); explicit tmat3x4(tmat4x2<T, P> const & x);
GLM_FUNC_DECL explicit tmat3x4(tmat4x3<T, P> const & x); explicit tmat3x4(tmat4x3<T, P> const & x);
// Accesses // Accesses
GLM_FUNC_DECL col_type & operator[](length_t i); col_type & operator[](length_t i);
GLM_FUNC_DECL col_type const & operator[](length_t i) const; col_type const & operator[](length_t i) const;
// Unary updatable operators // Unary updatable operators
GLM_FUNC_DECL tmat3x4<T, P> & operator= (tmat3x4<T, P> const & m); tmat3x4<T, P> & operator= (tmat3x4<T, P> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x4<T, P> & operator= (tmat3x4<U, P> const & m); tmat3x4<T, P> & operator= (tmat3x4<U, P> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x4<T, P> & operator+= (U s); tmat3x4<T, P> & operator+= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x4<T, P> & operator+= (tmat3x4<U, P> const & m); tmat3x4<T, P> & operator+= (tmat3x4<U, P> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x4<T, P> & operator-= (U s); tmat3x4<T, P> & operator-= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x4<T, P> & operator-= (tmat3x4<U, P> const & m); tmat3x4<T, P> & operator-= (tmat3x4<U, P> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x4<T, P> & operator*= (U s); tmat3x4<T, P> & operator*= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x4<T, P> & operator/= (U s); tmat3x4<T, P> & operator/= (U s);
////////////////////////////////////// //////////////////////////////////////
// Increment and decrement operators // Increment and decrement operators
GLM_FUNC_DECL tmat3x4<T, P> & operator++ (); tmat3x4<T, P> & operator++ ();
GLM_FUNC_DECL tmat3x4<T, P> & operator-- (); tmat3x4<T, P> & operator-- ();
GLM_FUNC_DECL tmat3x4<T, P> operator++(int); tmat3x4<T, P> operator++(int);
GLM_FUNC_DECL tmat3x4<T, P> operator--(int); tmat3x4<T, P> operator--(int);
}; };
// Binary operators // Binary operators
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x4<T, P> operator+ ( tmat3x4<T, P> operator+ (
tmat3x4<T, P> const & m, tmat3x4<T, P> const & m,
T const & s); T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x4<T, P> operator+ ( tmat3x4<T, P> operator+ (
tmat3x4<T, P> const & m1, tmat3x4<T, P> const & m1,
tmat3x4<T, P> const & m2); tmat3x4<T, P> const & m2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x4<T, P> operator- ( tmat3x4<T, P> operator- (
tmat3x4<T, P> const & m, tmat3x4<T, P> const & m,
T const & s); T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x4<T, P> operator- ( tmat3x4<T, P> operator- (
tmat3x4<T, P> const & m1, tmat3x4<T, P> const & m1,
tmat3x4<T, P> const & m2); tmat3x4<T, P> const & m2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x4<T, P> operator* ( tmat3x4<T, P> operator* (
tmat3x4<T, P> const & m, tmat3x4<T, P> const & m,
T const & s); T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x4<T, P> operator* ( tmat3x4<T, P> operator* (
T const & s, T const & s,
tmat3x4<T, P> const & m); tmat3x4<T, P> const & m);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL typename tmat3x4<T, P>::col_type operator* ( typename tmat3x4<T, P>::col_type operator* (
tmat3x4<T, P> const & m, tmat3x4<T, P> const & m,
typename tmat3x4<T, P>::row_type const & v); typename tmat3x4<T, P>::row_type const & v);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL typename tmat3x4<T, P>::row_type operator* ( typename tmat3x4<T, P>::row_type operator* (
typename tmat3x4<T, P>::col_type const & v, typename tmat3x4<T, P>::col_type const & v,
tmat3x4<T, P> const & m); tmat3x4<T, P> const & m);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat4x4<T, P> operator* ( tmat4x4<T, P> operator* (
tmat3x4<T, P> const & m1, tmat3x4<T, P> const & m1,
tmat4x3<T, P> const & m2); tmat4x3<T, P> const & m2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat2x4<T, P> operator* ( tmat2x4<T, P> operator* (
tmat3x4<T, P> const & m1, tmat3x4<T, P> const & m1,
tmat2x3<T, P> const & m2); tmat2x3<T, P> const & m2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x4<T, P> operator* ( tmat3x4<T, P> operator* (
tmat3x4<T, P> const & m1, tmat3x4<T, P> const & m1,
tmat3x3<T, P> const & m2); tmat3x3<T, P> const & m2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x4<T, P> operator/ ( tmat3x4<T, P> operator/ (
tmat3x4<T, P> const & m, tmat3x4<T, P> const & m,
T const & s); T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x4<T, P> operator/ ( tmat3x4<T, P> operator/ (
T const & s, T const & s,
tmat3x4<T, P> const & m); tmat3x4<T, P> const & m);
// Unary constant operators // Unary constant operators
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x4<T, P> const operator-( tmat3x4<T, P> const operator-(
tmat3x4<T, P> const & m); tmat3x4<T, P> const & m);
}//namespace detail }//namespace detail

View File

@ -49,7 +49,7 @@ namespace detail
typedef tmat4x2<T, P> type; typedef tmat4x2<T, P> type;
typedef tmat2x4<T, P> transpose_type; typedef tmat2x4<T, P> transpose_type;
GLM_FUNC_DECL length_t length() const; length_t length() const;
private: private:
// Data // Data
@ -57,21 +57,21 @@ namespace detail
public: public:
// Constructors // Constructors
GLM_FUNC_DECL tmat4x2(); tmat4x2();
GLM_FUNC_DECL tmat4x2(tmat4x2<T, P> const & m); tmat4x2(tmat4x2<T, P> const & m);
template <precision Q> template <precision Q>
GLM_FUNC_DECL tmat4x2(tmat4x2<T, Q> const & m); tmat4x2(tmat4x2<T, Q> const & m);
GLM_FUNC_DECL explicit tmat4x2( explicit tmat4x2(
ctor Null); ctor Null);
GLM_FUNC_DECL explicit tmat4x2( explicit tmat4x2(
T const & x); T const & x);
GLM_FUNC_DECL tmat4x2( tmat4x2(
T const & x0, T const & y0, T const & x0, T const & y0,
T const & x1, T const & y1, T const & x1, T const & y1,
T const & x2, T const & y2, T const & x2, T const & y2,
T const & x3, T const & y3); T const & x3, T const & y3);
GLM_FUNC_DECL tmat4x2( tmat4x2(
col_type const & v0, col_type const & v0,
col_type const & v1, col_type const & v1,
col_type const & v2, col_type const & v2,
@ -85,14 +85,14 @@ namespace detail
typename X2, typename Y2, typename X2, typename Y2,
typename X3, typename Y3, typename X3, typename Y3,
typename X4, typename Y4> typename X4, typename Y4>
GLM_FUNC_DECL tmat4x2( tmat4x2(
X1 const & x1, Y1 const & y1, X1 const & x1, Y1 const & y1,
X2 const & x2, Y2 const & y2, X2 const & x2, Y2 const & y2,
X3 const & x3, Y3 const & y3, X3 const & x3, Y3 const & y3,
X4 const & x4, Y4 const & y4); X4 const & x4, Y4 const & y4);
template <typename V1, typename V2, typename V3, typename V4> template <typename V1, typename V2, typename V3, typename V4>
GLM_FUNC_DECL tmat4x2( tmat4x2(
tvec2<V1, P> const & v1, tvec2<V1, P> const & v1,
tvec2<V2, P> const & v2, tvec2<V2, P> const & v2,
tvec2<V3, P> const & v3, tvec2<V3, P> const & v3,
@ -100,116 +100,116 @@ namespace detail
// Matrix conversions // Matrix conversions
template <typename U, precision Q> template <typename U, precision Q>
GLM_FUNC_DECL explicit tmat4x2(tmat4x2<U, Q> const & m); explicit tmat4x2(tmat4x2<U, Q> const & m);
GLM_FUNC_DECL explicit tmat4x2(tmat2x2<T, P> const & x); explicit tmat4x2(tmat2x2<T, P> const & x);
GLM_FUNC_DECL explicit tmat4x2(tmat3x3<T, P> const & x); explicit tmat4x2(tmat3x3<T, P> const & x);
GLM_FUNC_DECL explicit tmat4x2(tmat4x4<T, P> const & x); explicit tmat4x2(tmat4x4<T, P> const & x);
GLM_FUNC_DECL explicit tmat4x2(tmat2x3<T, P> const & x); explicit tmat4x2(tmat2x3<T, P> const & x);
GLM_FUNC_DECL explicit tmat4x2(tmat3x2<T, P> const & x); explicit tmat4x2(tmat3x2<T, P> const & x);
GLM_FUNC_DECL explicit tmat4x2(tmat2x4<T, P> const & x); explicit tmat4x2(tmat2x4<T, P> const & x);
GLM_FUNC_DECL explicit tmat4x2(tmat4x3<T, P> const & x); explicit tmat4x2(tmat4x3<T, P> const & x);
GLM_FUNC_DECL explicit tmat4x2(tmat3x4<T, P> const & x); explicit tmat4x2(tmat3x4<T, P> const & x);
// Accesses // Accesses
GLM_FUNC_DECL col_type & operator[](length_t i); col_type & operator[](length_t i);
GLM_FUNC_DECL col_type const & operator[](length_t i) const; col_type const & operator[](length_t i) const;
// Unary updatable operators // Unary updatable operators
GLM_FUNC_DECL tmat4x2<T, P>& operator= (tmat4x2<T, P> const & m); tmat4x2<T, P>& operator= (tmat4x2<T, P> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x2<T, P>& operator= (tmat4x2<U, P> const & m); tmat4x2<T, P>& operator= (tmat4x2<U, P> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x2<T, P>& operator+= (U s); tmat4x2<T, P>& operator+= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x2<T, P>& operator+= (tmat4x2<U, P> const & m); tmat4x2<T, P>& operator+= (tmat4x2<U, P> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x2<T, P>& operator-= (U s); tmat4x2<T, P>& operator-= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x2<T, P>& operator-= (tmat4x2<U, P> const & m); tmat4x2<T, P>& operator-= (tmat4x2<U, P> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x2<T, P>& operator*= (U s); tmat4x2<T, P>& operator*= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x2<T, P>& operator/= (U s); tmat4x2<T, P>& operator/= (U s);
////////////////////////////////////// //////////////////////////////////////
// Increment and decrement operators // Increment and decrement operators
GLM_FUNC_DECL tmat4x2<T, P> & operator++ (); tmat4x2<T, P> & operator++ ();
GLM_FUNC_DECL tmat4x2<T, P> & operator-- (); tmat4x2<T, P> & operator-- ();
GLM_FUNC_DECL tmat4x2<T, P> operator++(int); tmat4x2<T, P> operator++(int);
GLM_FUNC_DECL tmat4x2<T, P> operator--(int); tmat4x2<T, P> operator--(int);
}; };
// Binary operators // Binary operators
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat4x2<T, P> operator+ ( tmat4x2<T, P> operator+ (
tmat4x2<T, P> const & m, tmat4x2<T, P> const & m,
T const & s); T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat4x2<T, P> operator+ ( tmat4x2<T, P> operator+ (
tmat4x2<T, P> const & m1, tmat4x2<T, P> const & m1,
tmat4x2<T, P> const & m2); tmat4x2<T, P> const & m2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat4x2<T, P> operator- ( tmat4x2<T, P> operator- (
tmat4x2<T, P> const & m, tmat4x2<T, P> const & m,
T const & s); T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat4x2<T, P> operator- ( tmat4x2<T, P> operator- (
tmat4x2<T, P> const & m1, tmat4x2<T, P> const & m1,
tmat4x2<T, P> const & m2); tmat4x2<T, P> const & m2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat4x2<T, P> operator* ( tmat4x2<T, P> operator* (
tmat4x2<T, P> const & m, tmat4x2<T, P> const & m,
T const & s); T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat4x2<T, P> operator* ( tmat4x2<T, P> operator* (
T const & s, T const & s,
tmat4x2<T, P> const & m); tmat4x2<T, P> const & m);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL typename tmat4x2<T, P>::col_type operator* ( typename tmat4x2<T, P>::col_type operator* (
tmat4x2<T, P> const & m, tmat4x2<T, P> const & m,
typename tmat4x2<T, P>::row_type const & v); typename tmat4x2<T, P>::row_type const & v);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL typename tmat4x2<T, P>::row_type operator* ( typename tmat4x2<T, P>::row_type operator* (
typename tmat4x2<T, P>::col_type const & v, typename tmat4x2<T, P>::col_type const & v,
tmat4x2<T, P> const & m); tmat4x2<T, P> const & m);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x2<T, P> operator* ( tmat3x2<T, P> operator* (
tmat4x2<T, P> const & m1, tmat4x2<T, P> const & m1,
tmat3x4<T, P> const & m2); tmat3x4<T, P> const & m2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat4x2<T, P> operator* ( tmat4x2<T, P> operator* (
tmat4x2<T, P> const & m1, tmat4x2<T, P> const & m1,
tmat4x4<T, P> const & m2); tmat4x4<T, P> const & m2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat2x3<T, P> operator* ( tmat2x3<T, P> operator* (
tmat4x3<T, P> const & m1, tmat4x3<T, P> const & m1,
tmat2x4<T, P> const & m2); tmat2x4<T, P> const & m2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat4x2<T, P> operator/ ( tmat4x2<T, P> operator/ (
tmat4x2<T, P> const & m, tmat4x2<T, P> const & m,
T const & s); T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat4x2<T, P> operator/ ( tmat4x2<T, P> operator/ (
T const & s, T const & s,
tmat4x2<T, P> const & m); tmat4x2<T, P> const & m);
// Unary constant operators // Unary constant operators
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat4x2<T, P> const operator-( tmat4x2<T, P> const operator-(
tmat4x2<T, P> const & m); tmat4x2<T, P> const & m);
}//namespace detail }//namespace detail

View File

@ -49,7 +49,7 @@ namespace detail
typedef tmat4x3<T, P> type; typedef tmat4x3<T, P> type;
typedef tmat3x4<T, P> transpose_type; typedef tmat3x4<T, P> transpose_type;
GLM_FUNC_DECL length_t length() const; length_t length() const;
private: private:
// Data // Data
@ -57,21 +57,21 @@ namespace detail
public: public:
// Constructors // Constructors
GLM_FUNC_DECL tmat4x3(); tmat4x3();
GLM_FUNC_DECL tmat4x3(tmat4x3<T, P> const & m); tmat4x3(tmat4x3<T, P> const & m);
template <precision Q> template <precision Q>
GLM_FUNC_DECL tmat4x3(tmat4x3<T, Q> const & m); tmat4x3(tmat4x3<T, Q> const & m);
GLM_FUNC_DECL explicit tmat4x3( explicit tmat4x3(
ctor Null); ctor Null);
GLM_FUNC_DECL explicit tmat4x3( explicit tmat4x3(
T const & x); T const & x);
GLM_FUNC_DECL tmat4x3( tmat4x3(
T const & x0, T const & y0, T const & z0, T const & x0, T const & y0, T const & z0,
T const & x1, T const & y1, T const & z1, T const & x1, T const & y1, T const & z1,
T const & x2, T const & y2, T const & z2, T const & x2, T const & y2, T const & z2,
T const & x3, T const & y3, T const & z3); T const & x3, T const & y3, T const & z3);
GLM_FUNC_DECL tmat4x3( tmat4x3(
col_type const & v0, col_type const & v0,
col_type const & v1, col_type const & v1,
col_type const & v2, col_type const & v2,
@ -85,14 +85,14 @@ namespace detail
typename X2, typename Y2, typename Z2, typename X2, typename Y2, typename Z2,
typename X3, typename Y3, typename Z3, typename X3, typename Y3, typename Z3,
typename X4, typename Y4, typename Z4> typename X4, typename Y4, typename Z4>
GLM_FUNC_DECL tmat4x3( tmat4x3(
X1 const & x1, Y1 const & y1, Z1 const & z1, X1 const & x1, Y1 const & y1, Z1 const & z1,
X2 const & x2, Y2 const & y2, Z2 const & z2, X2 const & x2, Y2 const & y2, Z2 const & z2,
X3 const & x3, Y3 const & y3, Z3 const & z3, X3 const & x3, Y3 const & y3, Z3 const & z3,
X4 const & x4, Y4 const & y4, Z4 const & z4); X4 const & x4, Y4 const & y4, Z4 const & z4);
template <typename V1, typename V2, typename V3, typename V4> template <typename V1, typename V2, typename V3, typename V4>
GLM_FUNC_DECL tmat4x3( tmat4x3(
tvec3<V1, P> const & v1, tvec3<V1, P> const & v1,
tvec3<V2, P> const & v2, tvec3<V2, P> const & v2,
tvec3<V3, P> const & v3, tvec3<V3, P> const & v3,
@ -100,116 +100,116 @@ namespace detail
// Matrix conversions // Matrix conversions
template <typename U, precision Q> template <typename U, precision Q>
GLM_FUNC_DECL explicit tmat4x3(tmat4x3<U, Q> const & m); explicit tmat4x3(tmat4x3<U, Q> const & m);
GLM_FUNC_DECL explicit tmat4x3(tmat2x2<T, P> const & x); explicit tmat4x3(tmat2x2<T, P> const & x);
GLM_FUNC_DECL explicit tmat4x3(tmat3x3<T, P> const & x); explicit tmat4x3(tmat3x3<T, P> const & x);
GLM_FUNC_DECL explicit tmat4x3(tmat4x4<T, P> const & x); explicit tmat4x3(tmat4x4<T, P> const & x);
GLM_FUNC_DECL explicit tmat4x3(tmat2x3<T, P> const & x); explicit tmat4x3(tmat2x3<T, P> const & x);
GLM_FUNC_DECL explicit tmat4x3(tmat3x2<T, P> const & x); explicit tmat4x3(tmat3x2<T, P> const & x);
GLM_FUNC_DECL explicit tmat4x3(tmat2x4<T, P> const & x); explicit tmat4x3(tmat2x4<T, P> const & x);
GLM_FUNC_DECL explicit tmat4x3(tmat4x2<T, P> const & x); explicit tmat4x3(tmat4x2<T, P> const & x);
GLM_FUNC_DECL explicit tmat4x3(tmat3x4<T, P> const & x); explicit tmat4x3(tmat3x4<T, P> const & x);
// Accesses // Accesses
GLM_FUNC_DECL col_type & operator[](size_type i); col_type & operator[](size_type i);
GLM_FUNC_DECL col_type const & operator[](size_type i) const; col_type const & operator[](size_type i) const;
// Unary updatable operators // Unary updatable operators
GLM_FUNC_DECL tmat4x3<T, P> & operator= (tmat4x3<T, P> const & m); tmat4x3<T, P> & operator= (tmat4x3<T, P> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x3<T, P> & operator= (tmat4x3<U, P> const & m); tmat4x3<T, P> & operator= (tmat4x3<U, P> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x3<T, P> & operator+= (U s); tmat4x3<T, P> & operator+= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x3<T, P> & operator+= (tmat4x3<U, P> const & m); tmat4x3<T, P> & operator+= (tmat4x3<U, P> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x3<T, P> & operator-= (U s); tmat4x3<T, P> & operator-= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x3<T, P> & operator-= (tmat4x3<U, P> const & m); tmat4x3<T, P> & operator-= (tmat4x3<U, P> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x3<T, P> & operator*= (U s); tmat4x3<T, P> & operator*= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x3<T, P> & operator/= (U s); tmat4x3<T, P> & operator/= (U s);
////////////////////////////////////// //////////////////////////////////////
// Increment and decrement operators // Increment and decrement operators
GLM_FUNC_DECL tmat4x3<T, P> & operator++ (); tmat4x3<T, P> & operator++ ();
GLM_FUNC_DECL tmat4x3<T, P> & operator-- (); tmat4x3<T, P> & operator-- ();
GLM_FUNC_DECL tmat4x3<T, P> operator++(int); tmat4x3<T, P> operator++(int);
GLM_FUNC_DECL tmat4x3<T, P> operator--(int); tmat4x3<T, P> operator--(int);
}; };
// Binary operators // Binary operators
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat4x3<T, P> operator+ ( tmat4x3<T, P> operator+ (
tmat4x3<T, P> const & m, tmat4x3<T, P> const & m,
T const & s); T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat4x3<T, P> operator+ ( tmat4x3<T, P> operator+ (
tmat4x3<T, P> const & m1, tmat4x3<T, P> const & m1,
tmat4x3<T, P> const & m2); tmat4x3<T, P> const & m2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat4x3<T, P> operator- ( tmat4x3<T, P> operator- (
tmat4x3<T, P> const & m, tmat4x3<T, P> const & m,
T const & s); T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat4x3<T, P> operator- ( tmat4x3<T, P> operator- (
tmat4x3<T, P> const & m1, tmat4x3<T, P> const & m1,
tmat4x3<T, P> const & m2); tmat4x3<T, P> const & m2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat4x3<T, P> operator* ( tmat4x3<T, P> operator* (
tmat4x3<T, P> const & m, tmat4x3<T, P> const & m,
T const & s); T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat4x3<T, P> operator* ( tmat4x3<T, P> operator* (
T const & s, T const & s,
tmat4x3<T, P> const & m); tmat4x3<T, P> const & m);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL typename tmat4x3<T, P>::col_type operator* ( typename tmat4x3<T, P>::col_type operator* (
tmat4x3<T, P> const & m, tmat4x3<T, P> const & m,
typename tmat4x3<T, P>::row_type const & v); typename tmat4x3<T, P>::row_type const & v);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL typename tmat4x3<T, P>::row_type operator* ( typename tmat4x3<T, P>::row_type operator* (
typename tmat4x3<T, P>::col_type const & v, typename tmat4x3<T, P>::col_type const & v,
tmat4x3<T, P> const & m); tmat4x3<T, P> const & m);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat2x3<T, P> operator* ( tmat2x3<T, P> operator* (
tmat4x3<T, P> const & m1, tmat4x3<T, P> const & m1,
tmat2x4<T, P> const & m2); tmat2x4<T, P> const & m2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x3<T, P> operator* ( tmat3x3<T, P> operator* (
tmat4x3<T, P> const & m1, tmat4x3<T, P> const & m1,
tmat3x4<T, P> const & m2); tmat3x4<T, P> const & m2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat4x3<T, P> operator* ( tmat4x3<T, P> operator* (
tmat4x3<T, P> const & m1, tmat4x3<T, P> const & m1,
tmat4x4<T, P> const & m2); tmat4x4<T, P> const & m2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat4x3<T, P> operator/ ( tmat4x3<T, P> operator/ (
tmat4x3<T, P> const & m, tmat4x3<T, P> const & m,
T const & s); T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat4x3<T, P> operator/ ( tmat4x3<T, P> operator/ (
T const & s, T const & s,
tmat4x3<T, P> const & m); tmat4x3<T, P> const & m);
// Unary constant operators // Unary constant operators
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat4x3<T, P> const operator- ( tmat4x3<T, P> const operator- (
tmat4x3<T, P> const & m); tmat4x3<T, P> const & m);
}//namespace detail }//namespace detail

View File

@ -49,7 +49,7 @@ namespace detail
typedef tmat4x4<T, P> type; typedef tmat4x4<T, P> type;
typedef tmat4x4<T, P> transpose_type; typedef tmat4x4<T, P> transpose_type;
GLM_FUNC_DECL length_t length() const; length_t length() const;
template <typename U, precision Q> template <typename U, precision Q>
friend tvec4<U, Q> operator/(tmat4x4<U, Q> const & m, tvec4<U, Q> const & v); friend tvec4<U, Q> operator/(tmat4x4<U, Q> const & m, tvec4<U, Q> const & v);
@ -62,21 +62,21 @@ namespace detail
public: public:
// Constructors // Constructors
GLM_FUNC_DECL tmat4x4(); tmat4x4();
GLM_FUNC_DECL tmat4x4(tmat4x4<T, P> const & m); tmat4x4(tmat4x4<T, P> const & m);
template <precision Q> template <precision Q>
GLM_FUNC_DECL tmat4x4(tmat4x4<T, Q> const & m); tmat4x4(tmat4x4<T, Q> const & m);
GLM_FUNC_DECL explicit tmat4x4( explicit tmat4x4(
ctor Null); ctor Null);
GLM_FUNC_DECL explicit tmat4x4( explicit tmat4x4(
T const & x); T const & x);
GLM_FUNC_DECL tmat4x4( tmat4x4(
T const & x0, T const & y0, T const & z0, T const & w0, T const & x0, T const & y0, T const & z0, T const & w0,
T const & x1, T const & y1, T const & z1, T const & w1, T const & x1, T const & y1, T const & z1, T const & w1,
T const & x2, T const & y2, T const & z2, T const & w2, T const & x2, T const & y2, T const & z2, T const & w2,
T const & x3, T const & y3, T const & z3, T const & w3); T const & x3, T const & y3, T const & z3, T const & w3);
GLM_FUNC_DECL tmat4x4( tmat4x4(
col_type const & v0, col_type const & v0,
col_type const & v1, col_type const & v1,
col_type const & v2, col_type const & v2,
@ -90,14 +90,14 @@ namespace detail
typename X2, typename Y2, typename Z2, typename W2, typename X2, typename Y2, typename Z2, typename W2,
typename X3, typename Y3, typename Z3, typename W3, typename X3, typename Y3, typename Z3, typename W3,
typename X4, typename Y4, typename Z4, typename W4> typename X4, typename Y4, typename Z4, typename W4>
GLM_FUNC_DECL tmat4x4( tmat4x4(
X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1, X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1,
X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2, X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2,
X3 const & x3, Y3 const & y3, Z3 const & z3, W3 const & w3, X3 const & x3, Y3 const & y3, Z3 const & z3, W3 const & w3,
X4 const & x4, Y4 const & y4, Z4 const & z4, W4 const & w4); X4 const & x4, Y4 const & y4, Z4 const & z4, W4 const & w4);
template <typename V1, typename V2, typename V3, typename V4> template <typename V1, typename V2, typename V3, typename V4>
GLM_FUNC_DECL tmat4x4( tmat4x4(
tvec4<V1, P> const & v1, tvec4<V1, P> const & v1,
tvec4<V2, P> const & v2, tvec4<V2, P> const & v2,
tvec4<V3, P> const & v3, tvec4<V3, P> const & v3,
@ -105,148 +105,148 @@ namespace detail
// Matrix conversions // Matrix conversions
template <typename U, precision Q> template <typename U, precision Q>
GLM_FUNC_DECL explicit tmat4x4(tmat4x4<U, Q> const & m); explicit tmat4x4(tmat4x4<U, Q> const & m);
GLM_FUNC_DECL explicit tmat4x4(tmat2x2<T, P> const & x); explicit tmat4x4(tmat2x2<T, P> const & x);
GLM_FUNC_DECL explicit tmat4x4(tmat3x3<T, P> const & x); explicit tmat4x4(tmat3x3<T, P> const & x);
GLM_FUNC_DECL explicit tmat4x4(tmat2x3<T, P> const & x); explicit tmat4x4(tmat2x3<T, P> const & x);
GLM_FUNC_DECL explicit tmat4x4(tmat3x2<T, P> const & x); explicit tmat4x4(tmat3x2<T, P> const & x);
GLM_FUNC_DECL explicit tmat4x4(tmat2x4<T, P> const & x); explicit tmat4x4(tmat2x4<T, P> const & x);
GLM_FUNC_DECL explicit tmat4x4(tmat4x2<T, P> const & x); explicit tmat4x4(tmat4x2<T, P> const & x);
GLM_FUNC_DECL explicit tmat4x4(tmat3x4<T, P> const & x); explicit tmat4x4(tmat3x4<T, P> const & x);
GLM_FUNC_DECL explicit tmat4x4(tmat4x3<T, P> const & x); explicit tmat4x4(tmat4x3<T, P> const & x);
// Accesses // Accesses
GLM_FUNC_DECL col_type & operator[](length_t i); col_type & operator[](length_t i);
GLM_FUNC_DECL col_type const & operator[](length_t i) const; col_type const & operator[](length_t i) const;
// Unary updatable operators // Unary updatable operators
GLM_FUNC_DECL tmat4x4<T, P> & operator= (tmat4x4<T, P> const & m); tmat4x4<T, P> & operator= (tmat4x4<T, P> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x4<T, P> & operator= (tmat4x4<U, P> const & m); tmat4x4<T, P> & operator= (tmat4x4<U, P> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x4<T, P> & operator+= (U s); tmat4x4<T, P> & operator+= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x4<T, P> & operator+= (tmat4x4<U, P> const & m); tmat4x4<T, P> & operator+= (tmat4x4<U, P> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x4<T, P> & operator-= (U s); tmat4x4<T, P> & operator-= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x4<T, P> & operator-= (tmat4x4<U, P> const & m); tmat4x4<T, P> & operator-= (tmat4x4<U, P> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x4<T, P> & operator*= (U s); tmat4x4<T, P> & operator*= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x4<T, P> & operator*= (tmat4x4<U, P> const & m); tmat4x4<T, P> & operator*= (tmat4x4<U, P> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x4<T, P> & operator/= (U s); tmat4x4<T, P> & operator/= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x4<T, P> & operator/= (tmat4x4<U, P> const & m); tmat4x4<T, P> & operator/= (tmat4x4<U, P> const & m);
////////////////////////////////////// //////////////////////////////////////
// Increment and decrement operators // Increment and decrement operators
GLM_FUNC_DECL tmat4x4<T, P> & operator++ (); tmat4x4<T, P> & operator++ ();
GLM_FUNC_DECL tmat4x4<T, P> & operator-- (); tmat4x4<T, P> & operator-- ();
GLM_FUNC_DECL tmat4x4<T, P> operator++(int); tmat4x4<T, P> operator++(int);
GLM_FUNC_DECL tmat4x4<T, P> operator--(int); tmat4x4<T, P> operator--(int);
}; };
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat4x4<T, P> compute_inverse_mat4(tmat4x4<T, P> const & m); tmat4x4<T, P> compute_inverse_mat4(tmat4x4<T, P> const & m);
// Binary operators // Binary operators
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat4x4<T, P> operator+ ( tmat4x4<T, P> operator+ (
tmat4x4<T, P> const & m, tmat4x4<T, P> const & m,
T const & s); T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat4x4<T, P> operator+ ( tmat4x4<T, P> operator+ (
T const & s, T const & s,
tmat4x4<T, P> const & m); tmat4x4<T, P> const & m);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat4x4<T, P> operator+ ( tmat4x4<T, P> operator+ (
tmat4x4<T, P> const & m1, tmat4x4<T, P> const & m1,
tmat4x4<T, P> const & m2); tmat4x4<T, P> const & m2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat4x4<T, P> operator- ( tmat4x4<T, P> operator- (
tmat4x4<T, P> const & m, tmat4x4<T, P> const & m,
T const & s); T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat4x4<T, P> operator- ( tmat4x4<T, P> operator- (
T const & s, T const & s,
tmat4x4<T, P> const & m); tmat4x4<T, P> const & m);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat4x4<T, P> operator- ( tmat4x4<T, P> operator- (
tmat4x4<T, P> const & m1, tmat4x4<T, P> const & m1,
tmat4x4<T, P> const & m2); tmat4x4<T, P> const & m2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat4x4<T, P> operator* ( tmat4x4<T, P> operator* (
tmat4x4<T, P> const & m, tmat4x4<T, P> const & m,
T const & s); T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat4x4<T, P> operator* ( tmat4x4<T, P> operator* (
T const & s, T const & s,
tmat4x4<T, P> const & m); tmat4x4<T, P> const & m);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL typename tmat4x4<T, P>::col_type operator* ( typename tmat4x4<T, P>::col_type operator* (
tmat4x4<T, P> const & m, tmat4x4<T, P> const & m,
typename tmat4x4<T, P>::row_type const & v); typename tmat4x4<T, P>::row_type const & v);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL typename tmat4x4<T, P>::row_type operator* ( typename tmat4x4<T, P>::row_type operator* (
typename tmat4x4<T, P>::col_type const & v, typename tmat4x4<T, P>::col_type const & v,
tmat4x4<T, P> const & m); tmat4x4<T, P> const & m);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat2x4<T, P> operator* ( tmat2x4<T, P> operator* (
tmat4x4<T, P> const & m1, tmat4x4<T, P> const & m1,
tmat2x4<T, P> const & m2); tmat2x4<T, P> const & m2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x4<T, P> operator* ( tmat3x4<T, P> operator* (
tmat4x4<T, P> const & m1, tmat4x4<T, P> const & m1,
tmat3x4<T, P> const & m2); tmat3x4<T, P> const & m2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat4x4<T, P> operator* ( tmat4x4<T, P> operator* (
tmat4x4<T, P> const & m1, tmat4x4<T, P> const & m1,
tmat4x4<T, P> const & m2); tmat4x4<T, P> const & m2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat4x4<T, P> operator/ ( tmat4x4<T, P> operator/ (
tmat4x4<T, P> const & m, tmat4x4<T, P> const & m,
T const & s); T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat4x4<T, P> operator/ ( tmat4x4<T, P> operator/ (
T const & s, T const & s,
tmat4x4<T, P> const & m); tmat4x4<T, P> const & m);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL typename tmat4x4<T, P>::col_type operator/ ( typename tmat4x4<T, P>::col_type operator/ (
tmat4x4<T, P> const & m, tmat4x4<T, P> const & m,
typename tmat4x4<T, P>::row_type const & v); typename tmat4x4<T, P>::row_type const & v);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL typename tmat4x4<T, P>::row_type operator/ ( typename tmat4x4<T, P>::row_type operator/ (
typename tmat4x4<T, P>::col_type & v, typename tmat4x4<T, P>::col_type & v,
tmat4x4<T, P> const & m); tmat4x4<T, P> const & m);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat4x4<T, P> operator/ ( tmat4x4<T, P> operator/ (
tmat4x4<T, P> const & m1, tmat4x4<T, P> const & m1,
tmat4x4<T, P> const & m2); tmat4x4<T, P> const & m2);
// Unary constant operators // Unary constant operators
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat4x4<T, P> const operator- ( tmat4x4<T, P> const operator- (
tmat4x4<T, P> const & m); tmat4x4<T, P> const & m);
}//namespace detail }//namespace detail

View File

@ -58,7 +58,7 @@ namespace detail
////////////////////////////////////// //////////////////////////////////////
// Helper // Helper
GLM_FUNC_DECL length_t length() const; length_t length() const;
////////////////////////////////////// //////////////////////////////////////
// Data // Data
@ -68,23 +68,23 @@ namespace detail
////////////////////////////////////// //////////////////////////////////////
// Accesses // Accesses
GLM_FUNC_DECL T & operator[](length_t i); T & operator[](length_t i);
GLM_FUNC_DECL T const & operator[](length_t i) const; T const & operator[](length_t i) const;
////////////////////////////////////// //////////////////////////////////////
// Implicit basic constructors // Implicit basic constructors
GLM_FUNC_DECL tvec1(); tvec1();
GLM_FUNC_DECL tvec1(tvec1<T, P> const & v); tvec1(tvec1<T, P> const & v);
template <precision Q> template <precision Q>
GLM_FUNC_DECL tvec1(tvec1<T, Q> const & v); tvec1(tvec1<T, Q> const & v);
////////////////////////////////////// //////////////////////////////////////
// Explicit basic constructors // Explicit basic constructors
GLM_FUNC_DECL explicit tvec1( explicit tvec1(
ctor); ctor);
GLM_FUNC_DECL tvec1( tvec1(
T const & s); T const & s);
////////////////////////////////////// //////////////////////////////////////
@ -92,180 +92,180 @@ namespace detail
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename U, precision Q> template <typename U, precision Q>
GLM_FUNC_DECL explicit tvec1(tvec1<U, Q> const & v); explicit tvec1(tvec1<U, Q> const & v);
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename U, precision Q> template <typename U, precision Q>
GLM_FUNC_DECL explicit tvec1(tvec2<U, Q> const & v); explicit tvec1(tvec2<U, Q> const & v);
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename U, precision Q> template <typename U, precision Q>
GLM_FUNC_DECL explicit tvec1(tvec3<U, Q> const & v); explicit tvec1(tvec3<U, Q> const & v);
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename U, precision Q> template <typename U, precision Q>
GLM_FUNC_DECL explicit tvec1(tvec4<U, Q> const & v); explicit tvec1(tvec4<U, Q> const & v);
////////////////////////////////////// //////////////////////////////////////
// Unary arithmetic operators // Unary arithmetic operators
GLM_FUNC_DECL tvec1<T, P> & operator= (tvec1<T, P> const & v); tvec1<T, P> & operator= (tvec1<T, P> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec1<T, P> & operator= (tvec1<U, P> const & v); tvec1<T, P> & operator= (tvec1<U, P> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec1<T, P> & operator+=(U const & s); tvec1<T, P> & operator+=(U const & s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec1<T, P> & operator+=(tvec1<U, P> const & v); tvec1<T, P> & operator+=(tvec1<U, P> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec1<T, P> & operator-=(U const & s); tvec1<T, P> & operator-=(U const & s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec1<T, P> & operator-=(tvec1<U, P> const & v); tvec1<T, P> & operator-=(tvec1<U, P> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec1<T, P> & operator*=(U const & s); tvec1<T, P> & operator*=(U const & s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec1<T, P> & operator*=(tvec1<U, P> const & v); tvec1<T, P> & operator*=(tvec1<U, P> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec1<T, P> & operator/=(U const & s); tvec1<T, P> & operator/=(U const & s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec1<T, P> & operator/=(tvec1<U, P> const & v); tvec1<T, P> & operator/=(tvec1<U, P> const & v);
////////////////////////////////////// //////////////////////////////////////
// Increment and decrement operators // Increment and decrement operators
GLM_FUNC_DECL tvec1<T, P> & operator++(); tvec1<T, P> & operator++();
GLM_FUNC_DECL tvec1<T, P> & operator--(); tvec1<T, P> & operator--();
GLM_FUNC_DECL tvec1<T, P> operator++(int); tvec1<T, P> operator++(int);
GLM_FUNC_DECL tvec1<T, P> operator--(int); tvec1<T, P> operator--(int);
////////////////////////////////////// //////////////////////////////////////
// Unary bit operators // Unary bit operators
template <typename U> template <typename U>
GLM_FUNC_DECL tvec1<T, P> & operator%=(U const & s); tvec1<T, P> & operator%=(U const & s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec1<T, P> & operator%=(tvec1<U, P> const & v); tvec1<T, P> & operator%=(tvec1<U, P> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec1<T, P> & operator&=(U const & s); tvec1<T, P> & operator&=(U const & s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec1<T, P> & operator&=(tvec1<U, P> const & v); tvec1<T, P> & operator&=(tvec1<U, P> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec1<T, P> & operator|=(U const & s); tvec1<T, P> & operator|=(U const & s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec1<T, P> & operator|=(tvec1<U, P> const & v); tvec1<T, P> & operator|=(tvec1<U, P> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec1<T, P> & operator^=(U const & s); tvec1<T, P> & operator^=(U const & s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec1<T, P> & operator^=(tvec1<U, P> const & v); tvec1<T, P> & operator^=(tvec1<U, P> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec1<T, P> & operator<<=(U const & s); tvec1<T, P> & operator<<=(U const & s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec1<T, P> & operator<<=(tvec1<U, P> const & v); tvec1<T, P> & operator<<=(tvec1<U, P> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec1<T, P> & operator>>=(U const & s); tvec1<T, P> & operator>>=(U const & s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec1<T, P> & operator>>=(tvec1<U, P> const & v); tvec1<T, P> & operator>>=(tvec1<U, P> const & v);
}; };
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec1<T, P> operator+(tvec1<T, P> const & v, T const & s); tvec1<T, P> operator+(tvec1<T, P> const & v, T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec1<T, P> operator+(T const & s, tvec1<T, P> const & v); tvec1<T, P> operator+(T const & s, tvec1<T, P> const & v);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec1<T, P> operator+(tvec1<T, P> const & v1, tvec1<T, P> const & v2); tvec1<T, P> operator+(tvec1<T, P> const & v1, tvec1<T, P> const & v2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec1<T, P> operator-(tvec1<T, P> const & v, T const & s); tvec1<T, P> operator-(tvec1<T, P> const & v, T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec1<T, P> operator-(T const & s, tvec1<T, P> const & v); tvec1<T, P> operator-(T const & s, tvec1<T, P> const & v);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec1<T, P> operator- (tvec1<T, P> const & v1, tvec1<T, P> const & v2); tvec1<T, P> operator- (tvec1<T, P> const & v1, tvec1<T, P> const & v2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec1<T, P> operator*(tvec1<T, P> const & v, T const & s); tvec1<T, P> operator*(tvec1<T, P> const & v, T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec1<T, P> operator*(T const & s, tvec1<T, P> const & v); tvec1<T, P> operator*(T const & s, tvec1<T, P> const & v);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec1<T, P> operator*(tvec1<T, P> const & v1, tvec1<T, P> const & v2); tvec1<T, P> operator*(tvec1<T, P> const & v1, tvec1<T, P> const & v2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec1<T, P> operator/(tvec1<T, P> const & v, T const & s); tvec1<T, P> operator/(tvec1<T, P> const & v, T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec1<T, P> operator/(T const & s, tvec1<T, P> const & v); tvec1<T, P> operator/(T const & s, tvec1<T, P> const & v);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec1<T, P> operator/(tvec1<T, P> const & v1, tvec1<T, P> const & v2); tvec1<T, P> operator/(tvec1<T, P> const & v1, tvec1<T, P> const & v2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec1<T, P> operator-(tvec1<T, P> const & v); tvec1<T, P> operator-(tvec1<T, P> const & v);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL bool operator==(tvec1<T, P> const & v1, tvec1<T, P> const & v2); bool operator==(tvec1<T, P> const & v1, tvec1<T, P> const & v2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL bool operator!=(tvec1<T, P> const & v1, tvec1<T, P> const & v2); bool operator!=(tvec1<T, P> const & v1, tvec1<T, P> const & v2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec1<T, P> operator%(tvec1<T, P> const & v, T const & s); tvec1<T, P> operator%(tvec1<T, P> const & v, T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec1<T, P> operator%(T const & s, tvec1<T, P> const & v); tvec1<T, P> operator%(T const & s, tvec1<T, P> const & v);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec1<T, P> operator%(tvec1<T, P> const & v1, tvec1<T, P> const & v2); tvec1<T, P> operator%(tvec1<T, P> const & v1, tvec1<T, P> const & v2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec1<T, P> operator&(tvec1<T, P> const & v, T const & s); tvec1<T, P> operator&(tvec1<T, P> const & v, T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec1<T, P> operator&(T const & s, tvec1<T, P> const & v); tvec1<T, P> operator&(T const & s, tvec1<T, P> const & v);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec1<T, P> operator&(tvec1<T, P> const & v1, tvec1<T, P> const & v2); tvec1<T, P> operator&(tvec1<T, P> const & v1, tvec1<T, P> const & v2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec1<T, P> operator|(tvec1<T, P> const & v, T const & s); tvec1<T, P> operator|(tvec1<T, P> const & v, T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec1<T, P> operator|(T const & s, tvec1<T, P> const & v); tvec1<T, P> operator|(T const & s, tvec1<T, P> const & v);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec1<T, P> operator|(tvec1<T, P> const & v1, tvec1<T, P> const & v2); tvec1<T, P> operator|(tvec1<T, P> const & v1, tvec1<T, P> const & v2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec1<T, P> operator^(tvec1<T, P> const & v, T const & s); tvec1<T, P> operator^(tvec1<T, P> const & v, T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec1<T, P> operator^(T const & s, tvec1<T, P> const & v); tvec1<T, P> operator^(T const & s, tvec1<T, P> const & v);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec1<T, P> operator^(tvec1<T, P> const & v1, tvec1<T, P> const & v2); tvec1<T, P> operator^(tvec1<T, P> const & v1, tvec1<T, P> const & v2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec1<T, P> operator<<(tvec1<T, P> const & v, T const & s); tvec1<T, P> operator<<(tvec1<T, P> const & v, T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec1<T, P> operator<<(T const & s, tvec1<T, P> const & v); tvec1<T, P> operator<<(T const & s, tvec1<T, P> const & v);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec1<T, P> operator<<(tvec1<T, P> const & v1, tvec1<T, P> const & v2); tvec1<T, P> operator<<(tvec1<T, P> const & v1, tvec1<T, P> const & v2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec1<T, P> operator>>(tvec1<T, P> const & v, T const & s); tvec1<T, P> operator>>(tvec1<T, P> const & v, T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec1<T, P> operator>>(T const & s, tvec1<T, P> const & v); tvec1<T, P> operator>>(T const & s, tvec1<T, P> const & v);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec1<T, P> operator>>(tvec1<T, P> const & v1, tvec1<T, P> const & v2); tvec1<T, P> operator>>(tvec1<T, P> const & v1, tvec1<T, P> const & v2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec1<T, P> operator~(tvec1<T, P> const & v); tvec1<T, P> operator~(tvec1<T, P> const & v);
}//namespace detail }//namespace detail
}//namespace glm }//namespace glm

View File

@ -59,7 +59,7 @@ namespace detail
////////////////////////////////////// //////////////////////////////////////
// Helper // Helper
GLM_FUNC_DECL length_t length() const; length_t length() const;
////////////////////////////////////// //////////////////////////////////////
// Data // Data
@ -93,25 +93,25 @@ namespace detail
////////////////////////////////////// //////////////////////////////////////
// Accesses // Accesses
GLM_FUNC_DECL T & operator[](length_t i); T & operator[](length_t i);
GLM_FUNC_DECL T const & operator[](length_t i) const; T const & operator[](length_t i) const;
////////////////////////////////////// //////////////////////////////////////
// Implicit basic constructors // Implicit basic constructors
GLM_FUNC_DECL tvec2(); tvec2();
GLM_FUNC_DECL tvec2(tvec2<T, P> const & v); tvec2(tvec2<T, P> const & v);
template <precision Q> template <precision Q>
GLM_FUNC_DECL tvec2(tvec2<T, Q> const & v); tvec2(tvec2<T, Q> const & v);
////////////////////////////////////// //////////////////////////////////////
// Explicit basic constructors // Explicit basic constructors
GLM_FUNC_DECL explicit tvec2( explicit tvec2(
ctor); ctor);
GLM_FUNC_DECL explicit tvec2( explicit tvec2(
T const & s); T const & s);
GLM_FUNC_DECL tvec2( tvec2(
T const & s1, T const & s1,
T const & s2); T const & s2);
@ -120,7 +120,7 @@ namespace detail
# if(GLM_HAS_ANONYMOUS_UNION && defined(GLM_SWIZZLE)) # if(GLM_HAS_ANONYMOUS_UNION && defined(GLM_SWIZZLE))
template <int E0, int E1> template <int E0, int E1>
GLM_FUNC_DECL tvec2(_swizzle<2,T, P, tvec2<T, P>, E0, E1,-1,-2> const & that) tvec2(_swizzle<2,T, P, tvec2<T, P>, E0, E1,-1,-2> const & that)
{ {
*this = that(); *this = that();
} }
@ -131,7 +131,7 @@ namespace detail
//! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) //! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename U, typename V> template <typename U, typename V>
GLM_FUNC_DECL tvec2( tvec2(
U const & x, U const & x,
V const & y); V const & y);
@ -140,170 +140,170 @@ namespace detail
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename U, precision Q> template <typename U, precision Q>
GLM_FUNC_DECL tvec2(tvec2<U, Q> const & v); tvec2(tvec2<U, Q> const & v);
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename U, precision Q> template <typename U, precision Q>
GLM_FUNC_DECL explicit tvec2(tvec3<U, Q> const & v); explicit tvec2(tvec3<U, Q> const & v);
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename U, precision Q> template <typename U, precision Q>
GLM_FUNC_DECL explicit tvec2(tvec4<U, Q> const & v); explicit tvec2(tvec4<U, Q> const & v);
////////////////////////////////////// //////////////////////////////////////
// Unary arithmetic operators // Unary arithmetic operators
GLM_FUNC_DECL tvec2<T, P> & operator= (tvec2<T, P> const & v); tvec2<T, P> & operator= (tvec2<T, P> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T, P> & operator= (tvec2<U, P> const & v); tvec2<T, P> & operator= (tvec2<U, P> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T, P> & operator+=(U s); tvec2<T, P> & operator+=(U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T, P> & operator+=(tvec2<U, P> const & v); tvec2<T, P> & operator+=(tvec2<U, P> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T, P> & operator-=(U s); tvec2<T, P> & operator-=(U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T, P> & operator-=(tvec2<U, P> const & v); tvec2<T, P> & operator-=(tvec2<U, P> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T, P> & operator*=(U s); tvec2<T, P> & operator*=(U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T, P> & operator*=(tvec2<U, P> const & v); tvec2<T, P> & operator*=(tvec2<U, P> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T, P> & operator/=(U s); tvec2<T, P> & operator/=(U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T, P> & operator/=(tvec2<U, P> const & v); tvec2<T, P> & operator/=(tvec2<U, P> const & v);
////////////////////////////////////// //////////////////////////////////////
// Increment and decrement operators // Increment and decrement operators
GLM_FUNC_DECL tvec2<T, P> & operator++(); tvec2<T, P> & operator++();
GLM_FUNC_DECL tvec2<T, P> & operator--(); tvec2<T, P> & operator--();
GLM_FUNC_DECL tvec2<T, P> operator++(int); tvec2<T, P> operator++(int);
GLM_FUNC_DECL tvec2<T, P> operator--(int); tvec2<T, P> operator--(int);
////////////////////////////////////// //////////////////////////////////////
// Unary bit operators // Unary bit operators
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T, P> & operator%= (U s); tvec2<T, P> & operator%= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T, P> & operator%= (tvec2<U, P> const & v); tvec2<T, P> & operator%= (tvec2<U, P> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T, P> & operator&= (U s); tvec2<T, P> & operator&= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T, P> & operator&= (tvec2<U, P> const & v); tvec2<T, P> & operator&= (tvec2<U, P> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T, P> & operator|= (U s); tvec2<T, P> & operator|= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T, P> & operator|= (tvec2<U, P> const & v); tvec2<T, P> & operator|= (tvec2<U, P> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T, P> & operator^= (U s); tvec2<T, P> & operator^= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T, P> & operator^= (tvec2<U, P> const & v); tvec2<T, P> & operator^= (tvec2<U, P> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T, P> & operator<<=(U s); tvec2<T, P> & operator<<=(U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T, P> & operator<<=(tvec2<U, P> const & v); tvec2<T, P> & operator<<=(tvec2<U, P> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T, P> & operator>>=(U s); tvec2<T, P> & operator>>=(U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T, P> & operator>>=(tvec2<U, P> const & v); tvec2<T, P> & operator>>=(tvec2<U, P> const & v);
}; };
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec2<T, P> operator+(tvec2<T, P> const & v, T const & s); tvec2<T, P> operator+(tvec2<T, P> const & v, T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec2<T, P> operator+(T const & s, tvec2<T, P> const & v); tvec2<T, P> operator+(T const & s, tvec2<T, P> const & v);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec2<T, P> operator+(tvec2<T, P> const & v1, tvec2<T, P> const & v2); tvec2<T, P> operator+(tvec2<T, P> const & v1, tvec2<T, P> const & v2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec2<T, P> operator-(tvec2<T, P> const & v, T const & s); tvec2<T, P> operator-(tvec2<T, P> const & v, T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec2<T, P> operator-(T const & s, tvec2<T, P> const & v); tvec2<T, P> operator-(T const & s, tvec2<T, P> const & v);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec2<T, P> operator- (tvec2<T, P> const & v1, tvec2<T, P> const & v2); tvec2<T, P> operator- (tvec2<T, P> const & v1, tvec2<T, P> const & v2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec2<T, P> operator*(tvec2<T, P> const & v, T const & s); tvec2<T, P> operator*(tvec2<T, P> const & v, T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec2<T, P> operator*(T const & s, tvec2<T, P> const & v); tvec2<T, P> operator*(T const & s, tvec2<T, P> const & v);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec2<T, P> operator*(tvec2<T, P> const & v1, tvec2<T, P> const & v2); tvec2<T, P> operator*(tvec2<T, P> const & v1, tvec2<T, P> const & v2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec2<T, P> operator/(tvec2<T, P> const & v, T const & s); tvec2<T, P> operator/(tvec2<T, P> const & v, T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec2<T, P> operator/(T const & s, tvec2<T, P> const & v); tvec2<T, P> operator/(T const & s, tvec2<T, P> const & v);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec2<T, P> operator/(tvec2<T, P> const & v1, tvec2<T, P> const & v2); tvec2<T, P> operator/(tvec2<T, P> const & v1, tvec2<T, P> const & v2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec2<T, P> operator-(tvec2<T, P> const & v); tvec2<T, P> operator-(tvec2<T, P> const & v);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec2<T, P> operator%(tvec2<T, P> const & v, T const & s); tvec2<T, P> operator%(tvec2<T, P> const & v, T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec2<T, P> operator%(T const & s, tvec2<T, P> const & v); tvec2<T, P> operator%(T const & s, tvec2<T, P> const & v);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec2<T, P> operator%(tvec2<T, P> const & v1, tvec2<T, P> const & v2); tvec2<T, P> operator%(tvec2<T, P> const & v1, tvec2<T, P> const & v2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec2<T, P> operator&(tvec2<T, P> const & v, T const & s); tvec2<T, P> operator&(tvec2<T, P> const & v, T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec2<T, P> operator&(T const & s, tvec2<T, P> const & v); tvec2<T, P> operator&(T const & s, tvec2<T, P> const & v);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec2<T, P> operator&(tvec2<T, P> const & v1, tvec2<T, P> const & v2); tvec2<T, P> operator&(tvec2<T, P> const & v1, tvec2<T, P> const & v2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec2<T, P> operator|(tvec2<T, P> const & v, T const & s); tvec2<T, P> operator|(tvec2<T, P> const & v, T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec2<T, P> operator|(T const & s, tvec2<T, P> const & v); tvec2<T, P> operator|(T const & s, tvec2<T, P> const & v);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec2<T, P> operator|(tvec2<T, P> const & v1, tvec2<T, P> const & v2); tvec2<T, P> operator|(tvec2<T, P> const & v1, tvec2<T, P> const & v2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec2<T, P> operator^(tvec2<T, P> const & v, T const & s); tvec2<T, P> operator^(tvec2<T, P> const & v, T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec2<T, P> operator^(T const & s, tvec2<T, P> const & v); tvec2<T, P> operator^(T const & s, tvec2<T, P> const & v);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec2<T, P> operator^(tvec2<T, P> const & v1, tvec2<T, P> const & v2); tvec2<T, P> operator^(tvec2<T, P> const & v1, tvec2<T, P> const & v2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec2<T, P> operator<<(tvec2<T, P> const & v, T const & s); tvec2<T, P> operator<<(tvec2<T, P> const & v, T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec2<T, P> operator<<(T const & s, tvec2<T, P> const & v); tvec2<T, P> operator<<(T const & s, tvec2<T, P> const & v);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec2<T, P> operator<<(tvec2<T, P> const & v1, tvec2<T, P> const & v2); tvec2<T, P> operator<<(tvec2<T, P> const & v1, tvec2<T, P> const & v2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec2<T, P> operator>>(tvec2<T, P> const & v, T const & s); tvec2<T, P> operator>>(tvec2<T, P> const & v, T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec2<T, P> operator>>(T const & s, tvec2<T, P> const & v); tvec2<T, P> operator>>(T const & s, tvec2<T, P> const & v);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec2<T, P> operator>>(tvec2<T, P> const & v1, tvec2<T, P> const & v2); tvec2<T, P> operator>>(tvec2<T, P> const & v1, tvec2<T, P> const & v2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec2<T, P> operator~(tvec2<T, P> const & v); tvec2<T, P> operator~(tvec2<T, P> const & v);
}//namespace detail }//namespace detail
}//namespace glm }//namespace glm

View File

@ -59,7 +59,7 @@ namespace detail
////////////////////////////////////// //////////////////////////////////////
// Helper // Helper
GLM_FUNC_DECL length_t length() const; length_t length() const;
////////////////////////////////////// //////////////////////////////////////
// Data // Data
@ -94,25 +94,25 @@ namespace detail
////////////////////////////////////// //////////////////////////////////////
// Accesses // Accesses
GLM_FUNC_DECL T & operator[](length_t i); T & operator[](length_t i);
GLM_FUNC_DECL T const & operator[](length_t i) const; T const & operator[](length_t i) const;
////////////////////////////////////// //////////////////////////////////////
// Implicit basic constructors // Implicit basic constructors
GLM_FUNC_DECL tvec3(); tvec3();
GLM_FUNC_DECL tvec3(tvec3<T, P> const & v); tvec3(tvec3<T, P> const & v);
template <precision Q> template <precision Q>
GLM_FUNC_DECL tvec3(tvec3<T, Q> const & v); tvec3(tvec3<T, Q> const & v);
////////////////////////////////////// //////////////////////////////////////
// Explicit basic constructors // Explicit basic constructors
GLM_FUNC_DECL explicit tvec3( explicit tvec3(
ctor); ctor);
GLM_FUNC_DECL explicit tvec3( explicit tvec3(
T const & s); T const & s);
GLM_FUNC_DECL tvec3( tvec3(
T const & s1, T const & s1,
T const & s2, T const & s2,
T const & s3); T const & s3);
@ -122,7 +122,7 @@ namespace detail
//! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) //! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename U, typename V, typename W> template <typename U, typename V, typename W>
GLM_FUNC_DECL tvec3( tvec3(
U const & x, U const & x,
V const & y, V const & y,
W const & z); W const & z);
@ -132,35 +132,35 @@ namespace detail
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename A, typename B, precision Q> template <typename A, typename B, precision Q>
GLM_FUNC_DECL explicit tvec3(tvec2<A, Q> const & v, B const & s); explicit tvec3(tvec2<A, Q> const & v, B const & s);
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename A, typename B, precision Q> template <typename A, typename B, precision Q>
GLM_FUNC_DECL explicit tvec3(A const & s, tvec2<B, Q> const & v); explicit tvec3(A const & s, tvec2<B, Q> const & v);
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename U, precision Q> template <typename U, precision Q>
GLM_FUNC_DECL explicit tvec3(tvec3<U, Q> const & v); explicit tvec3(tvec3<U, Q> const & v);
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename U, precision Q> template <typename U, precision Q>
GLM_FUNC_DECL explicit tvec3(tvec4<U, Q> const & v); explicit tvec3(tvec4<U, Q> const & v);
////////////////////////////////////// //////////////////////////////////////
// Swizzle constructors // Swizzle constructors
# if(GLM_HAS_ANONYMOUS_UNION && defined(GLM_SWIZZLE)) # if(GLM_HAS_ANONYMOUS_UNION && defined(GLM_SWIZZLE))
template <int E0, int E1, int E2> template <int E0, int E1, int E2>
GLM_FUNC_DECL tvec3(_swizzle<3, T, P, tvec3<T, P>, E0, E1, E2, -1> const & that) tvec3(_swizzle<3, T, P, tvec3<T, P>, E0, E1, E2, -1> const & that)
{ {
*this = that(); *this = that();
} }
template <int E0, int E1> template <int E0, int E1>
GLM_FUNC_DECL tvec3(_swizzle<2, T, P, tvec2<T, P>, E0, E1, -1, -2> const & v, T const & s) tvec3(_swizzle<2, T, P, tvec2<T, P>, E0, E1, -1, -2> const & v, T const & s)
{ {
*this = tvec3<T, P>(v(), s); *this = tvec3<T, P>(v(), s);
} }
template <int E0, int E1> template <int E0, int E1>
GLM_FUNC_DECL tvec3(T const & s, _swizzle<2, T, P, tvec2<T, P>, E0, E1, -1, -2> const & v) tvec3(T const & s, _swizzle<2, T, P, tvec2<T, P>, E0, E1, -1, -2> const & v)
{ {
*this = tvec3<T, P>(s, v()); *this = tvec3<T, P>(s, v());
} }
@ -169,159 +169,159 @@ namespace detail
////////////////////////////////////// //////////////////////////////////////
// Unary arithmetic operators // Unary arithmetic operators
GLM_FUNC_DECL tvec3<T, P> & operator= (tvec3<T, P> const & v); tvec3<T, P> & operator= (tvec3<T, P> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec3<T, P> & operator= (tvec3<U, P> const & v); tvec3<T, P> & operator= (tvec3<U, P> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec3<T, P> & operator+=(U s); tvec3<T, P> & operator+=(U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec3<T, P> & operator+=(tvec3<U, P> const & v); tvec3<T, P> & operator+=(tvec3<U, P> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec3<T, P> & operator-=(U s); tvec3<T, P> & operator-=(U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec3<T, P> & operator-=(tvec3<U, P> const & v); tvec3<T, P> & operator-=(tvec3<U, P> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec3<T, P> & operator*=(U s); tvec3<T, P> & operator*=(U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec3<T, P> & operator*=(tvec3<U, P> const & v); tvec3<T, P> & operator*=(tvec3<U, P> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec3<T, P> & operator/=(U s); tvec3<T, P> & operator/=(U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec3<T, P> & operator/=(tvec3<U, P> const & v); tvec3<T, P> & operator/=(tvec3<U, P> const & v);
////////////////////////////////////// //////////////////////////////////////
// Increment and decrement operators // Increment and decrement operators
GLM_FUNC_DECL tvec3<T, P> & operator++(); tvec3<T, P> & operator++();
GLM_FUNC_DECL tvec3<T, P> & operator--(); tvec3<T, P> & operator--();
GLM_FUNC_DECL tvec3<T, P> operator++(int); tvec3<T, P> operator++(int);
GLM_FUNC_DECL tvec3<T, P> operator--(int); tvec3<T, P> operator--(int);
////////////////////////////////////// //////////////////////////////////////
// Unary bit operators // Unary bit operators
template <typename U> template <typename U>
GLM_FUNC_DECL tvec3<T, P> & operator%= (U s); tvec3<T, P> & operator%= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec3<T, P> & operator%= (tvec3<U, P> const & v); tvec3<T, P> & operator%= (tvec3<U, P> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec3<T, P> & operator&= (U s); tvec3<T, P> & operator&= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec3<T, P> & operator&= (tvec3<U, P> const & v); tvec3<T, P> & operator&= (tvec3<U, P> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec3<T, P> & operator|= (U s); tvec3<T, P> & operator|= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec3<T, P> & operator|= (tvec3<U, P> const & v); tvec3<T, P> & operator|= (tvec3<U, P> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec3<T, P> & operator^= (U s); tvec3<T, P> & operator^= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec3<T, P> & operator^= (tvec3<U, P> const & v); tvec3<T, P> & operator^= (tvec3<U, P> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec3<T, P> & operator<<=(U s); tvec3<T, P> & operator<<=(U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec3<T, P> & operator<<=(tvec3<U, P> const & v); tvec3<T, P> & operator<<=(tvec3<U, P> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec3<T, P> & operator>>=(U s); tvec3<T, P> & operator>>=(U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec3<T, P> & operator>>=(tvec3<U, P> const & v); tvec3<T, P> & operator>>=(tvec3<U, P> const & v);
}; };
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator+(tvec3<T, P> const & v, T const & s); tvec3<T, P> operator+(tvec3<T, P> const & v, T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator+(T const & s, tvec3<T, P> const & v); tvec3<T, P> operator+(T const & s, tvec3<T, P> const & v);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator+(tvec3<T, P> const & v1, tvec3<T, P> const & v2); tvec3<T, P> operator+(tvec3<T, P> const & v1, tvec3<T, P> const & v2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator-(tvec3<T, P> const & v, T const & s); tvec3<T, P> operator-(tvec3<T, P> const & v, T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator-(T const & s, tvec3<T, P> const & v); tvec3<T, P> operator-(T const & s, tvec3<T, P> const & v);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator- (tvec3<T, P> const & v1, tvec3<T, P> const & v2); tvec3<T, P> operator- (tvec3<T, P> const & v1, tvec3<T, P> const & v2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator*(tvec3<T, P> const & v, T const & s); tvec3<T, P> operator*(tvec3<T, P> const & v, T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator*(T const & s, tvec3<T, P> const & v); tvec3<T, P> operator*(T const & s, tvec3<T, P> const & v);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator*(tvec3<T, P> const & v1, tvec3<T, P> const & v2); tvec3<T, P> operator*(tvec3<T, P> const & v1, tvec3<T, P> const & v2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator/(tvec3<T, P> const & v, T const & s); tvec3<T, P> operator/(tvec3<T, P> const & v, T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator/(T const & s, tvec3<T, P> const & v); tvec3<T, P> operator/(T const & s, tvec3<T, P> const & v);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator/(tvec3<T, P> const & v1, tvec3<T, P> const & v2); tvec3<T, P> operator/(tvec3<T, P> const & v1, tvec3<T, P> const & v2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator-(tvec3<T, P> const & v); tvec3<T, P> operator-(tvec3<T, P> const & v);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator%(tvec3<T, P> const & v, T const & s); tvec3<T, P> operator%(tvec3<T, P> const & v, T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator%(T const & s, tvec3<T, P> const & v); tvec3<T, P> operator%(T const & s, tvec3<T, P> const & v);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator%(tvec3<T, P> const & v1, tvec3<T, P> const & v2); tvec3<T, P> operator%(tvec3<T, P> const & v1, tvec3<T, P> const & v2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator&(tvec3<T, P> const & v, T const & s); tvec3<T, P> operator&(tvec3<T, P> const & v, T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator&(T const & s, tvec3<T, P> const & v); tvec3<T, P> operator&(T const & s, tvec3<T, P> const & v);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator&(tvec3<T, P> const & v1, tvec3<T, P> const & v2); tvec3<T, P> operator&(tvec3<T, P> const & v1, tvec3<T, P> const & v2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator|(tvec3<T, P> const & v, T const & s); tvec3<T, P> operator|(tvec3<T, P> const & v, T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator|(T const & s, tvec3<T, P> const & v); tvec3<T, P> operator|(T const & s, tvec3<T, P> const & v);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator|(tvec3<T, P> const & v1, tvec3<T, P> const & v2); tvec3<T, P> operator|(tvec3<T, P> const & v1, tvec3<T, P> const & v2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator^(tvec3<T, P> const & v, T const & s); tvec3<T, P> operator^(tvec3<T, P> const & v, T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator^(T const & s, tvec3<T, P> const & v); tvec3<T, P> operator^(T const & s, tvec3<T, P> const & v);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator^(tvec3<T, P> const & v1, tvec3<T, P> const & v2); tvec3<T, P> operator^(tvec3<T, P> const & v1, tvec3<T, P> const & v2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator<<(tvec3<T, P> const & v, T const & s); tvec3<T, P> operator<<(tvec3<T, P> const & v, T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator<<(T const & s, tvec3<T, P> const & v); tvec3<T, P> operator<<(T const & s, tvec3<T, P> const & v);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator<<(tvec3<T, P> const & v1, tvec3<T, P> const & v2); tvec3<T, P> operator<<(tvec3<T, P> const & v1, tvec3<T, P> const & v2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator>>(tvec3<T, P> const & v, T const & s); tvec3<T, P> operator>>(tvec3<T, P> const & v, T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator>>(T const & s, tvec3<T, P> const & v); tvec3<T, P> operator>>(T const & s, tvec3<T, P> const & v);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator>>(tvec3<T, P> const & v1, tvec3<T, P> const & v2); tvec3<T, P> operator>>(tvec3<T, P> const & v1, tvec3<T, P> const & v2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator~(tvec3<T, P> const & v); tvec3<T, P> operator~(tvec3<T, P> const & v);
}//namespace detail }//namespace detail
}//namespace glm }//namespace glm

View File

@ -60,7 +60,7 @@ namespace detail
////////////////////////////////////// //////////////////////////////////////
// Helper // Helper
GLM_FUNC_DECL length_t length() const; length_t length() const;
////////////////////////////////////// //////////////////////////////////////
// Data // Data
@ -96,25 +96,25 @@ namespace detail
////////////////////////////////////// //////////////////////////////////////
// Accesses // Accesses
GLM_FUNC_DECL T & operator[](length_t i); T & operator[](length_t i);
GLM_FUNC_DECL T const & operator[](length_t i) const; T const & operator[](length_t i) const;
////////////////////////////////////// //////////////////////////////////////
// Implicit basic constructors // Implicit basic constructors
GLM_FUNC_DECL tvec4(); tvec4();
GLM_FUNC_DECL tvec4(type const & v); tvec4(type const & v);
template <precision Q> template <precision Q>
GLM_FUNC_DECL tvec4(tvec4<T, Q> const & v); tvec4(tvec4<T, Q> const & v);
////////////////////////////////////// //////////////////////////////////////
// Explicit basic constructors // Explicit basic constructors
GLM_FUNC_DECL explicit tvec4( explicit tvec4(
ctor); ctor);
GLM_FUNC_DECL explicit tvec4( explicit tvec4(
T const & s); T const & s);
GLM_FUNC_DECL tvec4( tvec4(
T const & s0, T const & s0,
T const & s1, T const & s1,
T const & s2, T const & s2,
@ -125,7 +125,7 @@ namespace detail
/// Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) /// Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename A, typename B, typename C, typename D> template <typename A, typename B, typename C, typename D>
GLM_FUNC_DECL tvec4( tvec4(
A const & x, A const & x,
B const & y, B const & y,
C const & z, C const & z,
@ -136,68 +136,68 @@ namespace detail
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename A, typename B, typename C, precision Q> template <typename A, typename B, typename C, precision Q>
GLM_FUNC_DECL explicit tvec4(tvec2<A, Q> const & v, B const & s1, C const & s2); explicit tvec4(tvec2<A, Q> const & v, B const & s1, C const & s2);
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename A, typename B, typename C, precision Q> template <typename A, typename B, typename C, precision Q>
GLM_FUNC_DECL explicit tvec4(A const & s1, tvec2<B, Q> const & v, C const & s2); explicit tvec4(A const & s1, tvec2<B, Q> const & v, C const & s2);
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename A, typename B, typename C, precision Q> template <typename A, typename B, typename C, precision Q>
GLM_FUNC_DECL explicit tvec4(A const & s1, B const & s2, tvec2<C, Q> const & v); explicit tvec4(A const & s1, B const & s2, tvec2<C, Q> const & v);
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename A, typename B, precision Q> template <typename A, typename B, precision Q>
GLM_FUNC_DECL explicit tvec4(tvec3<A, Q> const & v, B const & s); explicit tvec4(tvec3<A, Q> const & v, B const & s);
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename A, typename B, precision Q> template <typename A, typename B, precision Q>
GLM_FUNC_DECL explicit tvec4(A const & s, tvec3<B, Q> const & v); explicit tvec4(A const & s, tvec3<B, Q> const & v);
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename A, typename B, precision Q> template <typename A, typename B, precision Q>
GLM_FUNC_DECL explicit tvec4(tvec2<A, Q> const & v1, tvec2<B, Q> const & v2); explicit tvec4(tvec2<A, Q> const & v1, tvec2<B, Q> const & v2);
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename U, precision Q> template <typename U, precision Q>
GLM_FUNC_DECL explicit tvec4(tvec4<U, Q> const & v); explicit tvec4(tvec4<U, Q> const & v);
////////////////////////////////////// //////////////////////////////////////
// Swizzle constructors // Swizzle constructors
# if(GLM_HAS_ANONYMOUS_UNION && defined(GLM_SWIZZLE)) # if(GLM_HAS_ANONYMOUS_UNION && defined(GLM_SWIZZLE))
template <int E0, int E1, int E2, int E3> template <int E0, int E1, int E2, int E3>
GLM_FUNC_DECL tvec4(_swizzle<4, T, P, tvec4<T, P>, E0, E1, E2, E3> const & that) tvec4(_swizzle<4, T, P, tvec4<T, P>, E0, E1, E2, E3> const & that)
{ {
*this = that(); *this = that();
} }
template <int E0, int E1, int F0, int F1> template <int E0, int E1, int F0, int F1>
GLM_FUNC_DECL tvec4(_swizzle<2, T, P, tvec2<T, P>, E0, E1, -1, -2> const & v, _swizzle<2, T, P, tvec2<T, P>, F0, F1, -1, -2> const & u) tvec4(_swizzle<2, T, P, tvec2<T, P>, E0, E1, -1, -2> const & v, _swizzle<2, T, P, tvec2<T, P>, F0, F1, -1, -2> const & u)
{ {
*this = tvec4<T, P>(v(), u()); *this = tvec4<T, P>(v(), u());
} }
template <int E0, int E1> template <int E0, int E1>
GLM_FUNC_DECL tvec4(T const & x, T const & y, _swizzle<2, T, P, tvec2<T, P>, E0, E1, -1, -2> const & v) tvec4(T const & x, T const & y, _swizzle<2, T, P, tvec2<T, P>, E0, E1, -1, -2> const & v)
{ {
*this = tvec4<T, P>(x, y, v()); *this = tvec4<T, P>(x, y, v());
} }
template <int E0, int E1> template <int E0, int E1>
GLM_FUNC_DECL tvec4(T const & x, _swizzle<2, T, P, tvec2<T, P>, E0, E1, -1, -2> const & v, T const & w) tvec4(T const & x, _swizzle<2, T, P, tvec2<T, P>, E0, E1, -1, -2> const & v, T const & w)
{ {
*this = tvec4<T, P>(x, v(), w); *this = tvec4<T, P>(x, v(), w);
} }
template <int E0, int E1> template <int E0, int E1>
GLM_FUNC_DECL tvec4(_swizzle<2, T, P, tvec2<T, P>, E0, E1, -1, -2> const & v, T const & z, T const & w) tvec4(_swizzle<2, T, P, tvec2<T, P>, E0, E1, -1, -2> const & v, T const & z, T const & w)
{ {
*this = tvec4<T, P>(v(), z, w); *this = tvec4<T, P>(v(), z, w);
} }
template <int E0, int E1, int E2> template <int E0, int E1, int E2>
GLM_FUNC_DECL tvec4(_swizzle<3, T, P, tvec3<T, P>, E0, E1, E2, -1> const & v, T const & w) tvec4(_swizzle<3, T, P, tvec3<T, P>, E0, E1, E2, -1> const & v, T const & w)
{ {
*this = tvec4<T, P>(v(), w); *this = tvec4<T, P>(v(), w);
} }
template <int E0, int E1, int E2> template <int E0, int E1, int E2>
GLM_FUNC_DECL tvec4(T const & x, _swizzle<3, T, P, tvec3<T, P>, E0, E1, E2, -1> const & v) tvec4(T const & x, _swizzle<3, T, P, tvec3<T, P>, E0, E1, E2, -1> const & v)
{ {
*this = tvec4<T, P>(x, v()); *this = tvec4<T, P>(x, v());
} }
@ -206,165 +206,165 @@ namespace detail
////////////////////////////////////// //////////////////////////////////////
// Unary arithmetic operators // Unary arithmetic operators
GLM_FUNC_DECL tvec4<T, P> & operator= (tvec4<T, P> const & v); tvec4<T, P> & operator= (tvec4<T, P> const & v);
template <typename U, precision Q> template <typename U, precision Q>
GLM_FUNC_DECL tvec4<T, P> & operator= (tvec4<U, Q> const & v); tvec4<T, P> & operator= (tvec4<U, Q> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec4<T, P> & operator+=(U s); tvec4<T, P> & operator+=(U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec4<T, P> & operator+=(tvec4<U, P> const & v); tvec4<T, P> & operator+=(tvec4<U, P> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec4<T, P> & operator-=(U s); tvec4<T, P> & operator-=(U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec4<T, P> & operator-=(tvec4<U, P> const & v); tvec4<T, P> & operator-=(tvec4<U, P> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec4<T, P> & operator*=(U s); tvec4<T, P> & operator*=(U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec4<T, P> & operator*=(tvec4<U, P> const & v); tvec4<T, P> & operator*=(tvec4<U, P> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec4<T, P> & operator/=(U s); tvec4<T, P> & operator/=(U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec4<T, P> & operator/=(tvec4<U, P> const & v); tvec4<T, P> & operator/=(tvec4<U, P> const & v);
////////////////////////////////////// //////////////////////////////////////
// Increment and decrement operators // Increment and decrement operators
GLM_FUNC_DECL tvec4<T, P> & operator++(); tvec4<T, P> & operator++();
GLM_FUNC_DECL tvec4<T, P> & operator--(); tvec4<T, P> & operator--();
GLM_FUNC_DECL tvec4<T, P> operator++(int); tvec4<T, P> operator++(int);
GLM_FUNC_DECL tvec4<T, P> operator--(int); tvec4<T, P> operator--(int);
////////////////////////////////////// //////////////////////////////////////
// Unary bit operators // Unary bit operators
template <typename U> template <typename U>
GLM_FUNC_DECL tvec4<T, P> & operator%= (U s); tvec4<T, P> & operator%= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec4<T, P> & operator%= (tvec4<U, P> const & v); tvec4<T, P> & operator%= (tvec4<U, P> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec4<T, P> & operator&= (U s); tvec4<T, P> & operator&= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec4<T, P> & operator&= (tvec4<U, P> const & v); tvec4<T, P> & operator&= (tvec4<U, P> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec4<T, P> & operator|= (U s); tvec4<T, P> & operator|= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec4<T, P> & operator|= (tvec4<U, P> const & v); tvec4<T, P> & operator|= (tvec4<U, P> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec4<T, P> & operator^= (U s); tvec4<T, P> & operator^= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec4<T, P> & operator^= (tvec4<U, P> const & v); tvec4<T, P> & operator^= (tvec4<U, P> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec4<T, P> & operator<<=(U s); tvec4<T, P> & operator<<=(U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec4<T, P> & operator<<=(tvec4<U, P> const & v); tvec4<T, P> & operator<<=(tvec4<U, P> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec4<T, P> & operator>>=(U s); tvec4<T, P> & operator>>=(U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec4<T, P> & operator>>=(tvec4<U, P> const & v); tvec4<T, P> & operator>>=(tvec4<U, P> const & v);
}; };
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> operator+(tvec4<T, P> const & v, T const & s); tvec4<T, P> operator+(tvec4<T, P> const & v, T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> operator+(T const & s, tvec4<T, P> const & v); tvec4<T, P> operator+(T const & s, tvec4<T, P> const & v);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> operator+(tvec4<T, P> const & v1, tvec4<T, P> const & v2); tvec4<T, P> operator+(tvec4<T, P> const & v1, tvec4<T, P> const & v2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> operator-(tvec4<T, P> const & v, T const & s); tvec4<T, P> operator-(tvec4<T, P> const & v, T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> operator-(T const & s, tvec4<T, P> const & v); tvec4<T, P> operator-(T const & s, tvec4<T, P> const & v);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> operator- (tvec4<T, P> const & v1, tvec4<T, P> const & v2); tvec4<T, P> operator- (tvec4<T, P> const & v1, tvec4<T, P> const & v2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> operator*(tvec4<T, P> const & v, T const & s); tvec4<T, P> operator*(tvec4<T, P> const & v, T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> operator*(T const & s, tvec4<T, P> const & v); tvec4<T, P> operator*(T const & s, tvec4<T, P> const & v);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> operator*(tvec4<T, P> const & v1, tvec4<T, P> const & v2); tvec4<T, P> operator*(tvec4<T, P> const & v1, tvec4<T, P> const & v2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> operator/(tvec4<T, P> const & v, T const & s); tvec4<T, P> operator/(tvec4<T, P> const & v, T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> operator/(T const & s, tvec4<T, P> const & v); tvec4<T, P> operator/(T const & s, tvec4<T, P> const & v);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> operator/(tvec4<T, P> const & v1, tvec4<T, P> const & v2); tvec4<T, P> operator/(tvec4<T, P> const & v1, tvec4<T, P> const & v2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> operator-(tvec4<T, P> const & v); tvec4<T, P> operator-(tvec4<T, P> const & v);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL bool operator==(tvec4<T, P> const & v1, tvec4<T, P> const & v2); bool operator==(tvec4<T, P> const & v1, tvec4<T, P> const & v2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL bool operator!=(tvec4<T, P> const & v1, tvec4<T, P> const & v2); bool operator!=(tvec4<T, P> const & v1, tvec4<T, P> const & v2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> operator%(tvec4<T, P> const & v, T const & s); tvec4<T, P> operator%(tvec4<T, P> const & v, T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> operator%(T const & s, tvec4<T, P> const & v); tvec4<T, P> operator%(T const & s, tvec4<T, P> const & v);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> operator%(tvec4<T, P> const & v1, tvec4<T, P> const & v2); tvec4<T, P> operator%(tvec4<T, P> const & v1, tvec4<T, P> const & v2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> operator&(tvec4<T, P> const & v, T const & s); tvec4<T, P> operator&(tvec4<T, P> const & v, T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> operator&(T const & s, tvec4<T, P> const & v); tvec4<T, P> operator&(T const & s, tvec4<T, P> const & v);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> operator&(tvec4<T, P> const & v1, tvec4<T, P> const & v2); tvec4<T, P> operator&(tvec4<T, P> const & v1, tvec4<T, P> const & v2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> operator|(tvec4<T, P> const & v, T const & s); tvec4<T, P> operator|(tvec4<T, P> const & v, T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> operator|(T const & s, tvec4<T, P> const & v); tvec4<T, P> operator|(T const & s, tvec4<T, P> const & v);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> operator|(tvec4<T, P> const & v1, tvec4<T, P> const & v2); tvec4<T, P> operator|(tvec4<T, P> const & v1, tvec4<T, P> const & v2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> operator^(tvec4<T, P> const & v, T const & s); tvec4<T, P> operator^(tvec4<T, P> const & v, T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> operator^(T const & s, tvec4<T, P> const & v); tvec4<T, P> operator^(T const & s, tvec4<T, P> const & v);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> operator^(tvec4<T, P> const & v1, tvec4<T, P> const & v2); tvec4<T, P> operator^(tvec4<T, P> const & v1, tvec4<T, P> const & v2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> operator<<(tvec4<T, P> const & v, T const & s); tvec4<T, P> operator<<(tvec4<T, P> const & v, T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> operator<<(T const & s, tvec4<T, P> const & v); tvec4<T, P> operator<<(T const & s, tvec4<T, P> const & v);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> operator<<(tvec4<T, P> const & v1, tvec4<T, P> const & v2); tvec4<T, P> operator<<(tvec4<T, P> const & v1, tvec4<T, P> const & v2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> operator>>(tvec4<T, P> const & v, T const & s); tvec4<T, P> operator>>(tvec4<T, P> const & v, T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> operator>>(T const & s, tvec4<T, P> const & v); tvec4<T, P> operator>>(T const & s, tvec4<T, P> const & v);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> operator>>(tvec4<T, P> const & v1, tvec4<T, P> const & v2); tvec4<T, P> operator>>(tvec4<T, P> const & v1, tvec4<T, P> const & v2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> operator~(tvec4<T, P> const & v); tvec4<T, P> operator~(tvec4<T, P> const & v);
}//namespace detail }//namespace detail
}//namespace glm }//namespace glm

View File

@ -55,127 +55,127 @@ namespace glm
/// @todo Implement epsilon for half-precision floating point type. /// @todo Implement epsilon for half-precision floating point type.
/// @see gtc_constants /// @see gtc_constants
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType epsilon(); genType epsilon();
/// Return 0. /// Return 0.
/// @see gtc_constants /// @see gtc_constants
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType zero(); genType zero();
/// Return 1. /// Return 1.
/// @see gtc_constants /// @see gtc_constants
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType one(); genType one();
/// Return the pi constant. /// Return the pi constant.
/// @see gtc_constants /// @see gtc_constants
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType pi(); genType pi();
/// Return square root of pi. /// Return square root of pi.
/// @see gtc_constants /// @see gtc_constants
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType root_pi(); genType root_pi();
/// Return pi / 2. /// Return pi / 2.
/// @see gtc_constants /// @see gtc_constants
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType half_pi(); genType half_pi();
/// Return pi / 4. /// Return pi / 4.
/// @see gtc_constants /// @see gtc_constants
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType quarter_pi(); genType quarter_pi();
/// Return 1 / pi. /// Return 1 / pi.
/// @see gtc_constants /// @see gtc_constants
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType one_over_pi(); genType one_over_pi();
/// Return 2 / pi. /// Return 2 / pi.
/// @see gtc_constants /// @see gtc_constants
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType two_over_pi(); genType two_over_pi();
/// Return 2 / sqrt(pi). /// Return 2 / sqrt(pi).
/// @see gtc_constants /// @see gtc_constants
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType two_over_root_pi(); genType two_over_root_pi();
/// Return 1 / sqrt(2). /// Return 1 / sqrt(2).
/// @see gtc_constants /// @see gtc_constants
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType one_over_root_two(); genType one_over_root_two();
/// Return sqrt(pi / 2). /// Return sqrt(pi / 2).
/// @see gtc_constants /// @see gtc_constants
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType root_half_pi(); genType root_half_pi();
/// Return sqrt(2 * pi). /// Return sqrt(2 * pi).
/// @see gtc_constants /// @see gtc_constants
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType root_two_pi(); genType root_two_pi();
/// Return sqrt(ln(4)). /// Return sqrt(ln(4)).
/// @see gtc_constants /// @see gtc_constants
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType root_ln_four(); genType root_ln_four();
/// Return e constant. /// Return e constant.
/// @see gtc_constants /// @see gtc_constants
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType e(); genType e();
/// Return Euler's constant. /// Return Euler's constant.
/// @see gtc_constants /// @see gtc_constants
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType euler(); genType euler();
/// Return sqrt(2). /// Return sqrt(2).
/// @see gtc_constants /// @see gtc_constants
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType root_two(); genType root_two();
/// Return sqrt(3). /// Return sqrt(3).
/// @see gtc_constants /// @see gtc_constants
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType root_three(); genType root_three();
/// Return sqrt(5). /// Return sqrt(5).
/// @see gtc_constants /// @see gtc_constants
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType root_five(); genType root_five();
/// Return ln(2). /// Return ln(2).
/// @see gtc_constants /// @see gtc_constants
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType ln_two(); genType ln_two();
/// Return ln(10). /// Return ln(10).
/// @see gtc_constants /// @see gtc_constants
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType ln_ten(); genType ln_ten();
/// Return ln(ln(2)). /// Return ln(ln(2)).
/// @see gtc_constants /// @see gtc_constants
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType ln_ln_two(); genType ln_ln_two();
/// Return 1 / 3. /// Return 1 / 3.
/// @see gtc_constants /// @see gtc_constants
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType third(); genType third();
/// Return 2 / 3. /// Return 2 / 3.
/// @see gtc_constants /// @see gtc_constants
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType two_thirds(); genType two_thirds();
/// Return the golden ratio constant. /// Return the golden ratio constant.
/// @see gtc_constants /// @see gtc_constants
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType golden_ratio(); genType golden_ratio();
/// @} /// @}
} //namespace glm } //namespace glm

View File

@ -58,7 +58,7 @@ namespace glm
/// ///
/// @see gtc_epsilon /// @see gtc_epsilon
template <typename T, precision P, template <typename, precision> class vecType> template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL vecType<bool, P> epsilonEqual( vecType<bool, P> epsilonEqual(
vecType<T, P> const & x, vecType<T, P> const & x,
vecType<T, P> const & y, vecType<T, P> const & y,
T const & epsilon); T const & epsilon);
@ -68,7 +68,7 @@ namespace glm
/// ///
/// @see gtc_epsilon /// @see gtc_epsilon
template <typename genType> template <typename genType>
GLM_FUNC_DECL bool epsilonEqual( bool epsilonEqual(
genType const & x, genType const & x,
genType const & y, genType const & y,
genType const & epsilon); genType const & epsilon);
@ -78,7 +78,7 @@ namespace glm
/// ///
/// @see gtc_epsilon /// @see gtc_epsilon
template <typename genType> template <typename genType>
GLM_FUNC_DECL typename genType::boolType epsilonNotEqual( typename genType::boolType epsilonNotEqual(
genType const & x, genType const & x,
genType const & y, genType const & y,
typename genType::value_type const & epsilon); typename genType::value_type const & epsilon);
@ -88,7 +88,7 @@ namespace glm
/// ///
/// @see gtc_epsilon /// @see gtc_epsilon
template <typename genType> template <typename genType>
GLM_FUNC_DECL bool epsilonNotEqual( bool epsilonNotEqual(
genType const & x, genType const & x,
genType const & y, genType const & y,
genType const & epsilon); genType const & epsilon);

View File

@ -52,14 +52,14 @@ namespace glm
/// Get a specific row of a matrix. /// Get a specific row of a matrix.
/// @see gtc_matrix_access /// @see gtc_matrix_access
template <typename genType> template <typename genType>
GLM_FUNC_DECL typename genType::row_type row( typename genType::row_type row(
genType const & m, genType const & m,
length_t const & index); length_t const & index);
/// Set a specific row to a matrix. /// Set a specific row to a matrix.
/// @see gtc_matrix_access /// @see gtc_matrix_access
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType row( genType row(
genType const & m, genType const & m,
length_t const & index, length_t const & index,
typename genType::row_type const & x); typename genType::row_type const & x);
@ -67,14 +67,14 @@ namespace glm
/// Get a specific column of a matrix. /// Get a specific column of a matrix.
/// @see gtc_matrix_access /// @see gtc_matrix_access
template <typename genType> template <typename genType>
GLM_FUNC_DECL typename genType::col_type column( typename genType::col_type column(
genType const & m, genType const & m,
length_t const & index); length_t const & index);
/// Set a specific column to a matrix. /// Set a specific column to a matrix.
/// @see gtc_matrix_access /// @see gtc_matrix_access
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType column( genType column(
genType const & m, genType const & m,
length_t const & index, length_t const & index,
typename genType::col_type const & x); typename genType::col_type const & x);

View File

@ -55,7 +55,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. /// @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 /// @see gtc_matrix_inverse
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType affineInverse(genType const & m); genType affineInverse(genType const & m);
/// Compute the inverse transpose of a matrix. /// Compute the inverse transpose of a matrix.
/// ///
@ -63,7 +63,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. /// @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 /// @see gtc_matrix_inverse
template <typename genType> template <typename genType>
GLM_FUNC_DECL typename genType::value_type inverseTranspose( typename genType::value_type inverseTranspose(
genType const & m); genType const & m);
/// @} /// @}

View File

@ -82,7 +82,7 @@ namespace glm
/// @see - translate(detail::tmat4x4<T, P> const & m, T x, T y, T z) /// @see - translate(detail::tmat4x4<T, P> const & m, T x, T y, T z)
/// @see - translate(detail::tvec3<T, P> const & v) /// @see - translate(detail::tvec3<T, P> const & v)
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tmat4x4<T, P> translate( detail::tmat4x4<T, P> translate(
detail::tmat4x4<T, P> const & m, detail::tmat4x4<T, P> const & m,
detail::tvec3<T, P> const & v); detail::tvec3<T, P> const & v);
@ -98,7 +98,7 @@ namespace glm
/// @see - rotate(detail::tmat4x4<T, P> const & m, T angle, T x, T y, T z) /// @see - rotate(detail::tmat4x4<T, P> const & m, T angle, T x, T y, T z)
/// @see - rotate(T angle, detail::tvec3<T, P> const & v) /// @see - rotate(T angle, detail::tvec3<T, P> const & v)
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tmat4x4<T, P> rotate( detail::tmat4x4<T, P> rotate(
detail::tmat4x4<T, P> const & m, detail::tmat4x4<T, P> const & m,
T const & angle, T const & angle,
detail::tvec3<T, P> const & axis); detail::tvec3<T, P> const & axis);
@ -114,7 +114,7 @@ namespace glm
/// @see - scale(detail::tmat4x4<T, P> const & m, T x, T y, T z) /// @see - scale(detail::tmat4x4<T, P> const & m, T x, T y, T z)
/// @see - scale(detail::tvec3<T, P> const & v) /// @see - scale(detail::tvec3<T, P> const & v)
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tmat4x4<T, P> scale( detail::tmat4x4<T, P> scale(
detail::tmat4x4<T, P> const & m, detail::tmat4x4<T, P> const & m,
detail::tvec3<T, P> const & v); detail::tvec3<T, P> const & v);
@ -130,7 +130,7 @@ namespace glm
/// @see gtc_matrix_transform /// @see gtc_matrix_transform
/// @see - glm::ortho(T const & left, T const & right, T const & bottom, T const & top) /// @see - glm::ortho(T const & left, T const & right, T const & bottom, T const & top)
template <typename T> template <typename T>
GLM_FUNC_DECL detail::tmat4x4<T, defaultp> ortho( detail::tmat4x4<T, defaultp> ortho(
T const & left, T const & left,
T const & right, T const & right,
T const & bottom, T const & bottom,
@ -148,7 +148,7 @@ namespace glm
/// @see gtc_matrix_transform /// @see gtc_matrix_transform
/// @see - glm::ortho(T const & left, T const & right, T const & bottom, T const & top, T const & zNear, T const & zFar) /// @see - glm::ortho(T const & left, T const & right, T const & bottom, T const & top, T const & zNear, T const & zFar)
template <typename T> template <typename T>
GLM_FUNC_DECL detail::tmat4x4<T, defaultp> ortho( detail::tmat4x4<T, defaultp> ortho(
T const & left, T const & left,
T const & right, T const & right,
T const & bottom, T const & bottom,
@ -165,7 +165,7 @@ namespace glm
/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double. /// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
/// @see gtc_matrix_transform /// @see gtc_matrix_transform
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tmat4x4<T, P> frustum( detail::tmat4x4<T, P> frustum(
T const & left, T const & left,
T const & right, T const & right,
T const & bottom, T const & bottom,
@ -182,7 +182,7 @@ namespace glm
/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double. /// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
/// @see gtc_matrix_transform /// @see gtc_matrix_transform
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tmat4x4<T, P> perspective( detail::tmat4x4<T, P> perspective(
T const & fovy, T const & fovy,
T const & aspect, T const & aspect,
T const & near, T const & near,
@ -198,7 +198,7 @@ namespace glm
/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double. /// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
/// @see gtc_matrix_transform /// @see gtc_matrix_transform
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tmat4x4<T, P> perspectiveFov( detail::tmat4x4<T, P> perspectiveFov(
T const & fov, T const & fov,
T const & width, T const & width,
T const & height, T const & height,
@ -213,7 +213,7 @@ namespace glm
/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double. /// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
/// @see gtc_matrix_transform /// @see gtc_matrix_transform
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tmat4x4<T, P> infinitePerspective( detail::tmat4x4<T, P> infinitePerspective(
T fovy, T aspect, T near); T fovy, T aspect, T near);
/// Creates a matrix for a symmetric perspective-view frustum with far plane at infinite for graphics hardware that doesn't support depth clamping. /// Creates a matrix for a symmetric perspective-view frustum with far plane at infinite for graphics hardware that doesn't support depth clamping.
@ -224,7 +224,7 @@ namespace glm
/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double. /// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
/// @see gtc_matrix_transform /// @see gtc_matrix_transform
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tmat4x4<T, P> tweakedInfinitePerspective( detail::tmat4x4<T, P> tweakedInfinitePerspective(
T fovy, T aspect, T near); T fovy, T aspect, T near);
/// Map the specified object coordinates (obj.x, obj.y, obj.z) into window coordinates. /// Map the specified object coordinates (obj.x, obj.y, obj.z) into window coordinates.
@ -237,7 +237,7 @@ namespace glm
/// @tparam U Currently supported: Floating-point types and integer types. /// @tparam U Currently supported: Floating-point types and integer types.
/// @see gtc_matrix_transform /// @see gtc_matrix_transform
template <typename T, typename U, precision P> template <typename T, typename U, precision P>
GLM_FUNC_DECL detail::tvec3<T, P> project( detail::tvec3<T, P> project(
detail::tvec3<T, P> const & obj, detail::tvec3<T, P> const & obj,
detail::tmat4x4<T, P> const & model, detail::tmat4x4<T, P> const & model,
detail::tmat4x4<T, P> const & proj, detail::tmat4x4<T, P> const & proj,
@ -253,7 +253,7 @@ namespace glm
/// @tparam U Currently supported: Floating-point types and integer types. /// @tparam U Currently supported: Floating-point types and integer types.
/// @see gtc_matrix_transform /// @see gtc_matrix_transform
template <typename T, typename U, precision P> template <typename T, typename U, precision P>
GLM_FUNC_DECL detail::tvec3<T, P> unProject( detail::tvec3<T, P> unProject(
detail::tvec3<T, P> const & win, detail::tvec3<T, P> const & win,
detail::tmat4x4<T, P> const & model, detail::tmat4x4<T, P> const & model,
detail::tmat4x4<T, P> const & proj, detail::tmat4x4<T, P> const & proj,
@ -268,7 +268,7 @@ namespace glm
/// @tparam U Currently supported: Floating-point types and integer types. /// @tparam U Currently supported: Floating-point types and integer types.
/// @see gtc_matrix_transform /// @see gtc_matrix_transform
template <typename T, precision P, typename U> template <typename T, precision P, typename U>
GLM_FUNC_DECL detail::tmat4x4<T, P> pickMatrix( detail::tmat4x4<T, P> pickMatrix(
detail::tvec2<T, P> const & center, detail::tvec2<T, P> const & center,
detail::tvec2<T, P> const & delta, detail::tvec2<T, P> const & delta,
detail::tvec4<U, P> const & viewport); detail::tvec4<U, P> const & viewport);
@ -281,7 +281,7 @@ namespace glm
/// @see gtc_matrix_transform /// @see gtc_matrix_transform
/// @see - frustum(T const & left, T const & right, T const & bottom, T const & top, T const & nearVal, T const & farVal) frustum(T const & left, T const & right, T const & bottom, T const & top, T const & nearVal, T const & farVal) /// @see - frustum(T const & left, T const & right, T const & bottom, T const & top, T const & nearVal, T const & farVal) frustum(T const & left, T const & right, T const & bottom, T const & top, T const & nearVal, T const & farVal)
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tmat4x4<T, P> lookAt( detail::tmat4x4<T, P> lookAt(
detail::tvec3<T, P> const & eye, detail::tvec3<T, P> const & eye,
detail::tvec3<T, P> const & center, detail::tvec3<T, P> const & center,
detail::tvec3<T, P> const & up); detail::tvec3<T, P> const & up);

View File

@ -57,20 +57,20 @@ namespace glm
/// Classic perlin noise. /// Classic perlin noise.
/// @see gtc_noise /// @see gtc_noise
template <typename T, precision P, template<typename, precision> class vecType> template <typename T, precision P, template<typename, precision> class vecType>
GLM_FUNC_DECL T perlin( T perlin(
vecType<T, P> const & p); vecType<T, P> const & p);
/// Periodic perlin noise. /// Periodic perlin noise.
/// @see gtc_noise /// @see gtc_noise
template <typename T, precision P, template<typename, precision> class vecType> template <typename T, precision P, template<typename, precision> class vecType>
GLM_FUNC_DECL T perlin( T perlin(
vecType<T, P> const & p, vecType<T, P> const & p,
vecType<T, P> const & rep); vecType<T, P> const & rep);
/// Simplex noise. /// Simplex noise.
/// @see gtc_noise /// @see gtc_noise
template <typename T, precision P, template<typename, precision> class vecType> template <typename T, precision P, template<typename, precision> class vecType>
GLM_FUNC_DECL T simplex( T simplex(
vecType<T, P> const & p); vecType<T, P> const & p);
/// @} /// @}

View File

@ -62,7 +62,7 @@ namespace glm
/// @see uint32 packUnorm4x8(vec4 const & v) /// @see uint32 packUnorm4x8(vec4 const & v)
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packUnorm4x8.xml">GLSL packUnorm4x8 man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packUnorm4x8.xml">GLSL packUnorm4x8 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
GLM_FUNC_DECL uint8 packUnorm1x8(float const & v); uint8 packUnorm1x8(float const & v);
/// Convert a single 8-bit integer to a normalized floating-point value. /// Convert a single 8-bit integer to a normalized floating-point value.
/// ///
@ -74,7 +74,7 @@ namespace glm
/// @see vec4 unpackUnorm4x8(uint32 p) /// @see vec4 unpackUnorm4x8(uint32 p)
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackUnorm4x8.xml">GLSL unpackUnorm4x8 man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackUnorm4x8.xml">GLSL unpackUnorm4x8 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
GLM_FUNC_DECL float unpackUnorm1x8(uint8 const & p); float unpackUnorm1x8(uint8 const & p);
/// First, converts each component of the normalized floating-point value v into 8-bit integer values. /// 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. /// Then, the results are packed into the returned 16-bit unsigned integer.
@ -90,7 +90,7 @@ namespace glm
/// @see uint32 packUnorm4x8(vec4 const & v) /// @see uint32 packUnorm4x8(vec4 const & v)
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packUnorm4x8.xml">GLSL packUnorm4x8 man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packUnorm4x8.xml">GLSL packUnorm4x8 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
GLM_FUNC_DECL uint16 packUnorm2x8(vec2 const & v); uint16 packUnorm2x8(vec2 const & v);
/// First, unpacks a single 16-bit unsigned integer p into a pair of 8-bit unsigned integers. /// 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. /// Then, each component is converted to a normalized floating-point value to generate the returned two-component vector.
@ -106,7 +106,7 @@ namespace glm
/// @see vec4 unpackUnorm4x8(uint32 p) /// @see vec4 unpackUnorm4x8(uint32 p)
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackUnorm4x8.xml">GLSL unpackUnorm4x8 man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackUnorm4x8.xml">GLSL unpackUnorm4x8 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
GLM_FUNC_DECL vec2 unpackUnorm2x8(uint16 const & p); vec2 unpackUnorm2x8(uint16 const & p);
/// First, converts the normalized floating-point value v into 8-bit integer value. /// 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. /// Then, the results are packed into the returned 8-bit unsigned integer.
@ -119,7 +119,7 @@ namespace glm
/// @see uint32 packSnorm4x8(vec4 const & v) /// @see uint32 packSnorm4x8(vec4 const & v)
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packSnorm4x8.xml">GLSL packSnorm4x8 man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packSnorm4x8.xml">GLSL packSnorm4x8 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
GLM_FUNC_DECL uint8 packSnorm1x8(float const & s); uint8 packSnorm1x8(float const & s);
/// First, unpacks a single 8-bit unsigned integer p into a single 8-bit signed integers. /// 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. /// Then, the value is converted to a normalized floating-point value to generate the returned scalar.
@ -132,7 +132,7 @@ namespace glm
/// @see vec4 unpackSnorm4x8(uint32 p) /// @see vec4 unpackSnorm4x8(uint32 p)
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackSnorm4x8.xml">GLSL unpackSnorm4x8 man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackSnorm4x8.xml">GLSL unpackSnorm4x8 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
GLM_FUNC_DECL float unpackSnorm1x8(uint8 const & p); float unpackSnorm1x8(uint8 const & p);
/// First, converts each component of the normalized floating-point value v into 8-bit integer values. /// 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. /// Then, the results are packed into the returned 16-bit unsigned integer.
@ -148,7 +148,7 @@ namespace glm
/// @see uint32 packSnorm4x8(vec4 const & v) /// @see uint32 packSnorm4x8(vec4 const & v)
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packSnorm4x8.xml">GLSL packSnorm4x8 man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packSnorm4x8.xml">GLSL packSnorm4x8 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
GLM_FUNC_DECL uint16 packSnorm2x8(vec2 const & v); uint16 packSnorm2x8(vec2 const & v);
/// First, unpacks a single 16-bit unsigned integer p into a pair of 8-bit signed integers. /// 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. /// Then, each component is converted to a normalized floating-point value to generate the returned two-component vector.
@ -164,7 +164,7 @@ namespace glm
/// @see vec4 unpackSnorm4x8(uint32 p) /// @see vec4 unpackSnorm4x8(uint32 p)
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackSnorm4x8.xml">GLSL unpackSnorm4x8 man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackSnorm4x8.xml">GLSL unpackSnorm4x8 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
GLM_FUNC_DECL vec2 unpackSnorm2x8(uint16 const & p); vec2 unpackSnorm2x8(uint16 const & p);
/// First, converts the normalized floating-point value v into a 16-bit integer value. /// 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. /// Then, the results are packed into the returned 16-bit unsigned integer.
@ -177,7 +177,7 @@ namespace glm
/// @see uint64 packSnorm4x16(vec4 const & v) /// @see uint64 packSnorm4x16(vec4 const & v)
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packUnorm4x8.xml">GLSL packUnorm4x8 man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packUnorm4x8.xml">GLSL packUnorm4x8 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
GLM_FUNC_DECL uint16 packUnorm1x16(float const & v); uint16 packUnorm1x16(float const & v);
/// First, unpacks a single 16-bit unsigned integer p into a of 16-bit unsigned integers. /// 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. /// Then, the value is converted to a normalized floating-point value to generate the returned scalar.
@ -190,7 +190,7 @@ namespace glm
/// @see vec4 unpackUnorm4x16(uint64 p) /// @see vec4 unpackUnorm4x16(uint64 p)
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackUnorm2x16.xml">GLSL unpackUnorm2x16 man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackUnorm2x16.xml">GLSL unpackUnorm2x16 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
GLM_FUNC_DECL float unpackUnorm1x16(uint16 const & p); float unpackUnorm1x16(uint16 const & p);
/// First, converts each component of the normalized floating-point value v into 16-bit integer values. /// 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. /// Then, the results are packed into the returned 64-bit unsigned integer.
@ -206,7 +206,7 @@ namespace glm
/// @see uint32 packUnorm2x16(vec2 const & v) /// @see uint32 packUnorm2x16(vec2 const & v)
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packUnorm4x8.xml">GLSL packUnorm4x8 man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packUnorm4x8.xml">GLSL packUnorm4x8 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
GLM_FUNC_DECL uint64 packUnorm4x16(vec4 const & v); uint64 packUnorm4x16(vec4 const & v);
/// First, unpacks a single 64-bit unsigned integer p into four 16-bit unsigned integers. /// 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. /// Then, each component is converted to a normalized floating-point value to generate the returned four-component vector.
@ -222,7 +222,7 @@ namespace glm
/// @see vec2 unpackUnorm2x16(uint32 p) /// @see vec2 unpackUnorm2x16(uint32 p)
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackUnorm2x16.xml">GLSL unpackUnorm2x16 man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackUnorm2x16.xml">GLSL unpackUnorm2x16 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
GLM_FUNC_DECL vec4 unpackUnorm4x16(uint64 const & p); vec4 unpackUnorm4x16(uint64 const & p);
/// First, converts the normalized floating-point value v into 16-bit integer value. /// 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. /// Then, the results are packed into the returned 16-bit unsigned integer.
@ -235,7 +235,7 @@ namespace glm
/// @see uint64 packSnorm4x16(vec4 const & v) /// @see uint64 packSnorm4x16(vec4 const & v)
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packSnorm4x8.xml">GLSL packSnorm4x8 man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packSnorm4x8.xml">GLSL packSnorm4x8 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
GLM_FUNC_DECL uint16 packSnorm1x16(float const & v); uint16 packSnorm1x16(float const & v);
/// First, unpacks a single 16-bit unsigned integer p into a single 16-bit signed integers. /// 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. /// Then, each component is converted to a normalized floating-point value to generate the returned scalar.
@ -248,7 +248,7 @@ namespace glm
/// @see vec4 unpackSnorm4x16(uint64 p) /// @see vec4 unpackSnorm4x16(uint64 p)
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackSnorm1x16.xml">GLSL unpackSnorm4x8 man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackSnorm1x16.xml">GLSL unpackSnorm4x8 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
GLM_FUNC_DECL float unpackSnorm1x16(uint16 const & p); float unpackSnorm1x16(uint16 const & p);
/// First, converts each component of the normalized floating-point value v into 16-bit integer values. /// 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. /// Then, the results are packed into the returned 64-bit unsigned integer.
@ -264,7 +264,7 @@ namespace glm
/// @see uint32 packSnorm2x16(vec2 const & v) /// @see uint32 packSnorm2x16(vec2 const & v)
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packSnorm4x8.xml">GLSL packSnorm4x8 man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packSnorm4x8.xml">GLSL packSnorm4x8 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
GLM_FUNC_DECL uint64 packSnorm4x16(vec4 const & v); uint64 packSnorm4x16(vec4 const & v);
/// First, unpacks a single 64-bit unsigned integer p into four 16-bit signed integers. /// 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. /// Then, each component is converted to a normalized floating-point value to generate the returned four-component vector.
@ -280,7 +280,7 @@ namespace glm
/// @see vec2 unpackSnorm2x16(uint32 p) /// @see vec2 unpackSnorm2x16(uint32 p)
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackSnorm2x16.xml">GLSL unpackSnorm4x8 man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackSnorm2x16.xml">GLSL unpackSnorm4x8 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
GLM_FUNC_DECL vec4 unpackSnorm4x16(uint64 const & p); vec4 unpackSnorm4x16(uint64 const & p);
/// Returns an unsigned integer obtained by converting the components of a floating-point scalar /// 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, /// to the 16-bit floating-point representation found in the OpenGL Specification,
@ -291,7 +291,7 @@ namespace glm
/// @see uint64 packHalf4x16(vec4 const & v) /// @see uint64 packHalf4x16(vec4 const & v)
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packHalf2x16.xml">GLSL packHalf2x16 man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packHalf2x16.xml">GLSL packHalf2x16 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
GLM_FUNC_DECL uint16 packHalf1x16(float const & v); uint16 packHalf1x16(float const & v);
/// Returns a floating-point scalar with components obtained by unpacking a 16-bit unsigned integer into a 16-bit value, /// 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, /// interpreted as a 16-bit floating-point number according to the OpenGL Specification,
@ -302,7 +302,7 @@ namespace glm
/// @see vec4 unpackHalf4x16(uint64 const & v) /// @see vec4 unpackHalf4x16(uint64 const & v)
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackHalf2x16.xml">GLSL unpackHalf2x16 man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackHalf2x16.xml">GLSL unpackHalf2x16 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
GLM_FUNC_DECL float unpackHalf1x16(uint16 const & v); float unpackHalf1x16(uint16 const & v);
/// Returns an unsigned integer obtained by converting the components of a four-component floating-point vector /// 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, /// to the 16-bit floating-point representation found in the OpenGL Specification,
@ -315,7 +315,7 @@ namespace glm
/// @see uint32 packHalf2x16(vec2 const & v) /// @see uint32 packHalf2x16(vec2 const & v)
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packHalf2x16.xml">GLSL packHalf2x16 man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packHalf2x16.xml">GLSL packHalf2x16 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
GLM_FUNC_DECL uint64 packHalf4x16(vec4 const & v); uint64 packHalf4x16(vec4 const & v);
/// Returns a four-component floating-point vector with components obtained by unpacking a 64-bit unsigned integer into four 16-bit values, /// 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, /// interpreting those values as 16-bit floating-point numbers according to the OpenGL Specification,
@ -328,7 +328,7 @@ namespace glm
/// @see vec2 unpackHalf2x16(uint32 const & v) /// @see vec2 unpackHalf2x16(uint32 const & v)
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackHalf2x16.xml">GLSL unpackHalf2x16 man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackHalf2x16.xml">GLSL unpackHalf2x16 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
GLM_FUNC_DECL vec4 unpackHalf4x16(uint64 const & p); vec4 unpackHalf4x16(uint64 const & p);
/// Returns an unsigned integer obtained by converting the components of a four-component signed integer vector /// 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, /// to the 10-10-10-2-bit signed integer representation found in the OpenGL Specification,
@ -341,7 +341,7 @@ namespace glm
/// @see uint32 packSnorm3x10_1x2(vec4 const & v) /// @see uint32 packSnorm3x10_1x2(vec4 const & v)
/// @see uint32 packUnorm3x10_1x2(vec4 const & v) /// @see uint32 packUnorm3x10_1x2(vec4 const & v)
/// @see ivec4 unpackI3x10_1x2(uint32 const & p) /// @see ivec4 unpackI3x10_1x2(uint32 const & p)
GLM_FUNC_DECL uint32 packI3x10_1x2(ivec4 const & v); uint32 packI3x10_1x2(ivec4 const & v);
/// Unpacks a single 32-bit unsigned integer p into three 10-bit and one 2-bit signed integers. /// Unpacks a single 32-bit unsigned integer p into three 10-bit and one 2-bit signed integers.
/// ///
@ -352,7 +352,7 @@ namespace glm
/// @see uint32 packU3x10_1x2(uvec4 const & v) /// @see uint32 packU3x10_1x2(uvec4 const & v)
/// @see vec4 unpackSnorm3x10_1x2(uint32 const & p); /// @see vec4 unpackSnorm3x10_1x2(uint32 const & p);
/// @see uvec4 unpackI3x10_1x2(uint32 const & p); /// @see uvec4 unpackI3x10_1x2(uint32 const & p);
GLM_FUNC_DECL ivec4 unpackI3x10_1x2(uint32 const & p); ivec4 unpackI3x10_1x2(uint32 const & p);
/// Returns an unsigned integer obtained by converting the components of a four-component unsigned integer vector /// 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, /// to the 10-10-10-2-bit unsigned integer representation found in the OpenGL Specification,
@ -365,7 +365,7 @@ namespace glm
/// @see uint32 packSnorm3x10_1x2(vec4 const & v) /// @see uint32 packSnorm3x10_1x2(vec4 const & v)
/// @see uint32 packUnorm3x10_1x2(vec4 const & v) /// @see uint32 packUnorm3x10_1x2(vec4 const & v)
/// @see ivec4 unpackU3x10_1x2(uint32 const & p) /// @see ivec4 unpackU3x10_1x2(uint32 const & p)
GLM_FUNC_DECL uint32 packU3x10_1x2(uvec4 const & v); uint32 packU3x10_1x2(uvec4 const & v);
/// Unpacks a single 32-bit unsigned integer p into three 10-bit and one 2-bit unsigned integers. /// Unpacks a single 32-bit unsigned integer p into three 10-bit and one 2-bit unsigned integers.
/// ///
@ -376,7 +376,7 @@ namespace glm
/// @see uint32 packU3x10_1x2(uvec4 const & v) /// @see uint32 packU3x10_1x2(uvec4 const & v)
/// @see vec4 unpackSnorm3x10_1x2(uint32 const & p); /// @see vec4 unpackSnorm3x10_1x2(uint32 const & p);
/// @see uvec4 unpackI3x10_1x2(uint32 const & p); /// @see uvec4 unpackI3x10_1x2(uint32 const & p);
GLM_FUNC_DECL uvec4 unpackU3x10_1x2(uint32 const & p); uvec4 unpackU3x10_1x2(uint32 const & p);
/// First, converts the first three components of the normalized floating-point value v into 10-bit signed integer values. /// 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. /// Then, converts the forth component of the normalized floating-point value v into 2-bit signed integer values.
@ -394,7 +394,7 @@ namespace glm
/// @see uint32 packUnorm3x10_1x2(vec4 const & v) /// @see uint32 packUnorm3x10_1x2(vec4 const & v)
/// @see uint32 packU3x10_1x2(uvec4 const & v) /// @see uint32 packU3x10_1x2(uvec4 const & v)
/// @see uint32 packI3x10_1x2(ivec4 const & v) /// @see uint32 packI3x10_1x2(ivec4 const & v)
GLM_FUNC_DECL uint32 packSnorm3x10_1x2(vec4 const & v); uint32 packSnorm3x10_1x2(vec4 const & v);
/// First, unpacks a single 32-bit unsigned integer p into four 16-bit signed integers. /// 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. /// Then, each component is converted to a normalized floating-point value to generate the returned four-component vector.
@ -411,7 +411,7 @@ namespace glm
/// @see vec4 unpackUnorm3x10_1x2(uint32 const & p)) /// @see vec4 unpackUnorm3x10_1x2(uint32 const & p))
/// @see uvec4 unpackI3x10_1x2(uint32 const & p) /// @see uvec4 unpackI3x10_1x2(uint32 const & p)
/// @see uvec4 unpackU3x10_1x2(uint32 const & p) /// @see uvec4 unpackU3x10_1x2(uint32 const & p)
GLM_FUNC_DECL vec4 unpackSnorm3x10_1x2(uint32 const & p); vec4 unpackSnorm3x10_1x2(uint32 const & p);
/// First, converts the first three components of the normalized floating-point value v into 10-bit unsigned integer values. /// 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. /// Then, converts the forth component of the normalized floating-point value v into 2-bit signed uninteger values.
@ -429,7 +429,7 @@ namespace glm
/// @see uint32 packUnorm3x10_1x2(vec4 const & v) /// @see uint32 packUnorm3x10_1x2(vec4 const & v)
/// @see uint32 packU3x10_1x2(uvec4 const & v) /// @see uint32 packU3x10_1x2(uvec4 const & v)
/// @see uint32 packI3x10_1x2(ivec4 const & v) /// @see uint32 packI3x10_1x2(ivec4 const & v)
GLM_FUNC_DECL uint32 packUnorm3x10_1x2(vec4 const & v); uint32 packUnorm3x10_1x2(vec4 const & v);
/// First, unpacks a single 32-bit unsigned integer p into four 16-bit signed integers. /// 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. /// Then, each component is converted to a normalized floating-point value to generate the returned four-component vector.
@ -446,7 +446,7 @@ namespace glm
/// @see vec4 unpackInorm3x10_1x2(uint32 const & p)) /// @see vec4 unpackInorm3x10_1x2(uint32 const & p))
/// @see uvec4 unpackI3x10_1x2(uint32 const & p) /// @see uvec4 unpackI3x10_1x2(uint32 const & p)
/// @see uvec4 unpackU3x10_1x2(uint32 const & p) /// @see uvec4 unpackU3x10_1x2(uint32 const & p)
GLM_FUNC_DECL vec4 unpackUnorm3x10_1x2(uint32 const & p); vec4 unpackUnorm3x10_1x2(uint32 const & p);
/// First, converts the first two components of the normalized floating-point value v into 11-bit signless floating-point values. /// 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. /// Then, converts the third component of the normalized floating-point value v into a 10-bit signless floating-point value.
@ -457,7 +457,7 @@ namespace glm
/// ///
/// @see gtc_packing /// @see gtc_packing
/// @see vec3 unpackF2x11_1x10(uint32 const & p) /// @see vec3 unpackF2x11_1x10(uint32 const & p)
GLM_FUNC_DECL uint32 packF2x11_1x10(vec3 const & v); uint32 packF2x11_1x10(vec3 const & v);
/// 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 . /// 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. /// Then, each component is converted to a normalized floating-point value to generate the returned three-component vector.
@ -467,7 +467,7 @@ namespace glm
/// ///
/// @see gtc_packing /// @see gtc_packing
/// @see uint32 packF2x11_1x10(vec3 const & v) /// @see uint32 packF2x11_1x10(vec3 const & v)
GLM_FUNC_DECL vec3 unpackF2x11_1x10(uint32 const & p); vec3 unpackF2x11_1x10(uint32 const & p);
/// @} /// @}
}// namespace glm }// namespace glm

View File

@ -64,17 +64,17 @@ namespace detail
public: public:
T x, y, z, w; T x, y, z, w;
GLM_FUNC_DECL length_t length() const; length_t length() const;
// Constructors // Constructors
GLM_FUNC_DECL tquat(); tquat();
template <typename U, precision Q> template <typename U, precision Q>
GLM_FUNC_DECL explicit tquat( explicit tquat(
tquat<U, Q> const & q); tquat<U, Q> const & q);
GLM_FUNC_DECL tquat( tquat(
T const & s, T const & s,
tvec3<T, P> const & v); tvec3<T, P> const & v);
GLM_FUNC_DECL tquat( tquat(
T const & w, T const & w,
T const & x, T const & x,
T const & y, T const & y,
@ -88,74 +88,74 @@ namespace detail
/// @param v A second normalized axis /// @param v A second normalized axis
/// @see gtc_quaternion /// @see gtc_quaternion
/// @see http://lolengine.net/blog/2013/09/18/beautiful-maths-quaternion-from-vectors /// @see http://lolengine.net/blog/2013/09/18/beautiful-maths-quaternion-from-vectors
GLM_FUNC_DECL explicit tquat( explicit tquat(
detail::tvec3<T, P> const & u, detail::tvec3<T, P> const & u,
detail::tvec3<T, P> const & v); detail::tvec3<T, P> const & v);
/// Build a quaternion from euler angles (pitch, yaw, roll), in radians. /// Build a quaternion from euler angles (pitch, yaw, roll), in radians.
GLM_FUNC_DECL explicit tquat( explicit tquat(
tvec3<T, P> const & eulerAngles); tvec3<T, P> const & eulerAngles);
GLM_FUNC_DECL explicit tquat( explicit tquat(
tmat3x3<T, P> const & m); tmat3x3<T, P> const & m);
GLM_FUNC_DECL explicit tquat( explicit tquat(
tmat4x4<T, P> const & m); tmat4x4<T, P> const & m);
// Accesses // Accesses
GLM_FUNC_DECL T & operator[](length_t i); T & operator[](length_t i);
GLM_FUNC_DECL T const & operator[](length_t i) const; T const & operator[](length_t i) const;
// Operators // Operators
GLM_FUNC_DECL tquat<T, P> & operator+=(tquat<T, P> const & q); tquat<T, P> & operator+=(tquat<T, P> const & q);
GLM_FUNC_DECL tquat<T, P> & operator*=(tquat<T, P> const & q); tquat<T, P> & operator*=(tquat<T, P> const & q);
GLM_FUNC_DECL tquat<T, P> & operator*=(T const & s); tquat<T, P> & operator*=(T const & s);
GLM_FUNC_DECL tquat<T, P> & operator/=(T const & s); tquat<T, P> & operator/=(T const & s);
}; };
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tquat<T, P> operator- ( detail::tquat<T, P> operator- (
detail::tquat<T, P> const & q); detail::tquat<T, P> const & q);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tquat<T, P> operator+ ( detail::tquat<T, P> operator+ (
detail::tquat<T, P> const & q, detail::tquat<T, P> const & q,
detail::tquat<T, P> const & p); detail::tquat<T, P> const & p);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tquat<T, P> operator* ( detail::tquat<T, P> operator* (
detail::tquat<T, P> const & q, detail::tquat<T, P> const & q,
detail::tquat<T, P> const & p); detail::tquat<T, P> const & p);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tvec3<T, P> operator* ( detail::tvec3<T, P> operator* (
detail::tquat<T, P> const & q, detail::tquat<T, P> const & q,
detail::tvec3<T, P> const & v); detail::tvec3<T, P> const & v);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tvec3<T, P> operator* ( detail::tvec3<T, P> operator* (
detail::tvec3<T, P> const & v, detail::tvec3<T, P> const & v,
detail::tquat<T, P> const & q); detail::tquat<T, P> const & q);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tvec4<T, P> operator* ( detail::tvec4<T, P> operator* (
detail::tquat<T, P> const & q, detail::tquat<T, P> const & q,
detail::tvec4<T, P> const & v); detail::tvec4<T, P> const & v);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tvec4<T, P> operator* ( detail::tvec4<T, P> operator* (
detail::tvec4<T, P> const & v, detail::tvec4<T, P> const & v,
detail::tquat<T, P> const & q); detail::tquat<T, P> const & q);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tquat<T, P> operator* ( detail::tquat<T, P> operator* (
detail::tquat<T, P> const & q, detail::tquat<T, P> const & q,
T const & s); T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tquat<T, P> operator* ( detail::tquat<T, P> operator* (
T const & s, T const & s,
detail::tquat<T, P> const & q); detail::tquat<T, P> const & q);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tquat<T, P> operator/ ( detail::tquat<T, P> operator/ (
detail::tquat<T, P> const & q, detail::tquat<T, P> const & q,
T const & s); T const & s);
@ -168,21 +168,21 @@ namespace detail
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL T length( T length(
detail::tquat<T, P> const & q); detail::tquat<T, P> const & q);
/// Returns the normalized quaternion. /// Returns the normalized quaternion.
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tquat<T, P> normalize( detail::tquat<T, P> normalize(
detail::tquat<T, P> const & q); detail::tquat<T, P> const & q);
/// Returns dot product of q1 and q2, i.e., q1[0] * q2[0] + q1[1] * q2[1] + ... /// Returns dot product of q1 and q2, i.e., q1[0] * q2[0] + q1[1] * q2[1] + ...
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
template <typename T, precision P, template <typename, precision> class quatType> template <typename T, precision P, template <typename, precision> class quatType>
GLM_FUNC_DECL T dot( T dot(
quatType<T, P> const & x, quatType<T, P> const & x,
quatType<T, P> const & y); quatType<T, P> const & y);
@ -197,7 +197,7 @@ namespace detail
/// @see gtc_quaternion /// @see gtc_quaternion
/// @see - slerp(detail::tquat<T, P> const & x, detail::tquat<T, P> const & y, T const & a) /// @see - slerp(detail::tquat<T, P> const & x, detail::tquat<T, P> const & y, T const & a)
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tquat<T, P> mix( detail::tquat<T, P> mix(
detail::tquat<T, P> const & x, detail::tquat<T, P> const & x,
detail::tquat<T, P> const & y, detail::tquat<T, P> const & y,
T const & a); T const & a);
@ -211,7 +211,7 @@ namespace detail
/// @tparam T Value type used to build the quaternion. Supported: half, float or double. /// @tparam T Value type used to build the quaternion. Supported: half, float or double.
/// @see gtc_quaternion /// @see gtc_quaternion
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tquat<T, P> lerp( detail::tquat<T, P> lerp(
detail::tquat<T, P> const & x, detail::tquat<T, P> const & x,
detail::tquat<T, P> const & y, detail::tquat<T, P> const & y,
T const & a); T const & a);
@ -225,7 +225,7 @@ namespace detail
/// @tparam T Value type used to build the quaternion. Supported: half, float or double. /// @tparam T Value type used to build the quaternion. Supported: half, float or double.
/// @see gtc_quaternion /// @see gtc_quaternion
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tquat<T, P> slerp( detail::tquat<T, P> slerp(
detail::tquat<T, P> const & x, detail::tquat<T, P> const & x,
detail::tquat<T, P> const & y, detail::tquat<T, P> const & y,
T const & a); T const & a);
@ -234,14 +234,14 @@ namespace detail
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tquat<T, P> conjugate( detail::tquat<T, P> conjugate(
detail::tquat<T, P> const & q); detail::tquat<T, P> const & q);
/// Returns the q inverse. /// Returns the q inverse.
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tquat<T, P> inverse( detail::tquat<T, P> inverse(
detail::tquat<T, P> const & q); detail::tquat<T, P> const & q);
/// Rotates a quaternion from a vector of 3 components axis and an angle. /// Rotates a quaternion from a vector of 3 components axis and an angle.
@ -252,7 +252,7 @@ namespace detail
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tquat<T, P> rotate( detail::tquat<T, P> rotate(
detail::tquat<T, P> const & q, detail::tquat<T, P> const & q,
T const & angle, T const & angle,
detail::tvec3<T, P> const & axis); detail::tvec3<T, P> const & axis);
@ -262,66 +262,66 @@ namespace detail
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tvec3<T, P> eulerAngles( detail::tvec3<T, P> eulerAngles(
detail::tquat<T, P> const & x); detail::tquat<T, P> const & x);
/// Returns roll value of euler angles expressed in radians if GLM_FORCE_RADIANS is defined or degrees otherwise. /// Returns roll value of euler angles expressed in radians if GLM_FORCE_RADIANS is defined or degrees otherwise.
/// ///
/// @see gtx_quaternion /// @see gtx_quaternion
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL T roll(detail::tquat<T, P> const & x); T roll(detail::tquat<T, P> const & x);
/// Returns pitch value of euler angles expressed in radians if GLM_FORCE_RADIANS is defined or degrees otherwise. /// Returns pitch value of euler angles expressed in radians if GLM_FORCE_RADIANS is defined or degrees otherwise.
/// ///
/// @see gtx_quaternion /// @see gtx_quaternion
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL T pitch(detail::tquat<T, P> const & x); T pitch(detail::tquat<T, P> const & x);
/// Returns yaw value of euler angles expressed in radians if GLM_FORCE_RADIANS is defined or degrees otherwise. /// Returns yaw value of euler angles expressed in radians if GLM_FORCE_RADIANS is defined or degrees otherwise.
/// ///
/// @see gtx_quaternion /// @see gtx_quaternion
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL T yaw(detail::tquat<T, P> const & x); T yaw(detail::tquat<T, P> const & x);
/// Converts a quaternion to a 3 * 3 matrix. /// Converts a quaternion to a 3 * 3 matrix.
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tmat3x3<T, P> mat3_cast( detail::tmat3x3<T, P> mat3_cast(
detail::tquat<T, P> const & x); detail::tquat<T, P> const & x);
/// Converts a quaternion to a 4 * 4 matrix. /// Converts a quaternion to a 4 * 4 matrix.
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tmat4x4<T, P> mat4_cast( detail::tmat4x4<T, P> mat4_cast(
detail::tquat<T, P> const & x); detail::tquat<T, P> const & x);
/// Converts a 3 * 3 matrix to a quaternion. /// Converts a 3 * 3 matrix to a quaternion.
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tquat<T, P> quat_cast( detail::tquat<T, P> quat_cast(
detail::tmat3x3<T, P> const & x); detail::tmat3x3<T, P> const & x);
/// Converts a 4 * 4 matrix to a quaternion. /// Converts a 4 * 4 matrix to a quaternion.
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tquat<T, P> quat_cast( detail::tquat<T, P> quat_cast(
detail::tmat4x4<T, P> const & x); detail::tmat4x4<T, P> const & x);
/// Returns the quaternion rotation angle. /// Returns the quaternion rotation angle.
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL T angle(detail::tquat<T, P> const & x); T angle(detail::tquat<T, P> const & x);
/// Returns the q rotation axis. /// Returns the q rotation axis.
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tvec3<T, P> axis( detail::tvec3<T, P> axis(
detail::tquat<T, P> const & x); detail::tquat<T, P> const & x);
/// Build a quaternion from an angle and a normalized axis. /// Build a quaternion from an angle and a normalized axis.
@ -331,7 +331,7 @@ namespace detail
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tquat<T, P> angleAxis( detail::tquat<T, P> angleAxis(
T const & angle, T const & angle,
detail::tvec3<T, P> const & axis); detail::tvec3<T, P> const & axis);
@ -341,7 +341,7 @@ namespace detail
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tvec4<bool, P> lessThan( detail::tvec4<bool, P> lessThan(
detail::tquat<T, P> const & x, detail::tquat<T, P> const & x,
detail::tquat<T, P> const & y); detail::tquat<T, P> const & y);
@ -351,7 +351,7 @@ namespace detail
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tvec4<bool, P> lessThanEqual( detail::tvec4<bool, P> lessThanEqual(
detail::tquat<T, P> const & x, detail::tquat<T, P> const & x,
detail::tquat<T, P> const & y); detail::tquat<T, P> const & y);
@ -361,7 +361,7 @@ namespace detail
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tvec4<bool, P> greaterThan( detail::tvec4<bool, P> greaterThan(
detail::tquat<T, P> const & x, detail::tquat<T, P> const & x,
detail::tquat<T, P> const & y); detail::tquat<T, P> const & y);
@ -371,7 +371,7 @@ namespace detail
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tvec4<bool, P> greaterThanEqual( detail::tvec4<bool, P> greaterThanEqual(
detail::tquat<T, P> const & x, detail::tquat<T, P> const & x,
detail::tquat<T, P> const & y); detail::tquat<T, P> const & y);
@ -381,7 +381,7 @@ namespace detail
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tvec4<bool, P> equal( detail::tvec4<bool, P> equal(
detail::tquat<T, P> const & x, detail::tquat<T, P> const & x,
detail::tquat<T, P> const & y); detail::tquat<T, P> const & y);
@ -391,7 +391,7 @@ namespace detail
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tvec4<bool, P> notEqual( detail::tvec4<bool, P> notEqual(
detail::tquat<T, P> const & x, detail::tquat<T, P> const & x,
detail::tquat<T, P> const & y); detail::tquat<T, P> const & y);

View File

@ -60,7 +60,7 @@ namespace glm
/// @tparam genType Value type. Currently supported: half (not recommanded), float or double scalars and vectors. /// @tparam genType Value type. Currently supported: half (not recommanded), float or double scalars and vectors.
/// @see gtc_random /// @see gtc_random
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType linearRand( genType linearRand(
genType const & Min, genType const & Min,
genType const & Max); genType const & Max);
@ -70,7 +70,7 @@ namespace glm
/// @param Deviation /// @param Deviation
/// @see gtc_random /// @see gtc_random
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType gaussRand( genType gaussRand(
genType const & Mean, genType const & Mean,
genType const & Deviation); genType const & Deviation);
@ -79,7 +79,7 @@ namespace glm
/// @param Radius /// @param Radius
/// @see gtc_random /// @see gtc_random
template <typename T> template <typename T>
GLM_FUNC_DECL detail::tvec2<T, defaultp> circularRand( detail::tvec2<T, defaultp> circularRand(
T const & Radius); T const & Radius);
/// Generate a random 3D vector which coordinates are regulary distributed on a sphere of a given radius /// Generate a random 3D vector which coordinates are regulary distributed on a sphere of a given radius
@ -87,7 +87,7 @@ namespace glm
/// @param Radius /// @param Radius
/// @see gtc_random /// @see gtc_random
template <typename T> template <typename T>
GLM_FUNC_DECL detail::tvec3<T, defaultp> sphericalRand( detail::tvec3<T, defaultp> sphericalRand(
T const & Radius); T const & Radius);
/// Generate a random 2D vector which coordinates are regulary distributed within the area of a disk of a given radius /// Generate a random 2D vector which coordinates are regulary distributed within the area of a disk of a given radius
@ -95,7 +95,7 @@ namespace glm
/// @param Radius /// @param Radius
/// @see gtc_random /// @see gtc_random
template <typename T> template <typename T>
GLM_FUNC_DECL detail::tvec2<T, defaultp> diskRand( detail::tvec2<T, defaultp> diskRand(
T const & Radius); T const & Radius);
/// Generate a random 3D vector which coordinates are regulary distributed within the volume of a ball of a given radius /// Generate a random 3D vector which coordinates are regulary distributed within the volume of a ball of a given radius
@ -103,7 +103,7 @@ namespace glm
/// @param Radius /// @param Radius
/// @see gtc_random /// @see gtc_random
template <typename T> template <typename T>
GLM_FUNC_DECL detail::tvec3<T, defaultp> ballRand( detail::tvec3<T, defaultp> ballRand(
T const & Radius); T const & Radius);
/// @} /// @}

View File

@ -55,75 +55,75 @@ namespace glm
/// ///
/// @see gtc_reciprocal /// @see gtc_reciprocal
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType sec(genType const & angle); genType sec(genType const & angle);
/// Cosecant function. /// Cosecant function.
/// hypotenuse / opposite or 1 / sin(x) /// hypotenuse / opposite or 1 / sin(x)
/// ///
/// @see gtc_reciprocal /// @see gtc_reciprocal
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType csc(genType const & angle); genType csc(genType const & angle);
/// Cotangent function. /// Cotangent function.
/// adjacent / opposite or 1 / tan(x) /// adjacent / opposite or 1 / tan(x)
/// ///
/// @see gtc_reciprocal /// @see gtc_reciprocal
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType cot(genType const & angle); genType cot(genType const & angle);
/// Inverse secant function. /// Inverse secant function.
/// ///
/// @see gtc_reciprocal /// @see gtc_reciprocal
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType asec(genType const & x); genType asec(genType const & x);
/// Inverse cosecant function. /// Inverse cosecant function.
/// ///
/// @see gtc_reciprocal /// @see gtc_reciprocal
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType acsc(genType const & x); genType acsc(genType const & x);
/// Inverse cotangent function. /// Inverse cotangent function.
/// ///
/// @see gtc_reciprocal /// @see gtc_reciprocal
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType acot(genType const & x); genType acot(genType const & x);
/// Secant hyperbolic function. /// Secant hyperbolic function.
/// ///
/// @see gtc_reciprocal /// @see gtc_reciprocal
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType sech(genType const & angle); genType sech(genType const & angle);
/// Cosecant hyperbolic function. /// Cosecant hyperbolic function.
/// ///
/// @see gtc_reciprocal /// @see gtc_reciprocal
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType csch(genType const & angle); genType csch(genType const & angle);
/// Cotangent hyperbolic function. /// Cotangent hyperbolic function.
/// ///
/// @see gtc_reciprocal /// @see gtc_reciprocal
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType coth(genType const & angle); genType coth(genType const & angle);
/// Inverse secant hyperbolic function. /// Inverse secant hyperbolic function.
/// ///
/// @see gtc_reciprocal /// @see gtc_reciprocal
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType asech(genType const & x); genType asech(genType const & x);
/// Inverse cosecant hyperbolic function. /// Inverse cosecant hyperbolic function.
/// ///
/// @see gtc_reciprocal /// @see gtc_reciprocal
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType acsch(genType const & x); genType acsch(genType const & x);
/// Inverse cotangent hyperbolic function. /// Inverse cotangent hyperbolic function.
/// ///
/// @see gtc_reciprocal /// @see gtc_reciprocal
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType acoth(genType const & x); genType acoth(genType const & x);
/// @} /// @}
}//namespace glm }//namespace glm

View File

@ -87,88 +87,88 @@ namespace glm
/// Return the constant address to the data of the input parameter. /// Return the constant address to the data of the input parameter.
/// @see gtc_type_ptr /// @see gtc_type_ptr
template<typename genType> template<typename genType>
GLM_FUNC_DECL typename genType::value_type const * value_ptr(genType const & vec); typename genType::value_type const * value_ptr(genType const & vec);
/// Build a vector from a pointer. /// Build a vector from a pointer.
/// @see gtc_type_ptr /// @see gtc_type_ptr
template<typename T> template<typename T>
GLM_FUNC_DECL detail::tvec2<T, defaultp> make_vec2(T const * const ptr); detail::tvec2<T, defaultp> make_vec2(T const * const ptr);
/// Build a vector from a pointer. /// Build a vector from a pointer.
/// @see gtc_type_ptr /// @see gtc_type_ptr
template<typename T> template<typename T>
GLM_FUNC_DECL detail::tvec3<T, defaultp> make_vec3(T const * const ptr); detail::tvec3<T, defaultp> make_vec3(T const * const ptr);
/// Build a vector from a pointer. /// Build a vector from a pointer.
/// @see gtc_type_ptr /// @see gtc_type_ptr
template<typename T> template<typename T>
GLM_FUNC_DECL detail::tvec4<T, defaultp> make_vec4(T const * const ptr); detail::tvec4<T, defaultp> make_vec4(T const * const ptr);
/// Build a matrix from a pointer. /// Build a matrix from a pointer.
/// @see gtc_type_ptr /// @see gtc_type_ptr
template<typename T> template<typename T>
GLM_FUNC_DECL detail::tmat2x2<T, defaultp> make_mat2x2(T const * const ptr); detail::tmat2x2<T, defaultp> make_mat2x2(T const * const ptr);
/// Build a matrix from a pointer. /// Build a matrix from a pointer.
/// @see gtc_type_ptr /// @see gtc_type_ptr
template<typename T> template<typename T>
GLM_FUNC_DECL detail::tmat2x3<T, defaultp> make_mat2x3(T const * const ptr); detail::tmat2x3<T, defaultp> make_mat2x3(T const * const ptr);
/// Build a matrix from a pointer. /// Build a matrix from a pointer.
/// @see gtc_type_ptr /// @see gtc_type_ptr
template<typename T> template<typename T>
GLM_FUNC_DECL detail::tmat2x4<T, defaultp> make_mat2x4(T const * const ptr); detail::tmat2x4<T, defaultp> make_mat2x4(T const * const ptr);
/// Build a matrix from a pointer. /// Build a matrix from a pointer.
/// @see gtc_type_ptr /// @see gtc_type_ptr
template<typename T> template<typename T>
GLM_FUNC_DECL detail::tmat3x2<T, defaultp> make_mat3x2(T const * const ptr); detail::tmat3x2<T, defaultp> make_mat3x2(T const * const ptr);
/// Build a matrix from a pointer. /// Build a matrix from a pointer.
/// @see gtc_type_ptr /// @see gtc_type_ptr
template<typename T> template<typename T>
GLM_FUNC_DECL detail::tmat3x3<T, defaultp> make_mat3x3(T const * const ptr); detail::tmat3x3<T, defaultp> make_mat3x3(T const * const ptr);
/// Build a matrix from a pointer. /// Build a matrix from a pointer.
/// @see gtc_type_ptr /// @see gtc_type_ptr
template<typename T> template<typename T>
GLM_FUNC_DECL detail::tmat3x4<T, defaultp> make_mat3x4(T const * const ptr); detail::tmat3x4<T, defaultp> make_mat3x4(T const * const ptr);
/// Build a matrix from a pointer. /// Build a matrix from a pointer.
/// @see gtc_type_ptr /// @see gtc_type_ptr
template<typename T> template<typename T>
GLM_FUNC_DECL detail::tmat4x2<T, defaultp> make_mat4x2( detail::tmat4x2<T, defaultp> make_mat4x2(
T const * const ptr); T const * const ptr);
/// Build a matrix from a pointer. /// Build a matrix from a pointer.
/// @see gtc_type_ptr /// @see gtc_type_ptr
template<typename T> template<typename T>
GLM_FUNC_DECL detail::tmat4x3<T, defaultp> make_mat4x3(T const * const ptr); detail::tmat4x3<T, defaultp> make_mat4x3(T const * const ptr);
/// Build a matrix from a pointer. /// Build a matrix from a pointer.
/// @see gtc_type_ptr /// @see gtc_type_ptr
template<typename T> template<typename T>
GLM_FUNC_DECL detail::tmat4x4<T, defaultp> make_mat4x4(T const * const ptr); detail::tmat4x4<T, defaultp> make_mat4x4(T const * const ptr);
/// Build a matrix from a pointer. /// Build a matrix from a pointer.
/// @see gtc_type_ptr /// @see gtc_type_ptr
template<typename T> template<typename T>
GLM_FUNC_DECL detail::tmat2x2<T, defaultp> make_mat2(T const * const ptr); detail::tmat2x2<T, defaultp> make_mat2(T const * const ptr);
/// Build a matrix from a pointer. /// Build a matrix from a pointer.
/// @see gtc_type_ptr /// @see gtc_type_ptr
template<typename T> template<typename T>
GLM_FUNC_DECL detail::tmat3x3<T, defaultp> make_mat3(T const * const ptr); detail::tmat3x3<T, defaultp> make_mat3(T const * const ptr);
/// Build a matrix from a pointer. /// Build a matrix from a pointer.
/// @see gtc_type_ptr /// @see gtc_type_ptr
template<typename T> template<typename T>
GLM_FUNC_DECL detail::tmat4x4<T, defaultp> make_mat4(T const * const ptr); detail::tmat4x4<T, defaultp> make_mat4(T const * const ptr);
/// Build a quaternion from a pointer. /// Build a quaternion from a pointer.
/// @see gtc_type_ptr /// @see gtc_type_ptr
template<typename T> template<typename T>
GLM_FUNC_DECL detail::tquat<T, defaultp> make_quat(T const * const ptr); detail::tquat<T, defaultp> make_quat(T const * const ptr);
/// @} /// @}
}//namespace glm }//namespace glm

12
deps/glm/gtc/ulp.hpp vendored
View File

@ -56,32 +56,32 @@ namespace glm
/// Return the next ULP value(s) after the input value(s). /// Return the next ULP value(s) after the input value(s).
/// @see gtc_ulp /// @see gtc_ulp
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType next_float(genType const & x); genType next_float(genType const & x);
/// Return the previous ULP value(s) before the input value(s). /// Return the previous ULP value(s) before the input value(s).
/// @see gtc_ulp /// @see gtc_ulp
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType prev_float(genType const & x); genType prev_float(genType const & x);
/// Return the value(s) ULP distance after the input value(s). /// Return the value(s) ULP distance after the input value(s).
/// @see gtc_ulp /// @see gtc_ulp
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType next_float(genType const & x, uint const & Distance); genType next_float(genType const & x, uint const & Distance);
/// Return the value(s) ULP distance before the input value(s). /// Return the value(s) ULP distance before the input value(s).
/// @see gtc_ulp /// @see gtc_ulp
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType prev_float(genType const & x, uint const & Distance); genType prev_float(genType const & x, uint const & Distance);
/// Return the distance in the number of ULP between 2 scalars. /// Return the distance in the number of ULP between 2 scalars.
/// @see gtc_ulp /// @see gtc_ulp
template <typename T> template <typename T>
GLM_FUNC_DECL uint float_distance(T const & x, T const & y); uint float_distance(T const & x, T const & y);
/// Return the distance in the number of ULP between 2 vectors. /// Return the distance in the number of ULP between 2 vectors.
/// @see gtc_ulp /// @see gtc_ulp
template<typename T, template<typename> class vecType> template<typename T, template<typename> class vecType>
GLM_FUNC_DECL vecType<uint> float_distance(vecType<T> const & x, vecType<T> const & y); vecType<uint> float_distance(vecType<T> const & x, vecType<T> const & y);
/// @} /// @}
}// namespace glm }// namespace glm

View File

@ -53,14 +53,14 @@ namespace glm
/// Min comparison between 2 variables /// Min comparison between 2 variables
/// @see gtx_associated_min_max /// @see gtx_associated_min_max
template<typename genTypeT, typename genTypeU> template<typename genTypeT, typename genTypeU>
GLM_FUNC_DECL genTypeU associatedMin( genTypeU associatedMin(
const genTypeT& x, const genTypeU& a, const genTypeT& x, const genTypeU& a,
const genTypeT& y, const genTypeU& b); const genTypeT& y, const genTypeU& b);
/// Min comparison between 3 variables /// Min comparison between 3 variables
/// @see gtx_associated_min_max /// @see gtx_associated_min_max
template<typename genTypeT, typename genTypeU> template<typename genTypeT, typename genTypeU>
GLM_FUNC_DECL genTypeU associatedMin( genTypeU associatedMin(
const genTypeT& x, const genTypeU& a, const genTypeT& x, const genTypeU& a,
const genTypeT& y, const genTypeU& b, const genTypeT& y, const genTypeU& b,
const genTypeT& z, const genTypeU& c); const genTypeT& z, const genTypeU& c);
@ -68,7 +68,7 @@ namespace glm
/// Min comparison between 4 variables /// Min comparison between 4 variables
/// @see gtx_associated_min_max /// @see gtx_associated_min_max
template<typename genTypeT, typename genTypeU> template<typename genTypeT, typename genTypeU>
GLM_FUNC_DECL genTypeU associatedMin( genTypeU associatedMin(
const genTypeT& x, const genTypeU& a, const genTypeT& x, const genTypeU& a,
const genTypeT& y, const genTypeU& b, const genTypeT& y, const genTypeU& b,
const genTypeT& z, const genTypeU& c, const genTypeT& z, const genTypeU& c,
@ -77,14 +77,14 @@ namespace glm
/// Max comparison between 2 variables /// Max comparison between 2 variables
/// @see gtx_associated_min_max /// @see gtx_associated_min_max
template<typename genTypeT, typename genTypeU> template<typename genTypeT, typename genTypeU>
GLM_FUNC_DECL genTypeU associatedMax( genTypeU associatedMax(
const genTypeT& x, const genTypeU& a, const genTypeT& x, const genTypeU& a,
const genTypeT& y, const genTypeU& b); const genTypeT& y, const genTypeU& b);
/// Max comparison between 3 variables /// Max comparison between 3 variables
/// @see gtx_associated_min_max /// @see gtx_associated_min_max
template<typename genTypeT, typename genTypeU> template<typename genTypeT, typename genTypeU>
GLM_FUNC_DECL genTypeU associatedMax( genTypeU associatedMax(
const genTypeT& x, const genTypeU& a, const genTypeT& x, const genTypeU& a,
const genTypeT& y, const genTypeU& b, const genTypeT& y, const genTypeU& b,
const genTypeT& z, const genTypeU& c); const genTypeT& z, const genTypeU& c);
@ -92,7 +92,7 @@ namespace glm
/// Max comparison between 4 variables /// Max comparison between 4 variables
/// @see gtx_associated_min_max /// @see gtx_associated_min_max
template<typename genTypeT, typename genTypeU> template<typename genTypeT, typename genTypeU>
GLM_FUNC_DECL genTypeU associatedMax( genTypeU associatedMax(
const genTypeT& x, const genTypeU& a, const genTypeT& x, const genTypeU& a,
const genTypeT& y, const genTypeU& b, const genTypeT& y, const genTypeU& b,
const genTypeT& z, const genTypeU& c, const genTypeT& z, const genTypeU& c,

54
deps/glm/gtx/bit.hpp vendored
View File

@ -56,52 +56,52 @@ namespace glm
/// Build a mask of 'count' bits /// Build a mask of 'count' bits
/// @see gtx_bit /// @see gtx_bit
template <typename genIType> template <typename genIType>
GLM_FUNC_DECL genIType mask(genIType const & count); genIType mask(genIType const & count);
//! Find the highest bit set to 1 in a integer variable and return its value. //! Find the highest bit set to 1 in a integer variable and return its value.
/// @see gtx_bit /// @see gtx_bit
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType highestBitValue(genType const & value); genType highestBitValue(genType const & value);
//! Return true if the value is a power of two number. //! Return true if the value is a power of two number.
/// @see gtx_bit /// @see gtx_bit
template <typename genType> template <typename genType>
GLM_FUNC_DECL bool isPowerOfTwo(genType const & value); bool isPowerOfTwo(genType const & value);
//! Return the power of two number which value is just higher the input value. //! Return the power of two number which value is just higher the input value.
/// @see gtx_bit /// @see gtx_bit
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType powerOfTwoAbove(genType const & value); genType powerOfTwoAbove(genType const & value);
//! Return the power of two number which value is just lower the input value. //! Return the power of two number which value is just lower the input value.
/// @see gtx_bit /// @see gtx_bit
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType powerOfTwoBelow(genType const & value); genType powerOfTwoBelow(genType const & value);
//! Return the power of two number which value is the closet to the input value. //! Return the power of two number which value is the closet to the input value.
/// @see gtx_bit /// @see gtx_bit
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType powerOfTwoNearest(genType const & value); genType powerOfTwoNearest(genType const & value);
//! Revert all bits of any integer based type. //! Revert all bits of any integer based type.
/// @see gtx_bit /// @see gtx_bit
template <typename genType> template <typename genType>
GLM_DEPRECATED GLM_FUNC_DECL genType bitRevert(genType const & value); GLM_DEPRECATED genType bitRevert(genType const & value);
//! Rotate all bits to the right. //! Rotate all bits to the right.
/// @see gtx_bit /// @see gtx_bit
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType bitRotateRight(genType const & In, std::size_t Shift); genType bitRotateRight(genType const & In, std::size_t Shift);
//! Rotate all bits to the left. //! Rotate all bits to the left.
/// @see gtx_bit /// @see gtx_bit
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType bitRotateLeft(genType const & In, std::size_t Shift); genType bitRotateLeft(genType const & In, std::size_t Shift);
//! Set to 1 a range of bits. //! Set to 1 a range of bits.
/// @see gtx_bit /// @see gtx_bit
template <typename genIUType> template <typename genIUType>
GLM_FUNC_DECL genIUType fillBitfieldWithOne( genIUType fillBitfieldWithOne(
genIUType const & Value, genIUType const & Value,
int const & FromBit, int const & FromBit,
int const & ToBit); int const & ToBit);
@ -109,7 +109,7 @@ namespace glm
//! Set to 0 a range of bits. //! Set to 0 a range of bits.
/// @see gtx_bit /// @see gtx_bit
template <typename genIUType> template <typename genIUType>
GLM_FUNC_DECL genIUType fillBitfieldWithZero( genIUType fillBitfieldWithZero(
genIUType const & Value, genIUType const & Value,
int const & FromBit, int const & FromBit,
int const & ToBit); int const & ToBit);
@ -119,112 +119,112 @@ namespace glm
/// The other bits are interleaved following the previous sequence. /// The other bits are interleaved following the previous sequence.
/// ///
/// @see gtx_bit /// @see gtx_bit
GLM_FUNC_DECL int16 bitfieldInterleave(int8 x, int8 y); int16 bitfieldInterleave(int8 x, int8 y);
/// Interleaves the bits of x and y. /// Interleaves the bits of x and y.
/// The first bit is the first bit of x followed by the first bit of 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. /// The other bits are interleaved following the previous sequence.
/// ///
/// @see gtx_bit /// @see gtx_bit
GLM_FUNC_DECL uint16 bitfieldInterleave(uint8 x, uint8 y); uint16 bitfieldInterleave(uint8 x, uint8 y);
/// Interleaves the bits of x and y. /// Interleaves the bits of x and y.
/// The first bit is the first bit of x followed by the first bit of 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. /// The other bits are interleaved following the previous sequence.
/// ///
/// @see gtx_bit /// @see gtx_bit
GLM_FUNC_DECL int32 bitfieldInterleave(int16 x, int16 y); int32 bitfieldInterleave(int16 x, int16 y);
/// Interleaves the bits of x and y. /// Interleaves the bits of x and y.
/// The first bit is the first bit of x followed by the first bit of 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. /// The other bits are interleaved following the previous sequence.
/// ///
/// @see gtx_bit /// @see gtx_bit
GLM_FUNC_DECL uint32 bitfieldInterleave(uint16 x, uint16 y); uint32 bitfieldInterleave(uint16 x, uint16 y);
/// Interleaves the bits of x and y. /// Interleaves the bits of x and y.
/// The first bit is the first bit of x followed by the first bit of 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. /// The other bits are interleaved following the previous sequence.
/// ///
/// @see gtx_bit /// @see gtx_bit
GLM_FUNC_DECL int64 bitfieldInterleave(int32 x, int32 y); int64 bitfieldInterleave(int32 x, int32 y);
/// Interleaves the bits of x and y. /// Interleaves the bits of x and y.
/// The first bit is the first bit of x followed by the first bit of 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. /// The other bits are interleaved following the previous sequence.
/// ///
/// @see gtx_bit /// @see gtx_bit
GLM_FUNC_DECL uint64 bitfieldInterleave(uint32 x, uint32 y); uint64 bitfieldInterleave(uint32 x, uint32 y);
/// Interleaves the bits of x, y and z. /// 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 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. /// The other bits are interleaved following the previous sequence.
/// ///
/// @see gtx_bit /// @see gtx_bit
GLM_FUNC_DECL int32 bitfieldInterleave(int8 x, int8 y, int8 z); int32 bitfieldInterleave(int8 x, int8 y, int8 z);
/// Interleaves the bits of x, y and z. /// 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 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. /// The other bits are interleaved following the previous sequence.
/// ///
/// @see gtx_bit /// @see gtx_bit
GLM_FUNC_DECL uint32 bitfieldInterleave(uint8 x, uint8 y, uint8 z); uint32 bitfieldInterleave(uint8 x, uint8 y, uint8 z);
/// Interleaves the bits of x, y and z. /// 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 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. /// The other bits are interleaved following the previous sequence.
/// ///
/// @see gtx_bit /// @see gtx_bit
GLM_FUNC_DECL int64 bitfieldInterleave(int16 x, int16 y, int16 z); int64 bitfieldInterleave(int16 x, int16 y, int16 z);
/// Interleaves the bits of x, y and z. /// 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 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. /// The other bits are interleaved following the previous sequence.
/// ///
/// @see gtx_bit /// @see gtx_bit
GLM_FUNC_DECL uint64 bitfieldInterleave(uint16 x, uint16 y, uint16 z); uint64 bitfieldInterleave(uint16 x, uint16 y, uint16 z);
/// Interleaves the bits of x, y and z. /// 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 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. /// The other bits are interleaved following the previous sequence.
/// ///
/// @see gtx_bit /// @see gtx_bit
GLM_FUNC_DECL int64 bitfieldInterleave(int32 x, int32 y, int32 z); int64 bitfieldInterleave(int32 x, int32 y, int32 z);
/// Interleaves the bits of x, y and z. /// 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 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. /// The other bits are interleaved following the previous sequence.
/// ///
/// @see gtx_bit /// @see gtx_bit
GLM_FUNC_DECL uint64 bitfieldInterleave(uint32 x, uint32 y, uint32 z); uint64 bitfieldInterleave(uint32 x, uint32 y, uint32 z);
/// Interleaves the bits of x, y, z and w. /// 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 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. /// The other bits are interleaved following the previous sequence.
/// ///
/// @see gtx_bit /// @see gtx_bit
GLM_FUNC_DECL int32 bitfieldInterleave(int8 x, int8 y, int8 z, int8 w); int32 bitfieldInterleave(int8 x, int8 y, int8 z, int8 w);
/// Interleaves the bits of x, y, z and w. /// 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 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. /// The other bits are interleaved following the previous sequence.
/// ///
/// @see gtx_bit /// @see gtx_bit
GLM_FUNC_DECL uint32 bitfieldInterleave(uint8 x, uint8 y, uint8 z, uint8 w); uint32 bitfieldInterleave(uint8 x, uint8 y, uint8 z, uint8 w);
/// Interleaves the bits of x, y, z and w. /// 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 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. /// The other bits are interleaved following the previous sequence.
/// ///
/// @see gtx_bit /// @see gtx_bit
GLM_FUNC_DECL int64 bitfieldInterleave(int16 x, int16 y, int16 z, int16 w); int64 bitfieldInterleave(int16 x, int16 y, int16 z, int16 w);
/// Interleaves the bits of x, y, z and w. /// 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 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. /// The other bits are interleaved following the previous sequence.
/// ///
/// @see gtx_bit /// @see gtx_bit
GLM_FUNC_DECL uint64 bitfieldInterleave(uint16 x, uint16 y, uint16 z, uint16 w); uint64 bitfieldInterleave(uint16 x, uint16 y, uint16 z, uint16 w);
/// @} /// @}
} //namespace glm } //namespace glm

43
deps/glm/gtx/bit.inl vendored
View File

@ -312,51 +312,14 @@ namespace glm
namespace detail namespace detail
{ {
template <typename PARAM, typename RET> template <typename PARAM, typename RET>
GLM_FUNC_DECL RET bitfieldInterleave(PARAM x, PARAM y); RET bitfieldInterleave(PARAM x, PARAM y);
template <typename PARAM, typename RET> template <typename PARAM, typename RET>
GLM_FUNC_DECL RET bitfieldInterleave(PARAM x, PARAM y, PARAM z); RET bitfieldInterleave(PARAM x, PARAM y, PARAM z);
template <typename PARAM, typename RET> template <typename PARAM, typename RET>
GLM_FUNC_DECL RET bitfieldInterleave(PARAM x, PARAM y, PARAM z, PARAM w); RET bitfieldInterleave(PARAM x, PARAM y, PARAM z, PARAM w);
/*
template <typename PARAM, typename RET>
inline RET bitfieldInterleave(PARAM x, PARAM y)
{
RET Result = 0;
for (int i = 0; i < sizeof(PARAM) * 8; i++)
Result |= (x & 1U << i) << i | (y & 1U << i) << (i + 1);
return Result;
}
template <typename PARAM, typename RET>
inline RET bitfieldInterleave(PARAM x, PARAM y, PARAM z)
{
RET Result = 0;
for (RET i = 0; i < sizeof(PARAM) * 8; i++)
{
Result |= ((RET(x) & (RET(1) << i)) << ((i << 1) + 0));
Result |= ((RET(y) & (RET(1) << i)) << ((i << 1) + 1));
Result |= ((RET(z) & (RET(1) << i)) << ((i << 1) + 2));
}
return Result;
}
template <typename PARAM, typename RET>
inline RET bitfieldInterleave(PARAM x, PARAM y, PARAM z, PARAM w)
{
RET Result = 0;
for (int i = 0; i < sizeof(PARAM) * 8; i++)
{
Result |= ((((RET(x) >> i) & RET(1))) << RET((i << 2) + 0));
Result |= ((((RET(y) >> i) & RET(1))) << RET((i << 2) + 1));
Result |= ((((RET(z) >> i) & RET(1))) << RET((i << 2) + 2));
Result |= ((((RET(w) >> i) & RET(1))) << RET((i << 2) + 3));
}
return Result;
}
*/
template <> 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)
{ {

View File

@ -53,7 +53,7 @@ namespace glm
/// 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 /// @see gtx_closest_point
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tvec3<T, P> closestPointOnLine( detail::tvec3<T, P> closestPointOnLine(
detail::tvec3<T, P> const & point, detail::tvec3<T, P> const & point,
detail::tvec3<T, P> const & a, detail::tvec3<T, P> const & a,
detail::tvec3<T, P> const & b); detail::tvec3<T, P> const & b);

View File

@ -53,39 +53,39 @@ namespace glm
/// Converts a color from HSV color space to its color in RGB color space. /// Converts a color from HSV color space to its color in RGB color space.
/// @see gtx_color_space /// @see gtx_color_space
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tvec3<T, P> rgbColor( detail::tvec3<T, P> rgbColor(
detail::tvec3<T, P> const & hsvValue); detail::tvec3<T, P> const & hsvValue);
/// Converts a color from RGB color space to its color in HSV color space. /// Converts a color from RGB color space to its color in HSV color space.
/// @see gtx_color_space /// @see gtx_color_space
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tvec3<T, P> hsvColor( detail::tvec3<T, P> hsvColor(
detail::tvec3<T, P> const & rgbValue); detail::tvec3<T, P> const & rgbValue);
/// Build a saturation matrix. /// Build a saturation matrix.
/// @see gtx_color_space /// @see gtx_color_space
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tmat4x4<T, P> saturation( detail::tmat4x4<T, P> saturation(
T const s); T const s);
/// Modify the saturation of a color. /// Modify the saturation of a color.
/// @see gtx_color_space /// @see gtx_color_space
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tvec3<T, P> saturation( detail::tvec3<T, P> saturation(
T const s, T const s,
detail::tvec3<T, P> const & color); detail::tvec3<T, P> const & color);
/// Modify the saturation of a color. /// Modify the saturation of a color.
/// @see gtx_color_space /// @see gtx_color_space
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tvec4<T, P> saturation( detail::tvec4<T, P> saturation(
T const s, T const s,
detail::tvec4<T, P> const & color); detail::tvec4<T, P> const & color);
/// Compute color luminosity associating ratios (0.33, 0.59, 0.11) to RGB canals. /// Compute color luminosity associating ratios (0.33, 0.59, 0.11) to RGB canals.
/// @see gtx_color_space /// @see gtx_color_space
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL T luminosity( T luminosity(
detail::tvec3<T, P> const & color); detail::tvec3<T, P> const & color);
/// @} /// @}

View File

@ -53,27 +53,27 @@ namespace glm
/// Convert a color from RGB color space to YCoCg color space. /// Convert a color from RGB color space to YCoCg color space.
/// @see gtx_color_space_YCoCg /// @see gtx_color_space_YCoCg
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tvec3<T, P> rgb2YCoCg( detail::tvec3<T, P> rgb2YCoCg(
detail::tvec3<T, P> const & rgbColor); detail::tvec3<T, P> const & rgbColor);
/// Convert a color from YCoCg color space to RGB color space. /// Convert a color from YCoCg color space to RGB color space.
/// @see gtx_color_space_YCoCg /// @see gtx_color_space_YCoCg
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tvec3<T, P> YCoCg2rgb( detail::tvec3<T, P> YCoCg2rgb(
detail::tvec3<T, P> const & YCoCgColor); detail::tvec3<T, P> const & YCoCgColor);
/// Convert a color from RGB color space to YCoCgR color space. /// 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 "YCoCg-R: A Color Space with RGB Reversibility and Low Dynamic Range"
/// @see gtx_color_space_YCoCg /// @see gtx_color_space_YCoCg
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tvec3<T, P> rgb2YCoCgR( detail::tvec3<T, P> rgb2YCoCgR(
detail::tvec3<T, P> const & rgbColor); detail::tvec3<T, P> const & rgbColor);
/// Convert a color from YCoCgR color space to RGB color space. /// 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 "YCoCg-R: A Color Space with RGB Reversibility and Low Dynamic Range"
/// @see gtx_color_space_YCoCg /// @see gtx_color_space_YCoCg
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tvec3<T, P> YCoCgR2rgb( detail::tvec3<T, P> YCoCgR2rgb(
detail::tvec3<T, P> const & YCoCgColor); detail::tvec3<T, P> const & YCoCgColor);
/// @} /// @}

View File

@ -82,10 +82,10 @@ namespace glm
template <typename T, precision P> GLM_FUNC_QUALIFIER detail::tvec3<T, P> atan2(const detail::tvec3<T, P>& x, const detail::tvec3<T, P>& 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 <typename T, precision P> GLM_FUNC_QUALIFIER detail::tvec3<T, P> atan2(const detail::tvec3<T, P>& x, const detail::tvec3<T, P>& 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 <typename T, precision P> GLM_FUNC_QUALIFIER detail::tvec4<T, P> atan2(const detail::tvec4<T, P>& x, const detail::tvec4<T, P>& 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 <typename T, precision P> GLM_FUNC_QUALIFIER detail::tvec4<T, P> atan2(const detail::tvec4<T, P>& x, const detail::tvec4<T, P>& 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 <typename genType> 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 <typename genType> 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 <typename T, precision P> GLM_FUNC_DECL detail::tvec2<bool, P> isfinite(const detail::tvec2<T, P>& x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility) template <typename T, precision P> detail::tvec2<bool, P> isfinite(const detail::tvec2<T, P>& x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility)
template <typename T, precision P> GLM_FUNC_DECL detail::tvec3<bool, P> isfinite(const detail::tvec3<T, P>& x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility) template <typename T, precision P> detail::tvec3<bool, P> isfinite(const detail::tvec3<T, P>& x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility)
template <typename T, precision P> GLM_FUNC_DECL detail::tvec4<bool, P> isfinite(const detail::tvec4<T, P>& x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility) template <typename T, precision P> detail::tvec4<bool, P> isfinite(const detail::tvec4<T, P>& x); //!< \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 bool bool1; //!< \brief boolean type with 1 component. (From GLM_GTX_compatibility extension)
typedef detail::tvec2<bool, highp> bool2; //!< \brief boolean type with 2 components. (From GLM_GTX_compatibility extension) typedef detail::tvec2<bool, highp> bool2; //!< \brief boolean type with 2 components. (From GLM_GTX_compatibility extension)

View File

@ -53,25 +53,25 @@ namespace glm
/// Add all vector components together. /// Add all vector components together.
/// @see gtx_component_wise /// @see gtx_component_wise
template <typename genType> template <typename genType>
GLM_FUNC_DECL typename genType::value_type compAdd( typename genType::value_type compAdd(
genType const & v); genType const & v);
/// Multiply all vector components together. /// Multiply all vector components together.
/// @see gtx_component_wise /// @see gtx_component_wise
template <typename genType> template <typename genType>
GLM_FUNC_DECL typename genType::value_type compMul( typename genType::value_type compMul(
genType const & v); genType const & v);
/// Find the minimum value between single vector components. /// Find the minimum value between single vector components.
/// @see gtx_component_wise /// @see gtx_component_wise
template <typename genType> template <typename genType>
GLM_FUNC_DECL typename genType::value_type compMin( typename genType::value_type compMin(
genType const & v); genType const & v);
/// Find the maximum value between single vector components. /// Find the maximum value between single vector components.
/// @see gtx_component_wise /// @see gtx_component_wise
template <typename genType> template <typename genType>
GLM_FUNC_DECL typename genType::value_type compMax( typename genType::value_type compMax(
genType const & v); genType const & v);
/// @} /// @}

View File

@ -63,74 +63,74 @@ namespace detail
public: public:
glm::detail::tquat<T, P> real, dual; glm::detail::tquat<T, P> real, dual;
GLM_FUNC_DECL int length() const; int length() const;
// Constructors // Constructors
GLM_FUNC_DECL tdualquat(); tdualquat();
GLM_FUNC_DECL explicit tdualquat(tquat<T, P> const & real); explicit tdualquat(tquat<T, P> const & real);
GLM_FUNC_DECL tdualquat(tquat<T, P> const & real,tquat<T, P> const & dual); tdualquat(tquat<T, P> const & real,tquat<T, P> const & dual);
GLM_FUNC_DECL tdualquat(tquat<T, P> const & orientation,tvec3<T, P> const& translation); tdualquat(tquat<T, P> const & orientation,tvec3<T, P> const& translation);
////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////
// tdualquat conversions // tdualquat conversions
GLM_FUNC_DECL explicit tdualquat(tmat2x4<T, P> const & holder_mat); explicit tdualquat(tmat2x4<T, P> const & holder_mat);
GLM_FUNC_DECL explicit tdualquat(tmat3x4<T, P> const & aug_mat); explicit tdualquat(tmat3x4<T, P> const & aug_mat);
// Accesses // Accesses
GLM_FUNC_DECL part_type & operator[](int i); part_type & operator[](int i);
GLM_FUNC_DECL part_type const & operator[](int i) const; part_type const & operator[](int i) const;
// Operators // Operators
GLM_FUNC_DECL tdualquat<T, P> & operator*=(T const & s); tdualquat<T, P> & operator*=(T const & s);
GLM_FUNC_DECL tdualquat<T, P> & operator/=(T const & s); tdualquat<T, P> & operator/=(T const & s);
}; };
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tquat<T, P> operator- ( detail::tquat<T, P> operator- (
detail::tquat<T, P> const & q); detail::tquat<T, P> const & q);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tdualquat<T, P> operator+ ( detail::tdualquat<T, P> operator+ (
detail::tdualquat<T, P> const & q, detail::tdualquat<T, P> const & q,
detail::tdualquat<T, P> const & p); detail::tdualquat<T, P> const & p);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tdualquat<T, P> operator* ( detail::tdualquat<T, P> operator* (
detail::tdualquat<T, P> const & q, detail::tdualquat<T, P> const & q,
detail::tdualquat<T, P> const & p); detail::tdualquat<T, P> const & p);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tvec3<T, P> operator* ( detail::tvec3<T, P> operator* (
detail::tquat<T, P> const & q, detail::tquat<T, P> const & q,
detail::tvec3<T, P> const & v); detail::tvec3<T, P> const & v);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tvec3<T, P> operator* ( detail::tvec3<T, P> operator* (
detail::tvec3<T, P> const & v, detail::tvec3<T, P> const & v,
detail::tquat<T, P> const & q); detail::tquat<T, P> const & q);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tvec4<T, P> operator* ( detail::tvec4<T, P> operator* (
detail::tquat<T, P> const & q, detail::tquat<T, P> const & q,
detail::tvec4<T, P> const & v); detail::tvec4<T, P> const & v);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tvec4<T, P> operator* ( detail::tvec4<T, P> operator* (
detail::tvec4<T, P> const & v, detail::tvec4<T, P> const & v,
detail::tquat<T, P> const & q); detail::tquat<T, P> const & q);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tdualquat<T, P> operator* ( detail::tdualquat<T, P> operator* (
detail::tdualquat<T, P> const & q, detail::tdualquat<T, P> const & q,
T const & s); T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tdualquat<T, P> operator* ( detail::tdualquat<T, P> operator* (
T const & s, T const & s,
detail::tdualquat<T, P> const & q); detail::tdualquat<T, P> const & q);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tdualquat<T, P> operator/ ( detail::tdualquat<T, P> operator/ (
detail::tdualquat<T, P> const & q, detail::tdualquat<T, P> const & q,
T const & s); T const & s);
} //namespace detail } //namespace detail
@ -142,14 +142,14 @@ namespace detail
/// ///
/// @see gtc_dual_quaternion /// @see gtc_dual_quaternion
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tdualquat<T, P> normalize( detail::tdualquat<T, P> normalize(
detail::tdualquat<T, P> const & q); detail::tdualquat<T, P> const & q);
/// Returns the linear interpolation of two dual quaternion. /// Returns the linear interpolation of two dual quaternion.
/// ///
/// @see gtc_dual_quaternion /// @see gtc_dual_quaternion
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tdualquat<T, P> lerp( detail::tdualquat<T, P> lerp(
detail::tdualquat<T, P> const & x, detail::tdualquat<T, P> const & x,
detail::tdualquat<T, P> const & y, detail::tdualquat<T, P> const & y,
T const & a); T const & a);
@ -158,7 +158,7 @@ namespace detail
/// ///
/// @see gtc_dual_quaternion /// @see gtc_dual_quaternion
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tdualquat<T, P> inverse( detail::tdualquat<T, P> inverse(
detail::tdualquat<T, P> const & q); detail::tdualquat<T, P> const & q);
/* /*
@ -175,28 +175,28 @@ namespace detail
/// ///
/// @see gtc_dual_quaternion /// @see gtc_dual_quaternion
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tmat2x4<T, P> mat2x4_cast( detail::tmat2x4<T, P> mat2x4_cast(
detail::tdualquat<T, P> const & x); detail::tdualquat<T, P> const & x);
/// Converts a quaternion to a 3 * 4 matrix. /// Converts a quaternion to a 3 * 4 matrix.
/// ///
/// @see gtc_dual_quaternion /// @see gtc_dual_quaternion
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tmat3x4<T, P> mat3x4_cast( detail::tmat3x4<T, P> mat3x4_cast(
detail::tdualquat<T, P> const & x); detail::tdualquat<T, P> const & x);
/// Converts a 2 * 4 matrix (matrix which holds real and dual parts) to a quaternion. /// Converts a 2 * 4 matrix (matrix which holds real and dual parts) to a quaternion.
/// ///
/// @see gtc_dual_quaternion /// @see gtc_dual_quaternion
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tdualquat<T, P> dualquat_cast( detail::tdualquat<T, P> dualquat_cast(
detail::tmat2x4<T, P> const & x); detail::tmat2x4<T, P> const & x);
/// Converts a 3 * 4 matrix (augmented matrix rotation + translation) to a quaternion. /// Converts a 3 * 4 matrix (augmented matrix rotation + translation) to a quaternion.
/// ///
/// @see gtc_dual_quaternion /// @see gtc_dual_quaternion
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tdualquat<T, P> dualquat_cast( detail::tdualquat<T, P> dualquat_cast(
detail::tmat3x4<T, P> const & x); detail::tmat3x4<T, P> const & x);

View File

@ -54,67 +54,67 @@ namespace glm
/// Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle X. /// Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle X.
/// @see gtx_euler_angles /// @see gtx_euler_angles
template <typename T> template <typename T>
GLM_FUNC_DECL detail::tmat4x4<T, defaultp> eulerAngleX( detail::tmat4x4<T, defaultp> eulerAngleX(
T const & angleX); T const & angleX);
/// Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle Y. /// Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle Y.
/// @see gtx_euler_angles /// @see gtx_euler_angles
template <typename T> template <typename T>
GLM_FUNC_DECL detail::tmat4x4<T, defaultp> eulerAngleY( detail::tmat4x4<T, defaultp> eulerAngleY(
T const & angleY); T const & angleY);
/// Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle Z. /// Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle Z.
/// @see gtx_euler_angles /// @see gtx_euler_angles
template <typename T> template <typename T>
GLM_FUNC_DECL detail::tmat4x4<T, defaultp> eulerAngleZ( detail::tmat4x4<T, defaultp> eulerAngleZ(
T const & angleZ); T const & angleZ);
/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Y). /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Y).
/// @see gtx_euler_angles /// @see gtx_euler_angles
template <typename T> template <typename T>
GLM_FUNC_DECL detail::tmat4x4<T, defaultp> eulerAngleXY( detail::tmat4x4<T, defaultp> eulerAngleXY(
T const & angleX, T const & angleX,
T const & angleY); T const & angleY);
/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X). /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X).
/// @see gtx_euler_angles /// @see gtx_euler_angles
template <typename T> template <typename T>
GLM_FUNC_DECL detail::tmat4x4<T, defaultp> eulerAngleYX( detail::tmat4x4<T, defaultp> eulerAngleYX(
T const & angleY, T const & angleY,
T const & angleX); T const & angleX);
/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Z). /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Z).
/// @see gtx_euler_angles /// @see gtx_euler_angles
template <typename T> template <typename T>
GLM_FUNC_DECL detail::tmat4x4<T, defaultp> eulerAngleXZ( detail::tmat4x4<T, defaultp> eulerAngleXZ(
T const & angleX, T const & angleX,
T const & angleZ); T const & angleZ);
/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Z * X). /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Z * X).
/// @see gtx_euler_angles /// @see gtx_euler_angles
template <typename T> template <typename T>
GLM_FUNC_DECL detail::tmat4x4<T, defaultp> eulerAngleZX( detail::tmat4x4<T, defaultp> eulerAngleZX(
T const & angle, T const & angle,
T const & angleX); T const & angleX);
/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * Z). /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * Z).
/// @see gtx_euler_angles /// @see gtx_euler_angles
template <typename T> template <typename T>
GLM_FUNC_DECL detail::tmat4x4<T, defaultp> eulerAngleYZ( detail::tmat4x4<T, defaultp> eulerAngleYZ(
T const & angleY, T const & angleY,
T const & angleZ); T const & angleZ);
/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Z * Y). /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Z * Y).
/// @see gtx_euler_angles /// @see gtx_euler_angles
template <typename T> template <typename T>
GLM_FUNC_DECL detail::tmat4x4<T, defaultp> eulerAngleZY( detail::tmat4x4<T, defaultp> eulerAngleZY(
T const & angleZ, T const & angleZ,
T const & angleY); T const & angleY);
/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z). /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z).
/// @see gtx_euler_angles /// @see gtx_euler_angles
template <typename T> template <typename T>
GLM_FUNC_DECL detail::tmat4x4<T, defaultp> eulerAngleYXZ( detail::tmat4x4<T, defaultp> eulerAngleYXZ(
T const & yaw, T const & yaw,
T const & pitch, T const & pitch,
T const & roll); T const & roll);
@ -122,7 +122,7 @@ namespace glm
/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z). /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z).
/// @see gtx_euler_angles /// @see gtx_euler_angles
template <typename T> template <typename T>
GLM_FUNC_DECL detail::tmat4x4<T, defaultp> yawPitchRoll( detail::tmat4x4<T, defaultp> yawPitchRoll(
T const & yaw, T const & yaw,
T const & pitch, T const & pitch,
T const & roll); T const & roll);
@ -130,22 +130,22 @@ namespace glm
/// Creates a 2D 2 * 2 rotation matrix from an euler angle. /// Creates a 2D 2 * 2 rotation matrix from an euler angle.
/// @see gtx_euler_angles /// @see gtx_euler_angles
template <typename T> template <typename T>
GLM_FUNC_DECL detail::tmat2x2<T, defaultp> orientate2(T const & angle); detail::tmat2x2<T, defaultp> orientate2(T const & angle);
/// Creates a 2D 4 * 4 homogeneous rotation matrix from an euler angle. /// Creates a 2D 4 * 4 homogeneous rotation matrix from an euler angle.
/// @see gtx_euler_angles /// @see gtx_euler_angles
template <typename T> template <typename T>
GLM_FUNC_DECL detail::tmat3x3<T, defaultp> orientate3(T const & angle); detail::tmat3x3<T, defaultp> orientate3(T const & angle);
/// 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 /// @see gtx_euler_angles
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tmat3x3<T, P> orientate3(detail::tvec3<T, P> const & angles); detail::tmat3x3<T, P> orientate3(detail::tvec3<T, P> const & angles);
/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z). /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z).
/// @see gtx_euler_angles /// @see gtx_euler_angles
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tmat4x4<T, P> orientate4(detail::tvec3<T, P> const & angles); detail::tmat4x4<T, P> orientate4(detail::tvec3<T, P> const & angles);
/// @} /// @}
}//namespace glm }//namespace glm

View File

@ -53,7 +53,7 @@ namespace glm
/// Extends of Length the Origin position using the (Source - Origin) direction. /// Extends of Length the Origin position using the (Source - Origin) direction.
/// @see gtx_extend /// @see gtx_extend
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType extend( genType extend(
genType const & Origin, genType const & Origin,
genType const & Source, genType const & Source,
typename genType::value_type const Length); typename genType::value_type const Length);

View File

@ -54,7 +54,7 @@ namespace glm
/// Return the minimum component-wise values of 3 inputs /// Return the minimum component-wise values of 3 inputs
/// @see gtx_extented_min_max /// @see gtx_extented_min_max
template <typename T> template <typename T>
GLM_FUNC_DECL T min( T min(
T const & x, T const & x,
T const & y, T const & y,
T const & z); T const & z);
@ -62,7 +62,7 @@ namespace glm
/// Return the minimum component-wise values of 3 inputs /// Return the minimum component-wise values of 3 inputs
/// @see gtx_extented_min_max /// @see gtx_extented_min_max
template <typename T, template <typename> class C> template <typename T, template <typename> class C>
GLM_FUNC_DECL C<T> min( C<T> min(
C<T> const & x, C<T> const & x,
typename C<T>::T const & y, typename C<T>::T const & y,
typename C<T>::T const & z); typename C<T>::T const & z);
@ -70,7 +70,7 @@ namespace glm
/// Return the minimum component-wise values of 3 inputs /// Return the minimum component-wise values of 3 inputs
/// @see gtx_extented_min_max /// @see gtx_extented_min_max
template <typename T, template <typename> class C> template <typename T, template <typename> class C>
GLM_FUNC_DECL C<T> min( C<T> min(
C<T> const & x, C<T> const & x,
C<T> const & y, C<T> const & y,
C<T> const & z); C<T> const & z);
@ -78,7 +78,7 @@ namespace glm
/// Return the minimum component-wise values of 4 inputs /// Return the minimum component-wise values of 4 inputs
/// @see gtx_extented_min_max /// @see gtx_extented_min_max
template <typename T> template <typename T>
GLM_FUNC_DECL T min( T min(
T const & x, T const & x,
T const & y, T const & y,
T const & z, T const & z,
@ -87,7 +87,7 @@ namespace glm
/// Return the minimum component-wise values of 4 inputs /// Return the minimum component-wise values of 4 inputs
/// @see gtx_extented_min_max /// @see gtx_extented_min_max
template <typename T, template <typename> class C> template <typename T, template <typename> class C>
GLM_FUNC_DECL C<T> min( C<T> min(
C<T> const & x, C<T> const & x,
typename C<T>::T const & y, typename C<T>::T const & y,
typename C<T>::T const & z, typename C<T>::T const & z,
@ -96,7 +96,7 @@ namespace glm
/// Return the minimum component-wise values of 4 inputs /// Return the minimum component-wise values of 4 inputs
/// @see gtx_extented_min_max /// @see gtx_extented_min_max
template <typename T, template <typename> class C> template <typename T, template <typename> class C>
GLM_FUNC_DECL C<T> min( C<T> min(
C<T> const & x, C<T> const & x,
C<T> const & y, C<T> const & y,
C<T> const & z, C<T> const & z,
@ -105,7 +105,7 @@ namespace glm
/// Return the maximum component-wise values of 3 inputs /// Return the maximum component-wise values of 3 inputs
/// @see gtx_extented_min_max /// @see gtx_extented_min_max
template <typename T> template <typename T>
GLM_FUNC_DECL T max( T max(
T const & x, T const & x,
T const & y, T const & y,
T const & z); T const & z);
@ -113,7 +113,7 @@ namespace glm
/// Return the maximum component-wise values of 3 inputs /// Return the maximum component-wise values of 3 inputs
/// @see gtx_extented_min_max /// @see gtx_extented_min_max
template <typename T, template <typename> class C> template <typename T, template <typename> class C>
GLM_FUNC_DECL C<T> max( C<T> max(
C<T> const & x, C<T> const & x,
typename C<T>::T const & y, typename C<T>::T const & y,
typename C<T>::T const & z); typename C<T>::T const & z);
@ -121,7 +121,7 @@ namespace glm
/// Return the maximum component-wise values of 3 inputs /// Return the maximum component-wise values of 3 inputs
/// @see gtx_extented_min_max /// @see gtx_extented_min_max
template <typename T, template <typename> class C> template <typename T, template <typename> class C>
GLM_FUNC_DECL C<T> max( C<T> max(
C<T> const & x, C<T> const & x,
C<T> const & y, C<T> const & y,
C<T> const & z); C<T> const & z);
@ -129,7 +129,7 @@ namespace glm
/// Return the maximum component-wise values of 4 inputs /// Return the maximum component-wise values of 4 inputs
/// @see gtx_extented_min_max /// @see gtx_extented_min_max
template <typename T> template <typename T>
GLM_FUNC_DECL T max( T max(
T const & x, T const & x,
T const & y, T const & y,
T const & z, T const & z,
@ -138,7 +138,7 @@ namespace glm
/// Return the maximum component-wise values of 4 inputs /// Return the maximum component-wise values of 4 inputs
/// @see gtx_extented_min_max /// @see gtx_extented_min_max
template <typename T, template <typename> class C> template <typename T, template <typename> class C>
GLM_FUNC_DECL C<T> max( C<T> max(
C<T> const & x, C<T> const & x,
typename C<T>::T const & y, typename C<T>::T const & y,
typename C<T>::T const & z, typename C<T>::T const & z,
@ -147,7 +147,7 @@ namespace glm
/// Return the maximum component-wise values of 4 inputs /// Return the maximum component-wise values of 4 inputs
/// @see gtx_extented_min_max /// @see gtx_extented_min_max
template <typename T, template <typename> class C> template <typename T, template <typename> class C>
GLM_FUNC_DECL C<T> max( C<T> max(
C<T> const & x, C<T> const & x,
C<T> const & y, C<T> const & y,
C<T> const & z, C<T> const & z,

View File

@ -54,41 +54,41 @@ namespace glm
/// Faster than the common pow function but less accurate. /// Faster than the common pow function but less accurate.
/// @see gtx_fast_exponential /// @see gtx_fast_exponential
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType fastPow( genType fastPow(
genType const & x, genType const & x,
genType const & y); genType const & y);
/// Faster than the common pow function but less accurate. /// Faster than the common pow function but less accurate.
/// @see gtx_fast_exponential /// @see gtx_fast_exponential
template <typename genTypeT, typename genTypeU> template <typename genTypeT, typename genTypeU>
GLM_FUNC_DECL genTypeT fastPow( genTypeT fastPow(
genTypeT const & x, genTypeT const & x,
genTypeU const & y); genTypeU const & y);
/// Faster than the common exp function but less accurate. /// Faster than the common exp function but less accurate.
/// @see gtx_fast_exponential /// @see gtx_fast_exponential
template <typename T> template <typename T>
GLM_FUNC_DECL T fastExp(const T& x); T fastExp(const T& x);
/// Faster than the common log function but less accurate. /// Faster than the common log function but less accurate.
/// @see gtx_fast_exponential /// @see gtx_fast_exponential
template <typename T> template <typename T>
GLM_FUNC_DECL T fastLog(const T& x); T fastLog(const T& x);
/// Faster than the common exp2 function but less accurate. /// Faster than the common exp2 function but less accurate.
/// @see gtx_fast_exponential /// @see gtx_fast_exponential
template <typename T> template <typename T>
GLM_FUNC_DECL T fastExp2(const T& x); T fastExp2(const T& x);
/// Faster than the common log2 function but less accurate. /// Faster than the common log2 function but less accurate.
/// @see gtx_fast_exponential /// @see gtx_fast_exponential
template <typename T> template <typename T>
GLM_FUNC_DECL T fastLog2(const T& x); T fastLog2(const T& x);
/// Faster than the common ln function but less accurate. /// Faster than the common ln function but less accurate.
/// @see gtx_fast_exponential /// @see gtx_fast_exponential
template <typename T> template <typename T>
GLM_FUNC_DECL T fastLn(const T& x); T fastLn(const T& x);
/// @} /// @}
}//namespace glm }//namespace glm

View File

@ -55,32 +55,32 @@ namespace glm
//! Faster than the common sqrt function but less accurate. //! Faster than the common sqrt function but less accurate.
//! From GLM_GTX_fast_square_root extension. //! From GLM_GTX_fast_square_root extension.
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType fastSqrt(genType const & x); genType fastSqrt(genType const & x);
//! Faster than the common inversesqrt function but less accurate. //! Faster than the common inversesqrt function but less accurate.
//! From GLM_GTX_fast_square_root extension. //! From GLM_GTX_fast_square_root extension.
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType fastInverseSqrt(genType const & x); genType fastInverseSqrt(genType const & x);
//! Faster than the common inversesqrt function but less accurate. //! Faster than the common inversesqrt function but less accurate.
//! From GLM_GTX_fast_square_root extension. //! From GLM_GTX_fast_square_root extension.
template <typename T, precision P, template <typename, precision> class vecType> template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL vecType<T, P> fastInverseSqrt(vecType<T, P> const & x); vecType<T, P> fastInverseSqrt(vecType<T, P> const & x);
//! Faster than the common length function but less accurate. //! Faster than the common length function but less accurate.
//! From GLM_GTX_fast_square_root extension. //! From GLM_GTX_fast_square_root extension.
template <typename genType> template <typename genType>
GLM_FUNC_DECL typename genType::value_type fastLength(genType const & x); typename genType::value_type fastLength(genType const & x);
//! Faster than the common distance function but less accurate. //! Faster than the common distance function but less accurate.
//! From GLM_GTX_fast_square_root extension. //! From GLM_GTX_fast_square_root extension.
template <typename genType> template <typename genType>
GLM_FUNC_DECL typename genType::value_type fastDistance(genType const & x, genType const & y); typename genType::value_type fastDistance(genType const & x, genType const & y);
//! Faster than the common normalize function but less accurate. //! Faster than the common normalize function but less accurate.
//! From GLM_GTX_fast_square_root extension. //! From GLM_GTX_fast_square_root extension.
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType fastNormalize(genType const & x); genType fastNormalize(genType const & x);
/// @} /// @}
}// namespace glm }// namespace glm

View File

@ -54,43 +54,43 @@ namespace glm
//! Defined between -2pi and 2pi. //! Defined between -2pi and 2pi.
//! From GLM_GTX_fast_trigonometry extension. //! From GLM_GTX_fast_trigonometry extension.
template <typename T> template <typename T>
GLM_FUNC_DECL T fastSin(const T& angle); T fastSin(const T& angle);
//! Faster than the common cos function but less accurate. //! Faster than the common cos function but less accurate.
//! Defined between -2pi and 2pi. //! Defined between -2pi and 2pi.
//! From GLM_GTX_fast_trigonometry extension. //! From GLM_GTX_fast_trigonometry extension.
template <typename T> template <typename T>
GLM_FUNC_DECL T fastCos(const T& angle); T fastCos(const T& angle);
//! Faster than the common tan function but less accurate. //! Faster than the common tan function but less accurate.
//! Defined between -2pi and 2pi. //! Defined between -2pi and 2pi.
//! From GLM_GTX_fast_trigonometry extension. //! From GLM_GTX_fast_trigonometry extension.
template <typename T> template <typename T>
GLM_FUNC_DECL T fastTan(const T& angle); T fastTan(const T& angle);
//! Faster than the common asin function but less accurate. //! Faster than the common asin function but less accurate.
//! Defined between -2pi and 2pi. //! Defined between -2pi and 2pi.
//! From GLM_GTX_fast_trigonometry extension. //! From GLM_GTX_fast_trigonometry extension.
template <typename T> template <typename T>
GLM_FUNC_DECL T fastAsin(const T& angle); T fastAsin(const T& angle);
//! Faster than the common acos function but less accurate. //! Faster than the common acos function but less accurate.
//! Defined between -2pi and 2pi. //! Defined between -2pi and 2pi.
//! From GLM_GTX_fast_trigonometry extension. //! From GLM_GTX_fast_trigonometry extension.
template <typename T> template <typename T>
GLM_FUNC_DECL T fastAcos(const T& angle); T fastAcos(const T& angle);
//! Faster than the common atan function but less accurate. //! Faster than the common atan function but less accurate.
//! Defined between -2pi and 2pi. //! Defined between -2pi and 2pi.
//! From GLM_GTX_fast_trigonometry extension. //! From GLM_GTX_fast_trigonometry extension.
template <typename T> template <typename T>
GLM_FUNC_DECL T fastAtan(const T& y, const T& x); T fastAtan(const T& y, const T& x);
//! Faster than the common atan function but less accurate. //! Faster than the common atan function but less accurate.
//! Defined between -2pi and 2pi. //! Defined between -2pi and 2pi.
//! From GLM_GTX_fast_trigonometry extension. //! From GLM_GTX_fast_trigonometry extension.
template <typename T> template <typename T>
GLM_FUNC_DECL T fastAtan(const T& angle); T fastAtan(const T& angle);
/// @} /// @}
}//namespace glm }//namespace glm

View File

@ -54,7 +54,7 @@ namespace glm
/// Return a color from a radial gradient. /// Return a color from a radial gradient.
/// @see - gtx_gradient_paint /// @see - gtx_gradient_paint
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL T radialGradient( T radialGradient(
detail::tvec2<T, P> const & Center, detail::tvec2<T, P> const & Center,
T const & Radius, T const & Radius,
detail::tvec2<T, P> const & Focal, detail::tvec2<T, P> const & Focal,
@ -63,7 +63,7 @@ namespace glm
/// Return a color from a linear gradient. /// Return a color from a linear gradient.
/// @see - gtx_gradient_paint /// @see - gtx_gradient_paint
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL T linearGradient( T linearGradient(
detail::tvec2<T, P> const & Point0, detail::tvec2<T, P> const & Point0,
detail::tvec2<T, P> const & Point1, detail::tvec2<T, P> const & Point1,
detail::tvec2<T, P> const & Position); detail::tvec2<T, P> const & Position);

View File

@ -53,7 +53,7 @@ namespace glm
//! Return if a trihedron right handed or not. //! Return if a trihedron right handed or not.
//! From GLM_GTX_handed_coordinate_space extension. //! From GLM_GTX_handed_coordinate_space extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL bool rightHanded( bool rightHanded(
detail::tvec3<T, P> const & tangent, detail::tvec3<T, P> const & tangent,
detail::tvec3<T, P> const & binormal, detail::tvec3<T, P> const & binormal,
detail::tvec3<T, P> const & normal); detail::tvec3<T, P> const & normal);
@ -61,7 +61,7 @@ namespace glm
//! Return if a trihedron left handed or not. //! Return if a trihedron left handed or not.
//! From GLM_GTX_handed_coordinate_space extension. //! From GLM_GTX_handed_coordinate_space extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL bool leftHanded( bool leftHanded(
detail::tvec3<T, P> const & tangent, detail::tvec3<T, P> const & tangent,
detail::tvec3<T, P> const & binormal, detail::tvec3<T, P> const & binormal,
detail::tvec3<T, P> const & normal); detail::tvec3<T, P> const & normal);

View File

@ -52,29 +52,29 @@ namespace glm
//! Returns x raised to the y power. //! Returns x raised to the y power.
//! From GLM_GTX_integer extension. //! From GLM_GTX_integer extension.
GLM_FUNC_DECL int pow(int x, int y); int pow(int x, int y);
//! Returns the positive square root of x. //! Returns the positive square root of x.
//! From GLM_GTX_integer extension. //! From GLM_GTX_integer extension.
GLM_FUNC_DECL int sqrt(int x); int sqrt(int x);
//! Returns the log2 of x. Can be reliably using to compute mipmap count from the texture size. //! Returns the log2 of x. Can be reliably using to compute mipmap count from the texture size.
//! From GLM_GTX_integer extension. //! From GLM_GTX_integer extension.
template <typename genIUType> template <typename genIUType>
GLM_FUNC_DECL genIUType log2(genIUType x); genIUType log2(genIUType x);
//! Returns the floor log2 of x. //! Returns the floor log2 of x.
//! From GLM_GTX_integer extension. //! From GLM_GTX_integer extension.
GLM_FUNC_DECL unsigned int floor_log2(unsigned int x); unsigned int floor_log2(unsigned int x);
//! Modulus. Returns x - y * floor(x / y) for each component in x using the floating point value y. //! Modulus. Returns x - y * floor(x / y) for each component in x using the floating point value y.
//! From GLM_GTX_integer extension. //! From GLM_GTX_integer extension.
GLM_FUNC_DECL int mod(int x, int y); int mod(int x, int y);
//! Return the factorial value of a number (!12 max, integer only) //! Return the factorial value of a number (!12 max, integer only)
//! From GLM_GTX_integer extension. //! From GLM_GTX_integer extension.
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType factorial(genType const & x); genType factorial(genType const & x);
//! 32bit signed integer. //! 32bit signed integer.
//! From GLM_GTX_integer extension. //! From GLM_GTX_integer extension.
@ -82,19 +82,19 @@ namespace glm
//! Returns x raised to the y power. //! Returns x raised to the y power.
//! From GLM_GTX_integer extension. //! From GLM_GTX_integer extension.
GLM_FUNC_DECL uint pow(uint x, uint y); uint pow(uint x, uint y);
//! Returns the positive square root of x. //! Returns the positive square root of x.
//! From GLM_GTX_integer extension. //! From GLM_GTX_integer extension.
GLM_FUNC_DECL uint sqrt(uint x); uint sqrt(uint x);
//! Modulus. Returns x - y * floor(x / y) for each component in x using the floating point value y. //! Modulus. Returns x - y * floor(x / y) for each component in x using the floating point value y.
//! From GLM_GTX_integer extension. //! From GLM_GTX_integer extension.
GLM_FUNC_DECL uint mod(uint x, uint y); uint mod(uint x, uint y);
//! Returns the number of leading zeros. //! Returns the number of leading zeros.
//! From GLM_GTX_integer extension. //! From GLM_GTX_integer extension.
GLM_FUNC_DECL uint nlz(uint x); uint nlz(uint x);
/// @} /// @}
}//namespace glm }//namespace glm

View File

@ -56,7 +56,7 @@ namespace glm
//! Ray direction and plane normal must be unit length. //! Ray direction and plane normal must be unit length.
//! From GLM_GTX_intersect extension. //! From GLM_GTX_intersect extension.
template <typename genType> template <typename genType>
GLM_FUNC_DECL bool intersectRayPlane( bool intersectRayPlane(
genType const & orig, genType const & dir, genType const & orig, genType const & dir,
genType const & planeOrig, genType const & planeNormal, genType const & planeOrig, genType const & planeNormal,
typename genType::value_type & intersectionDistance); typename genType::value_type & intersectionDistance);
@ -64,7 +64,7 @@ namespace glm
//! Compute the intersection of a ray and a triangle. //! Compute the intersection of a ray and a triangle.
//! From GLM_GTX_intersect extension. //! From GLM_GTX_intersect extension.
template <typename genType> template <typename genType>
GLM_FUNC_DECL bool intersectRayTriangle( bool intersectRayTriangle(
genType const & orig, genType const & dir, genType const & orig, genType const & dir,
genType const & vert0, genType const & vert1, genType const & vert2, genType const & vert0, genType const & vert1, genType const & vert2,
genType & baryPosition); genType & baryPosition);
@ -72,7 +72,7 @@ namespace glm
//! Compute the intersection of a line and a triangle. //! Compute the intersection of a line and a triangle.
//! From GLM_GTX_intersect extension. //! From GLM_GTX_intersect extension.
template <typename genType> template <typename genType>
GLM_FUNC_DECL bool intersectLineTriangle( bool intersectLineTriangle(
genType const & orig, genType const & dir, genType const & orig, genType const & dir,
genType const & vert0, genType const & vert1, genType const & vert2, genType const & vert0, genType const & vert1, genType const & vert2,
genType & position); genType & position);
@ -81,7 +81,7 @@ namespace glm
//! The ray direction vector is unit length. //! The ray direction vector is unit length.
//! From GLM_GTX_intersect extension. //! From GLM_GTX_intersect extension.
template <typename genType> template <typename genType>
GLM_FUNC_DECL bool intersectRaySphere( bool intersectRaySphere(
genType const & rayStarting, genType const & rayNormalizedDirection, genType const & rayStarting, genType const & rayNormalizedDirection,
genType const & sphereCenter, typename genType::value_type const sphereRadiusSquered, genType const & sphereCenter, typename genType::value_type const sphereRadiusSquered,
typename genType::value_type & intersectionDistance); typename genType::value_type & intersectionDistance);
@ -89,7 +89,7 @@ namespace glm
//! Compute the intersection of a ray and a sphere. //! Compute the intersection of a ray and a sphere.
//! From GLM_GTX_intersect extension. //! From GLM_GTX_intersect extension.
template <typename genType> template <typename genType>
GLM_FUNC_DECL bool intersectRaySphere( bool intersectRaySphere(
genType const & rayStarting, genType const & rayNormalizedDirection, genType const & rayStarting, genType const & rayNormalizedDirection,
genType const & sphereCenter, const typename genType::value_type sphereRadius, genType const & sphereCenter, const typename genType::value_type sphereRadius,
genType & intersectionPosition, genType & intersectionNormal); genType & intersectionPosition, genType & intersectionNormal);
@ -97,7 +97,7 @@ namespace glm
//! Compute the intersection of a line and a sphere. //! Compute the intersection of a line and a sphere.
//! From GLM_GTX_intersect extension //! From GLM_GTX_intersect extension
template <typename genType> template <typename genType>
GLM_FUNC_DECL bool intersectLineSphere( bool intersectLineSphere(
genType const & point0, genType const & point1, genType const & point0, genType const & point1,
genType const & sphereCenter, typename genType::value_type sphereRadius, genType const & sphereCenter, typename genType::value_type sphereRadius,
genType & intersectionPosition1, genType & intersectionNormal1, genType & intersectionPosition1, genType & intersectionNormal1,

50
deps/glm/gtx/io.hpp vendored
View File

@ -62,8 +62,8 @@ namespace glm
public: public:
GLM_FUNC_DECL explicit precision_guard(); explicit precision_guard();
GLM_FUNC_DECL ~precision_guard(); ~precision_guard();
private: private:
@ -77,8 +77,8 @@ namespace glm
public: public:
enum order_t { column_major, row_major, }; enum order_t { column_major, row_major, };
GLM_FUNC_DECL explicit format_guard(); explicit format_guard();
GLM_FUNC_DECL ~format_guard(); ~format_guard();
private: private:
@ -87,59 +87,59 @@ namespace glm
}; };
// decimal places (dflt: 3) // decimal places (dflt: 3)
GLM_FUNC_DECL unsigned& precision(); unsigned& precision();
// sign + value + '.' + decimals (dflt: 1 + 4 + 1 + precision()) // sign + value + '.' + decimals (dflt: 1 + 4 + 1 + precision())
GLM_FUNC_DECL unsigned& value_width(); unsigned& value_width();
// matrix output order (dflt: row_major) // matrix output order (dflt: row_major)
GLM_FUNC_DECL format_guard::order_t& order(); format_guard::order_t& order();
// carriage/return char (dflt: '\n') // carriage/return char (dflt: '\n')
GLM_FUNC_DECL char& cr(); char& cr();
// matrix output order -> column_major // matrix output order -> column_major
GLM_FUNC_DECL std::ios_base& column_major(std::ios_base&); std::ios_base& column_major(std::ios_base&);
// matrix output order -> row_major // matrix output order -> row_major
GLM_FUNC_DECL std::ios_base& row_major (std::ios_base&); std::ios_base& row_major (std::ios_base&);
// carriage/return char -> '\n' // carriage/return char -> '\n'
GLM_FUNC_DECL std::ios_base& formatted (std::ios_base&); std::ios_base& formatted (std::ios_base&);
// carriage/return char -> ' ' // carriage/return char -> ' '
GLM_FUNC_DECL std::ios_base& unformatted (std::ios_base&); std::ios_base& unformatted (std::ios_base&);
}//namespace io }//namespace io
namespace detail namespace detail
{ {
template <typename CTy, typename CTr, typename T, precision P> template <typename CTy, typename CTr, typename T, precision P>
GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tquat<T,P> const&); std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tquat<T,P> const&);
template <typename CTy, typename CTr, typename T, precision P> template <typename CTy, typename CTr, typename T, precision P>
GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tvec2<T,P> const&); std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tvec2<T,P> const&);
template <typename CTy, typename CTr, typename T, precision P> template <typename CTy, typename CTr, typename T, precision P>
GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tvec3<T,P> const&); std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tvec3<T,P> const&);
template <typename CTy, typename CTr, typename T, precision P> template <typename CTy, typename CTr, typename T, precision P>
GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tvec4<T,P> const&); std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tvec4<T,P> const&);
template <typename CTy, typename CTr, typename T, precision P> template <typename CTy, typename CTr, typename T, precision P>
GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tmat2x2<T,P> const&); std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tmat2x2<T,P> const&);
template <typename CTy, typename CTr, typename T, precision P> template <typename CTy, typename CTr, typename T, precision P>
GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tmat2x3<T,P> const&); std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tmat2x3<T,P> const&);
template <typename CTy, typename CTr, typename T, precision P> template <typename CTy, typename CTr, typename T, precision P>
GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tmat2x4<T,P> const&); std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tmat2x4<T,P> const&);
template <typename CTy, typename CTr, typename T, precision P> template <typename CTy, typename CTr, typename T, precision P>
GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tmat3x2<T,P> const&); std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tmat3x2<T,P> const&);
template <typename CTy, typename CTr, typename T, precision P> template <typename CTy, typename CTr, typename T, precision P>
GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tmat3x3<T,P> const&); std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tmat3x3<T,P> const&);
template <typename CTy, typename CTr, typename T, precision P> template <typename CTy, typename CTr, typename T, precision P>
GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tmat3x4<T,P> const&); std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tmat3x4<T,P> const&);
template <typename CTy, typename CTr, typename T, precision P> template <typename CTy, typename CTr, typename T, precision P>
GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tmat4x2<T,P> const&); std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tmat4x2<T,P> const&);
template <typename CTy, typename CTr, typename T, precision P> template <typename CTy, typename CTr, typename T, precision P>
GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tmat4x3<T,P> const&); std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tmat4x3<T,P> const&);
template <typename CTy, typename CTr, typename T, precision P> template <typename CTy, typename CTr, typename T, precision P>
GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tmat4x4<T,P> const&); std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tmat4x4<T,P> const&);
/// @} /// @}
}//namespace detail }//namespace detail

View File

@ -53,7 +53,7 @@ namespace glm
//! Logarithm for any base. //! Logarithm for any base.
//! From GLM_GTX_log_base. //! From GLM_GTX_log_base.
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType log( genType log(
genType const & x, genType const & x,
genType const & base); genType const & base);

View File

@ -54,13 +54,13 @@ namespace glm
//! Build a cross product matrix. //! Build a cross product matrix.
//! From GLM_GTX_matrix_cross_product extension. //! From GLM_GTX_matrix_cross_product extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tmat3x3<T, P> matrixCross3( detail::tmat3x3<T, P> matrixCross3(
detail::tvec3<T, P> const & x); detail::tvec3<T, P> const & x);
//! Build a cross product matrix. //! Build a cross product matrix.
//! From GLM_GTX_matrix_cross_product extension. //! From GLM_GTX_matrix_cross_product extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tmat4x4<T, P> matrixCross4( detail::tmat4x4<T, P> matrixCross4(
detail::tvec3<T, P> const & x); detail::tvec3<T, P> const & x);
/// @} /// @}

View File

@ -53,7 +53,7 @@ namespace glm
/// Get the axis and angle of the rotation from a matrix. /// Get the axis and angle of the rotation from a matrix.
/// From GLM_GTX_matrix_interpolation extension. /// From GLM_GTX_matrix_interpolation extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL void axisAngle( void axisAngle(
detail::tmat4x4<T, P> const & mat, detail::tmat4x4<T, P> const & mat,
detail::tvec3<T, P> & axis, detail::tvec3<T, P> & axis,
T & angle); T & angle);
@ -61,21 +61,21 @@ namespace glm
/// Build a matrix from axis and angle. /// Build a matrix from axis and angle.
/// From GLM_GTX_matrix_interpolation extension. /// From GLM_GTX_matrix_interpolation extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tmat4x4<T, P> axisAngleMatrix( detail::tmat4x4<T, P> axisAngleMatrix(
detail::tvec3<T, P> const & axis, detail::tvec3<T, P> const & axis,
T const angle); T const angle);
/// Extracts the rotation part of a matrix. /// Extracts the rotation part of a matrix.
/// From GLM_GTX_matrix_interpolation extension. /// From GLM_GTX_matrix_interpolation extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tmat4x4<T, P> extractMatrixRotation( detail::tmat4x4<T, P> extractMatrixRotation(
detail::tmat4x4<T, P> const & mat); detail::tmat4x4<T, P> const & mat);
/// Build a interpolation of 4 * 4 matrixes. /// Build a interpolation of 4 * 4 matrixes.
/// From GLM_GTX_matrix_interpolation extension. /// From GLM_GTX_matrix_interpolation extension.
/// Warning! works only with rotation and/or translation matrixes, scale will generate unexpected results. /// Warning! works only with rotation and/or translation matrixes, scale will generate unexpected results.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tmat4x4<T, P> interpolate( detail::tmat4x4<T, P> interpolate(
detail::tmat4x4<T, P> const & m1, detail::tmat4x4<T, P> const & m1,
detail::tmat4x4<T, P> const & m2, detail::tmat4x4<T, P> const & m2,
T const delta); T const delta);

View File

@ -54,20 +54,20 @@ namespace glm
//! Build a row major matrix from row vectors. //! Build a row major matrix from row vectors.
//! From GLM_GTX_matrix_major_storage extension. //! From GLM_GTX_matrix_major_storage extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tmat2x2<T, P> rowMajor2( detail::tmat2x2<T, P> rowMajor2(
detail::tvec2<T, P> const & v1, detail::tvec2<T, P> const & v1,
detail::tvec2<T, P> const & v2); detail::tvec2<T, P> const & v2);
//! Build a row major matrix from other matrix. //! Build a row major matrix from other matrix.
//! From GLM_GTX_matrix_major_storage extension. //! From GLM_GTX_matrix_major_storage extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tmat2x2<T, P> rowMajor2( detail::tmat2x2<T, P> rowMajor2(
detail::tmat2x2<T, P> const & m); detail::tmat2x2<T, P> const & m);
//! Build a row major matrix from row vectors. //! Build a row major matrix from row vectors.
//! From GLM_GTX_matrix_major_storage extension. //! From GLM_GTX_matrix_major_storage extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tmat3x3<T, P> rowMajor3( detail::tmat3x3<T, P> rowMajor3(
detail::tvec3<T, P> const & v1, detail::tvec3<T, P> const & v1,
detail::tvec3<T, P> const & v2, detail::tvec3<T, P> const & v2,
detail::tvec3<T, P> const & v3); detail::tvec3<T, P> const & v3);
@ -75,13 +75,13 @@ namespace glm
//! Build a row major matrix from other matrix. //! Build a row major matrix from other matrix.
//! From GLM_GTX_matrix_major_storage extension. //! From GLM_GTX_matrix_major_storage extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tmat3x3<T, P> rowMajor3( detail::tmat3x3<T, P> rowMajor3(
detail::tmat3x3<T, P> const & m); detail::tmat3x3<T, P> const & m);
//! Build a row major matrix from row vectors. //! Build a row major matrix from row vectors.
//! From GLM_GTX_matrix_major_storage extension. //! From GLM_GTX_matrix_major_storage extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tmat4x4<T, P> rowMajor4( detail::tmat4x4<T, P> rowMajor4(
detail::tvec4<T, P> const & v1, detail::tvec4<T, P> const & v1,
detail::tvec4<T, P> const & v2, detail::tvec4<T, P> const & v2,
detail::tvec4<T, P> const & v3, detail::tvec4<T, P> const & v3,
@ -90,26 +90,26 @@ namespace glm
//! Build a row major matrix from other matrix. //! Build a row major matrix from other matrix.
//! From GLM_GTX_matrix_major_storage extension. //! From GLM_GTX_matrix_major_storage extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tmat4x4<T, P> rowMajor4( detail::tmat4x4<T, P> rowMajor4(
detail::tmat4x4<T, P> const & m); detail::tmat4x4<T, P> const & m);
//! Build a column major matrix from column vectors. //! Build a column major matrix from column vectors.
//! From GLM_GTX_matrix_major_storage extension. //! From GLM_GTX_matrix_major_storage extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tmat2x2<T, P> colMajor2( detail::tmat2x2<T, P> colMajor2(
detail::tvec2<T, P> const & v1, detail::tvec2<T, P> const & v1,
detail::tvec2<T, P> const & v2); detail::tvec2<T, P> const & v2);
//! Build a column major matrix from other matrix. //! Build a column major matrix from other matrix.
//! From GLM_GTX_matrix_major_storage extension. //! From GLM_GTX_matrix_major_storage extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tmat2x2<T, P> colMajor2( detail::tmat2x2<T, P> colMajor2(
detail::tmat2x2<T, P> const & m); detail::tmat2x2<T, P> const & m);
//! Build a column major matrix from column vectors. //! Build a column major matrix from column vectors.
//! From GLM_GTX_matrix_major_storage extension. //! From GLM_GTX_matrix_major_storage extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tmat3x3<T, P> colMajor3( detail::tmat3x3<T, P> colMajor3(
detail::tvec3<T, P> const & v1, detail::tvec3<T, P> const & v1,
detail::tvec3<T, P> const & v2, detail::tvec3<T, P> const & v2,
detail::tvec3<T, P> const & v3); detail::tvec3<T, P> const & v3);
@ -117,13 +117,13 @@ namespace glm
//! Build a column major matrix from other matrix. //! Build a column major matrix from other matrix.
//! From GLM_GTX_matrix_major_storage extension. //! From GLM_GTX_matrix_major_storage extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tmat3x3<T, P> colMajor3( detail::tmat3x3<T, P> colMajor3(
detail::tmat3x3<T, P> const & m); detail::tmat3x3<T, P> const & m);
//! Build a column major matrix from column vectors. //! Build a column major matrix from column vectors.
//! From GLM_GTX_matrix_major_storage extension. //! From GLM_GTX_matrix_major_storage extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tmat4x4<T, P> colMajor4( detail::tmat4x4<T, P> colMajor4(
detail::tvec4<T, P> const & v1, detail::tvec4<T, P> const & v1,
detail::tvec4<T, P> const & v2, detail::tvec4<T, P> const & v2,
detail::tvec4<T, P> const & v3, detail::tvec4<T, P> const & v3,
@ -132,7 +132,7 @@ namespace glm
//! Build a column major matrix from other matrix. //! Build a column major matrix from other matrix.
//! From GLM_GTX_matrix_major_storage extension. //! From GLM_GTX_matrix_major_storage extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tmat4x4<T, P> colMajor4( detail::tmat4x4<T, P> colMajor4(
detail::tmat4x4<T, P> const & m); detail::tmat4x4<T, P> const & m);
/// @} /// @}

View File

@ -53,55 +53,55 @@ namespace glm
//! Build a diagonal matrix. //! Build a diagonal matrix.
//! From GLM_GTX_matrix_operation extension. //! From GLM_GTX_matrix_operation extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tmat2x2<T, P> diagonal2x2( detail::tmat2x2<T, P> diagonal2x2(
detail::tvec2<T, P> const & v); detail::tvec2<T, P> const & v);
//! Build a diagonal matrix. //! Build a diagonal matrix.
//! From GLM_GTX_matrix_operation extension. //! From GLM_GTX_matrix_operation extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tmat2x3<T, P> diagonal2x3( detail::tmat2x3<T, P> diagonal2x3(
detail::tvec2<T, P> const & v); detail::tvec2<T, P> const & v);
//! Build a diagonal matrix. //! Build a diagonal matrix.
//! From GLM_GTX_matrix_operation extension. //! From GLM_GTX_matrix_operation extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tmat2x4<T, P> diagonal2x4( detail::tmat2x4<T, P> diagonal2x4(
detail::tvec2<T, P> const & v); detail::tvec2<T, P> const & v);
//! Build a diagonal matrix. //! Build a diagonal matrix.
//! From GLM_GTX_matrix_operation extension. //! From GLM_GTX_matrix_operation extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tmat3x2<T, P> diagonal3x2( detail::tmat3x2<T, P> diagonal3x2(
detail::tvec2<T, P> const & v); detail::tvec2<T, P> const & v);
//! Build a diagonal matrix. //! Build a diagonal matrix.
//! From GLM_GTX_matrix_operation extension. //! From GLM_GTX_matrix_operation extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tmat3x3<T, P> diagonal3x3( detail::tmat3x3<T, P> diagonal3x3(
detail::tvec3<T, P> const & v); detail::tvec3<T, P> const & v);
//! Build a diagonal matrix. //! Build a diagonal matrix.
//! From GLM_GTX_matrix_operation extension. //! From GLM_GTX_matrix_operation extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tmat3x4<T, P> diagonal3x4( detail::tmat3x4<T, P> diagonal3x4(
detail::tvec3<T, P> const & v); detail::tvec3<T, P> const & v);
//! Build a diagonal matrix. //! Build a diagonal matrix.
//! From GLM_GTX_matrix_operation extension. //! From GLM_GTX_matrix_operation extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tmat4x2<T, P> diagonal4x2( detail::tmat4x2<T, P> diagonal4x2(
detail::tvec2<T, P> const & v); detail::tvec2<T, P> const & v);
//! Build a diagonal matrix. //! Build a diagonal matrix.
//! From GLM_GTX_matrix_operation extension. //! From GLM_GTX_matrix_operation extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tmat4x3<T, P> diagonal4x3( detail::tmat4x3<T, P> diagonal4x3(
detail::tvec3<T, P> const & v); detail::tvec3<T, P> const & v);
//! Build a diagonal matrix. //! Build a diagonal matrix.
//! From GLM_GTX_matrix_operation extension. //! From GLM_GTX_matrix_operation extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tmat4x4<T, P> diagonal4x4( detail::tmat4x4<T, P> diagonal4x4(
detail::tvec4<T, P> const & v); detail::tvec4<T, P> const & v);
/// @} /// @}

View File

@ -56,42 +56,42 @@ namespace glm
/// Return whether a matrix a null matrix. /// Return whether a matrix a null matrix.
/// From GLM_GTX_matrix_query extension. /// From GLM_GTX_matrix_query extension.
template<typename T, precision P> template<typename T, precision P>
GLM_FUNC_DECL bool isNull(detail::tmat2x2<T, P> const & m, T const & epsilon); bool isNull(detail::tmat2x2<T, P> const & m, T const & epsilon);
/// Return whether a matrix a null matrix. /// Return whether a matrix a null matrix.
/// From GLM_GTX_matrix_query extension. /// From GLM_GTX_matrix_query extension.
template<typename T, precision P> template<typename T, precision P>
GLM_FUNC_DECL bool isNull(detail::tmat3x3<T, P> const & m, T const & epsilon); bool isNull(detail::tmat3x3<T, P> const & m, T const & epsilon);
/// Return whether a matrix is a null matrix. /// Return whether a matrix is a null matrix.
/// From GLM_GTX_matrix_query extension. /// From GLM_GTX_matrix_query extension.
template<typename T, precision P> template<typename T, precision P>
GLM_FUNC_DECL bool isNull(detail::tmat4x4<T, P> const & m, T const & epsilon); bool isNull(detail::tmat4x4<T, P> const & m, T const & epsilon);
/// Return whether a matrix is an identity matrix. /// Return whether a matrix is an identity matrix.
/// From GLM_GTX_matrix_query extension. /// From GLM_GTX_matrix_query extension.
template<typename T, precision P, template <typename, precision> class matType> template<typename T, precision P, template <typename, precision> class matType>
GLM_FUNC_DECL bool isIdentity(matType<T, P> const & m, T const & epsilon); bool isIdentity(matType<T, P> const & m, T const & epsilon);
/// Return whether a matrix is a normalized matrix. /// Return whether a matrix is a normalized matrix.
/// From GLM_GTX_matrix_query extension. /// From GLM_GTX_matrix_query extension.
template<typename T, precision P> template<typename T, precision P>
GLM_FUNC_DECL bool isNormalized(detail::tmat2x2<T, P> const & m, T const & epsilon); bool isNormalized(detail::tmat2x2<T, P> const & m, T const & epsilon);
/// Return whether a matrix is a normalized matrix. /// Return whether a matrix is a normalized matrix.
/// From GLM_GTX_matrix_query extension. /// From GLM_GTX_matrix_query extension.
template<typename T, precision P> template<typename T, precision P>
GLM_FUNC_DECL bool isNormalized(detail::tmat3x3<T, P> const & m, T const & epsilon); bool isNormalized(detail::tmat3x3<T, P> const & m, T const & epsilon);
/// Return whether a matrix is a normalized matrix. /// Return whether a matrix is a normalized matrix.
/// From GLM_GTX_matrix_query extension. /// From GLM_GTX_matrix_query extension.
template<typename T, precision P> template<typename T, precision P>
GLM_FUNC_DECL bool isNormalized(detail::tmat4x4<T, P> const & m, T const & epsilon); bool isNormalized(detail::tmat4x4<T, P> const & m, T const & epsilon);
/// Return whether a matrix is an orthonormalized matrix. /// Return whether a matrix is an orthonormalized matrix.
/// From GLM_GTX_matrix_query extension. /// From GLM_GTX_matrix_query extension.
template<typename T, precision P, template <typename, precision> class matType> template<typename T, precision P, template <typename, precision> class matType>
GLM_FUNC_DECL bool isOrthogonal(matType<T, P> const & m, T const & epsilon); bool isOrthogonal(matType<T, P> const & m, T const & epsilon);
/// @} /// @}
}//namespace glm }//namespace glm

View File

@ -52,7 +52,7 @@ namespace glm
/// @brief Mixed product of 3 vectors (from GLM_GTX_mixed_product extension) /// @brief Mixed product of 3 vectors (from GLM_GTX_mixed_product extension)
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL T mixedProduct( T mixedProduct(
detail::tvec3<T, P> const & v1, detail::tvec3<T, P> const & v1,
detail::tvec3<T, P> const & v2, detail::tvec3<T, P> const & v2,
detail::tvec3<T, P> const & v3); detail::tvec3<T, P> const & v3);

View File

@ -59,7 +59,7 @@ namespace glm
/// ///
/// @see gtx_multiple /// @see gtx_multiple
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType higherMultiple( genType higherMultiple(
genType const & Source, genType const & Source,
genType const & Multiple); genType const & Multiple);
@ -71,7 +71,7 @@ namespace glm
/// ///
/// @see gtx_multiple /// @see gtx_multiple
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType lowerMultiple( genType lowerMultiple(
genType const & Source, genType const & Source,
genType const & Multiple); genType const & Multiple);

20
deps/glm/gtx/norm.hpp vendored
View File

@ -55,59 +55,59 @@ namespace glm
//! Returns the squared length of x. //! Returns the squared length of x.
//! From GLM_GTX_norm extension. //! From GLM_GTX_norm extension.
template <typename T> template <typename T>
GLM_FUNC_DECL T length2( T length2(
T const & x); T const & x);
//! Returns the squared length of x. //! Returns the squared length of x.
//! From GLM_GTX_norm extension. //! From GLM_GTX_norm extension.
template <typename genType> template <typename genType>
GLM_FUNC_DECL typename genType::value_type length2( typename genType::value_type length2(
genType const & x); genType const & x);
//! Returns the squared distance between p0 and p1, i.e., length(p0 - p1). //! Returns the squared distance between p0 and p1, i.e., length(p0 - p1).
//! From GLM_GTX_norm extension. //! From GLM_GTX_norm extension.
template <typename T> template <typename T>
GLM_FUNC_DECL T distance2( T distance2(
T const & p0, T const & p0,
T const & p1); T const & p1);
//! Returns the squared distance between p0 and p1, i.e., length(p0 - p1). //! Returns the squared distance between p0 and p1, i.e., length(p0 - p1).
//! From GLM_GTX_norm extension. //! From GLM_GTX_norm extension.
template <typename genType> template <typename genType>
GLM_FUNC_DECL typename genType::value_type distance2( typename genType::value_type distance2(
genType const & p0, genType const & p0,
genType const & p1); genType const & p1);
//! Returns the L1 norm between x and y. //! Returns the L1 norm between x and y.
//! From GLM_GTX_norm extension. //! From GLM_GTX_norm extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL T l1Norm( T l1Norm(
detail::tvec3<T, P> const & x, detail::tvec3<T, P> const & x,
detail::tvec3<T, P> const & y); detail::tvec3<T, P> const & y);
//! Returns the L1 norm of v. //! Returns the L1 norm of v.
//! From GLM_GTX_norm extension. //! From GLM_GTX_norm extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL T l1Norm( T l1Norm(
detail::tvec3<T, P> const & v); detail::tvec3<T, P> const & v);
//! Returns the L2 norm between x and y. //! Returns the L2 norm between x and y.
//! From GLM_GTX_norm extension. //! From GLM_GTX_norm extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL T l2Norm( T l2Norm(
detail::tvec3<T, P> const & x, detail::tvec3<T, P> const & x,
detail::tvec3<T, P> const & y); detail::tvec3<T, P> const & y);
//! Returns the L2 norm of v. //! Returns the L2 norm of v.
//! From GLM_GTX_norm extension. //! From GLM_GTX_norm extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL T l2Norm( T l2Norm(
detail::tvec3<T, P> const & x); detail::tvec3<T, P> const & x);
//! Returns the L norm between x and y. //! Returns the L norm between x and y.
//! From GLM_GTX_norm extension. //! From GLM_GTX_norm extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL T lxNorm( T lxNorm(
detail::tvec3<T, P> const & x, detail::tvec3<T, P> const & x,
detail::tvec3<T, P> const & y, detail::tvec3<T, P> const & y,
unsigned int Depth); unsigned int Depth);
@ -115,7 +115,7 @@ namespace glm
//! Returns the L norm of v. //! Returns the L norm of v.
//! From GLM_GTX_norm extension. //! From GLM_GTX_norm extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL T lxNorm( T lxNorm(
detail::tvec3<T, P> const & x, detail::tvec3<T, P> const & x,
unsigned int Depth); unsigned int Depth);

View File

@ -54,7 +54,7 @@ namespace glm
//! Computes triangle normal from triangle points. //! Computes triangle normal from triangle points.
//! From GLM_GTX_normal extension. //! From GLM_GTX_normal extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tvec3<T, P> triangleNormal( detail::tvec3<T, P> triangleNormal(
detail::tvec3<T, P> const & p1, detail::tvec3<T, P> const & p1,
detail::tvec3<T, P> const & p2, detail::tvec3<T, P> const & p2,
detail::tvec3<T, P> const & p3); detail::tvec3<T, P> const & p3);

View File

@ -56,7 +56,7 @@ namespace glm
//! It's faster that dot(normalize(x), normalize(y)). //! It's faster that dot(normalize(x), normalize(y)).
//! From GLM_GTX_normalize_dot extension. //! From GLM_GTX_normalize_dot extension.
template <typename genType> template <typename genType>
GLM_FUNC_DECL typename genType::value_type normalizeDot( typename genType::value_type normalizeDot(
genType const & x, genType const & x,
genType const & y); genType const & y);
@ -64,7 +64,7 @@ namespace glm
//! Faster that dot(fastNormalize(x), fastNormalize(y)). //! Faster that dot(fastNormalize(x), fastNormalize(y)).
//! From GLM_GTX_normalize_dot extension. //! From GLM_GTX_normalize_dot extension.
template <typename genType> template <typename genType>
GLM_FUNC_DECL typename genType::value_type fastNormalizeDot( typename genType::value_type fastNormalizeDot(
genType const & x, genType const & x,
genType const & y); genType const & y);

View File

@ -54,36 +54,36 @@ namespace gtx
//! Returns x raised to the power of 2. //! Returns x raised to the power of 2.
//! From GLM_GTX_optimum_pow extension. //! From GLM_GTX_optimum_pow extension.
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType pow2(const genType& x); genType pow2(const genType& x);
//! Returns x raised to the power of 3. //! Returns x raised to the power of 3.
//! From GLM_GTX_optimum_pow extension. //! From GLM_GTX_optimum_pow extension.
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType pow3(const genType& x); genType pow3(const genType& x);
//! Returns x raised to the power of 4. //! Returns x raised to the power of 4.
//! From GLM_GTX_optimum_pow extension. //! From GLM_GTX_optimum_pow extension.
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType pow4(const genType& x); genType pow4(const genType& x);
//! Checks if the parameter is a power of 2 number. //! Checks if the parameter is a power of 2 number.
//! From GLM_GTX_optimum_pow extension. //! From GLM_GTX_optimum_pow extension.
GLM_FUNC_DECL bool powOfTwo(int num); bool powOfTwo(int num);
//! Checks to determine if the parameter component are power of 2 numbers. //! Checks to determine if the parameter component are power of 2 numbers.
//! From GLM_GTX_optimum_pow extension. //! From GLM_GTX_optimum_pow extension.
template <precision P> template <precision P>
GLM_FUNC_DECL detail::tvec2<bool, P> powOfTwo(detail::tvec2<int, P> const & x); detail::tvec2<bool, P> powOfTwo(detail::tvec2<int, P> const & x);
//! Checks to determine if the parameter component are power of 2 numbers. //! Checks to determine if the parameter component are power of 2 numbers.
//! From GLM_GTX_optimum_pow extension. //! From GLM_GTX_optimum_pow extension.
template <precision P> template <precision P>
GLM_FUNC_DECL detail::tvec3<bool, P> powOfTwo(detail::tvec3<int, P> const & x); detail::tvec3<bool, P> powOfTwo(detail::tvec3<int, P> const & x);
//! Checks to determine if the parameter component are power of 2 numbers. //! Checks to determine if the parameter component are power of 2 numbers.
//! From GLM_GTX_optimum_pow extension. //! From GLM_GTX_optimum_pow extension.
template <precision P> template <precision P>
GLM_FUNC_DECL detail::tvec4<bool, P> powOfTwo(detail::tvec4<int, P> const & x); detail::tvec4<bool, P> powOfTwo(detail::tvec4<int, P> const & x);
/// @} /// @}
}//namespace gtx }//namespace gtx

View File

@ -54,13 +54,13 @@ namespace glm
//! Returns the orthonormalized matrix of m. //! Returns the orthonormalized matrix of m.
//! From GLM_GTX_orthonormalize extension. //! From GLM_GTX_orthonormalize extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tmat3x3<T, P> orthonormalize( detail::tmat3x3<T, P> orthonormalize(
const detail::tmat3x3<T, P>& m); const detail::tmat3x3<T, P>& m);
//! Orthonormalizes x according y. //! Orthonormalizes x according y.
//! From GLM_GTX_orthonormalize extension. //! From GLM_GTX_orthonormalize extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tvec3<T, P> orthonormalize( detail::tvec3<T, P> orthonormalize(
const detail::tvec3<T, P>& x, const detail::tvec3<T, P>& x,
const detail::tvec3<T, P>& y); const detail::tvec3<T, P>& y);

View File

@ -55,7 +55,7 @@ namespace glm
//! Projects x a perpendicular axis of Normal. //! Projects x a perpendicular axis of Normal.
//! From GLM_GTX_perpendicular extension. //! From GLM_GTX_perpendicular extension.
template <typename vecType> template <typename vecType>
GLM_FUNC_DECL vecType perp( vecType perp(
vecType const & x, vecType const & x,
vecType const & Normal); vecType const & Normal);

View File

@ -54,14 +54,14 @@ namespace glm
/// ///
/// @see gtx_polar_coordinates /// @see gtx_polar_coordinates
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tvec3<T, P> polar( detail::tvec3<T, P> polar(
detail::tvec3<T, P> const & euclidean); detail::tvec3<T, P> const & euclidean);
/// Convert Polar to Euclidean coordinates. /// Convert Polar to Euclidean coordinates.
/// ///
/// @see gtx_polar_coordinates /// @see gtx_polar_coordinates
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tvec3<T, P> euclidean( detail::tvec3<T, P> euclidean(
detail::tvec2<T, P> const & polar); detail::tvec2<T, P> const & polar);
/// @} /// @}

View File

@ -53,7 +53,7 @@ namespace glm
//! Projects x on Normal. //! Projects x on Normal.
//! From GLM_GTX_projection extension. //! From GLM_GTX_projection extension.
template <typename vecType> template <typename vecType>
GLM_FUNC_DECL vecType proj( vecType proj(
vecType const & x, vecType const & x,
vecType const & Normal); vecType const & Normal);

View File

@ -58,7 +58,7 @@ namespace glm
/// ///
/// @see gtx_quaternion /// @see gtx_quaternion
template<typename T, precision P> template<typename T, precision P>
GLM_FUNC_DECL detail::tvec3<T, P> cross( detail::tvec3<T, P> cross(
detail::tquat<T, P> const & q, detail::tquat<T, P> const & q,
detail::tvec3<T, P> const & v); detail::tvec3<T, P> const & v);
@ -66,7 +66,7 @@ namespace glm
/// ///
/// @see gtx_quaternion /// @see gtx_quaternion
template<typename T, precision P> template<typename T, precision P>
GLM_FUNC_DECL detail::tvec3<T, P> cross( detail::tvec3<T, P> cross(
detail::tvec3<T, P> const & v, detail::tvec3<T, P> const & v,
detail::tquat<T, P> const & q); detail::tquat<T, P> const & q);
@ -75,7 +75,7 @@ namespace glm
/// ///
/// @see gtx_quaternion /// @see gtx_quaternion
template<typename T, precision P> template<typename T, precision P>
GLM_FUNC_DECL detail::tquat<T, P> squad( detail::tquat<T, P> squad(
detail::tquat<T, P> const & q1, detail::tquat<T, P> const & q1,
detail::tquat<T, P> const & q2, detail::tquat<T, P> const & q2,
detail::tquat<T, P> const & s1, detail::tquat<T, P> const & s1,
@ -86,7 +86,7 @@ namespace glm
/// ///
/// @see gtx_quaternion /// @see gtx_quaternion
template<typename T, precision P> template<typename T, precision P>
GLM_FUNC_DECL detail::tquat<T, P> intermediate( detail::tquat<T, P> intermediate(
detail::tquat<T, P> const & prev, detail::tquat<T, P> const & prev,
detail::tquat<T, P> const & curr, detail::tquat<T, P> const & curr,
detail::tquat<T, P> const & next); detail::tquat<T, P> const & next);
@ -95,21 +95,21 @@ namespace glm
/// ///
/// @see gtx_quaternion /// @see gtx_quaternion
template<typename T, precision P> template<typename T, precision P>
GLM_FUNC_DECL detail::tquat<T, P> exp( detail::tquat<T, P> exp(
detail::tquat<T, P> const & q); detail::tquat<T, P> const & q);
//! Returns a log of a quaternion. //! Returns a log of a quaternion.
/// ///
/// @see gtx_quaternion /// @see gtx_quaternion
template<typename T, precision P> template<typename T, precision P>
GLM_FUNC_DECL detail::tquat<T, P> log( detail::tquat<T, P> log(
detail::tquat<T, P> const & q); detail::tquat<T, P> const & q);
/// Returns x raised to the y power. /// Returns x raised to the y power.
/// ///
/// @see gtx_quaternion /// @see gtx_quaternion
template<typename T, precision P> template<typename T, precision P>
GLM_FUNC_DECL detail::tquat<T, P> pow( detail::tquat<T, P> pow(
detail::tquat<T, P> const & x, detail::tquat<T, P> const & x,
T const & y); T const & y);
@ -124,7 +124,7 @@ namespace glm
/// ///
/// @see gtx_quaternion /// @see gtx_quaternion
template<typename T, precision P> template<typename T, precision P>
GLM_FUNC_DECL detail::tvec3<T, P> rotate( detail::tvec3<T, P> rotate(
detail::tquat<T, P> const & q, detail::tquat<T, P> const & q,
detail::tvec3<T, P> const & v); detail::tvec3<T, P> const & v);
@ -132,7 +132,7 @@ namespace glm
/// ///
/// @see gtx_quaternion /// @see gtx_quaternion
template<typename T, precision P> template<typename T, precision P>
GLM_FUNC_DECL detail::tvec4<T, P> rotate( detail::tvec4<T, P> rotate(
detail::tquat<T, P> const & q, detail::tquat<T, P> const & q,
detail::tvec4<T, P> const & v); detail::tvec4<T, P> const & v);
@ -140,42 +140,42 @@ namespace glm
/// ///
/// @see gtx_quaternion /// @see gtx_quaternion
template<typename T, precision P> template<typename T, precision P>
GLM_FUNC_DECL T extractRealComponent( T extractRealComponent(
detail::tquat<T, P> const & q); detail::tquat<T, P> const & q);
/// Converts a quaternion to a 3 * 3 matrix. /// Converts a quaternion to a 3 * 3 matrix.
/// ///
/// @see gtx_quaternion /// @see gtx_quaternion
template<typename T, precision P> template<typename T, precision P>
GLM_FUNC_DECL detail::tmat3x3<T, P> toMat3( detail::tmat3x3<T, P> toMat3(
detail::tquat<T, P> const & x){return mat3_cast(x);} detail::tquat<T, P> const & x){return mat3_cast(x);}
/// Converts a quaternion to a 4 * 4 matrix. /// Converts a quaternion to a 4 * 4 matrix.
/// ///
/// @see gtx_quaternion /// @see gtx_quaternion
template<typename T, precision P> template<typename T, precision P>
GLM_FUNC_DECL detail::tmat4x4<T, P> toMat4( detail::tmat4x4<T, P> toMat4(
detail::tquat<T, P> const & x){return mat4_cast(x);} detail::tquat<T, P> const & x){return mat4_cast(x);}
/// Converts a 3 * 3 matrix to a quaternion. /// Converts a 3 * 3 matrix to a quaternion.
/// ///
/// @see gtx_quaternion /// @see gtx_quaternion
template<typename T, precision P> template<typename T, precision P>
GLM_FUNC_DECL detail::tquat<T, P> toQuat( detail::tquat<T, P> toQuat(
detail::tmat3x3<T, P> const & x){return quat_cast(x);} detail::tmat3x3<T, P> const & x){return quat_cast(x);}
/// Converts a 4 * 4 matrix to a quaternion. /// Converts a 4 * 4 matrix to a quaternion.
/// ///
/// @see gtx_quaternion /// @see gtx_quaternion
template<typename T, precision P> template<typename T, precision P>
GLM_FUNC_DECL detail::tquat<T, P> toQuat( detail::tquat<T, P> toQuat(
detail::tmat4x4<T, P> const & x){return quat_cast(x);} detail::tmat4x4<T, P> const & x){return quat_cast(x);}
/// Quaternion interpolation using the rotation short path. /// Quaternion interpolation using the rotation short path.
/// ///
/// @see gtx_quaternion /// @see gtx_quaternion
template<typename T, precision P> template<typename T, precision P>
GLM_FUNC_DECL detail::tquat<T, P> shortMix( detail::tquat<T, P> shortMix(
detail::tquat<T, P> const & x, detail::tquat<T, P> const & x,
detail::tquat<T, P> const & y, detail::tquat<T, P> const & y,
T const & a); T const & a);
@ -184,7 +184,7 @@ namespace glm
/// ///
/// @see gtx_quaternion /// @see gtx_quaternion
template<typename T, precision P> template<typename T, precision P>
GLM_FUNC_DECL detail::tquat<T, P> fastMix( detail::tquat<T, P> fastMix(
detail::tquat<T, P> const & x, detail::tquat<T, P> const & x,
detail::tquat<T, P> const & y, detail::tquat<T, P> const & y,
T const & a); T const & a);
@ -195,7 +195,7 @@ namespace glm
/// ///
/// @see gtx_quaternion /// @see gtx_quaternion
template<typename T, precision P> template<typename T, precision P>
GLM_FUNC_DECL detail::tquat<T, P> rotation( detail::tquat<T, P> rotation(
detail::tvec3<T, P> const & orig, detail::tvec3<T, P> const & orig,
detail::tvec3<T, P> const & dest); detail::tvec3<T, P> const & dest);
@ -203,7 +203,7 @@ namespace glm
/// ///
/// @see gtx_quaternion /// @see gtx_quaternion
template<typename T, precision P> template<typename T, precision P>
GLM_FUNC_DECL T length2(detail::tquat<T, P> const & q); T length2(detail::tquat<T, P> const & q);
/// @} /// @}
}//namespace glm }//namespace glm

View File

@ -66,7 +66,7 @@ namespace glm
/// @see - rotate(detail::tmat4x4<T, P> const & m, T angle, T x, T y, T z) /// @see - rotate(detail::tmat4x4<T, P> const & m, T angle, T x, T y, T z)
/// @see - rotate(T angle, detail::tvec3<T, P> const & v) /// @see - rotate(T angle, detail::tvec3<T, P> const & v)
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tmat4x4<T, P> rotateNormalizedAxis( detail::tmat4x4<T, P> rotateNormalizedAxis(
detail::tmat4x4<T, P> const & m, detail::tmat4x4<T, P> const & m,
T const & angle, T const & angle,
detail::tvec3<T, P> const & axis); detail::tvec3<T, P> const & axis);
@ -79,7 +79,7 @@ namespace glm
/// ///
/// @see gtx_rotate_normalized_axis /// @see gtx_rotate_normalized_axis
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tquat<T, P> rotateNormalizedAxis( detail::tquat<T, P> rotateNormalizedAxis(
detail::tquat<T, P> const & q, detail::tquat<T, P> const & q,
T const & angle, T const & angle,
detail::tvec3<T, P> const & axis); detail::tvec3<T, P> const & axis);

View File

@ -55,14 +55,14 @@ namespace glm
//! Rotate a two dimensional vector. //! Rotate a two dimensional vector.
//! From GLM_GTX_rotate_vector extension. //! From GLM_GTX_rotate_vector extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tvec2<T, P> rotate( detail::tvec2<T, P> rotate(
detail::tvec2<T, P> const & v, detail::tvec2<T, P> const & v,
T const & angle); T const & angle);
//! Rotate a three dimensional vector around an axis. //! Rotate a three dimensional vector around an axis.
//! From GLM_GTX_rotate_vector extension. //! From GLM_GTX_rotate_vector extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tvec3<T, P> rotate( detail::tvec3<T, P> rotate(
detail::tvec3<T, P> const & v, detail::tvec3<T, P> const & v,
T const & angle, T const & angle,
detail::tvec3<T, P> const & normal); detail::tvec3<T, P> const & normal);
@ -70,7 +70,7 @@ namespace glm
//! Rotate a four dimensional vector around an axis. //! Rotate a four dimensional vector around an axis.
//! From GLM_GTX_rotate_vector extension. //! From GLM_GTX_rotate_vector extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tvec4<T, P> rotate( detail::tvec4<T, P> rotate(
detail::tvec4<T, P> const & v, detail::tvec4<T, P> const & v,
T const & angle, T const & angle,
detail::tvec3<T, P> const & normal); detail::tvec3<T, P> const & normal);
@ -78,49 +78,49 @@ namespace glm
//! Rotate a three dimensional vector around the X axis. //! Rotate a three dimensional vector around the X axis.
//! From GLM_GTX_rotate_vector extension. //! From GLM_GTX_rotate_vector extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tvec3<T, P> rotateX( detail::tvec3<T, P> rotateX(
detail::tvec3<T, P> const & v, detail::tvec3<T, P> const & v,
T const & angle); T const & angle);
//! Rotate a three dimensional vector around the Y axis. //! Rotate a three dimensional vector around the Y axis.
//! From GLM_GTX_rotate_vector extension. //! From GLM_GTX_rotate_vector extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tvec3<T, P> rotateY( detail::tvec3<T, P> rotateY(
detail::tvec3<T, P> const & v, detail::tvec3<T, P> const & v,
T const & angle); T const & angle);
//! Rotate a three dimensional vector around the Z axis. //! Rotate a three dimensional vector around the Z axis.
//! From GLM_GTX_rotate_vector extension. //! From GLM_GTX_rotate_vector extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tvec3<T, P> rotateZ( detail::tvec3<T, P> rotateZ(
detail::tvec3<T, P> const & v, detail::tvec3<T, P> const & v,
T const & angle); T const & angle);
//! Rotate a four dimentionnals vector around the X axis. //! Rotate a four dimentionnals vector around the X axis.
//! From GLM_GTX_rotate_vector extension. //! From GLM_GTX_rotate_vector extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tvec4<T, P> rotateX( detail::tvec4<T, P> rotateX(
detail::tvec4<T, P> const & v, detail::tvec4<T, P> const & v,
T const & angle); T const & angle);
//! Rotate a four dimensional vector around the X axis. //! Rotate a four dimensional vector around the X axis.
//! From GLM_GTX_rotate_vector extension. //! From GLM_GTX_rotate_vector extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tvec4<T, P> rotateY( detail::tvec4<T, P> rotateY(
detail::tvec4<T, P> const & v, detail::tvec4<T, P> const & v,
T const & angle); T const & angle);
//! Rotate a four dimensional vector around the X axis. //! Rotate a four dimensional vector around the X axis.
//! From GLM_GTX_rotate_vector extension. //! From GLM_GTX_rotate_vector extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tvec4<T, P> rotateZ( detail::tvec4<T, P> rotateZ(
detail::tvec4<T, P> const & v, detail::tvec4<T, P> const & v,
T const & angle); T const & angle);
//! Build a rotation matrix from a normal and a up vector. //! Build a rotation matrix from a normal and a up vector.
//! From GLM_GTX_rotate_vector extension. //! From GLM_GTX_rotate_vector extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tmat4x4<T, P> orientation( detail::tmat4x4<T, P> orientation(
detail::tvec3<T, P> const & Normal, detail::tvec3<T, P> const & Normal,
detail::tvec3<T, P> const & Up); detail::tvec3<T, P> const & Up);

View File

@ -69,7 +69,7 @@ namespace detail
typedef fmat4x4SIMD type; typedef fmat4x4SIMD type;
typedef fmat4x4SIMD transpose_type; typedef fmat4x4SIMD transpose_type;
GLM_FUNC_DECL length_t length() const; length_t length() const;
fvec4SIMD Data[4]; fvec4SIMD Data[4];

View File

@ -54,7 +54,7 @@ namespace glm
//! Return a point from a catmull rom curve. //! Return a point from a catmull rom curve.
/// @see gtx_spline extension. /// @see gtx_spline extension.
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType catmullRom( genType catmullRom(
genType const & v1, genType const & v1,
genType const & v2, genType const & v2,
genType const & v3, genType const & v3,
@ -64,7 +64,7 @@ namespace glm
//! Return a point from a hermite curve. //! Return a point from a hermite curve.
/// @see gtx_spline extension. /// @see gtx_spline extension.
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType hermite( genType hermite(
genType const & v1, genType const & v1,
genType const & t1, genType const & t1,
genType const & v2, genType const & v2,
@ -74,7 +74,7 @@ namespace glm
//! Return a point from a cubic curve. //! Return a point from a cubic curve.
/// @see gtx_spline extension. /// @see gtx_spline extension.
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType cubic( genType cubic(
genType const & v1, genType const & v1,
genType const & v2, genType const & v2,
genType const & v3, genType const & v3,

View File

@ -64,7 +64,7 @@ namespace glm
/// Create a string from a GLM type value. /// Create a string from a GLM type value.
/// @see gtx_string_cast extension. /// @see gtx_string_cast extension.
template <typename genType> template <typename genType>
GLM_FUNC_DECL std::string to_string(genType const & x); std::string to_string(genType const & x);
/// @} /// @}
}//namespace glm }//namespace glm

View File

@ -58,14 +58,14 @@ namespace glm
/// - From \link gtx_transform GLM_GTX_transform \endlink extension /// - From \link gtx_transform GLM_GTX_transform \endlink extension
/// - See also: \link glm::translate GLM_GTC_matrix_transform \endlink /// - See also: \link glm::translate GLM_GTC_matrix_transform \endlink
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tmat4x4<T, P> translate( detail::tmat4x4<T, P> translate(
detail::tvec3<T, P> const & v); detail::tvec3<T, P> const & v);
/// Builds a rotation 4 * 4 matrix created from an axis of 3 scalars and an angle expressed in degrees. /// Builds a rotation 4 * 4 matrix created from an axis of 3 scalars and an angle expressed in degrees.
/// - From \link gtx_transform GLM_GTX_transform \endlink extension /// - From \link gtx_transform GLM_GTX_transform \endlink extension
/// - See also: \link glm::rotate GLM_GTC_matrix_transform \endlink /// - See also: \link glm::rotate GLM_GTC_matrix_transform \endlink
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tmat4x4<T, P> rotate( detail::tmat4x4<T, P> rotate(
T angle, T angle,
detail::tvec3<T, P> const & v); detail::tvec3<T, P> const & v);
@ -73,7 +73,7 @@ namespace glm
/// - From \link gtx_transform GLM_GTX_transform \endlink extension /// - From \link gtx_transform GLM_GTX_transform \endlink extension
/// - See also: \link glm::scale GLM_GTC_matrix_transform \endlink /// - See also: \link glm::scale GLM_GTC_matrix_transform \endlink
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tmat4x4<T, P> scale( detail::tmat4x4<T, P> scale(
detail::tvec3<T, P> const & v); detail::tvec3<T, P> const & v);
/// @} /// @}

View File

@ -55,21 +55,21 @@ namespace glm
//! Transforms a matrix with a shearing on X axis. //! Transforms a matrix with a shearing on X axis.
//! From GLM_GTX_transform2 extension. //! From GLM_GTX_transform2 extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tmat3x3<T, P> shearX2D( detail::tmat3x3<T, P> shearX2D(
detail::tmat3x3<T, P> const & m, detail::tmat3x3<T, P> const & m,
T y); T y);
//! Transforms a matrix with a shearing on Y axis. //! Transforms a matrix with a shearing on Y axis.
//! From GLM_GTX_transform2 extension. //! From GLM_GTX_transform2 extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tmat3x3<T, P> shearY2D( detail::tmat3x3<T, P> shearY2D(
detail::tmat3x3<T, P> const & m, detail::tmat3x3<T, P> const & m,
T x); T x);
//! Transforms a matrix with a shearing on X axis //! Transforms a matrix with a shearing on X axis
//! From GLM_GTX_transform2 extension. //! From GLM_GTX_transform2 extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tmat4x4<T, P> shearX3D( detail::tmat4x4<T, P> shearX3D(
const detail::tmat4x4<T, P> & m, const detail::tmat4x4<T, P> & m,
T y, T y,
T z); T z);
@ -77,7 +77,7 @@ namespace glm
//! Transforms a matrix with a shearing on Y axis. //! Transforms a matrix with a shearing on Y axis.
//! From GLM_GTX_transform2 extension. //! From GLM_GTX_transform2 extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tmat4x4<T, P> shearY3D( detail::tmat4x4<T, P> shearY3D(
const detail::tmat4x4<T, P> & m, const detail::tmat4x4<T, P> & m,
T x, T x,
T z); T z);
@ -85,44 +85,36 @@ namespace glm
//! Transforms a matrix with a shearing on Z axis. //! Transforms a matrix with a shearing on Z axis.
//! From GLM_GTX_transform2 extension. //! From GLM_GTX_transform2 extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tmat4x4<T, P> shearZ3D( detail::tmat4x4<T, P> shearZ3D(
const detail::tmat4x4<T, P> & m, const detail::tmat4x4<T, P> & m,
T x, T x,
T y); T y);
//template <typename T> GLM_FUNC_QUALIFIER detail::tmat4x4<T, P> shear(const detail::tmat4x4<T, P> & m, shearPlane, planePoint, angle)
// Identity + tan(angle) * cross(Normal, OnPlaneVector) 0
// - dot(PointOnPlane, normal) * OnPlaneVector 1
// Reflect functions seem to don't work
//template <typename T> detail::tmat3x3<T, P> reflect2D(const detail::tmat3x3<T, P> & m, const detail::tvec3<T, P>& normal){return reflect2DGTX(m, normal);} //!< \brief Build a reflection matrix (from GLM_GTX_transform2 extension)
//template <typename T> detail::tmat4x4<T, P> reflect3D(const detail::tmat4x4<T, P> & m, const detail::tvec3<T, P>& normal){return reflect3DGTX(m, normal);} //!< \brief Build a reflection matrix (from GLM_GTX_transform2 extension)
//! Build planar projection matrix along normal axis. //! Build planar projection matrix along normal axis.
//! From GLM_GTX_transform2 extension. //! From GLM_GTX_transform2 extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tmat3x3<T, P> proj2D( detail::tmat3x3<T, P> proj2D(
const detail::tmat3x3<T, P> & m, const detail::tmat3x3<T, P> & m,
const detail::tvec3<T, P>& normal); const detail::tvec3<T, P>& normal);
//! Build planar projection matrix along normal axis. //! Build planar projection matrix along normal axis.
//! From GLM_GTX_transform2 extension. //! From GLM_GTX_transform2 extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL detail::tmat4x4<T, P> proj3D( detail::tmat4x4<T, P> proj3D(
const detail::tmat4x4<T, P> & m, const detail::tmat4x4<T, P> & m,
const detail::tvec3<T, P>& normal); const detail::tvec3<T, P>& normal);
//! Build a scale bias matrix. //! Build a scale bias matrix.
//! From GLM_GTX_transform2 extension. //! From GLM_GTX_transform2 extension.
template <typename valType, precision P> template <typename valType, precision P>
GLM_FUNC_DECL detail::tmat4x4<valType, P> scaleBias( detail::tmat4x4<valType, P> scaleBias(
valType scale, valType scale,
valType bias); valType bias);
//! Build a scale bias matrix. //! Build a scale bias matrix.
//! From GLM_GTX_transform2 extension. //! From GLM_GTX_transform2 extension.
template <typename valType, precision P> template <typename valType, precision P>
GLM_FUNC_DECL detail::tmat4x4<valType, P> scaleBias( detail::tmat4x4<valType, P> scaleBias(
detail::tmat4x4<valType, P> const & m, detail::tmat4x4<valType, P> const & m,
valType scale, valType scale,
valType bias); valType bias);

View File

@ -59,7 +59,7 @@ namespace glm
//! Parameters need to be normalized. //! Parameters need to be normalized.
/// @see gtx_vector_angle extension /// @see gtx_vector_angle extension
template <typename vecType> template <typename vecType>
GLM_FUNC_DECL typename vecType::value_type angle( typename vecType::value_type angle(
vecType const & x, vecType const & x,
vecType const & y); vecType const & y);
@ -67,7 +67,7 @@ namespace glm
//! Parameters need to be normalized. //! Parameters need to be normalized.
/// @see gtx_vector_angle extension. /// @see gtx_vector_angle extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL T orientedAngle( T orientedAngle(
detail::tvec2<T, P> const & x, detail::tvec2<T, P> const & x,
detail::tvec2<T, P> const & y); detail::tvec2<T, P> const & y);
@ -75,7 +75,7 @@ namespace glm
//! Parameters need to be normalized. //! Parameters need to be normalized.
/// @see gtx_vector_angle extension. /// @see gtx_vector_angle extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL T orientedAngle( T orientedAngle(
detail::tvec3<T, P> const & x, detail::tvec3<T, P> const & x,
detail::tvec3<T, P> const & y, detail::tvec3<T, P> const & y,
detail::tvec3<T, P> const & ref); detail::tvec3<T, P> const & ref);

View File

@ -55,32 +55,32 @@ namespace glm
//! Check whether two vectors are collinears. //! Check whether two vectors are collinears.
/// @see gtx_vector_query extensions. /// @see gtx_vector_query extensions.
template <typename T, precision P, template <typename, precision> class vecType> template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL bool areCollinear(vecType<T, P> const & v0, vecType<T, P> const & v1, T const & epsilon); bool areCollinear(vecType<T, P> const & v0, vecType<T, P> const & v1, T const & epsilon);
//! Check whether two vectors are orthogonals. //! Check whether two vectors are orthogonals.
/// @see gtx_vector_query extensions. /// @see gtx_vector_query extensions.
template <typename T, precision P, template <typename, precision> class vecType> template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL bool areOrthogonal(vecType<T, P> const & v0, vecType<T, P> const & v1, T const & epsilon); bool areOrthogonal(vecType<T, P> const & v0, vecType<T, P> const & v1, T const & epsilon);
//! Check whether a vector is normalized. //! Check whether a vector is normalized.
/// @see gtx_vector_query extensions. /// @see gtx_vector_query extensions.
template <typename T, precision P, template <typename, precision> class vecType> template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL bool isNormalized(vecType<T, P> const & v, T const & epsilon); bool isNormalized(vecType<T, P> const & v, T const & epsilon);
//! Check whether a vector is null. //! Check whether a vector is null.
/// @see gtx_vector_query extensions. /// @see gtx_vector_query extensions.
template <typename T, precision P, template <typename, precision> class vecType> template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL bool isNull(vecType<T, P> const & v, T const & epsilon); bool isNull(vecType<T, P> const & v, T const & epsilon);
//! Check whether a each component of a vector is null. //! Check whether a each component of a vector is null.
/// @see gtx_vector_query extensions. /// @see gtx_vector_query extensions.
template <typename T, precision P, template <typename, precision> class vecType> template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL vecType<bool, P> isCompNull(vecType<T, P> const & v, T const & epsilon); vecType<bool, P> isCompNull(vecType<T, P> const & v, T const & epsilon);
//! Check whether two vectors are orthonormal. //! Check whether two vectors are orthonormal.
/// @see gtx_vector_query extensions. /// @see gtx_vector_query extensions.
template <typename T, precision P, template <typename, precision> class vecType> template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL bool areOrthonormal(vecType<T, P> const & v0, vecType<T, P> const & v1, T const & epsilon); bool areOrthonormal(vecType<T, P> const & v0, vecType<T, P> const & v1, T const & epsilon);
/// @} /// @}
}// namespace glm }// namespace glm

View File

@ -53,17 +53,17 @@ namespace glm
/// Simulate GL_CLAMP OpenGL wrap mode /// Simulate GL_CLAMP OpenGL wrap mode
/// @see gtx_wrap extension. /// @see gtx_wrap extension.
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType clamp(genType const & Texcoord); genType clamp(genType const & Texcoord);
/// Simulate GL_REPEAT OpenGL wrap mode /// Simulate GL_REPEAT OpenGL wrap mode
/// @see gtx_wrap extension. /// @see gtx_wrap extension.
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType repeat(genType const & Texcoord); genType repeat(genType const & Texcoord);
/// Simulate GL_MIRROR_REPEAT OpenGL wrap mode /// Simulate GL_MIRROR_REPEAT OpenGL wrap mode
/// @see gtx_wrap extension. /// @see gtx_wrap extension.
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType mirrorRepeat(genType const & Texcoord); genType mirrorRepeat(genType const & Texcoord);
/// @} /// @}
}// namespace glm }// namespace glm