Created doxygen modules for core functions

This commit is contained in:
Christophe Riccio 2011-06-18 13:27:58 +01:00
parent 3291cdb869
commit f1a56a6ba1
9 changed files with 275 additions and 225 deletions

View File

@ -33,8 +33,8 @@
/// These all operate component-wise. The description is per component. /// These all operate component-wise. The description is per component.
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
#ifndef glm_core_func_common #ifndef GLM_CORE_func_common
#define glm_core_func_common #define GLM_CORE_func_common GLM_VERSION
#include "_fixes.hpp" #include "_fixes.hpp"
@ -45,7 +45,6 @@ namespace glm
/// Returns x if x >= 0; otherwise, it returns -x. /// Returns x if x >= 0; otherwise, it returns -x.
/// ///
/// @see
/// @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/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a> /// @see - <a href="http://www.opengl.org/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a>
template <typename genFIType> template <typename genFIType>
@ -53,7 +52,6 @@ namespace glm
/// 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.
/// ///
/// @see
/// @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/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a> /// @see - <a href="http://www.opengl.org/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a>
template <typename genFIType> template <typename genFIType>
@ -61,7 +59,6 @@ namespace glm
//! 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.
//! //!
/// @see
/// @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/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a> /// @see - <a href="http://www.opengl.org/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a>
template <typename genType> template <typename genType>
@ -70,7 +67,6 @@ namespace glm
//! 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.
//! //!
/// @see
/// @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/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a> /// @see - <a href="http://www.opengl.org/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a>
template <typename genType> template <typename genType>
@ -82,7 +78,6 @@ namespace glm
//! This includes the possibility that round(x) returns the //! This includes the possibility that round(x) returns the
//! same value as roundEven(x) for all values of x. //! same value as roundEven(x) for all values of x.
//! //!
/// @see
/// @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/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a> /// @see - <a href="http://www.opengl.org/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a>
template <typename genType> template <typename genType>
@ -92,7 +87,6 @@ namespace glm
//! A fractional part of 0.5 will round toward the nearest even //! A fractional part of 0.5 will round toward the nearest even
//! integer. (Both 3.5 and 4.5 for x will return 4.0.) //! integer. (Both 3.5 and 4.5 for x will return 4.0.)
//! //!
/// @see
/// @see - <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/roundEven.xml">GLSL roundEven man page</a> /// @see - <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/roundEven.xml">GLSL roundEven man page</a>
/// @see - <a href="http://www.opengl.org/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a> /// @see - <a href="http://www.opengl.org/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a>
template <typename genType> template <typename genType>
@ -101,7 +95,6 @@ namespace glm
//! 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.
//! //!
/// @see
/// @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/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a> /// @see - <a href="http://www.opengl.org/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a>
template <typename genType> template <typename genType>
@ -109,7 +102,6 @@ namespace glm
//! Return x - floor(x). //! Return x - floor(x).
//! //!
/// @see
/// @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/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a> /// @see - <a href="http://www.opengl.org/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a>
template <typename genType> template <typename genType>
@ -118,7 +110,6 @@ namespace glm
//! 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.
//! //!
/// @see
/// @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/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a> /// @see - <a href="http://www.opengl.org/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a>
template <typename genType> template <typename genType>
@ -129,7 +120,6 @@ namespace glm
//! 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.
//! //!
/// @see
/// @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/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a> /// @see - <a href="http://www.opengl.org/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a>
template <typename genType> template <typename genType>
@ -142,7 +132,6 @@ namespace glm
//! return value and the output parameter will have the same //! return value and the output parameter will have the same
//! sign as x. //! sign as x.
//! //!
/// @see
/// @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/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a> /// @see - <a href="http://www.opengl.org/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a>
template <typename genType> template <typename genType>
@ -152,7 +141,6 @@ namespace glm
/// Returns y if y < x; otherwise, it returns x. /// Returns y if y < x; otherwise, it returns x.
/// ///
/// @see
/// @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/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a> /// @see - <a href="http://www.opengl.org/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a>
template <typename genType> template <typename genType>
@ -167,7 +155,6 @@ namespace glm
/// Returns y if x < y; otherwise, it returns x. /// Returns y if x < y; otherwise, it returns x.
/// ///
/// @see
/// @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/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a> /// @see - <a href="http://www.opengl.org/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a>
template <typename genType> template <typename genType>
@ -183,7 +170,6 @@ namespace glm
//! Returns min(max(x, minVal), maxVal) for each component in x //! Returns min(max(x, minVal), maxVal) for each component in x
//! using the floating-point values minVal and maxVal. //! using the floating-point values minVal and maxVal.
//! //!
/// @see
/// @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/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a> /// @see - <a href="http://www.opengl.org/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a>
template <typename genType> template <typename genType>
@ -214,22 +200,37 @@ namespace glm
//! provides different functionality than //! provides different functionality than
//! genType mix(genType x, genType y, genType(a)) //! genType mix(genType x, genType y, genType(a))
//! where a is a Boolean vector. //! where a is a Boolean vector.
//! ///
//! @see
/// @see - <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/mix.xml">GLSL mix man page</a> /// @see - <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/mix.xml">GLSL mix man page</a>
/// @see - <a href="http://www.opengl.org/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a> /// @see - <a href="http://www.opengl.org/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a>
//! ///
//! @param[in] x Floating point scalar or vector. /// @param[in] x Value to interpolate.
//! @param[in] y Floating point scalar or vector. /// @param[in] y Value to interpolate.
//! @param[in] a Floating point or boolean scalar or vector. /// @param[in] a Interpolant.
//! ///
//! @todo Test when 'a' is a boolean. /// @tparam genTypeT Floating point scalar or vector.
/// @tparam genTypeU Floating point or boolean scalar or vector. It can't be a vector if it is the length of genTypeT.
///
/// @code
/// #include <glm/glm.hpp>
/// ...
/// float a;
/// bool b;
/// glm::dvec3 e;
/// glm::dvec3 f;
/// glm::vec4 g;
/// glm::vec4 h;
/// ...
/// glm::vec4 r = glm::mix(g, h, a); // Interpolate with a floating-point scalar two vectors.
/// glm::vec4 s = glm::mix(g, h, b); // Teturns g or h;
/// glm::dvec3 t = glm::mix(e, f, a); // Types of the third parameter is not required to match with the first and the second.
/// glm::vec4 u = glm::mix(g, h, r); // Interpolations can be perform per component with a vector for the last parameter.
/// @endcode
template <typename genTypeT, typename genTypeU> template <typename genTypeT, typename genTypeU>
genTypeT mix(genTypeT const & x, genTypeT const & y, genTypeU const & a); genTypeT mix(genTypeT const & x, genTypeT const & y, genTypeU const & a);
//! Returns 0.0 if x < edge, otherwise it returns 1.0. //! Returns 0.0 if x < edge, otherwise it returns 1.0.
//! //!
//! @see
/// @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/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a> /// @see - <a href="http://www.opengl.org/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a>
template <typename genType> template <typename genType>
@ -252,7 +253,6 @@ namespace glm
//! return t * t * (3 2 * t); //! return t * t * (3 2 * t);
//! Results are undefined if edge0 >= edge1. //! Results are undefined if edge0 >= edge1.
//! //!
//! @see
/// @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/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a> /// @see - <a href="http://www.opengl.org/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a>
template <typename genType> template <typename genType>
@ -273,7 +273,6 @@ namespace glm
//! including for implementations with no NaN //! including for implementations with no NaN
//! representations. //! representations.
//! //!
//! @see
/// @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/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a> /// @see - <a href="http://www.opengl.org/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a>
template <typename genType> template <typename genType>
@ -285,7 +284,6 @@ namespace glm
//! otherwise, including for implementations with no infinity //! otherwise, including for implementations with no infinity
//! representations. //! representations.
//! //!
//! @see
/// @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/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a> /// @see - <a href="http://www.opengl.org/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a>
template <typename genType> template <typename genType>
@ -295,7 +293,6 @@ namespace glm
//! the encoding of a floating-point value. The floatingpoint //! the encoding of a floating-point value. The floatingpoint
//! value's bit-level representation is preserved. //! value's bit-level representation is preserved.
//! //!
//! @see
/// @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/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a> /// @see - <a href="http://www.opengl.org/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a>
template <typename genType, typename genIType> template <typename genType, typename genIType>
@ -305,7 +302,6 @@ namespace glm
//! the encoding of a floating-point value. The floatingpoint //! the encoding of a floating-point value. The floatingpoint
//! value's bit-level representation is preserved. //! value's bit-level representation is preserved.
//! //!
//! @see
/// @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/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a> /// @see - <a href="http://www.opengl.org/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a>
template <typename genType, typename genUType> template <typename genType, typename genUType>
@ -317,7 +313,6 @@ namespace glm
//! resulting floating point value is unspecified. Otherwise, //! resulting floating point value is unspecified. Otherwise,
//! the bit-level representation is preserved. //! the bit-level representation is preserved.
//! //!
//! @see
/// @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/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a> /// @see - <a href="http://www.opengl.org/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a>
template <typename genType, typename genIType> template <typename genType, typename genIType>
@ -329,7 +324,6 @@ namespace glm
//! resulting floating point value is unspecified. Otherwise, //! resulting floating point value is unspecified. Otherwise,
//! the bit-level representation is preserved. //! the bit-level representation is preserved.
//! //!
//! @see
/// @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/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a> /// @see - <a href="http://www.opengl.org/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a>
template <typename genType, typename genUType> template <typename genType, typename genUType>
@ -337,7 +331,6 @@ namespace glm
//! Computes and returns a * b + c. //! Computes and returns a * b + c.
//! //!
//! @see
/// @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/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a> /// @see - <a href="http://www.opengl.org/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a>
template <typename genType> template <typename genType>
@ -353,7 +346,6 @@ namespace glm
//! are both zero. For a floating-point value that is an //! are both zero. For a floating-point value that is an
//! infinity or is not a number, the results are undefined. //! infinity or is not a number, the results are undefined.
//! //!
//! @see
/// @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/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a> /// @see - <a href="http://www.opengl.org/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a>
template <typename genType, typename genIType> template <typename genType, typename genIType>
@ -366,7 +358,6 @@ namespace glm
//! If this product is too large to be represented in the //! If this product is too large to be represented in the
//! floating-point type, the result is undefined. //! floating-point type, the result is undefined.
//! //!
//! @see
/// @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/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a> /// @see - <a href="http://www.opengl.org/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a>
template <typename genType, typename genIType> template <typename genType, typename genIType>
@ -377,4 +368,4 @@ namespace glm
#include "func_common.inl" #include "func_common.inl"
#endif//glm_core_func_common #endif//GLM_CORE_func_common

