mirror of
https://github.com/g-truc/glm.git
synced 2024-11-26 18:24:35 +00:00
Fixed more typos
This commit is contained in:
parent
f8473154eb
commit
f73b0c5b80
@ -12,12 +12,11 @@
|
||||
|
||||
#include "_fixes.hpp"
|
||||
|
||||
namespace glm
|
||||
namespace glm{
|
||||
namespace core{
|
||||
namespace function{
|
||||
namespace common //!< Define common functions from Section 8.3 of GLSL 1.30.8 specification. Included in glm namespace.
|
||||
{
|
||||
namespace core{
|
||||
namespace function{
|
||||
namespace common{ //!< Define common functions from Section 8.3 of GLSL 1.30.8 specification. Included in glm namespace.
|
||||
|
||||
/// \addtogroup core_funcs
|
||||
///@{
|
||||
|
||||
@ -325,10 +324,9 @@ namespace glm
|
||||
genType ldexp(genType const & x, genIType const & exp);
|
||||
|
||||
///@}
|
||||
}//namespace common
|
||||
}//namespace function
|
||||
}//namespace core
|
||||
|
||||
}//namespace common
|
||||
}//namespace function
|
||||
}//namespace core
|
||||
using namespace core::function::common;
|
||||
}//namespace glm
|
||||
|
||||
|
@ -10,13 +10,11 @@
|
||||
#ifndef glm_core_func_exponential
|
||||
#define glm_core_func_exponential
|
||||
|
||||
namespace glm
|
||||
namespace glm{
|
||||
namespace core{
|
||||
namespace function{
|
||||
namespace exponential //!< Define all exponential functions from Section 8.2 of GLSL 1.30.8 specification. Included in glm namespace.
|
||||
{
|
||||
namespace core{
|
||||
namespace function{
|
||||
//! Define all exponential functions from Section 8.2 of GLSL 1.30.8 specification. Included in glm namespace.
|
||||
namespace exponential{
|
||||
|
||||
/// \addtogroup core_funcs
|
||||
///@{
|
||||
|
||||
@ -73,11 +71,9 @@ namespace glm
|
||||
genType inversesqrt(genType const & x);
|
||||
|
||||
///@}
|
||||
|
||||
}//namespace exponential
|
||||
}//namespace function
|
||||
}//namespace core
|
||||
|
||||
}//namespace exponential
|
||||
}//namespace function
|
||||
}//namespace core
|
||||
using namespace core::function::exponential;
|
||||
}//namespace glm
|
||||
|
||||
|
@ -10,14 +10,13 @@
|
||||
#ifndef glm_core_func_geometric
|
||||
#define glm_core_func_geometric
|
||||
|
||||
namespace glm
|
||||
namespace glm{
|
||||
namespace core{
|
||||
namespace function{
|
||||
namespace geometric //!< Define all geometric functions from Section 8.4 of GLSL 1.30.8 specification. Included in glm namespace.
|
||||
{
|
||||
namespace core{
|
||||
namespace function{
|
||||
namespace geometric{ //!< Define all geometric functions from Section 8.4 of GLSL 1.30.8 specification. Included in glm namespace.
|
||||
|
||||
/// \addtogroup core_funcs
|
||||
///@{
|
||||
/// @{
|
||||
|
||||
//! Returns the length of x, i.e., sqrt(x * x).
|
||||
//!
|
||||
@ -94,12 +93,10 @@ namespace glm
|
||||
genType const & N,
|
||||
typename genType::value_type const & eta);
|
||||
|
||||
///@}
|
||||
|
||||
}//namespace geometric
|
||||
}//namespace function
|
||||
}//namespace core
|
||||
|
||||
/// @}
|
||||
}//namespace geometric
|
||||
}//namespace function
|
||||
}//namespace core
|
||||
using namespace core::function::geometric;
|
||||
}//namespace glm
|
||||
|
||||
|
@ -10,145 +10,141 @@
|
||||
#ifndef glm_core_func_integer
|
||||
#define glm_core_func_integer
|
||||
|
||||
namespace glm
|
||||
namespace glm{
|
||||
namespace core{
|
||||
namespace function{
|
||||
namespace integer //!< Define integer functions from Section 8.8 of GLSL 4.00.8 specification.
|
||||
{
|
||||
namespace core{
|
||||
namespace function{
|
||||
//! Define integer functions from Section 8.8 of GLSL 4.00.8 specification.
|
||||
namespace integer{
|
||||
/// \addtogroup core_funcs
|
||||
/// @{
|
||||
|
||||
/// \addtogroup core_funcs
|
||||
///@{
|
||||
//! 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
|
||||
//! 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>
|
||||
//! \li GLSL 4.00.08 specification, section 8.8
|
||||
template <typename genUType>
|
||||
genUType uaddCarry(
|
||||
genUType const & x,
|
||||
genUType const & y,
|
||||
genUType & carry);
|
||||
|
||||
//! 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
|
||||
//! 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>
|
||||
//! \li GLSL 4.00.08 specification, section 8.8
|
||||
template <typename genUType>
|
||||
genUType uaddCarry(
|
||||
genUType const & x,
|
||||
genUType const & y,
|
||||
genUType & carry);
|
||||
|
||||
//! Subtracts the 32-bit unsigned integer y from x, returning
|
||||
//! 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.
|
||||
//!
|
||||
//! \li <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
|
||||
template <typename genUType>
|
||||
genUType usubBorrow(
|
||||
genUType const & x,
|
||||
genUType const & y,
|
||||
genUType & borrow);
|
||||
//! Subtracts the 32-bit unsigned integer y from x, returning
|
||||
//! 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.
|
||||
//!
|
||||
//! \li <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
|
||||
template <typename genUType>
|
||||
genUType usubBorrow(
|
||||
genUType const & x,
|
||||
genUType const & y,
|
||||
genUType & borrow);
|
||||
|
||||
//! Multiplies 32-bit integers x and y, producing a 64-bit
|
||||
//! result. The 32 least-significant bits are returned in lsb.
|
||||
//! 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>
|
||||
//! \li GLSL 4.00.08 specification, section 8.8
|
||||
template <typename genUType>
|
||||
void umulExtended(
|
||||
genUType const & x,
|
||||
genUType const & y,
|
||||
genUType & msb,
|
||||
genUType & lsb);
|
||||
//! Multiplies 32-bit integers x and y, producing a 64-bit
|
||||
//! result. The 32 least-significant bits are returned in lsb.
|
||||
//! 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>
|
||||
//! \li GLSL 4.00.08 specification, section 8.8
|
||||
template <typename genUType>
|
||||
void umulExtended(
|
||||
genUType const & x,
|
||||
genUType const & y,
|
||||
genUType & msb,
|
||||
genUType & lsb);
|
||||
|
||||
//! Multiplies 32-bit integers x and y, producing a 64-bit
|
||||
//! result. The 32 least-significant bits are returned in lsb.
|
||||
//! 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>
|
||||
//! \li GLSL 4.00.08 specification, section 8.8
|
||||
template <typename genIType>
|
||||
void imulExtended(
|
||||
genIType const & x,
|
||||
genIType const & y,
|
||||
genIType & msb,
|
||||
genIType & lsb);
|
||||
//! Multiplies 32-bit integers x and y, producing a 64-bit
|
||||
//! result. The 32 least-significant bits are returned in lsb.
|
||||
//! 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>
|
||||
//! \li GLSL 4.00.08 specification, section 8.8
|
||||
template <typename genIType>
|
||||
void imulExtended(
|
||||
genIType const & x,
|
||||
genIType const & y,
|
||||
genIType & msb,
|
||||
genIType & lsb);
|
||||
|
||||
//! Extracts bits [offset, offset + bits - 1] from value,
|
||||
//! returning them in the least significant bits of the result.
|
||||
//! For unsigned data types, the most significant bits of the
|
||||
//! result will be set to zero. For signed data types, the
|
||||
//! most significant bits will be set to the value of bit offset + base – 1.
|
||||
//!
|
||||
//! If bits is zero, the result will be zero. The result will be
|
||||
//! undefined if offset or bits is negative, or if the sum of
|
||||
//! offset and bits is greater than the number of bits used
|
||||
//! to store the operand.
|
||||
//!
|
||||
//! \li <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
|
||||
template <typename genIUType>
|
||||
genIUType bitfieldExtract(
|
||||
genIUType const & Value,
|
||||
int const & Offset,
|
||||
int const & Bits);
|
||||
//! Extracts bits [offset, offset + bits - 1] from value,
|
||||
//! returning them in the least significant bits of the result.
|
||||
//! For unsigned data types, the most significant bits of the
|
||||
//! result will be set to zero. For signed data types, the
|
||||
//! most significant bits will be set to the value of bit offset + base – 1.
|
||||
//!
|
||||
//! If bits is zero, the result will be zero. The result will be
|
||||
//! undefined if offset or bits is negative, or if the sum of
|
||||
//! offset and bits is greater than the number of bits used
|
||||
//! to store the operand.
|
||||
//!
|
||||
//! \li <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
|
||||
template <typename genIUType>
|
||||
genIUType bitfieldExtract(
|
||||
genIUType const & Value,
|
||||
int const & Offset,
|
||||
int const & Bits);
|
||||
|
||||
//! Returns the insertion the bits least-significant bits of insert into base.
|
||||
//!
|
||||
//! The result will have bits [offset, offset + bits - 1] taken
|
||||
//! from bits [0, bits – 1] of insert, and all other bits taken
|
||||
//! directly from the corresponding bits of base. If bits is
|
||||
//! zero, the result will simply be base. The result will be
|
||||
//! undefined if offset or bits is negative, or if the sum of
|
||||
//! offset and bits is greater than the number of bits used to
|
||||
//! store the operand.
|
||||
//!
|
||||
//! \li <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
|
||||
template <typename genIUType>
|
||||
genIUType bitfieldInsert(
|
||||
genIUType const & Base,
|
||||
genIUType const & Insert,
|
||||
int const & Offset,
|
||||
int const & Bits);
|
||||
//! Returns the insertion the bits least-significant bits of insert into base.
|
||||
//!
|
||||
//! The result will have bits [offset, offset + bits - 1] taken
|
||||
//! from bits [0, bits – 1] of insert, and all other bits taken
|
||||
//! directly from the corresponding bits of base. If bits is
|
||||
//! zero, the result will simply be base. The result will be
|
||||
//! undefined if offset or bits is negative, or if the sum of
|
||||
//! offset and bits is greater than the number of bits used to
|
||||
//! store the operand.
|
||||
//!
|
||||
//! \li <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
|
||||
template <typename genIUType>
|
||||
genIUType bitfieldInsert(
|
||||
genIUType const & Base,
|
||||
genIUType const & Insert,
|
||||
int const & Offset,
|
||||
int const & Bits);
|
||||
|
||||
//! Returns the reversal of the bits 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.
|
||||
//!
|
||||
//! \li <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
|
||||
template <typename genIUType>
|
||||
genIUType bitfieldReverse(genIUType const & value);
|
||||
//! Returns the reversal of the bits 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.
|
||||
//!
|
||||
//! \li <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
|
||||
template <typename genIUType>
|
||||
genIUType bitfieldReverse(genIUType const & 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>
|
||||
//! \li GLSL 4.00.08 specification, section 8.8
|
||||
template <typename T, template <typename> class C>
|
||||
typename C<T>::signed_type bitCount(C<T> const & 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>
|
||||
//! \li GLSL 4.00.08 specification, section 8.8
|
||||
template <typename T, template <typename> class C>
|
||||
typename C<T>::signed_type bitCount(C<T> const & Value);
|
||||
|
||||
//! Returns the bit number of the least significant bit set to
|
||||
//! 1 in the binary representation of value.
|
||||
//! 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>
|
||||
//! \li GLSL 4.00.08 specification, section 8.8
|
||||
template <typename T, template <typename> class C>
|
||||
typename C<T>::signed_type findLSB(C<T> const & Value);
|
||||
//! Returns the bit number of the least significant bit set to
|
||||
//! 1 in the binary representation of value.
|
||||
//! 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>
|
||||
//! \li GLSL 4.00.08 specification, section 8.8
|
||||
template <typename T, template <typename> class C>
|
||||
typename C<T>::signed_type findLSB(C<T> const & 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 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.
|
||||
//!
|
||||
//! \li <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
|
||||
template <typename T, template <typename> class C>
|
||||
typename C<T>::signed_type findMSB(C<T> const & Value);
|
||||
|
||||
///@}
|
||||
|
||||
}//namespace integer
|
||||
}//namespace function
|
||||
}//namespace core
|
||||
//! 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 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.
|
||||
//!
|
||||
//! \li <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
|
||||
template <typename T, template <typename> class C>
|
||||
typename C<T>::signed_type findMSB(C<T> const & Value);
|
||||
|
||||
/// @}
|
||||
}//namespace integer
|
||||
}//namespace function
|
||||
}//namespace core
|
||||
using namespace core::function::integer;
|
||||
}//namespace glm
|
||||
|
||||
|
@ -10,15 +10,13 @@
|
||||
#ifndef glm_core_func_matrix
|
||||
#define glm_core_func_matrix
|
||||
|
||||
namespace glm
|
||||
namespace glm{
|
||||
namespace core{
|
||||
namespace function{
|
||||
namespace matrix //!< Define all matrix functions from Section 8.5 of GLSL 1.30.8 specification. Included in glm namespace.
|
||||
{
|
||||
namespace core{
|
||||
namespace function{
|
||||
//! Define all matrix functions from Section 8.5 of GLSL 1.30.8 specification. Included in glm namespace.
|
||||
namespace matrix{
|
||||
|
||||
/// \addtogroup core_funcs
|
||||
///@{
|
||||
/// @{
|
||||
|
||||
//! 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].
|
||||
@ -97,12 +95,10 @@ namespace glm
|
||||
detail::tmat4x4<T> inverse(
|
||||
detail::tmat4x4<T> const & m);
|
||||
|
||||
///@}
|
||||
|
||||
}//namespace matrix
|
||||
}//namespace function
|
||||
}//namespace core
|
||||
|
||||
/// @}
|
||||
}//namespace matrix
|
||||
}//namespace function
|
||||
}//namespace core
|
||||
using namespace core::function::matrix;
|
||||
}//namespace glm
|
||||
|
||||
|
@ -10,15 +10,13 @@
|
||||
#ifndef glm_core_func_noise
|
||||
#define glm_core_func_noise
|
||||
|
||||
namespace glm
|
||||
namespace glm{
|
||||
namespace core{
|
||||
namespace function{
|
||||
namespace noise //< Define all noise functions from Section 8.9 of GLSL 1.30.8 specification. Included in glm namespace.
|
||||
{
|
||||
namespace core{
|
||||
namespace function{
|
||||
// Define all noise functions from Section 8.9 of GLSL 1.30.8 specification. Included in glm namespace.
|
||||
namespace noise{
|
||||
|
||||
/// \addtogroup core_funcs
|
||||
///@{
|
||||
/// @{
|
||||
|
||||
//! Returns a 1D noise value based on the input value x.
|
||||
//!
|
||||
@ -48,12 +46,10 @@ namespace glm
|
||||
template <typename genType>
|
||||
detail::tvec4<typename genType::value_type> noise4(genType const & x);
|
||||
|
||||
///@}
|
||||
|
||||
}//namespace noise
|
||||
}//namespace function
|
||||
}//namespace core
|
||||
|
||||
/// @}
|
||||
}//namespace noise
|
||||
}//namespace function
|
||||
}//namespace core
|
||||
using namespace core::function::noise;
|
||||
}//namespace glm
|
||||
|
||||
|
@ -10,119 +10,115 @@
|
||||
#ifndef glm_core_func_packing
|
||||
#define glm_core_func_packing
|
||||
|
||||
namespace glm
|
||||
namespace glm{
|
||||
namespace core{
|
||||
namespace function{
|
||||
namespace packing //!< Define packing functions from section 8.4 floating-point pack and unpack functions of GLSL 4.00.8 specification
|
||||
{
|
||||
namespace core{
|
||||
namespace function{
|
||||
//! Define packing functions from section 8.4 floating-point pack and unpack functions of GLSL 4.00.8 specification
|
||||
namespace packing
|
||||
{
|
||||
/// \addtogroup core_funcs
|
||||
///@{
|
||||
/// \addtogroup core_funcs
|
||||
///@{
|
||||
|
||||
//! 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.
|
||||
//!
|
||||
//! The conversion for component c of v to fixed point is done as follows:
|
||||
//! packUnorm2x16: round(clamp(c, 0, +1) * 65535.0)
|
||||
//!
|
||||
//! 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.
|
||||
//!
|
||||
//! \li <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
|
||||
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.
|
||||
//! Then, the results are packed into the returned 32-bit unsigned integer.
|
||||
//!
|
||||
//! The conversion for component c of v to fixed point is done as follows:
|
||||
//! packUnorm2x16: round(clamp(c, 0, +1) * 65535.0)
|
||||
//!
|
||||
//! 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.
|
||||
//!
|
||||
//! \li <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
|
||||
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.
|
||||
//! Then, the results are packed into the returned 32-bit unsigned integer.
|
||||
//!
|
||||
//! The conversion for component c of v to fixed point is done as follows:
|
||||
//! packUnorm4x8: round(clamp(c, 0, +1) * 255.0)
|
||||
//!
|
||||
//! 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.
|
||||
//!
|
||||
//! \li <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
|
||||
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.
|
||||
//! Then, the results are packed into the returned 32-bit unsigned integer.
|
||||
//!
|
||||
//! The conversion for component c of v to fixed point is done as follows:
|
||||
//! packUnorm4x8: round(clamp(c, 0, +1) * 255.0)
|
||||
//!
|
||||
//! 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.
|
||||
//!
|
||||
//! \li <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
|
||||
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.
|
||||
//! Then, the results are packed into the returned 32-bit unsigned integer.
|
||||
//!
|
||||
//! The conversion for component c of v to fixed point is done as follows:
|
||||
//! packSnorm4x8: round(clamp(c, -1, +1) * 127.0)
|
||||
//!
|
||||
//! 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.
|
||||
//!
|
||||
//! \li <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
|
||||
detail::uint32 packSnorm4x8(detail::tvec4<detail::float32> const & v);
|
||||
//! 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.
|
||||
//!
|
||||
//! The conversion for component c of v to fixed point is done as follows:
|
||||
//! packSnorm4x8: round(clamp(c, -1, +1) * 127.0)
|
||||
//!
|
||||
//! 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.
|
||||
//!
|
||||
//! \li <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
|
||||
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.
|
||||
//! Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector.
|
||||
//!
|
||||
//! The conversion for unpacked fixed-point value f to floating point is done as follows:
|
||||
//! unpackUnorm2x16: f / 65535.0
|
||||
//!
|
||||
//! 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.
|
||||
//!
|
||||
//! \li <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
|
||||
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.
|
||||
//! Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector.
|
||||
//!
|
||||
//! The conversion for unpacked fixed-point value f to floating point is done as follows:
|
||||
//! unpackUnorm2x16: f / 65535.0
|
||||
//!
|
||||
//! 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.
|
||||
//!
|
||||
//! \li <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
|
||||
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.
|
||||
//! Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector.
|
||||
//!
|
||||
//! The conversion for unpacked fixed-point value f to floating point is done as follows:
|
||||
//! unpackUnorm4x8: f / 255.0
|
||||
//!
|
||||
//! 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.
|
||||
//!
|
||||
//! \li <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
|
||||
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.
|
||||
//! Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector.
|
||||
//!
|
||||
//! The conversion for unpacked fixed-point value f to floating point is done as follows:
|
||||
//! unpackUnorm4x8: f / 255.0
|
||||
//!
|
||||
//! 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.
|
||||
//!
|
||||
//! \li <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
|
||||
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.
|
||||
//! Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector.
|
||||
//!
|
||||
//! The conversion for unpacked fixed-point value f to floating point is done as follows:
|
||||
//! unpackSnorm4x8: clamp(f / 127.0, -1, +1)
|
||||
//!
|
||||
//! 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.
|
||||
//!
|
||||
//! \li <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
|
||||
detail::tvec4<detail::float32> unpackSnorm4x8(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.
|
||||
//! Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector.
|
||||
//!
|
||||
//! The conversion for unpacked fixed-point value f to floating point is done as follows:
|
||||
//! unpackSnorm4x8: clamp(f / 127.0, -1, +1)
|
||||
//!
|
||||
//! 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.
|
||||
//!
|
||||
//! \li <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
|
||||
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.
|
||||
//! If an IEEE 754 Inf or NaN is created, it will not signal, and the resulting floating point value is unspecified.
|
||||
//! Otherwise, the bit- level representation of v is preserved.
|
||||
//! The first vector component specifies the 32 least 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>
|
||||
//! \li GLSL 4.00.08 specification, section 8.4
|
||||
double packDouble2x32(detail::tvec2<detail::uint32> const & v);
|
||||
//! 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.
|
||||
//! Otherwise, the bit- level representation of v is preserved.
|
||||
//! The first vector component specifies the 32 least 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>
|
||||
//! \li GLSL 4.00.08 specification, section 8.4
|
||||
double packDouble2x32(detail::tvec2<detail::uint32> const & v);
|
||||
|
||||
//! Returns a two-component unsigned integer vector representation of v.
|
||||
//! The bit-level representation of v is preserved.
|
||||
//! The first component of the vector contains the 32 least significant bits of the double;
|
||||
//! 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>
|
||||
//! \li GLSL 4.00.08 specification, section 8.4
|
||||
detail::tvec2<detail::uint32> unpackDouble2x32(double const & v);
|
||||
|
||||
///@}
|
||||
|
||||
}//namespace packing
|
||||
}//namespace function
|
||||
}//namespace core
|
||||
//! Returns a two-component unsigned integer vector representation of v.
|
||||
//! The bit-level representation of v is preserved.
|
||||
//! The first component of the vector contains the 32 least significant bits of the double;
|
||||
//! 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>
|
||||
//! \li GLSL 4.00.08 specification, section 8.4
|
||||
detail::tvec2<detail::uint32> unpackDouble2x32(double const & v);
|
||||
|
||||
///@}
|
||||
}//namespace packing
|
||||
}//namespace function
|
||||
}//namespace core
|
||||
using namespace core::function::packing;
|
||||
}//namespace glm
|
||||
|
||||
|
@ -10,17 +10,16 @@
|
||||
#ifndef glm_core_func_trigonometric
|
||||
#define glm_core_func_trigonometric
|
||||
|
||||
namespace glm
|
||||
namespace glm{
|
||||
namespace core{
|
||||
namespace function{
|
||||
//! Define Angle and trigonometry functions
|
||||
//! from Section 8.1 of GLSL 1.30.8 specification.
|
||||
//! Included in glm namespace.
|
||||
namespace trigonometric
|
||||
{
|
||||
namespace core{
|
||||
namespace function{
|
||||
//! Define Angle and trigonometry functions
|
||||
//! from Section 8.1 of GLSL 1.30.8 specification.
|
||||
//! Included in glm namespace.
|
||||
namespace trigonometric{
|
||||
|
||||
/// \addtogroup core_funcs
|
||||
///@{
|
||||
/// @{
|
||||
|
||||
//! Converts degrees to radians and returns the result.
|
||||
//!
|
||||
@ -140,12 +139,10 @@ namespace glm
|
||||
template <typename genType>
|
||||
genType atanh(genType const & x);
|
||||
|
||||
///@}
|
||||
|
||||
}//namespace trigonometric
|
||||
}//namespace function
|
||||
}//namespace core
|
||||
|
||||
/// @}
|
||||
}//namespace trigonometric
|
||||
}//namespace function
|
||||
}//namespace core
|
||||
using namespace core::function::trigonometric;
|
||||
}//namespace glm
|
||||
|
||||
|
@ -12,201 +12,198 @@
|
||||
|
||||
#include "_detail.hpp"
|
||||
|
||||
namespace glm
|
||||
namespace glm{
|
||||
namespace core{
|
||||
namespace function{
|
||||
//! Define vector relational functions from Section 8.6 of GLSL 1.30.8 specification.
|
||||
//! Included in glm namespace.
|
||||
namespace vector_relational
|
||||
{
|
||||
namespace core{
|
||||
namespace function{
|
||||
//! Define vector relational functions from Section 8.6 of GLSL 1.30.8 specification.
|
||||
//! Included in glm namespace.
|
||||
namespace vector_relational
|
||||
/// \addtogroup core_funcs
|
||||
/// @{
|
||||
|
||||
//! Returns the component-wise comparison result of x < y.
|
||||
//!
|
||||
//! \li <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/lessThan.xml">GLSL lessThan man page</a>
|
||||
//! \li GLSL 1.30.08 specification, section 8.6
|
||||
template <typename T, template <typename> class vecType>
|
||||
GLM_FUNC_QUALIFIER typename vecType<T>::bool_type lessThan
|
||||
(
|
||||
vecType<T> const & x,
|
||||
vecType<T> const & y
|
||||
)
|
||||
{
|
||||
/// \addtogroup core_funcs
|
||||
///@{
|
||||
GLM_STATIC_ASSERT(detail::is_vector<vecType<T> >::_YES,
|
||||
"Invalid template instantiation of 'lessThan', GLM vector types required");
|
||||
GLM_STATIC_ASSERT(detail::is_bool<T>::_NO,
|
||||
"Invalid template instantiation of 'lessThan', GLM vector types required floating-point or integer value types vectors");
|
||||
|
||||
//! Returns the component-wise comparison result of x < y.
|
||||
//!
|
||||
//! \li <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/lessThan.xml">GLSL lessThan man page</a>
|
||||
//! \li GLSL 1.30.08 specification, section 8.6
|
||||
template <typename T, template <typename> class vecType>
|
||||
GLM_FUNC_QUALIFIER typename vecType<T>::bool_type lessThan
|
||||
(
|
||||
vecType<T> const & x,
|
||||
vecType<T> const & y
|
||||
)
|
||||
{
|
||||
GLM_STATIC_ASSERT(detail::is_vector<vecType<T> >::_YES,
|
||||
"Invalid template instantiation of 'lessThan', GLM vector types required");
|
||||
GLM_STATIC_ASSERT(detail::is_bool<T>::_NO,
|
||||
"Invalid template instantiation of 'lessThan', GLM vector types required floating-point or integer value types vectors");
|
||||
typename vecType<bool>::bool_type Result(vecType<bool>::null);
|
||||
for(typename vecType<bool>::size_type i = 0; i < vecType<bool>::value_size(); ++i)
|
||||
Result[i] = x[i] < y[i];
|
||||
|
||||
typename vecType<bool>::bool_type Result(vecType<bool>::null);
|
||||
for(typename vecType<bool>::size_type i = 0; i < vecType<bool>::value_size(); ++i)
|
||||
Result[i] = x[i] < y[i];
|
||||
return Result;
|
||||
}
|
||||
|
||||
return Result;
|
||||
}
|
||||
//! Returns the component-wise comparison of result x <= y.
|
||||
//!
|
||||
//! \li <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/lessThanEqual.xml">GLSL lessThanEqual man page</a>
|
||||
//! \li GLSL 1.30.08 specification, section 8.6
|
||||
template <typename T, template <typename> class vecType>
|
||||
GLM_FUNC_QUALIFIER typename vecType<T>::bool_type lessThanEqual
|
||||
(
|
||||
vecType<T> const & x,
|
||||
vecType<T> const & y
|
||||
)
|
||||
{
|
||||
GLM_STATIC_ASSERT(detail::is_vector<vecType<T> >::_YES,
|
||||
"Invalid template instantiation of 'lessThanEqual', GLM vector types required");
|
||||
GLM_STATIC_ASSERT(detail::is_bool<T>::_NO,
|
||||
"Invalid template instantiation of 'lessThanEqual', GLM vector types required floating-point or integer value types vectors");
|
||||
|
||||
//! Returns the component-wise comparison of result x <= y.
|
||||
//!
|
||||
//! \li <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/lessThanEqual.xml">GLSL lessThanEqual man page</a>
|
||||
//! \li GLSL 1.30.08 specification, section 8.6
|
||||
template <typename T, template <typename> class vecType>
|
||||
GLM_FUNC_QUALIFIER typename vecType<T>::bool_type lessThanEqual
|
||||
(
|
||||
vecType<T> const & x,
|
||||
vecType<T> const & y
|
||||
)
|
||||
{
|
||||
GLM_STATIC_ASSERT(detail::is_vector<vecType<T> >::_YES,
|
||||
"Invalid template instantiation of 'lessThanEqual', GLM vector types required");
|
||||
GLM_STATIC_ASSERT(detail::is_bool<T>::_NO,
|
||||
"Invalid template instantiation of 'lessThanEqual', GLM vector types required floating-point or integer value types vectors");
|
||||
typename vecType<bool>::bool_type Result(vecType<bool>::null);
|
||||
for(typename vecType<bool>::size_type i = 0; i < vecType<bool>::value_size(); ++i)
|
||||
Result[i] = x[i] <= y[i];
|
||||
return Result;
|
||||
}
|
||||
|
||||
typename vecType<bool>::bool_type Result(vecType<bool>::null);
|
||||
for(typename vecType<bool>::size_type i = 0; i < vecType<bool>::value_size(); ++i)
|
||||
Result[i] = x[i] <= y[i];
|
||||
return Result;
|
||||
}
|
||||
//! Returns the component-wise comparison of result x > y.
|
||||
//!
|
||||
//! \li <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/greaterThan.xml">GLSL greaterThan man page</a>
|
||||
//! \li GLSL 1.30.08 specification, section 8.6
|
||||
template <typename T, template <typename> class vecType>
|
||||
GLM_FUNC_QUALIFIER typename vecType<T>::bool_type greaterThan
|
||||
(
|
||||
vecType<T> const & x,
|
||||
vecType<T> const & y
|
||||
)
|
||||
{
|
||||
GLM_STATIC_ASSERT(detail::is_vector<vecType<T> >::_YES,
|
||||
"Invalid template instantiation of 'greaterThan', GLM vector types required");
|
||||
GLM_STATIC_ASSERT(detail::is_bool<T>::_NO,
|
||||
"Invalid template instantiation of 'greaterThan', GLM vector types required floating-point or integer value types vectors");
|
||||
|
||||
//! Returns the component-wise comparison of result x > y.
|
||||
//!
|
||||
//! \li <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/greaterThan.xml">GLSL greaterThan man page</a>
|
||||
//! \li GLSL 1.30.08 specification, section 8.6
|
||||
template <typename T, template <typename> class vecType>
|
||||
GLM_FUNC_QUALIFIER typename vecType<T>::bool_type greaterThan
|
||||
(
|
||||
vecType<T> const & x,
|
||||
vecType<T> const & y
|
||||
)
|
||||
{
|
||||
GLM_STATIC_ASSERT(detail::is_vector<vecType<T> >::_YES,
|
||||
"Invalid template instantiation of 'greaterThan', GLM vector types required");
|
||||
GLM_STATIC_ASSERT(detail::is_bool<T>::_NO,
|
||||
"Invalid template instantiation of 'greaterThan', GLM vector types required floating-point or integer value types vectors");
|
||||
typename vecType<bool>::bool_type Result(vecType<bool>::null);
|
||||
for(typename vecType<bool>::size_type i = 0; i < vecType<bool>::value_size(); ++i)
|
||||
Result[i] = x[i] > y[i];
|
||||
return Result;
|
||||
}
|
||||
|
||||
typename vecType<bool>::bool_type Result(vecType<bool>::null);
|
||||
for(typename vecType<bool>::size_type i = 0; i < vecType<bool>::value_size(); ++i)
|
||||
Result[i] = x[i] > y[i];
|
||||
return Result;
|
||||
}
|
||||
//! Returns the component-wise comparison of result x >= y.
|
||||
//!
|
||||
//! \li <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/greaterThanEqual.xml">GLSL greaterThanEqual man page</a>
|
||||
//! \li GLSL 1.30.08 specification, section 8.6
|
||||
template <typename T, template <typename> class vecType>
|
||||
GLM_FUNC_QUALIFIER typename vecType<T>::bool_type greaterThanEqual
|
||||
(
|
||||
vecType<T> const & x,
|
||||
vecType<T> const & y
|
||||
)
|
||||
{
|
||||
GLM_STATIC_ASSERT(detail::is_vector<vecType<T> >::_YES,
|
||||
"Invalid template instantiation of 'greaterThanEqual', GLM vector types required");
|
||||
GLM_STATIC_ASSERT(detail::is_bool<T>::_NO,
|
||||
"Invalid template instantiation of 'greaterThanEqual', GLM vector types required floating-point or integer value types vectors");
|
||||
|
||||
//! Returns the component-wise comparison of result x >= y.
|
||||
//!
|
||||
//! \li <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/greaterThanEqual.xml">GLSL greaterThanEqual man page</a>
|
||||
//! \li GLSL 1.30.08 specification, section 8.6
|
||||
template <typename T, template <typename> class vecType>
|
||||
GLM_FUNC_QUALIFIER typename vecType<T>::bool_type greaterThanEqual
|
||||
(
|
||||
vecType<T> const & x,
|
||||
vecType<T> const & y
|
||||
)
|
||||
{
|
||||
GLM_STATIC_ASSERT(detail::is_vector<vecType<T> >::_YES,
|
||||
"Invalid template instantiation of 'greaterThanEqual', GLM vector types required");
|
||||
GLM_STATIC_ASSERT(detail::is_bool<T>::_NO,
|
||||
"Invalid template instantiation of 'greaterThanEqual', GLM vector types required floating-point or integer value types vectors");
|
||||
typename vecType<bool>::bool_type Result(vecType<bool>::null);
|
||||
for(typename vecType<bool>::size_type i = 0; i < vecType<bool>::value_size(); ++i)
|
||||
Result[i] = x[i] >= y[i];
|
||||
return Result;
|
||||
}
|
||||
|
||||
typename vecType<bool>::bool_type Result(vecType<bool>::null);
|
||||
for(typename vecType<bool>::size_type i = 0; i < vecType<bool>::value_size(); ++i)
|
||||
Result[i] = x[i] >= y[i];
|
||||
return Result;
|
||||
}
|
||||
//! Returns the component-wise comparison of result x == y.
|
||||
//!
|
||||
//! \li <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/equal.xml">GLSL equal man page</a>
|
||||
//! \li GLSL 1.30.08 specification, section 8.6
|
||||
template <typename T, template <typename> class vecType>
|
||||
GLM_FUNC_QUALIFIER typename vecType<T>::bool_type equal
|
||||
(
|
||||
vecType<T> const & x,
|
||||
vecType<T> const & y
|
||||
)
|
||||
{
|
||||
GLM_STATIC_ASSERT(detail::is_vector<vecType<T> >::_YES,
|
||||
"Invalid template instantiation of 'equal', GLM vector types required");
|
||||
|
||||
//! Returns the component-wise comparison of result x == y.
|
||||
//!
|
||||
//! \li <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/equal.xml">GLSL equal man page</a>
|
||||
//! \li GLSL 1.30.08 specification, section 8.6
|
||||
template <typename T, template <typename> class vecType>
|
||||
GLM_FUNC_QUALIFIER typename vecType<T>::bool_type equal
|
||||
(
|
||||
vecType<T> const & x,
|
||||
vecType<T> const & y
|
||||
)
|
||||
{
|
||||
GLM_STATIC_ASSERT(detail::is_vector<vecType<T> >::_YES,
|
||||
"Invalid template instantiation of 'equal', GLM vector types required");
|
||||
typename vecType<bool>::bool_type Result(vecType<bool>::null);
|
||||
for(typename vecType<bool>::size_type i = 0; i < vecType<bool>::value_size(); ++i)
|
||||
Result[i] = x[i] == y[i];
|
||||
return Result;
|
||||
}
|
||||
|
||||
typename vecType<bool>::bool_type Result(vecType<bool>::null);
|
||||
for(typename vecType<bool>::size_type i = 0; i < vecType<bool>::value_size(); ++i)
|
||||
Result[i] = x[i] == y[i];
|
||||
return Result;
|
||||
}
|
||||
//! Returns the component-wise comparison of result x != y.
|
||||
//!
|
||||
//! \li <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/notEqual.xml">GLSL notEqual man page</a>
|
||||
//! \li GLSL 1.30.08 specification, section 8.6
|
||||
template <typename T, template <typename> class vecType>
|
||||
GLM_FUNC_QUALIFIER typename vecType<T>::bool_type notEqual
|
||||
(
|
||||
vecType<T> const & x,
|
||||
vecType<T> const & y
|
||||
)
|
||||
{
|
||||
GLM_STATIC_ASSERT(detail::is_vector<vecType<T> >::_YES,
|
||||
"Invalid template instantiation of 'notEqual', GLM vector types required");
|
||||
|
||||
//! Returns the component-wise comparison of result x != y.
|
||||
//!
|
||||
//! \li <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/notEqual.xml">GLSL notEqual man page</a>
|
||||
//! \li GLSL 1.30.08 specification, section 8.6
|
||||
template <typename T, template <typename> class vecType>
|
||||
GLM_FUNC_QUALIFIER typename vecType<T>::bool_type notEqual
|
||||
(
|
||||
vecType<T> const & x,
|
||||
vecType<T> const & y
|
||||
)
|
||||
{
|
||||
GLM_STATIC_ASSERT(detail::is_vector<vecType<T> >::_YES,
|
||||
"Invalid template instantiation of 'notEqual', GLM vector types required");
|
||||
typename vecType<bool>::bool_type Result(vecType<bool>::null);
|
||||
for(typename vecType<bool>::size_type i = 0; i < vecType<bool>::value_size(); ++i)
|
||||
Result[i] = x[i] != y[i];
|
||||
return Result;
|
||||
}
|
||||
|
||||
typename vecType<bool>::bool_type Result(vecType<bool>::null);
|
||||
for(typename vecType<bool>::size_type i = 0; i < vecType<bool>::value_size(); ++i)
|
||||
Result[i] = x[i] != y[i];
|
||||
return Result;
|
||||
}
|
||||
//! Returns true if any component of x is true.
|
||||
//!
|
||||
//! \li <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/any.xml">GLSL any man page</a>
|
||||
//! \li GLSL 1.30.08 specification, section 8.6
|
||||
template <template <typename> class vecType>
|
||||
GLM_FUNC_QUALIFIER bool any(vecType<bool> const & v)
|
||||
{
|
||||
GLM_STATIC_ASSERT(detail::is_vector<vecType<bool> >::_YES,
|
||||
"Invalid template instantiation of 'any', GLM boolean vector types required");
|
||||
|
||||
//! Returns true if any component of x is true.
|
||||
//!
|
||||
//! \li <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/any.xml">GLSL any man page</a>
|
||||
//! \li GLSL 1.30.08 specification, section 8.6
|
||||
template <template <typename> class vecType>
|
||||
GLM_FUNC_QUALIFIER bool any(vecType<bool> const & v)
|
||||
{
|
||||
GLM_STATIC_ASSERT(detail::is_vector<vecType<bool> >::_YES,
|
||||
"Invalid template instantiation of 'any', GLM boolean vector types required");
|
||||
bool Result = false;
|
||||
for(typename vecType<bool>::size_type i = 0; i < vecType<bool>::value_size(); ++i)
|
||||
Result = Result || v[i];
|
||||
return Result;
|
||||
}
|
||||
|
||||
bool Result = false;
|
||||
for(typename vecType<bool>::size_type i = 0; i < vecType<bool>::value_size(); ++i)
|
||||
Result = Result || v[i];
|
||||
return Result;
|
||||
}
|
||||
//! Returns true if all components of x are true.
|
||||
//!
|
||||
//! \li <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/all.xml">GLSL all man page</a>
|
||||
//! \li GLSL 1.30.08 specification, section 8.6
|
||||
template <template <typename> class vecType>
|
||||
GLM_FUNC_QUALIFIER bool all(vecType<bool> const & v)
|
||||
{
|
||||
GLM_STATIC_ASSERT(detail::is_vector<vecType<bool> >::_YES,
|
||||
"Invalid template instantiation of 'all', GLM boolean vector types required");
|
||||
|
||||
//! Returns true if all components of x are true.
|
||||
//!
|
||||
//! \li <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/all.xml">GLSL all man page</a>
|
||||
//! \li GLSL 1.30.08 specification, section 8.6
|
||||
template <template <typename> class vecType>
|
||||
GLM_FUNC_QUALIFIER bool all(vecType<bool> const & v)
|
||||
{
|
||||
GLM_STATIC_ASSERT(detail::is_vector<vecType<bool> >::_YES,
|
||||
"Invalid template instantiation of 'all', GLM boolean vector types required");
|
||||
bool Result = true;
|
||||
for(typename vecType<bool>::size_type i = 0; i < vecType<bool>::value_size(); ++i)
|
||||
Result = Result && v[i];
|
||||
return Result;
|
||||
}
|
||||
|
||||
bool Result = true;
|
||||
for(typename vecType<bool>::size_type i = 0; i < vecType<bool>::value_size(); ++i)
|
||||
Result = Result && v[i];
|
||||
return Result;
|
||||
}
|
||||
//! Returns the component-wise logical complement of x.
|
||||
//! /!\ Because of language incompatibilities between C++ and GLSL, GLM defines the function not but not_ instead.
|
||||
//!
|
||||
//! \li <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/not.xml">GLSL not man page</a>
|
||||
//! \li GLSL 1.30.08 specification, section 8.6
|
||||
template <template <typename> class vecType>
|
||||
GLM_FUNC_QUALIFIER vecType<bool> not_(vecType<bool> const & v)
|
||||
{
|
||||
GLM_STATIC_ASSERT(detail::is_vector<vecType<bool> >::_YES,
|
||||
"Invalid template instantiation of 'not_', GLM vector types required");
|
||||
|
||||
//! Returns the component-wise logical complement of x.
|
||||
//! /!\ Because of language incompatibilities between C++ and GLSL, GLM defines the function not but not_ instead.
|
||||
//!
|
||||
//! \li <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/not.xml">GLSL not man page</a>
|
||||
//! \li GLSL 1.30.08 specification, section 8.6
|
||||
template <template <typename> class vecType>
|
||||
GLM_FUNC_QUALIFIER vecType<bool> not_(vecType<bool> const & v)
|
||||
{
|
||||
GLM_STATIC_ASSERT(detail::is_vector<vecType<bool> >::_YES,
|
||||
"Invalid template instantiation of 'not_', GLM vector types required");
|
||||
|
||||
typename vecType<bool>::bool_type Result(vecType<bool>::null);
|
||||
for(typename vecType<bool>::size_type i = 0; i < vecType<bool>::value_size(); ++i)
|
||||
Result[i] = !v[i];
|
||||
return Result;
|
||||
}
|
||||
|
||||
///@}
|
||||
|
||||
}//namespace vector_relational
|
||||
}//namespace function
|
||||
}//namespace core
|
||||
typename vecType<bool>::bool_type Result(vecType<bool>::null);
|
||||
for(typename vecType<bool>::size_type i = 0; i < vecType<bool>::value_size(); ++i)
|
||||
Result[i] = !v[i];
|
||||
return Result;
|
||||
}
|
||||
|
||||
/// @}
|
||||
}//namespace vector_relational
|
||||
}//namespace function
|
||||
}//namespace core
|
||||
using namespace core::function::vector_relational;
|
||||
}//namespace glm
|
||||
|
||||
|
@ -325,7 +325,7 @@ namespace gtc{
|
||||
namespace half_float ///< GLM_GTC_half_float extension: Add support for half precision floating-point types
|
||||
{
|
||||
/// \addtogroup gtc_half_float
|
||||
///@{
|
||||
/// @{
|
||||
|
||||
/// Type for half-precision floating-point numbers.
|
||||
/// From GLM_GTC_half_float extension.
|
||||
|
@ -25,7 +25,7 @@ namespace gtc{
|
||||
namespace matrix_integer ///< GLM_GTC_matrix_integer extension: Add integer matrices
|
||||
{
|
||||
/// \addtogroup gtc_matrix_integer
|
||||
///@{
|
||||
/// @{
|
||||
|
||||
typedef detail::tmat2x2<highp_int> highp_imat2; //!< \brief High-precision signed integer 2x2 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef detail::tmat3x3<highp_int> highp_imat3; //!< \brief High-precision signed integer 3x3 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
|
@ -35,7 +35,6 @@ namespace detail
|
||||
template <typename T>
|
||||
struct tquat// : public genType<T, tquat>
|
||||
{
|
||||
|
||||
enum ctor{null};
|
||||
|
||||
typedef T value_type;
|
||||
|
@ -25,7 +25,6 @@ namespace glm{
|
||||
namespace gtc{
|
||||
namespace type_ptr ///< GLM_GTC_type_ptr extension: Get access to vectors & matrices value type address.
|
||||
{
|
||||
|
||||
/// \addtogroup gtc_type_ptr
|
||||
///@{
|
||||
|
||||
|
@ -26,7 +26,7 @@ namespace gtx{
|
||||
namespace associated_min_max ///< GLM_GTX_associated_min_max extension: Min and max functions that return associated values not the compared onces.
|
||||
{
|
||||
/// \addtogroup gtx_associated_min_max
|
||||
///@{
|
||||
/// @{
|
||||
|
||||
//! \brief Min comparison between 2 variables
|
||||
template<typename genTypeT, typename genTypeU>
|
||||
@ -70,7 +70,7 @@ namespace associated_min_max ///< GLM_GTX_associated_min_max extension: Min and
|
||||
const genTypeT& z, const genTypeU& c,
|
||||
const genTypeT& w, const genTypeU& d);
|
||||
|
||||
///@}
|
||||
/// @}
|
||||
} //namespace associated_min_max
|
||||
} //namespace gtx
|
||||
} //namespace glm
|
||||
|
@ -29,7 +29,7 @@ namespace bit ///< GLM_GTX_bit extension: Allow to perform bit operations on int
|
||||
using namespace gtc::half_float;
|
||||
|
||||
/// \addtogroup gtx_bit
|
||||
///@{
|
||||
/// @{
|
||||
|
||||
//! Build a mask of 'count' bits
|
||||
//! From GLM_GTX_bit extension.
|
||||
|
@ -29,7 +29,7 @@ namespace color_cast ///< GLM_GTX_color_cast extension: Conversion between two c
|
||||
using namespace gtx::number_precision;
|
||||
|
||||
/// \addtogroup gtx_color_cast
|
||||
///@{
|
||||
/// @{
|
||||
|
||||
//! Conversion of a floating value into a 8bit unsigned int value.
|
||||
//! From GLM_GTX_color_cast extension.
|
||||
@ -95,7 +95,7 @@ namespace color_cast ///< GLM_GTX_color_cast extension: Conversion between two c
|
||||
template <typename T> gtc::type_precision::f64vec4 f64_bgra_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension)
|
||||
template <typename T> gtc::type_precision::f64vec4 f64_abgr_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension)
|
||||
|
||||
///@}
|
||||
/// @}
|
||||
}//namespace color_space
|
||||
}//namespace gtx
|
||||
}//namespace glm
|
||||
|
@ -25,7 +25,7 @@ namespace gtx{
|
||||
namespace color_space_YCoCg ///< GLM_GTX_color_space_YCoCg extension: RGB to YCoCg conversions and operations
|
||||
{
|
||||
/// \addtogroup gtx_color_space_YCoCg
|
||||
///@{
|
||||
/// @{
|
||||
|
||||
//! Convert a color from RGB color space to YCoCg color space.
|
||||
//! From GLM_GTX_color_space_YCoCg extension.
|
||||
|
Loading…
Reference in New Issue
Block a user