View File

@ -34,7 +34,7 @@
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
#ifndef glm_core_func_exponential #ifndef glm_core_func_exponential
#define glm_core_func_exponential #define glm_core_func_exponential GLM_VERSION
namespace glm namespace glm
{ {
@ -43,7 +43,6 @@ namespace glm
/// Returns x raised to the y power. /// Returns x raised to the y power.
/// ///
/// @see
/// @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.10.6.pdf">GLSL 4.10.6 specification, section 8.2</a> /// @see - <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.2</a>
template <typename genType> template <typename genType>
@ -51,7 +50,6 @@ namespace glm
/// Returns the natural exponentiation of x, i.e., e^x. /// Returns the natural exponentiation of x, i.e., e^x.
/// ///
/// @see
/// @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.10.6.pdf">GLSL 4.10.6 specification, section 8.2</a> /// @see - <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.2</a>
template <typename genType> template <typename genType>
@ -61,7 +59,6 @@ namespace glm
/// returns the value y which satisfies the equation x = e^y. /// returns the value y which satisfies the equation x = e^y.
/// Results are undefined if x <= 0. /// Results are undefined if x <= 0.
/// ///
/// @see
/// @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.10.6.pdf">GLSL 4.10.6 specification, section 8.2</a> /// @see - <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.2</a>
template <typename genType> template <typename genType>
@ -69,7 +66,6 @@ namespace glm
/// Returns 2 raised to the x power. /// Returns 2 raised to the x power.
/// ///
/// @see
/// @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.10.6.pdf">GLSL 4.10.6 specification, section 8.2</a> /// @see - <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.2</a>
template <typename genType> template <typename genType>
@ -78,7 +74,6 @@ namespace glm
/// 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.
/// ///
/// @see
/// @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.10.6.pdf">GLSL 4.10.6 specification, section 8.2</a> /// @see - <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.2</a>
template <typename genType> template <typename genType>
@ -86,7 +81,6 @@ namespace glm
/// Returns the positive square root of x. /// Returns the positive square root of x.
/// ///
/// @see
/// @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.10.6.pdf">GLSL 4.10.6 specification, section 8.2</a> /// @see - <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.2</a>
template <typename genType> template <typename genType>
@ -94,7 +88,6 @@ namespace glm
/// Returns the reciprocal of the positive square root of x. /// Returns the reciprocal of the positive square root of x.
/// ///
/// @see
/// @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.10.6.pdf">GLSL 4.10.6 specification, section 8.2</a> /// @see - <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.2</a>
template <typename genType> template <typename genType>

View File

@ -24,85 +24,92 @@
/// @file glm/core/func_geometric.hpp /// @file glm/core/func_geometric.hpp
/// @date 2008-08-03 / 2011-06-14 /// @date 2008-08-03 / 2011-06-14
/// @author Christophe Riccio /// @author Christophe Riccio
///
/// @see - <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.5</a>
///
/// @defgroup core_func_geometric Geometric functions
/// @ingroup core
///
/// These operate on vectors as vectors, not component-wise.
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
#ifndef glm_core_func_geometric #ifndef glm_core_func_geometric
#define glm_core_func_geometric #define glm_core_func_geometric GLM_VERSION
namespace glm namespace glm
{ {
/// \addtogroup core_funcs /// @addtogroup core_func_geometric
/// @{ /// @{
//! Returns the length of x, i.e., sqrt(x * x). /// Returns the length of x, i.e., sqrt(x * x).
//! ///
//! \li <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>
//! \li GLSL 1.30.08 specification, section 8.4 /// @see - <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.5</a>
template <typename genType> template <typename genType>
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).
//! ///
//! \li <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>
//! \li GLSL 1.30.08 specification, section 8.4 /// @see - <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.5</a>
template <typename genType> template <typename genType>
typename genType::value_type distance( typename genType::value_type distance(
genType const & p0, genType const & p0,
genType const & p1); genType const & p1);
//! Returns the dot product of x and y, i.e., result = x * y. /// Returns the dot product of x and y, i.e., result = x * y.
//! ///
//! \li <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>
//! \li GLSL 1.30.08 specification, section 8.4 /// @see - <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.5</a>
template <typename genType> template <typename genType>
typename genType::value_type dot( typename genType::value_type dot(
genType const & x, genType const & x,
genType const & y); genType const & y);
//! Returns the cross product of x and y. /// Returns the cross product of x and y.
//! ///
//! \li <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>
//! \li GLSL 1.30.08 specification, section 8.4 /// @see - <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.5</a>
template <typename T> template <typename T>
detail::tvec3<T> cross( detail::tvec3<T> cross(
detail::tvec3<T> const & x, detail::tvec3<T> const & x,
detail::tvec3<T> const & y); detail::tvec3<T> const & y);
//! Returns a vector in the same direction as x but with length of 1. /// Returns a vector in the same direction as x but with length of 1.
//! ///
//! \li <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>
//! \li GLSL 1.30.08 specification, section 8.4 /// @see - <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.5</a>
template <typename genType> template <typename genType>
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.
//! ///
//! \li <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>
//! \li GLSL 1.30.08 specification, section 8.4 /// @see - <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.5</a>
template <typename genType> template <typename genType>
genType faceforward( genType faceforward(
genType const & N, genType const & N,
genType const & I, genType const & I,
genType const & Nref); genType const & Nref);
//! For the incident vector I and surface orientation N, /// For the incident vector I and surface orientation N,
//! returns the reflection direction : result = I - 2.0 * dot(N, I) * N. /// returns the reflection direction : result = I - 2.0 * dot(N, I) * N.
//! ///
//! \li <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>
//! \li GLSL 1.30.08 specification, section 8.4 /// @see - <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.5</a>
template <typename genType> template <typename genType>
genType reflect( genType reflect(
genType const & I, genType const & I,
genType const & N); genType const & N);
//! For the incident vector I and surface normal N, /// For the incident vector I and surface normal N,
//! and the ratio of indices of refraction eta, /// and the ratio of indices of refraction eta,
//! return the refraction vector. /// return the refraction vector.
//! ///
//! \li <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>
//! \li GLSL 1.30.08 specification, section 8.4 /// @see - <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.5</a>
template <typename genType> template <typename genType>
genType refract( genType refract(
genType const & I, genType const & I,

View File

@ -22,24 +22,33 @@
/// ///
/// @ref core /// @ref core
/// @file glm/core/func_integer.hpp /// @file glm/core/func_integer.hpp
/// @date 2010-03-17 / 2011-06-14 /// @date 2010-03-17 / 2011-06-18
/// @author Christophe Riccio /// @author Christophe Riccio
///
/// @see - <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.8</a>
///
/// @defgroup core_func_integer Integer functions
/// @ingroup core
///
/// These all operate component-wise. The description is per component.
/// The notation [a, b] means the set of bits from bit-number a through bit-number
/// b, inclusive. The lowest-order bit is bit 0.
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
#ifndef glm_core_func_integer #ifndef glm_core_func_integer
#define glm_core_func_integer #define glm_core_func_integer GLM_VERSION
namespace glm namespace glm
{ {
/// @addtogroup core_funcs /// @addtogroup core_func_integer
/// @{ /// @{
//! Adds 32-bit unsigned integer x and y, returning the sum //! Adds 32-bit unsigned integer x and y, returning the sum
//! modulo pow(2, 32). The value carry is set to 0 if the sum was //! modulo pow(2, 32). The value carry is set to 0 if the sum was
//! less than pow(2, 32), or to 1 otherwise. //! less than pow(2, 32), or to 1 otherwise.
//! //!
//! \li <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>
//! \li GLSL 4.00.08 specification, section 8.8 /// @see - <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.8</a>
template <typename genUType> template <typename genUType>
genUType uaddCarry( genUType uaddCarry(
genUType const & x, genUType const & x,
@ -50,8 +59,8 @@ namespace glm
//! the difference if non-negative, or pow(2, 32) plus the difference //! the difference if non-negative, or pow(2, 32) plus the difference
//! otherwise. The value borrow is set to 0 if x >= y, or to 1 otherwise. //! otherwise. The value borrow is set to 0 if x >= y, or to 1 otherwise.
//! //!
//! \li <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>
//! \li GLSL 4.00.08 specification, section 8.8 /// @see - <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.8</a>
template <typename genUType> template <typename genUType>
genUType usubBorrow( genUType usubBorrow(
genUType const & x, genUType const & x,
@ -62,8 +71,8 @@ namespace glm
//! result. The 32 least-significant bits are returned in lsb. //! result. The 32 least-significant bits are returned in lsb.
//! The 32 most-significant bits are returned in msb. //! The 32 most-significant bits are returned in msb.
//! //!
//! \li <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>
//! \li GLSL 4.00.08 specification, section 8.8 /// @see - <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.8</a>
template <typename genUType> template <typename genUType>
void umulExtended( void umulExtended(
genUType const & x, genUType const & x,
@ -75,8 +84,8 @@ namespace glm
//! result. The 32 least-significant bits are returned in lsb. //! result. The 32 least-significant bits are returned in lsb.
//! The 32 most-significant bits are returned in msb. //! The 32 most-significant bits are returned in msb.
//! //!
//! \li <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>
//! \li GLSL 4.00.08 specification, section 8.8 /// @see - <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.8</a>
template <typename genIType> template <typename genIType>
void imulExtended( void imulExtended(
genIType const & x, genIType const & x,
@ -95,8 +104,8 @@ namespace glm
//! offset and bits is greater than the number of bits used //! offset and bits is greater than the number of bits used
//! to store the operand. //! to store the operand.
//! //!
//! \li <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>
//! \li GLSL 4.00.08 specification, section 8.8 /// @see - <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.8</a>
template <typename genIUType> template <typename genIUType>
genIUType bitfieldExtract( genIUType bitfieldExtract(
genIUType const & Value, genIUType const & Value,
@ -113,8 +122,8 @@ namespace glm
//! offset and bits is greater than the number of bits used to //! offset and bits is greater than the number of bits used to
//! store the operand. //! store the operand.
//! //!
//! \li <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>
//! \li GLSL 4.00.08 specification, section 8.8 /// @see - <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.8</a>
template <typename genIUType> template <typename genIUType>
genIUType bitfieldInsert( genIUType bitfieldInsert(
genIUType const & Base, genIUType const & Base,
@ -126,15 +135,15 @@ namespace glm
//! The bit numbered n of the result will be taken from bit (bits - 1) - n of value, //! The bit numbered n of the result will be taken from bit (bits - 1) - n of value,
//! where bits is the total number of bits used to represent value. //! where bits is the total number of bits used to represent value.
//! //!
//! \li <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>
//! \li GLSL 4.00.08 specification, section 8.8 /// @see - <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.8</a>
template <typename genIUType> template <typename genIUType>
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.
//! //!
//! \li <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/bitCount.xml">GLSL bitCount man page</a> /// @see - <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/bitCount.xml">GLSL bitCount man page</a>
//! \li GLSL 4.00.08 specification, section 8.8 /// @see - <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.8</a>
template <typename T, template <typename> class C> template <typename T, template <typename> class C>
typename C<T>::signed_type bitCount(C<T> const & Value); typename C<T>::signed_type bitCount(C<T> const & Value);
@ -142,8 +151,8 @@ namespace glm
//! 1 in the binary representation of value. //! 1 in the binary representation of value.
//! If value is zero, -1 will be returned. //! If value is zero, -1 will be returned.
//! //!
//! \li <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/findLSB.xml">GLSL findLSB man page</a> /// @see - <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/findLSB.xml">GLSL findLSB man page</a>
//! \li GLSL 4.00.08 specification, section 8.8 /// @see - <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.8</a>
template <typename T, template <typename> class C> template <typename T, template <typename> class C>
typename C<T>::signed_type findLSB(C<T> const & Value); typename C<T>::signed_type findLSB(C<T> const & Value);
@ -152,8 +161,8 @@ namespace glm
//! For negative integers, the result will be the bit number of the most significant //! For negative integers, the result will be the bit number of the most significant
//! bit set to 0. For a value of zero or negative one, -1 will be returned. //! bit set to 0. For a value of zero or negative one, -1 will be returned.
//! //!
//! \li <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/findMSB.xml">GLSL findMSB man page</a> /// @see - <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/findMSB.xml">GLSL findMSB man page</a>
//! \li GLSL 4.00.08 specification, section 8.8 /// @see - <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.8</a>
template <typename T, template <typename> class C> template <typename T, template <typename> class C>
typename C<T>::signed_type findMSB(C<T> const & Value); typename C<T>::signed_type findMSB(C<T> const & Value);

View File

@ -24,89 +24,100 @@
/// @file glm/core/func_matrix.hpp /// @file glm/core/func_matrix.hpp
/// @date 2008-08-03 / 2011-06-15 /// @date 2008-08-03 / 2011-06-15
/// @author Christophe Riccio /// @author Christophe Riccio
///
/// @see - <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.6</a>
///
/// @defgroup core_func_matrix Matrix functions
/// @ingroup core
///
/// For each of the following built-in matrix functions, there is both a
/// single-precision floating point version, where all arguments and return values
/// are single precision, and a double-precision floating version, where all
/// arguments and return values are double precision. Only the single-precision
/// floating point version is shown.
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
#ifndef glm_core_func_matrix #ifndef GLM_CORE_func_matrix
#define glm_core_func_matrix #define GLM_CORE_func_matrix GLM_VERSION
namespace glm namespace glm
{ {
/// @addtogroup core_funcs /// @addtogroup core_func_matrix
/// @{ /// @{
//! Multiply matrix x by matrix y component-wise, i.e., /// Multiply matrix x by matrix y component-wise, i.e.,
//! result[i][j] is the scalar product of x[i][j] and y[i][j]. /// result[i][j] is the scalar product of x[i][j] and y[i][j].
//! ///
//! \li <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>
//! \li GLSL 1.30.08 specification, section 8.5 /// @see - <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.6</a>
template <typename matType> template <typename matType>
matType matrixCompMult( matType matrixCompMult(
matType const & x, matType const & x,
matType const & y); matType 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
//! and does a linear algebraic matrix multiply c * r. /// and does a linear algebraic matrix multiply c * r.
//! ///
//! \li <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/outerProduct.xml">GLSL outerProduct man page</a> /// @see - <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/outerProduct.xml">GLSL outerProduct man page</a>
//! \li GLSL 1.30.08 specification, section 8.5 /// @see - <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.6</a>
template <typename vecType, typename matType> template <typename vecType, typename matType>
matType outerProduct( matType outerProduct(
vecType const & c, vecType const & c,
vecType const & r); vecType const & r);
//! Returns the transposed matrix of x /// Returns the transposed matrix of x
//! ///
//! \li <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/transpose.xml">GLSL transpose man page</a> /// @see - <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/transpose.xml">GLSL transpose man page</a>
//! \li GLSL 1.30.08 specification, section 8.5 /// @see - <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.6</a>
template <typename matType> template <typename matType>
typename matType::transpose_type transpose( typename matType::transpose_type transpose(
matType const & x); matType const & x);
//! Return the determinant of a mat2 matrix. /// Return the determinant of a mat2 matrix.
//! ///
//! \li <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>
//! \li GLSL 1.30.08 specification, section 8.5 /// @see - <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.6</a>
template <typename T> template <typename T>
typename detail::tmat2x2<T>::value_type determinant( typename detail::tmat2x2<T>::value_type determinant(
detail::tmat2x2<T> const & m); detail::tmat2x2<T> const & m);
//! Return the determinant of a mat3 matrix. /// Return the determinant of a mat3 matrix.
//! ///
//! \li <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>
//! \li GLSL 1.30.08 specification, section 8.5 /// @see - <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.6</a>
template <typename T> template <typename T>
typename detail::tmat3x3<T>::value_type determinant( typename detail::tmat3x3<T>::value_type determinant(
detail::tmat3x3<T> const & m); detail::tmat3x3<T> const & m);
//! Return the determinant of a mat4 matrix. /// Return the determinant of a mat4 matrix.
//! ///
//! \li <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>
//! \li GLSL 1.30.08 specification, section 8.5 /// @see - <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.6</a>
template <typename T> template <typename T>
typename detail::tmat4x4<T>::value_type determinant( typename detail::tmat4x4<T>::value_type determinant(
detail::tmat4x4<T> const & m); detail::tmat4x4<T> const & m);
//! Return the inverse of a mat2 matrix. /// Return the inverse of a mat2 matrix.
//! ///
//! \li <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>
//! \li GLSL 1.40.07 specification, section 8.5 /// @see - <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.6</a>
template <typename T> template <typename T>
detail::tmat2x2<T> inverse( detail::tmat2x2<T> inverse(
detail::tmat2x2<T> const & m); detail::tmat2x2<T> const & m);
//! Return the inverse of a mat3 matrix. /// Return the inverse of a mat3 matrix.
//! ///
//! \li <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>
//! \li GLSL 1.40.07 specification, section 8.5 /// @see - <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.6</a>
template <typename T> template <typename T>
detail::tmat3x3<T> inverse( detail::tmat3x3<T> inverse(
detail::tmat3x3<T> const & m); detail::tmat3x3<T> const & m);
//! Return the inverse of a mat4 matrix. /// Return the inverse of a mat4 matrix.
//! ///
//! \li <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>
//! \li GLSL 1.40.07 specification, section 8.5 /// @see - <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.6</a>
template <typename T> template <typename T>
detail::tmat4x4<T> inverse( detail::tmat4x4<T> inverse(
detail::tmat4x4<T> const & m); detail::tmat4x4<T> const & m);
@ -116,4 +127,4 @@ namespace glm
#include "func_matrix.inl" #include "func_matrix.inl"
#endif//glm_core_func_matrix #endif//GLM_CORE_func_matrix

View File

@ -22,43 +22,52 @@
/// ///
/// @ref core /// @ref core
/// @file glm/core/func_noise.hpp /// @file glm/core/func_noise.hpp
/// @date 2008-08-01 / 2011-06-15 /// @date 2008-08-01 / 2011-06-18
/// @author Christophe Riccio /// @author Christophe Riccio
///
/// @see - <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.11</a>
///
/// @defgroup core_func_noise Noise functions
/// @ingroup core
///
/// Noise functions are stochastic functions that can be used to increase visual
/// complexity. Values returned by the following noise functions give the
/// appearance of randomness, but are not truly random.
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
#ifndef glm_core_func_noise #ifndef glm_core_func_noise
#define glm_core_func_noise #define glm_core_func_noise GLM_VERSION
namespace glm namespace glm
{ {
/// @addtogroup core_funcs /// @addtogroup core_func_noise
/// @{ /// @{
//! Returns a 1D noise value based on the input value x. /// Returns a 1D noise value based on the input value x.
//! ///
//! \li <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>
//! \li GLSL 1.30.08 specification, section 8.9 /// @see - <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.11</a>
template <typename genType> template <typename genType>
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.
//! ///
//! \li <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>
//! \li GLSL 1.30.08 specification, section 8.9 /// @see - <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.11</a>
template <typename genType> template <typename genType>
detail::tvec2<typename genType::value_type> noise2(genType const & x); detail::tvec2<typename genType::value_type> 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.
//! ///
//! \li <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>
//! \li GLSL 1.30.08 specification, section 8.9 /// @see - <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.11</a>
template <typename genType> template <typename genType>
detail::tvec3<typename genType::value_type> noise3(genType const & x); detail::tvec3<typename genType::value_type> 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.
//! ///
//! \li <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>
//! \li GLSL 1.30.08 specification, section 8.9 /// @see - <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.11</a>
template <typename genType> template <typename genType>
detail::tvec4<typename genType::value_type> noise4(genType const & x); detail::tvec4<typename genType::value_type> noise4(genType const & x);

View File

@ -24,14 +24,21 @@
/// @file glm/core/func_packing.hpp /// @file glm/core/func_packing.hpp
/// @date 2010-03-17 / 2011-06-15 /// @date 2010-03-17 / 2011-06-15
/// @author Christophe Riccio /// @author Christophe Riccio
///
/// @see - <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.4</a>
///
/// @defgroup core_func_packing Floating-Point Pack and Unpack Functions
/// @ingroup core
///
/// These functions do not operate component-wise, rather as described in each case.
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
#ifndef glm_core_func_packing #ifndef GLM_CORE_func_packing
#define glm_core_func_packing #define GLM_CORE_func_packing GLM_VERSION
namespace glm namespace glm
{ {
/// @addtogroup core_funcs /// @addtogroup core_func_packing
/// @{ /// @{
//! 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.
@ -43,8 +50,8 @@ namespace glm
//! The first component of the vector will be written to the least significant bits of the output; //! The first component of the vector will be written to the least significant bits of the output;
//! the last component will be written to the most significant bits. //! the last component will be written to the most significant bits.
//! //!
//! \li <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>
//! \li GLSL 4.00.08 specification, section 8.4 /// @see - <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.4</a>
detail::uint32 packUnorm2x16(detail::tvec2<detail::float32> const & v); detail::uint32 packUnorm2x16(detail::tvec2<detail::float32> 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.
@ -56,8 +63,8 @@ namespace glm
//! The first component of the vector will be written to the least significant bits of the output; //! The first component of the vector will be written to the least significant bits of the output;
//! the last component will be written to the most significant bits. //! the last component will be written to the most significant bits.
//! //!
//! \li <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>
//! \li GLSL 4.00.08 specification, section 8.4 /// @see - <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.4</a>
detail::uint32 packUnorm4x8(detail::tvec4<detail::float32> const & v); detail::uint32 packUnorm4x8(detail::tvec4<detail::float32> 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.
@ -69,8 +76,8 @@ namespace glm
//! The first component of the vector will be written to the least significant bits of the output; //! The first component of the vector will be written to the least significant bits of the output;
//! the last component will be written to the most significant bits. //! the last component will be written to the most significant bits.
//! //!
//! \li <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>
//! \li GLSL 4.00.08 specification, section 8.4 /// @see - <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.4</a>
detail::uint32 packSnorm4x8(detail::tvec4<detail::float32> const & v); detail::uint32 packSnorm4x8(detail::tvec4<detail::float32> 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.
@ -82,8 +89,8 @@ namespace glm
//! The first component of the returned vector will be extracted from the least significant bits of the input; //! The first component of the returned vector will be extracted from the least significant bits of the input;
//! the last component will be extracted from the most significant bits. //! the last component will be extracted from the most significant bits.
//! //!
//! \li <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>
//! \li GLSL 4.00.08 specification, section 8.4 /// @see - <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.4</a>
detail::tvec2<detail::float32> unpackUnorm2x16(detail::uint32 const & p); detail::tvec2<detail::float32> unpackUnorm2x16(detail::uint32 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.
@ -95,8 +102,8 @@ namespace glm
//! The first component of the returned vector will be extracted from the least significant bits of the input; //! The first component of the returned vector will be extracted from the least significant bits of the input;
//! the last component will be extracted from the most significant bits. //! the last component will be extracted from the most significant bits.
//! //!
//! \li <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>
//! \li GLSL 4.00.08 specification, section 8.4 /// @see - <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.4</a>
detail::tvec4<detail::float32> unpackUnorm4x8(detail::uint32 const & p); detail::tvec4<detail::float32> unpackUnorm4x8(detail::uint32 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.
@ -108,8 +115,8 @@ namespace glm
//! The first component of the returned vector will be extracted from the least significant bits of the input; //! The first component of the returned vector will be extracted from the least significant bits of the input;
//! the last component will be extracted from the most significant bits. //! the last component will be extracted from the most significant bits.
//! //!
//! \li <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>
//! \li GLSL 4.00.08 specification, section 8.4 /// @see - <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.4</a>
detail::tvec4<detail::float32> unpackSnorm4x8(detail::uint32 const & p); detail::tvec4<detail::float32> unpackSnorm4x8(detail::uint32 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.
@ -118,8 +125,8 @@ namespace glm
//! The first vector component specifies the 32 least significant bits; //! The first vector component specifies the 32 least significant bits;
//! the second component specifies the 32 most significant bits. //! the second component specifies the 32 most significant bits.
//! //!
//! \li <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>
//! \li GLSL 4.00.08 specification, section 8.4 /// @see - <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.4</a>
double packDouble2x32(detail::tvec2<detail::uint32> const & v); double packDouble2x32(detail::tvec2<detail::uint32> const & v);
//! Returns a two-component unsigned integer vector representation of v. //! Returns a two-component unsigned integer vector representation of v.
@ -127,8 +134,8 @@ namespace glm
//! The first component of the vector contains the 32 least significant bits of the double; //! The first component of the vector contains the 32 least significant bits of the double;
//! the second component consists the 32 most significant bits. //! the second component consists the 32 most significant bits.
//! //!
//! \li <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>
//! \li GLSL 4.00.08 specification, section 8.4 /// @see - <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.4</a>
detail::tvec2<detail::uint32> unpackDouble2x32(double const & v); detail::tvec2<detail::uint32> unpackDouble2x32(double const & v);
/// @} /// @}
@ -136,5 +143,5 @@ namespace glm
#include "func_packing.inl" #include "func_packing.inl"
#endif//glm_core_func_packing #endif//GLM_CORE_func_packing

View File

@ -24,50 +24,61 @@
/// @file glm/core/func_trigonometric.hpp /// @file glm/core/func_trigonometric.hpp
/// @date 2008-08-01 / 2011-06-15 /// @date 2008-08-01 / 2011-06-15
/// @author Christophe Riccio /// @author Christophe Riccio
///
/// @see - <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.1</a>
///
/// @defgroup core_func_trigonometric Angle and Trigonometry Functions
/// @ingroup core
///
/// Function parameters specified as angle are assumed to be in units of radians.
/// In no case will any of these functions result in a divide by zero error. If
/// the divisor of a ratio is 0, then results will be undefined.
///
/// These all operate component-wise. The description is per component.
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
#ifndef glm_core_func_trigonometric #ifndef GLM_CORE_func_trigonometric
#define glm_core_func_trigonometric #define GLM_CORE_func_trigonometric GLM_VERSION
namespace glm namespace glm
{ {
/// @addtogroup core_funcs /// @addtogroup core_func_trigonometric
/// @{ /// @{
//! Converts degrees to radians and returns the result. //! Converts degrees to radians and returns the result.
//! //!
//! \li <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>
//! \li GLSL 1.30.08 specification, section 8.1 /// @see - <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.1</a>
template <typename genType> template <typename genType>
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.
//! //!
//! \li <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>
//! \li GLSL 1.30.08 specification, section 8.1 /// @see - <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.1</a>
template <typename genType> template <typename genType>
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].
//! //!
//! \li <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>
//! \li GLSL 1.30.08 specification, section 8.1 /// @see - <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.1</a>
template <typename genType> template <typename genType>
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].
//! //!
//! \li <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>
//! \li GLSL 1.30.08 specification, section 8.1 /// @see - <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.1</a>
template <typename genType> template <typename genType>
genType cos(genType const & angle); genType cos(genType const & angle);
//! The standard trigonometric tangent function. //! The standard trigonometric tangent function.
//! //!
//! \li <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>
//! \li GLSL 1.30.08 specification, section 8.1 /// @see - <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.1</a>
template <typename genType> template <typename genType>
genType tan(genType const & angle); genType tan(genType const & angle);
@ -75,8 +86,8 @@ namespace glm
//! 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].
//! Results are undefined if |x| > 1. //! Results are undefined if |x| > 1.
//! //!
//! \li <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>
//! \li GLSL 1.30.08 specification, section 8.1 /// @see - <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.1</a>
template <typename genType> template <typename genType>
genType asin(genType const & x); genType asin(genType const & x);
@ -84,8 +95,8 @@ namespace glm
//! The range of values returned by this function is [0, PI]. //! The range of values returned by this function is [0, PI].
//! Results are undefined if |x| > 1. //! Results are undefined if |x| > 1.
//! //!
//! \li <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>
//! \li GLSL 1.30.08 specification, section 8.1 /// @see - <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.1</a>
template <typename genType> template <typename genType>
genType acos(genType const & x); genType acos(genType const & x);
@ -95,60 +106,60 @@ namespace glm
//! by this function is [-PI, PI]. Results are undefined //! by this function is [-PI, PI]. Results are undefined
//! if x and y are both 0. //! if x and y are both 0.
//! //!
//! \li <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>
//! \li GLSL 1.30.08 specification, section 8.1 /// @see - <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.1</a>
template <typename genType> template <typename genType>
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].
//! //!
//! \li <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>
//! \li GLSL 1.30.08 specification, section 8.1 /// @see - <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.1</a>
template <typename genType> template <typename genType>
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
//! //!
//! \li <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>
//! \li GLSL 1.30.08 specification, section 8.1 /// @see - <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.1</a>
template <typename genType> template <typename genType>
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
//! //!
//! \li <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>
//! \li GLSL 1.30.08 specification, section 8.1 /// @see - <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.1</a>
template <typename genType> template <typename genType>
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)
//! //!
//! \li <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>
//! \li GLSL 1.30.08 specification, section 8.1 /// @see - <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.1</a>
template <typename genType> template <typename genType>
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.
//! //!
//! \li <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>
//! \li GLSL 1.30.08 specification, section 8.1 /// @see - <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.1</a>
template <typename genType> template <typename genType>
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.
//! //!
//! \li <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>
//! \li GLSL 1.30.08 specification, section 8.1 /// @see - <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.1</a>
template <typename genType> template <typename genType>
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.
//! //!
//! \li <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>
//! \li GLSL 1.30.08 specification, section 8.1 /// @see - <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.1</a>
template <typename genType> template <typename genType>
genType atanh(genType const & x); genType atanh(genType const & x);
@ -157,6 +168,6 @@ namespace glm
#include "func_trigonometric.inl" #include "func_trigonometric.inl"
#endif//glm_core_func_trigonometric #endif//GLM_CORE_func_trigonometric

View File

@ -24,16 +24,28 @@
/// @file glm/core/func_vector_relational.hpp /// @file glm/core/func_vector_relational.hpp
/// @date 2008-08-03 / 2011-06-15 /// @date 2008-08-03 / 2011-06-15
/// @author Christophe Riccio /// @author Christophe Riccio
///
/// @see - <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.7</a>
///
/// @defgroup core_func_vector_relational Vector Relational Functions
/// @ingroup core
///
/// Relational and equality operators (<, <=, >, >=, ==, !=) are defined to
/// operate on scalars and produce scalar Boolean results. For vector results,
/// use the following built-in functions.
///
/// In all cases, the sizes of all the input and return vectors for any particular
/// call must match.
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
#ifndef glm_core_func_vector_relational #ifndef GLM_CORE_func_vector_relational
#define glm_core_func_vector_relational #define GLM_CORE_func_vector_relational GLM_VERSION
#include "_detail.hpp" #include "_detail.hpp"
namespace glm namespace glm
{ {
/// @addtogroup core_funcs /// @addtogroup core_func_vector_relational
/// @{ /// @{
//! Returns the component-wise comparison result of x < y. //! Returns the component-wise comparison result of x < y.
@ -219,4 +231,4 @@ namespace glm
#include "func_vector_relational.inl" #include "func_vector_relational.inl"
#endif//glm_core_func_vector_relational #endif//GLM_CORE_func_vector_relational