Merge branch '0.9.3' of ssh://ogl-math.git.sourceforge.net/gitroot/ogl-math/ogl-math into 0.9.3

This commit is contained in:
Christophe Riccio 2011-06-14 20:26:56 +01:00
commit 8b919ffe54
146 changed files with 7915 additions and 8237 deletions

View File

@ -311,11 +311,11 @@ void foo()
<dl>
<dt>glRotate[fd]</dt>
<dd>\link glm::gtc::rotate glm::rotate \endlink</dd>
<dd>\link glm::rotate glm::rotate \endlink</dd>
<dt>glScale[fd]</dt>
<dd>\link glm::gtc::scale glm::scale \endlink</dd>
<dd>\link glm::scale glm::scale \endlink</dd>
<dt>glTranslate[fd]</dt>
<dd>\link glm::gtc::translate glm::translate \endlink</dd>
<dd>\link glm::translate glm::translate \endlink</dd>
<dt>glLoadIdentity</dt>
<dd>The default constructor of all matrix types creates an identity matrix.</dd>
<dt>glMultMatrix[fd]</dt>
@ -325,24 +325,24 @@ void foo()
<dt>glMultTransposeMatrix</dt>
<dd>Combine the last two.</dd>
<dt>glFrustum</dt>
<dd>\link glm::gtc::frustum glm::frustum \endlink</dd>
<dd>\link glm::frustum glm::frustum \endlink</dd>
<dt>glOrtho</dt>
<dd>\link glm::gtc::ortho glm::ortho \endlink</dd>
<dd>\link glm::ortho glm::ortho \endlink</dd>
<dt>gluLookAt</dt>
<dd>\link glm::gtc::lookAt glm::lookAt \endlink</dd>
<dd>\link glm::lookAt glm::lookAt \endlink</dd>
</dl>
\section deprecated_glu GLU function replacements
<dl>
<dt>gluOrtho2D</dt>
<dd>\link glm::gtc::ortho glm::ortho \endlink</dd>
<dd>\link glm::ortho glm::ortho \endlink</dd>
<dt>gluPerspective</dt>
<dd>\link glm::gtc::perspective glm::perspective \endlink</dd>
<dd>\link glm::perspective glm::perspective \endlink</dd>
<dt>gluProject</dt>
<dd>\link glm::gtc::project glm::project \endlink</dd>
<dd>\link glm::project glm::project \endlink</dd>
<dt>gluUnProject</dt>
<dd>\link glm::gtc::unProject glm::unProject \endlink</dd>
<dd>\link glm::unProject glm::unProject \endlink</dd>
</dl>
**/

View File

@ -31,8 +31,7 @@
#include "_fixes.hpp"
namespace glm{
namespace core
namespace glm
{
/// @addtogroup core_funcs
/// @{
@ -367,7 +366,6 @@ namespace core
genType ldexp(genType const & x, genIType const & exp);
/// @}
}//namespace core
}//namespace glm
#include "func_common.inl"

View File

@ -38,8 +38,6 @@ namespace detail
};
}//namespace detail
namespace core
{
// abs
template <typename genFIType>
GLM_FUNC_QUALIFIER genFIType abs(
@ -728,7 +726,7 @@ namespace core
//if(x >= maxVal) return maxVal;
//if(x <= minVal) return minVal;
//return x;
return glm::max(glm::min(x, maxVal), minVal);
return max(min(x, maxVal), minVal);
}
template <typename T>
@ -1566,5 +1564,4 @@ namespace core
return std::frexp(x, exp);
}
}//namespace core
}//namespace glm

View File

@ -29,10 +29,9 @@
#ifndef glm_core_func_exponential
#define glm_core_func_exponential
namespace glm{
namespace core
namespace glm
{
/// \addtogroup core_funcs
/// @addtogroup core_funcs
/// @{
//! Returns x raised to the y power.
@ -88,7 +87,6 @@ namespace core
genType inversesqrt(genType const & x);
/// @}
}//namespace core
}//namespace glm
#include "func_exponential.inl"

View File

@ -7,8 +7,7 @@
// File : glm/core/func_exponential.inl
///////////////////////////////////////////////////////////////////////////////////////////////////
namespace glm{
namespace core
namespace glm
{
// pow
template <typename genType>
@ -349,5 +348,4 @@ namespace core
inversesqrt(x.w));
}
}//namespace core
}//namespace glm

View File

@ -29,8 +29,7 @@
#ifndef glm_core_func_geometric
#define glm_core_func_geometric
namespace glm{
namespace core
namespace glm
{
/// \addtogroup core_funcs
/// @{
@ -111,7 +110,6 @@ namespace core
typename genType::value_type const & eta);
/// @}
}//namespace core
}//namespace glm
#include "func_geometric.inl"

View File

@ -7,8 +7,7 @@
// File : glm/core/func_geometric.inl
///////////////////////////////////////////////////////////////////////////////////////////////////
namespace glm{
namespace core
namespace glm
{
// length
template <typename genType>
@ -281,5 +280,4 @@ namespace core
return eta * I - (eta * dotValue + sqrt(k)) * N;
}
}//namespace core
}//namespace glm

View File

@ -29,10 +29,9 @@
#ifndef glm_core_func_integer
#define glm_core_func_integer
namespace glm{
namespace core
namespace glm
{
/// \addtogroup core_funcs
/// @addtogroup core_funcs
/// @{
//! Adds 32-bit unsigned integer x and y, returning the sum
@ -159,7 +158,6 @@ namespace core
typename C<T>::signed_type findMSB(C<T> const & Value);
/// @}
}//namespace core
}//namespace glm
#include "func_integer.inl"

View File

@ -7,8 +7,7 @@
// File : glm/core/func_integer.inl
///////////////////////////////////////////////////////////////////////////////////////////////////
namespace glm{
namespace core
namespace glm
{
// uaddCarry
template <typename genUType>
@ -582,6 +581,4 @@ namespace core
findMSB(value[2]),
findMSB(value[3]));
}
}//namespace core
}//namespace glm

View File

@ -10,10 +10,9 @@
#ifndef glm_core_func_matrix
#define glm_core_func_matrix
namespace glm{
namespace core
namespace glm
{
/// \addtogroup core_funcs
/// @addtogroup core_funcs
/// @{
//! Multiply matrix x by matrix y component-wise, i.e.,
@ -94,7 +93,6 @@ namespace core
detail::tmat4x4<T> const & m);
/// @}
}//namespace core
}//namespace glm
#include "func_matrix.inl"

View File

@ -7,8 +7,7 @@
// File : glm/core/func_matrix.inl
///////////////////////////////////////////////////////////////////////////////////////////////////
namespace glm{
namespace core
namespace glm
{
// matrixCompMult
template <typename matType>
@ -561,6 +560,4 @@ namespace core
return Inverse;
}
}//namespace core
}//namespace glm

View File

@ -10,10 +10,9 @@
#ifndef glm_core_func_noise
#define glm_core_func_noise
namespace glm{
namespace core
namespace glm
{
/// \addtogroup core_funcs
/// @addtogroup core_funcs
/// @{
//! Returns a 1D noise value based on the input value x.
@ -45,7 +44,6 @@ namespace core
detail::tvec4<typename genType::value_type> noise4(genType const & x);
/// @}
}//namespace core
}//namespace glm
#include "func_noise.inl"

View File

@ -10,10 +10,9 @@
#ifndef glm_core_func_packing
#define glm_core_func_packing
namespace glm{
namespace core
namespace glm
{
/// \addtogroup core_funcs
/// @addtogroup core_funcs
/// @{
//! First, converts each component of the normalized floating-point value v into 8- or 16-bit integer values.
@ -114,7 +113,6 @@ namespace core
detail::tvec2<detail::uint32> unpackDouble2x32(double const & v);
/// @}
}//namespace core
}//namespace glm
#include "func_packing.inl"

View File

@ -8,8 +8,7 @@
///////////////////////////////////////////////////////////////////////////////////////////////////
namespace glm{
namespace core
{
GLM_FUNC_QUALIFIER detail::uint32 packUnorm2x16(detail::tvec2<detail::float32> const & v)
{
detail::uint16 A((detail::uint16)round(clamp(v.x, 0.0f, 1.0f) * 65535.0f));
@ -80,5 +79,4 @@ namespace core
return *(detail::tvec2<detail::uint32>*)&v;
}
}//namespace core
}//namespace glm

View File

@ -10,10 +10,9 @@
#ifndef glm_core_func_trigonometric
#define glm_core_func_trigonometric
namespace glm{
namespace core
namespace glm
{
/// \addtogroup core_funcs
/// @addtogroup core_funcs
/// @{
//! Converts degrees to radians and returns the result.
@ -135,7 +134,6 @@ namespace core
genType atanh(genType const & x);
/// @}
}//namespace core
}//namespace glm
#include "func_trigonometric.inl"

View File

@ -8,8 +8,7 @@
///////////////////////////////////////////////////////////////////////////////////////////////////
namespace glm{
namespace core
{
// radians
template <typename genType>
GLM_FUNC_QUALIFIER genType radians
@ -736,5 +735,4 @@ namespace core
atanh(x.w));
}
}//namespace core
}//namespace glm

View File

@ -12,10 +12,9 @@
#include "_detail.hpp"
namespace glm{
namespace core
namespace glm
{
/// \addtogroup core_funcs
/// @addtogroup core_funcs
/// @{
//! Returns the component-wise comparison result of x < y.
@ -197,7 +196,6 @@ namespace core
}
/// @}
}//namespace core
}//namespace glm
#include "func_vector_relational.inl"

View File

@ -16,6 +16,6 @@ namespace glm
class dont_care {};
class nicest {};
class fastest {};
};
}//namespace glm
#endif//glm_core_type

View File

@ -43,16 +43,6 @@
# pragma message("GLM: Core library included")
#endif//GLM_MESSAGE
namespace glm
{
namespace gtc{}
namespace gtx{}
namespace virtrev{}
using namespace gtc;
using namespace gtx;
}//namespace glm
#include "./core/_detail.hpp"
#include "./core/type.hpp"

View File

@ -35,8 +35,8 @@
///
///////////////////////////////////////////////////////////////////////////////////
#ifndef glm_gtc_half_float
#define glm_gtc_half_float
#ifndef GLM_GTC_half_float
#define GLM_GTC_half_float 90
// Dependency:
#include "../glm.hpp"
@ -349,8 +349,6 @@ namespace detail
}
//namespace detail
namespace gtc
{
/// @addtogroup gtc_half_float
/// @{
@ -419,9 +417,8 @@ namespace gtc
typedef detail::tmat4x4<detail::thalf> hmat4x4;
/// @}
}// namespace gtc
}// namespace glm
#include "half_float.inl"
#endif//glm_gtc_half_float
#endif//GLM_GTC_half_float

View File

@ -34,8 +34,8 @@
/// <glm/gtc/matrix_access.hpp> need to be included to use these functionalities.
///////////////////////////////////////////////////////////////////////////////////
#ifndef glm_gtc_matrix_access
#define glm_gtc_matrix_access
#ifndef GLM_GTC_matrix_access
#define GLM_GTC_matrix_access 90
// Dependency:
#include "../glm.hpp"
@ -44,9 +44,8 @@
# pragma message("GLM: GLM_GTC_matrix_access extension included")
#endif
namespace glm{
namespace gtc{
namespace glm
{
/// @addtogroup gtc_matrix_access
/// @{
@ -81,9 +80,8 @@ namespace gtc{
typename genType::col_type const & x);
/// @}
}//namespace gtc
}//namespace glm
#include "matrix_access.inl"
#endif//glm_gtc_matrix_access
#endif//GLM_GTC_matrix_access

View File

@ -8,8 +8,7 @@
///////////////////////////////////////////////////////////////////////////////////////////////////
namespace glm{
namespace gtc
{
template <typename genType>
GLM_FUNC_QUALIFIER genType row(
genType const & m,
@ -52,6 +51,5 @@ namespace gtc
return m[index];
}
}//namespace gtc
}//namespace glm

View File

@ -34,8 +34,8 @@
/// <glm/gtc/matrix_integer.hpp> need to be included to use these functionalities.
///////////////////////////////////////////////////////////////////////////////////
#ifndef glm_gtc_matrix_integer
#define glm_gtc_matrix_integer
#ifndef GLM_GTC_matrix_integer
#define GLM_GTC_matrix_integer 90
// Dependency:
#include "../glm.hpp"
@ -44,10 +44,9 @@
# pragma message("GLM: GLM_GTC_matrix_integer extension included")
#endif
namespace glm{
namespace gtc{
/// \addtogroup gtc_matrix_integer
namespace glm
{
/// @addtogroup gtc_matrix_integer
/// @{
typedef detail::tmat2x2<highp_int> highp_imat2; //!< \brief High-precision signed integer 2x2 matrix. (from GLM_GTC_matrix_integer extension)
@ -217,7 +216,6 @@ namespace gtc{
#endif//GLM_PRECISION
/// @}
}//namespace gtc
}//namespace glm
#endif//glm_gtc_matrix_integer
#endif//GLM_GTC_matrix_integer

View File

@ -34,8 +34,8 @@
/// <glm/gtc/matrix_inverse.hpp> need to be included to use these functionalities.
///////////////////////////////////////////////////////////////////////////////////
#ifndef glm_gtc_matrix_inverse
#define glm_gtc_matrix_inverse
#ifndef GLM_GTC_matrix_inverse
#define GLM_GTC_matrix_inverse 90
// Dependency:
#include "../glm.hpp"
@ -44,8 +44,7 @@
# pragma message("GLM: GLM_GTC_matrix_inverse extension included")
#endif
namespace glm{
namespace gtc
namespace glm
{
/// @addtogroup gtc_matrix_inverse
/// @{
@ -62,9 +61,8 @@ namespace gtc
genType const & m);
/// @}
}//namespace gtc
}//namespace glm
#include "matrix_inverse.inl"
#endif//glm_gtc_matrix_inverse
#endif//GLM_GTC_matrix_inverse

View File

@ -8,7 +8,6 @@
///////////////////////////////////////////////////////////////////////////////////////////////////
namespace glm{
namespace gtc{
template <typename T>
GLM_FUNC_QUALIFIER detail::tmat3x3<T> affineInverse
@ -133,5 +132,4 @@ namespace gtc{
return Inverse;
}
}//namespace gtc
}//namespace glm

View File

@ -43,8 +43,8 @@
/// <glm/gtc/matrix_transform.hpp> need to be included to use these functionalities.
///////////////////////////////////////////////////////////////////////////////////
#ifndef glm_gtc_matrix_transform
#define glm_gtc_matrix_transform
#ifndef GLM_GTC_matrix_transform
#define GLM_GTC_matrix_transform 90
// Dependency:
#include "../glm.hpp"
@ -53,8 +53,7 @@
# pragma message("GLM: GLM_GTC_matrix_transform extension included")
#endif
namespace glm{
namespace gtc
namespace glm
{
/// @addtogroup gtc_matrix_transform
/// @{
@ -62,9 +61,9 @@ namespace gtc
/// Builds a translation 4 * 4 matrix created from a vector of 3 components.
/// @see - gtc_matrix_transform
/// @see - gtx_transform:
/// - @link glm::gtx::translate(T x, T y, T z) translate(T x, T y, T z) @endlink
/// - @link glm::gtx::translate(detail::tmat4x4<T> const & m, T x, T y, T z) translate(mat4x4<T> const & m, T x, T y, T z) @endlink
/// - @link glm::gtx::translate(detail::tvec3<T> const & v) translate(vec3<T> const & v) @endlink
/// - @link translate(T x, T y, T z) translate(T x, T y, T z) @endlink
/// - @link translate(detail::tmat4x4<T> const & m, T x, T y, T z) translate(mat4x4<T> const & m, T x, T y, T z) @endlink
/// - @link translate(detail::tvec3<T> const & v) translate(vec3<T> const & v) @endlink
template <typename T>
detail::tmat4x4<T> translate(
detail::tmat4x4<T> const & m,
@ -73,9 +72,9 @@ namespace gtc
/// Builds a rotation 4 * 4 matrix created from an axis vector and an angle expressed in degrees.
/// @see - gtc_matrix_transform
/// @see - gtx_transform:
/// - @link glm::gtx::rotate(T angle, T x, T y, T z) rotate(T const & angle, T const & x, T const & y, T const & z) @endlink
/// - @link glm::gtx::rotate(detail::tmat4x4<T> const & m, T angle, T x, T y, T z) rotate(mat4x4<T> const & m, T const & angle, T const & x, T const & y, T const & z) @endlink
/// - @link glm::gtx::rotate(T angle, detail::tvec3<T> const & v) rotate(T const & angle, vec3<T> const & v) @endlink
/// - @link rotate(T angle, T x, T y, T z) rotate(T const & angle, T const & x, T const & y, T const & z) @endlink
/// - @link rotate(detail::tmat4x4<T> const & m, T angle, T x, T y, T z) rotate(mat4x4<T> const & m, T const & angle, T const & x, T const & y, T const & z) @endlink
/// - @link rotate(T angle, detail::tvec3<T> const & v) rotate(T const & angle, vec3<T> const & v) @endlink
template <typename T>
detail::tmat4x4<T> rotate(
detail::tmat4x4<T> const & m,
@ -85,9 +84,9 @@ namespace gtc
/// Builds a scale 4 * 4 matrix created from 3 scalars.
/// @see - gtc_matrix_transform
/// @see - gtx_transform:
/// - @link glm::gtx::scale(T x, T y, T z) scale(T const & x, T const & y, T const & z) @endlink
/// - @link glm::gtx::scale(detail::tmat4x4<T> const & m, T x, T y, T z) scale(mat4x4<T> const & m, T const & angle, T const & x, T const & y, T const & z) @endlink
/// - @link glm::gtx::scale(detail::tvec3<T> const & v) scale(vec3<T> const & v) @endlink
/// - @link scale(T x, T y, T z) scale(T const & x, T const & y, T const & z) @endlink
/// - @link scale(detail::tmat4x4<T> const & m, T x, T y, T z) scale(mat4x4<T> const & m, T const & angle, T const & x, T const & y, T const & z) @endlink
/// - @link scale(detail::tvec3<T> const & v) scale(vec3<T> const & v) @endlink
template <typename T>
detail::tmat4x4<T> scale(
detail::tmat4x4<T> const & m,
@ -95,7 +94,7 @@ namespace gtc
/// Creates a matrix for an orthographic parallel viewing volume.
/// @see - gtc_matrix_transform:
/// - @link glm::gtc::ortho(T const & left, T const & right, T const & bottom, T const & top) ortho(T const & left, T const & right, T const & bottom, T const & top) @endlink
/// - @link glm::ortho(T const & left, T const & right, T const & bottom, T const & top) ortho(T const & left, T const & right, T const & bottom, T const & top) @endlink
template <typename T>
detail::tmat4x4<T> ortho(
T const & left,
@ -107,7 +106,7 @@ namespace gtc
/// Creates a matrix for projecting two-dimensional coordinates onto the screen.
/// @see - gtc_matrix_transform:
/// - @link glm::gtc::ortho(T const & left, T const & right, T const & bottom, T const & top, T const & zNear, T const & zFar) ortho(T const & left, T const & right, T const & bottom, T const & top, T const & zNear, T const & zFar) @endlink
/// - @link glm::ortho(T const & left, T const & right, T const & bottom, T const & top, T const & zNear, T const & zFar) ortho(T const & left, T const & right, T const & bottom, T const & top, T const & zNear, T const & zFar) @endlink
template <typename T>
detail::tmat4x4<T> ortho(
T const & left,
@ -196,9 +195,8 @@ namespace gtc
detail::tvec3<T> const & up);
/// @}
}//namespace gtc
}//namespace glm
#include "matrix_transform.inl"
#endif//glm_gtc_matrix_transform
#endif//GLM_GTC_matrix_transform

View File

@ -8,7 +8,6 @@
///////////////////////////////////////////////////////////////////////////////////////////////////
namespace glm{
namespace gtc{
template <typename T>
GLM_FUNC_QUALIFIER detail::tmat4x4<T> translate
@ -389,8 +388,7 @@ namespace gtc{
Result[3][1] =-dot(y, eye);
Result[3][2] = dot(f, eye);
*/
return gtc::translate(Result, -eye);
return translate(Result, -eye);
}
}//namespace gtc
}//namespace glm

View File

@ -39,8 +39,8 @@
/// <glm/gtc/quaternion.hpp> need to be included to use these functionalities.
///////////////////////////////////////////////////////////////////////////////////
#ifndef glm_gtc_quaternion
#define glm_gtc_quaternion
#ifndef GLM_GTC_quaternion
#define GLM_GTC_quaternion 90
// Dependency:
#include "../glm.hpp"
@ -73,7 +73,7 @@ namespace detail
tquat();
explicit tquat(
value_type const & s,
tvec3<T> const & v);
glm::detail::tvec3<T> const & v);
explicit tquat(
value_type const & w,
value_type const & x,
@ -150,8 +150,6 @@ namespace detail
} //namespace detail
namespace gtc{
/// @addtogroup gtc_quaternion
/// @{
@ -255,9 +253,8 @@ namespace gtc{
typedef detail::tquat<highp_float> highp_quat;
/// @}
} //namespace gtc
} //namespace glm
#include "quaternion.inl"
#endif//glm_gtc_quaternion
#endif//GLM_GTC_quaternion

View File

@ -211,7 +211,7 @@ namespace detail{
detail::tquat<T> const & q
)
{
return gtc::inverse(q) * v;
return inverse(q) * v;
}
template <typename T>
@ -231,7 +231,7 @@ namespace detail{
detail::tquat<T> const & q
)
{
return gtc::inverse(q) * v;
return inverse(q) * v;
}
template <typename T>
@ -291,8 +291,6 @@ namespace detail{
}//namespace detail
namespace gtc{
////////////////////////////////////////////////////////
template <typename T>
GLM_FUNC_QUALIFIER T length
@ -447,7 +445,7 @@ namespace gtc{
detail::tquat<T> const & q
)
{
return gtc::conjugate(q) / gtc::dot(q, q);
return conjugate(q) / dot(q, q);
}
template <typename T>
@ -473,7 +471,7 @@ namespace gtc{
typename detail::tquat<T>::value_type AngleRad = radians(angle);
typename detail::tquat<T>::value_type fSin = sin(AngleRad * T(0.5));
return gtc::cross(q, detail::tquat<T>(cos(AngleRad * T(0.5)), Tmp.x * fSin, Tmp.y * fSin, Tmp.z * fSin));
return cross(q, detail::tquat<T>(cos(AngleRad * T(0.5)), Tmp.x * fSin, Tmp.y * fSin, Tmp.z * fSin));
}
template <typename T>
@ -578,5 +576,4 @@ namespace gtc{
return quat_cast(detail::tmat3x3<T>(m4));
}
}//namespace gtc
}//namespace glm

View File

@ -35,8 +35,8 @@
/// <glm/gtc/swizzle.hpp> need to be included to use these functionalities.
///////////////////////////////////////////////////////////////////////////////////
#ifndef glm_gtc_swizzle
#define glm_gtc_swizzle
#ifndef GLM_GTC_swizzle
#define GLM_GTC_swizzle 90
// Dependency:
#include "../glm.hpp"
@ -46,8 +46,7 @@
# pragma message("GLM: GLM_GTC_swizzle extension included")
#endif
namespace glm{
namespace gtc
namespace glm
{
/// @addtogroup gtc_swizzle
/// @{
@ -369,9 +368,8 @@ namespace gtc
static_swizzle4_ref(glm::u64, 4)
/// @}
}//namespace gtc
}//namespace glm
#include "swizzle.inl"
#endif//glm_gtc_swizzle
#endif//GLM_GTC_swizzle

View File

@ -11,7 +11,6 @@
///////////////////////////////////////////////////////////////////////////////////////////////////
namespace glm{
namespace gtc{
template <typename T, template <typename> class vecType>
GLM_FUNC_QUALIFIER T swizzle
@ -172,5 +171,4 @@ GLM_FUNC_QUALIFIER detail::tref4<int> swizzle
}
*/
}//namespace gtc
}//namespace glm

View File

@ -40,8 +40,8 @@
/// <glm/gtc/type_precision.hpp> need to be included to use these functionalities.
///////////////////////////////////////////////////////////////////////////////////
#ifndef glm_gtc_type_precision
#define glm_gtc_type_precision
#ifndef GLM_GTC_type_precision
#define GLM_GTC_type_precision 100
// Dependency:
#include "../glm.hpp"
@ -52,9 +52,8 @@
# pragma message("GLM: GLM_GTC_type_precision extension included")
#endif
namespace glm{
namespace gtc{
namespace glm
{
///////////////////////////
// Signed int vector types
@ -229,9 +228,8 @@ namespace gtc{
typedef detail::tquat<f64> f64quat; //!< \brief Double-precision floating-point quaternion. (from GLM_GTC_type_precision extension)
/// @}
}//namespace gtc
}//namespace glm
#include "type_precision.inl"
#endif//glm_gtc_type_precision
#endif//GLM_GTC_type_precision

View File

@ -56,8 +56,8 @@
/// <glm/gtc/type_ptr.hpp> need to be included to use these functionalities.
///////////////////////////////////////////////////////////////////////////////////
#ifndef glm_gtc_type_ptr
#define glm_gtc_type_ptr
#ifndef GLM_GTC_type_ptr
#define GLM_GTC_type_ptr 90
// Dependency:
#include "../glm.hpp"
@ -69,8 +69,7 @@
# pragma message("GLM: GLM_GTC_type_ptr extension included")
#endif
namespace glm{
namespace gtc
namespace glm
{
/// @addtogroup gtc_type_ptr
/// @{
@ -502,10 +501,9 @@ namespace gtc
}
/// @}
}//namespace gtc
}//namespace glm
#include "type_ptr.inl"
#endif//glm_gtx_type_ptr
#endif//GLM_GTC_type_ptr

View File

@ -45,8 +45,7 @@
# pragma message("GLM: GLM_GTX_associated_min_max extension included")
#endif
namespace glm{
namespace gtx
namespace glm
{
/// @addtogroup gtx_associated_min_max
/// @{
@ -94,7 +93,6 @@ namespace gtx
const genTypeT& w, const genTypeU& d);
/// @}
} //namespace gtx
} //namespace glm
#include "associated_min_max.inl"

View File

@ -8,8 +8,7 @@
///////////////////////////////////////////////////////////////////////////////////////////////////
namespace glm{
namespace gtx
{
// Min comparison between 2 variables
template<typename T, typename U>
GLM_FUNC_QUALIFIER U associatedMin(T x, U a, T y, U b)
@ -910,5 +909,4 @@ namespace gtx
return Result;
}
}//namespace gtx
}//namespace glm

View File

@ -47,8 +47,7 @@
# pragma message("GLM: GLM_GTX_bit extension included")
#endif
namespace glm{
namespace gtx
namespace glm
{
/// @addtogroup gtx_bit
/// @{
@ -134,7 +133,6 @@ namespace gtx
int const & ToBit);
/// @}
}// namespace gtx
}// namespace glm
#include "bit.inl"

View File

@ -10,7 +10,6 @@
#include "../core/_detail.hpp"
namespace glm{
namespace gtx{
template <typename genIType>
GLM_FUNC_QUALIFIER genIType mask
@ -61,13 +60,13 @@ GLM_FUNC_QUALIFIER detail::tvec4<valIType> mask
template <typename genIType>
GLM_FUNC_QUALIFIER genIType extractField
(
gtc::half const & value,
half const & value,
genIType const & first,
genIType const & count
)
{
assert(first + count < sizeof(gtc::half));
return (value._data() << first) >> ((sizeof(gtc::half) << 3) - count);
assert(first + count < sizeof(half));
return (value._data() << first) >> ((sizeof(half) << 3) - count);
}
template <typename genIType>
@ -771,5 +770,4 @@ GLM_FUNC_QUALIFIER genIUType fillBitfieldWithZero
return Result;
}
}//namespace gtx
}//namespace glm

View File

@ -45,8 +45,7 @@
# pragma message("GLM: GLM_GTX_closest_point extension included")
#endif
namespace glm{
namespace gtx
namespace glm
{
/// @addtogroup gtx_closest_point
/// @{
@ -60,7 +59,6 @@ namespace gtx
detail::tvec3<T> const & b);
/// @}
}// namespace gtx
}// namespace glm
#include "closest_point.inl"

View File

@ -11,7 +11,6 @@
#define glm_gtx_closest_point
namespace glm{
namespace gtx{
template <typename valType>
GLM_FUNC_QUALIFIER detail::tvec3<valType> closestPointOnLine
@ -33,7 +32,6 @@ GLM_FUNC_QUALIFIER detail::tvec3<valType> closestPointOnLine
return a + LineDirection * Distance;
}
}//namespace gtx
}//namespace glm
#endif//glm_gtx_closest_point

View File

@ -47,78 +47,76 @@
# pragma message("GLM: GLM_GTX_color_cast extension included")
#endif
namespace glm{
namespace gtx
namespace glm
{
/// @addtogroup gtx_color_cast
/// @{
//! Conversion of a floating value into a 8bit unsigned int value.
//! From GLM_GTX_color_cast extension.
template <typename valType> gtc::uint8 u8channel_cast(valType a);
template <typename valType> uint8 u8channel_cast(valType a);
//! Conversion of a floating value into a 16bit unsigned int value.
//! From GLM_GTX_color_cast extension.
template <typename valType> gtc::uint16 u16channel_cast(valType a);
template <typename valType> uint16 u16channel_cast(valType a);
template <typename T> gtc::uint32 u32_rgbx_cast(const detail::tvec3<T>& c); //!< \brief Conversion of a 3 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension)
template <typename T> gtc::uint32 u32_xrgb_cast(const detail::tvec3<T>& c); //!< \brief Conversion of a 3 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension)
template <typename T> gtc::uint32 u32_bgrx_cast(const detail::tvec3<T>& c); //!< \brief Conversion of a 3 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension)
template <typename T> gtc::uint32 u32_xbgr_cast(const detail::tvec3<T>& c); //!< \brief Conversion of a 3 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension)
template <typename T> uint32 u32_rgbx_cast(const detail::tvec3<T>& c); //!< \brief Conversion of a 3 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension)
template <typename T> uint32 u32_xrgb_cast(const detail::tvec3<T>& c); //!< \brief Conversion of a 3 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension)
template <typename T> uint32 u32_bgrx_cast(const detail::tvec3<T>& c); //!< \brief Conversion of a 3 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension)
template <typename T> uint32 u32_xbgr_cast(const detail::tvec3<T>& c); //!< \brief Conversion of a 3 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension)
template <typename T> gtc::uint32 u32_rgba_cast(const detail::tvec4<T>& c); //!< \brief Conversion of a 4 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension)
template <typename T> gtc::uint32 u32_argb_cast(const detail::tvec4<T>& c); //!< \brief Conversion of a 4 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension)
template <typename T> gtc::uint32 u32_bgra_cast(const detail::tvec4<T>& c); //!< \brief Conversion of a 4 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension)
template <typename T> gtc::uint32 u32_abgr_cast(const detail::tvec4<T>& c); //!< \brief Conversion of a 4 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension)
template <typename T> uint32 u32_rgba_cast(const detail::tvec4<T>& c); //!< \brief Conversion of a 4 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension)
template <typename T> uint32 u32_argb_cast(const detail::tvec4<T>& c); //!< \brief Conversion of a 4 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension)
template <typename T> uint32 u32_bgra_cast(const detail::tvec4<T>& c); //!< \brief Conversion of a 4 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension)
template <typename T> uint32 u32_abgr_cast(const detail::tvec4<T>& c); //!< \brief Conversion of a 4 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension)
template <typename T> gtc::uint64 u64_rgbx_cast(const detail::tvec3<T>& c); //!< \brief Conversion of a 3 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension)
template <typename T> gtc::uint64 u64_xrgb_cast(const detail::tvec3<T>& c); //!< \brief Conversion of a 3 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension)
template <typename T> gtc::uint64 u64_bgrx_cast(const detail::tvec3<T>& c); //!< \brief Conversion of a 3 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension)
template <typename T> gtc::uint64 u64_xbgr_cast(const detail::tvec3<T>& c); //!< \brief Conversion of a 3 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension)
template <typename T> uint64 u64_rgbx_cast(const detail::tvec3<T>& c); //!< \brief Conversion of a 3 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension)
template <typename T> uint64 u64_xrgb_cast(const detail::tvec3<T>& c); //!< \brief Conversion of a 3 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension)
template <typename T> uint64 u64_bgrx_cast(const detail::tvec3<T>& c); //!< \brief Conversion of a 3 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension)
template <typename T> uint64 u64_xbgr_cast(const detail::tvec3<T>& c); //!< \brief Conversion of a 3 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension)
template <typename T> gtc::uint64 u64_rgba_cast(const detail::tvec4<T>& c); //!< \brief Conversion of a 4 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension)
template <typename T> gtc::uint64 u64_argb_cast(const detail::tvec4<T>& c); //!< \brief Conversion of a 4 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension)
template <typename T> gtc::uint64 u64_bgra_cast(const detail::tvec4<T>& c); //!< \brief Conversion of a 4 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension)
template <typename T> gtc::uint64 u64_abgr_cast(const detail::tvec4<T>& c); //!< \brief Conversion of a 4 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension)
template <typename T> uint64 u64_rgba_cast(const detail::tvec4<T>& c); //!< \brief Conversion of a 4 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension)
template <typename T> uint64 u64_argb_cast(const detail::tvec4<T>& c); //!< \brief Conversion of a 4 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension)
template <typename T> uint64 u64_bgra_cast(const detail::tvec4<T>& c); //!< \brief Conversion of a 4 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension)
template <typename T> uint64 u64_abgr_cast(const detail::tvec4<T>& c); //!< \brief Conversion of a 4 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension)
template <typename T> gtx::f16vec1 f16_channel_cast(T a); //!< \brief Conversion of a u8 or u16 value to a single channel floating value. (From GLM_GTX_color_cast extension)
template <typename T> f16 f16_channel_cast(T a); //!< \brief Conversion of a u8 or u16 value to a single channel floating value. (From GLM_GTX_color_cast extension)
template <typename T> gtc::f16vec3 f16_rgbx_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension)
template <typename T> gtc::f16vec3 f16_xrgb_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension)
template <typename T> gtc::f16vec3 f16_bgrx_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension)
template <typename T> gtc::f16vec3 f16_xbgr_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension)
template <typename T> f16vec3 f16_rgbx_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension)
template <typename T> f16vec3 f16_xrgb_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension)
template <typename T> f16vec3 f16_bgrx_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension)
template <typename T> f16vec3 f16_xbgr_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension)
template <typename T> gtc::f16vec4 f16_rgba_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::f16vec4 f16_argb_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::f16vec4 f16_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::f16vec4 f16_abgr_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> f16vec4 f16_rgba_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> f16vec4 f16_argb_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> f16vec4 f16_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> f16vec4 f16_abgr_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> gtx::f32vec1 f32_channel_cast(T a); //!< \brief Conversion of a u8 or u16 value to a single channel floating value. (From GLM_GTX_color_cast extension)
template <typename T> f32 f32_channel_cast(T a); //!< \brief Conversion of a u8 or u16 value to a single channel floating value. (From GLM_GTX_color_cast extension)
template <typename T> gtc::f32vec3 f32_rgbx_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension)
template <typename T> gtc::f32vec3 f32_xrgb_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension)
template <typename T> gtc::f32vec3 f32_bgrx_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension)
template <typename T> gtc::f32vec3 f32_xbgr_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension)
template <typename T> f32vec3 f32_rgbx_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension)
template <typename T> f32vec3 f32_xrgb_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension)
template <typename T> f32vec3 f32_bgrx_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension)
template <typename T> f32vec3 f32_xbgr_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension)
template <typename T> gtc::f32vec4 f32_rgba_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::f32vec4 f32_argb_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::f32vec4 f32_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::f32vec4 f32_abgr_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> f32vec4 f32_rgba_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> f32vec4 f32_argb_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> f32vec4 f32_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> f32vec4 f32_abgr_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> gtx::f64vec1 f64_channel_cast(T a); //!< \brief Conversion of a u8 or u16 value to a single channel floating value. (From GLM_GTX_color_cast extension)
template <typename T> f64 f64_channel_cast(T a); //!< \brief Conversion of a u8 or u16 value to a single channel floating value. (From GLM_GTX_color_cast extension)
template <typename T> gtc::f64vec3 f64_rgbx_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension)
template <typename T> gtc::f64vec3 f64_xrgb_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension)
template <typename T> gtc::f64vec3 f64_bgrx_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension)
template <typename T> gtc::f64vec3 f64_xbgr_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension)
template <typename T> f64vec3 f64_rgbx_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension)
template <typename T> f64vec3 f64_xrgb_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension)
template <typename T> f64vec3 f64_bgrx_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension)
template <typename T> f64vec3 f64_xbgr_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension)
template <typename T> gtc::f64vec4 f64_rgba_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::f64vec4 f64_argb_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::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::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)
template <typename T> f64vec4 f64_rgba_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> f64vec4 f64_argb_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> 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> 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 gtx
}//namespace glm
#include "color_cast.inl"

View File

@ -8,213 +8,212 @@
///////////////////////////////////////////////////////////////////////////////////////////////////
namespace glm{
namespace gtx{
template <typename T>
GLM_FUNC_QUALIFIER gtc::uint8 u8channel_cast(T a)
GLM_FUNC_QUALIFIER uint8 u8channel_cast(T a)
{
return static_cast<gtc::uint8>(a * T(255));
return static_cast<uint8>(a * T(255));
}
template <typename T>
GLM_FUNC_QUALIFIER gtc::uint16 u16channel_cast(T a)
GLM_FUNC_QUALIFIER uint16 u16channel_cast(T a)
{
return static_cast<gtc::uint16>(a * T(65535));
return static_cast<uint16>(a * T(65535));
}
template <typename T>
GLM_FUNC_QUALIFIER gtc::uint32 u32_rgbx_cast(const detail::tvec3<T>& c)
GLM_FUNC_QUALIFIER uint32 u32_rgbx_cast(const detail::tvec3<T>& c)
{
gtc::uint32 result = 0;
result += static_cast<gtc::uint32>(c.x * detail::tvec3<T>::value_type(255)) << 0;
result += static_cast<gtc::uint32>(c.y * detail::tvec3<T>::value_type(255)) << 8;
result += static_cast<gtc::uint32>(c.z * detail::tvec3<T>::value_type(255)) << 16;
uint32 result = 0;
result += static_cast<uint32>(c.x * detail::tvec3<T>::value_type(255)) << 0;
result += static_cast<uint32>(c.y * detail::tvec3<T>::value_type(255)) << 8;
result += static_cast<uint32>(c.z * detail::tvec3<T>::value_type(255)) << 16;
return result;
}
template <typename T>
GLM_FUNC_QUALIFIER gtc::uint32 u32_xrgb_cast(const detail::tvec3<T>& c)
GLM_FUNC_QUALIFIER uint32 u32_xrgb_cast(const detail::tvec3<T>& c)
{
gtc::uint32 result = 0;
result += static_cast<gtc::uint32>(c.x * detail::tvec3<T>::value_type(255)) << 8;
result += static_cast<gtc::uint32>(c.y * detail::tvec3<T>::value_type(255)) << 16;
result += static_cast<gtc::uint32>(c.z * detail::tvec3<T>::value_type(255)) << 24;
uint32 result = 0;
result += static_cast<uint32>(c.x * detail::tvec3<T>::value_type(255)) << 8;
result += static_cast<uint32>(c.y * detail::tvec3<T>::value_type(255)) << 16;
result += static_cast<uint32>(c.z * detail::tvec3<T>::value_type(255)) << 24;
return result;
}
template <typename T>
GLM_FUNC_QUALIFIER gtc::uint32 u32_bgrx_cast(const detail::tvec3<T>& c)
GLM_FUNC_QUALIFIER uint32 u32_bgrx_cast(const detail::tvec3<T>& c)
{
gtc::uint32 result = 0;
result += static_cast<gtc::uint32>(c.x * detail::tvec3<T>::value_type(255)) << 16;
result += static_cast<gtc::uint32>(c.y * detail::tvec3<T>::value_type(255)) << 8;
result += static_cast<gtc::uint32>(c.z * detail::tvec3<T>::value_type(255)) << 0;
uint32 result = 0;
result += static_cast<uint32>(c.x * detail::tvec3<T>::value_type(255)) << 16;
result += static_cast<uint32>(c.y * detail::tvec3<T>::value_type(255)) << 8;
result += static_cast<uint32>(c.z * detail::tvec3<T>::value_type(255)) << 0;
return result;
}
template <typename T>
GLM_FUNC_QUALIFIER gtc::uint32 u32_xbgr_cast(const detail::tvec3<T>& c)
GLM_FUNC_QUALIFIER uint32 u32_xbgr_cast(const detail::tvec3<T>& c)
{
gtc::uint32 result = 0;
result += static_cast<gtc::uint32>(c.x * detail::tvec3<T>::value_type(255)) << 24;
result += static_cast<gtc::uint32>(c.y * detail::tvec3<T>::value_type(255)) << 16;
result += static_cast<gtc::uint32>(c.z * detail::tvec3<T>::value_type(255)) << 8;
result += static_cast<gtc::uint32>(c.w * detail::tvec3<T>::value_type(255)) << 0;
uint32 result = 0;
result += static_cast<uint32>(c.x * detail::tvec3<T>::value_type(255)) << 24;
result += static_cast<uint32>(c.y * detail::tvec3<T>::value_type(255)) << 16;
result += static_cast<uint32>(c.z * detail::tvec3<T>::value_type(255)) << 8;
result += static_cast<uint32>(c.w * detail::tvec3<T>::value_type(255)) << 0;
return result;
}
template <typename T>
GLM_FUNC_QUALIFIER gtc::uint32 u32_rgba_cast(const detail::tvec4<T>& c)
GLM_FUNC_QUALIFIER uint32 u32_rgba_cast(const detail::tvec4<T>& c)
{
gtc::uint32 result = 0;
result += static_cast<gtc::uint32>(c.x * detail::tvec4<T>::value_type(255)) << 0;
result += static_cast<gtc::uint32>(c.y * detail::tvec4<T>::value_type(255)) << 8;
result += static_cast<gtc::uint32>(c.z * detail::tvec4<T>::value_type(255)) << 16;
result += static_cast<gtc::uint32>(c.w * detail::tvec4<T>::value_type(255)) << 24;
uint32 result = 0;
result += static_cast<uint32>(c.x * detail::tvec4<T>::value_type(255)) << 0;
result += static_cast<uint32>(c.y * detail::tvec4<T>::value_type(255)) << 8;
result += static_cast<uint32>(c.z * detail::tvec4<T>::value_type(255)) << 16;
result += static_cast<uint32>(c.w * detail::tvec4<T>::value_type(255)) << 24;
return result;
}
template <typename T>
GLM_FUNC_QUALIFIER gtc::uint32 u32_argb_cast(const detail::tvec4<T>& c)
GLM_FUNC_QUALIFIER uint32 u32_argb_cast(const detail::tvec4<T>& c)
{
gtc::uint32 result = 0;
result += static_cast<gtc::uint32>(c.x * detail::tvec4<T>::value_type(255)) << 8;
result += static_cast<gtc::uint32>(c.y * detail::tvec4<T>::value_type(255)) << 16;
result += static_cast<gtc::uint32>(c.z * detail::tvec4<T>::value_type(255)) << 24;
result += static_cast<gtc::uint32>(c.w * detail::tvec4<T>::value_type(255)) << 0;
uint32 result = 0;
result += static_cast<uint32>(c.x * detail::tvec4<T>::value_type(255)) << 8;
result += static_cast<uint32>(c.y * detail::tvec4<T>::value_type(255)) << 16;
result += static_cast<uint32>(c.z * detail::tvec4<T>::value_type(255)) << 24;
result += static_cast<uint32>(c.w * detail::tvec4<T>::value_type(255)) << 0;
return result;
}
template <typename T>
GLM_FUNC_QUALIFIER gtc::uint32 u32_bgra_cast(const detail::tvec4<T>& c)
GLM_FUNC_QUALIFIER uint32 u32_bgra_cast(const detail::tvec4<T>& c)
{
gtc::uint32 result = 0;
result += static_cast<gtc::uint32>(c.x * detail::tvec4<T>::value_type(255)) << 16;
result += static_cast<gtc::uint32>(c.y * detail::tvec4<T>::value_type(255)) << 8;
result += static_cast<gtc::uint32>(c.z * detail::tvec4<T>::value_type(255)) << 0;
result += static_cast<gtc::uint32>(c.w * detail::tvec4<T>::value_type(255)) << 24;
uint32 result = 0;
result += static_cast<uint32>(c.x * detail::tvec4<T>::value_type(255)) << 16;
result += static_cast<uint32>(c.y * detail::tvec4<T>::value_type(255)) << 8;
result += static_cast<uint32>(c.z * detail::tvec4<T>::value_type(255)) << 0;
result += static_cast<uint32>(c.w * detail::tvec4<T>::value_type(255)) << 24;
return result;
}
template <typename T>
GLM_FUNC_QUALIFIER gtc::uint32 u32_abgr_cast(const detail::tvec4<T>& c)
GLM_FUNC_QUALIFIER uint32 u32_abgr_cast(const detail::tvec4<T>& c)
{
gtc::uint32 result = 0;
result += static_cast<gtc::uint32>(c.x * detail::tvec4<T>::value_type(255)) << 24;
result += static_cast<gtc::uint32>(c.y * detail::tvec4<T>::value_type(255)) << 16;
result += static_cast<gtc::uint32>(c.z * detail::tvec4<T>::value_type(255)) << 8;
result += static_cast<gtc::uint32>(c.w * detail::tvec4<T>::value_type(255)) << 0;
uint32 result = 0;
result += static_cast<uint32>(c.x * detail::tvec4<T>::value_type(255)) << 24;
result += static_cast<uint32>(c.y * detail::tvec4<T>::value_type(255)) << 16;
result += static_cast<uint32>(c.z * detail::tvec4<T>::value_type(255)) << 8;
result += static_cast<uint32>(c.w * detail::tvec4<T>::value_type(255)) << 0;
return result;
}
template <typename T>
GLM_FUNC_QUALIFIER gtc::uint64 u64_rgbx_cast(const detail::tvec3<T>& c)
GLM_FUNC_QUALIFIER uint64 u64_rgbx_cast(const detail::tvec3<T>& c)
{
gtc::uint64 result = 0;
result += static_cast<gtc::uint64>(c.x * detail::tvec3<T>::value_type(65535)) << 0;
result += static_cast<gtc::uint64>(c.y * detail::tvec3<T>::value_type(65535)) << 16;
result += static_cast<gtc::uint64>(c.z * detail::tvec3<T>::value_type(65535)) << 32;
uint64 result = 0;
result += static_cast<uint64>(c.x * detail::tvec3<T>::value_type(65535)) << 0;
result += static_cast<uint64>(c.y * detail::tvec3<T>::value_type(65535)) << 16;
result += static_cast<uint64>(c.z * detail::tvec3<T>::value_type(65535)) << 32;
return result;
}
template <typename T>
GLM_FUNC_QUALIFIER gtc::uint64 u32_xrgb_cast(const detail::tvec3<T>& c)
GLM_FUNC_QUALIFIER uint64 u32_xrgb_cast(const detail::tvec3<T>& c)
{
gtc::uint64 result = 0;
result += static_cast<gtc::uint64>(c.x * detail::tvec3<T>::value_type(65535)) << 16;
result += static_cast<gtc::uint64>(c.y * detail::tvec3<T>::value_type(65535)) << 32;
result += static_cast<gtc::uint64>(c.z * detail::tvec3<T>::value_type(65535)) << 48;
uint64 result = 0;
result += static_cast<uint64>(c.x * detail::tvec3<T>::value_type(65535)) << 16;
result += static_cast<uint64>(c.y * detail::tvec3<T>::value_type(65535)) << 32;
result += static_cast<uint64>(c.z * detail::tvec3<T>::value_type(65535)) << 48;
return result;
}
template <typename T>
GLM_FUNC_QUALIFIER gtc::uint64 u32_bgrx_cast(const detail::tvec3<T>& c)
GLM_FUNC_QUALIFIER uint64 u32_bgrx_cast(const detail::tvec3<T>& c)
{
gtc::uint64 result = 0;
result += static_cast<gtc::uint64>(c.x * detail::tvec3<T>::value_type(65535)) << 32;
result += static_cast<gtc::uint64>(c.y * detail::tvec3<T>::value_type(65535)) << 16;
result += static_cast<gtc::uint64>(c.z * detail::tvec3<T>::value_type(65535)) << 0;
uint64 result = 0;
result += static_cast<uint64>(c.x * detail::tvec3<T>::value_type(65535)) << 32;
result += static_cast<uint64>(c.y * detail::tvec3<T>::value_type(65535)) << 16;
result += static_cast<uint64>(c.z * detail::tvec3<T>::value_type(65535)) << 0;
return result;
}
template <typename T>
GLM_FUNC_QUALIFIER gtc::uint64 u32_xbgr_cast(const detail::tvec3<T>& c)
GLM_FUNC_QUALIFIER uint64 u32_xbgr_cast(const detail::tvec3<T>& c)
{
gtc::uint64 result = 0;
result += static_cast<gtc::uint64>(c.x * detail::tvec3<T>::value_type(65535)) << 48;
result += static_cast<gtc::uint64>(c.y * detail::tvec3<T>::value_type(65535)) << 32;
result += static_cast<gtc::uint64>(c.z * detail::tvec3<T>::value_type(65535)) << 16;
result += static_cast<gtc::uint64>(c.w * detail::tvec3<T>::value_type(65535)) << 0;
uint64 result = 0;
result += static_cast<uint64>(c.x * detail::tvec3<T>::value_type(65535)) << 48;
result += static_cast<uint64>(c.y * detail::tvec3<T>::value_type(65535)) << 32;
result += static_cast<uint64>(c.z * detail::tvec3<T>::value_type(65535)) << 16;
result += static_cast<uint64>(c.w * detail::tvec3<T>::value_type(65535)) << 0;
return result;
}
template <typename T>
GLM_FUNC_QUALIFIER gtc::uint64 u64_rgba_cast(const detail::tvec4<T>& c)
GLM_FUNC_QUALIFIER uint64 u64_rgba_cast(const detail::tvec4<T>& c)
{
gtc::uint64 result = 0;
result += static_cast<gtc::uint64>(c.x * detail::tvec4<T>::value_type(65535)) << 0;
result += static_cast<gtc::uint64>(c.y * detail::tvec4<T>::value_type(65535)) << 16;
result += static_cast<gtc::uint64>(c.z * detail::tvec4<T>::value_type(65535)) << 32;
result += static_cast<gtc::uint64>(c.w * detail::tvec4<T>::value_type(65535)) << 48;
uint64 result = 0;
result += static_cast<uint64>(c.x * detail::tvec4<T>::value_type(65535)) << 0;
result += static_cast<uint64>(c.y * detail::tvec4<T>::value_type(65535)) << 16;
result += static_cast<uint64>(c.z * detail::tvec4<T>::value_type(65535)) << 32;
result += static_cast<uint64>(c.w * detail::tvec4<T>::value_type(65535)) << 48;
return result;
}
template <typename T>
GLM_FUNC_QUALIFIER gtc::uint64 u64_argb_cast(const detail::tvec4<T>& c)
GLM_FUNC_QUALIFIER uint64 u64_argb_cast(const detail::tvec4<T>& c)
{
gtc::uint64 result = 0;
result += static_cast<gtc::uint64>(c.x * detail::tvec4<T>::value_type(65535)) << 16;
result += static_cast<gtc::uint64>(c.y * detail::tvec4<T>::value_type(65535)) << 32;
result += static_cast<gtc::uint64>(c.z * detail::tvec4<T>::value_type(65535)) << 48;
result += static_cast<gtc::uint64>(c.w * detail::tvec4<T>::value_type(65535)) << 0;
uint64 result = 0;
result += static_cast<uint64>(c.x * detail::tvec4<T>::value_type(65535)) << 16;
result += static_cast<uint64>(c.y * detail::tvec4<T>::value_type(65535)) << 32;
result += static_cast<uint64>(c.z * detail::tvec4<T>::value_type(65535)) << 48;
result += static_cast<uint64>(c.w * detail::tvec4<T>::value_type(65535)) << 0;
return result;
}
template <typename T>
GLM_FUNC_QUALIFIER gtc::uint64 u64_bgra_cast(const detail::tvec4<T>& c)
GLM_FUNC_QUALIFIER uint64 u64_bgra_cast(const detail::tvec4<T>& c)
{
gtc::uint64 result = 0;
result += static_cast<gtc::uint64>(c.x * detail::tvec4<T>::value_type(65535)) << 32;
result += static_cast<gtc::uint64>(c.y * detail::tvec4<T>::value_type(65535)) << 16;
result += static_cast<gtc::uint64>(c.z * detail::tvec4<T>::value_type(65535)) << 0;
result += static_cast<gtc::uint64>(c.w * detail::tvec4<T>::value_type(65535)) << 48;
uint64 result = 0;
result += static_cast<uint64>(c.x * detail::tvec4<T>::value_type(65535)) << 32;
result += static_cast<uint64>(c.y * detail::tvec4<T>::value_type(65535)) << 16;
result += static_cast<uint64>(c.z * detail::tvec4<T>::value_type(65535)) << 0;
result += static_cast<uint64>(c.w * detail::tvec4<T>::value_type(65535)) << 48;
return result;
}
template <typename T>
GLM_FUNC_QUALIFIER gtc::uint64 u64_abgr_cast(const detail::tvec4<T>& c)
GLM_FUNC_QUALIFIER uint64 u64_abgr_cast(const detail::tvec4<T>& c)
{
gtc::uint64 result = 0;
result += static_cast<gtc::uint64>(c.x * detail::tvec4<T>::value_type(65535)) << 48;
result += static_cast<gtc::uint64>(c.y * detail::tvec4<T>::value_type(65535)) << 32;
result += static_cast<gtc::uint64>(c.z * detail::tvec4<T>::value_type(65535)) << 16;
result += static_cast<gtc::uint64>(c.w * detail::tvec4<T>::value_type(65535)) << 0;
uint64 result = 0;
result += static_cast<uint64>(c.x * detail::tvec4<T>::value_type(65535)) << 48;
result += static_cast<uint64>(c.y * detail::tvec4<T>::value_type(65535)) << 32;
result += static_cast<uint64>(c.z * detail::tvec4<T>::value_type(65535)) << 16;
result += static_cast<uint64>(c.w * detail::tvec4<T>::value_type(65535)) << 0;
return result;
}
template <>
GLM_FUNC_QUALIFIER f16vec1 f16_channel_cast<gtc::uint32>(gtc::uint32 color)
GLM_FUNC_QUALIFIER f16 f16_channel_cast<uint32>(uint32 color)
{
return gtc::f16(static_cast<float>(color >> 0) / static_cast<float>(255));
return f16(static_cast<float>(color >> 0) / static_cast<float>(255));
}
template <>
GLM_FUNC_QUALIFIER gtc::f16vec3 f16_rgbx_cast<gtc::uint32>(gtc::uint32 color)
GLM_FUNC_QUALIFIER f16vec3 f16_rgbx_cast<uint32>(uint32 color)
{
gtc::f16vec3 result;
result.x = gtc::f16(static_cast<float>(color >> 0) / static_cast<float>(255));
result.y = gtc::f16(static_cast<float>(color >> 8) / static_cast<float>(255));
result.z = gtc::f16(static_cast<float>(color >> 16) / static_cast<float>(255));
f16vec3 result;
result.x = f16(static_cast<float>(color >> 0) / static_cast<float>(255));
result.y = f16(static_cast<float>(color >> 8) / static_cast<float>(255));
result.z = f16(static_cast<float>(color >> 16) / static_cast<float>(255));
return result;
}
template <>
GLM_FUNC_QUALIFIER gtc::f16vec3 f16_xrgb_cast<gtc::uint32>(gtc::uint32 color)
GLM_FUNC_QUALIFIER f16vec3 f16_xrgb_cast<uint32>(uint32 color)
{
gtc::f16vec3 result;
result.x = gtc::f16(static_cast<float>(color >> 8) / static_cast<float>(255));
result.y = gtc::f16(static_cast<float>(color >> 16) / static_cast<float>(255));
result.z = gtc::f16(static_cast<float>(color >> 24) / static_cast<float>(255));
f16vec3 result;
result.x = f16(static_cast<float>(color >> 8) / static_cast<float>(255));
result.y = f16(static_cast<float>(color >> 16) / static_cast<float>(255));
result.z = f16(static_cast<float>(color >> 24) / static_cast<float>(255));
return result;
}
@ -732,5 +731,4 @@ GLM_FUNC_QUALIFIER detail::tvec4<double> f64_abgr_cast<uint64>(uint64 color)
return result;
}
}//namespace gtx
}//namespace glm

View File

@ -45,8 +45,7 @@
# pragma message("GLM: GLM_GTX_color_space extension included")
#endif
namespace glm{
namespace gtx
namespace glm
{
/// @addtogroup gtx_color_space
/// @{
@ -90,7 +89,6 @@ namespace gtx
detail::tvec3<valType> const & color);
/// @}
}//namespace gtx
}//namespace glm
#include "color_space.inl"

View File

@ -8,8 +8,7 @@
///////////////////////////////////////////////////////////////////////////////////////////////////
namespace glm{
namespace gtx
{
template <typename T>
GLM_FUNC_QUALIFIER detail::tvec3<T> rgbColor(const detail::tvec3<T>& hsvColor)
{
@ -148,5 +147,4 @@ namespace gtx
return dot(color, tmp);
}
}//namespace gtx
}//namespace glm

View File

@ -45,8 +45,7 @@
# pragma message("GLM: GLM_GTX_color_space_YCoCg extension included")
#endif
namespace glm{
namespace gtx
namespace glm
{
/// @addtogroup gtx_color_space_YCoCg
/// @{
@ -78,7 +77,6 @@ namespace gtx
detail::tvec3<valType> const & YCoCgColor);
/// @}
}//namespace gtx
}//namespace glm
#include "color_space_YCoCg.inl"

View File

@ -8,7 +8,6 @@
///////////////////////////////////////////////////////////////////////////////////////////////////
namespace glm{
namespace gtx{
template <typename valType>
GLM_FUNC_QUALIFIER detail::tvec3<valType> rgb2YCoCg
@ -63,5 +62,4 @@ GLM_FUNC_QUALIFIER detail::tvec3<valType> YCoCgR2rgb
return result;
}
}//namespace gtx
}//namespace glm

View File

@ -53,8 +53,7 @@
#include <cmath>
#endif//GLM_COMPILER
namespace glm{
namespace gtx
namespace glm
{
/// @addtogroup gtx_compatibility
/// @{
@ -124,21 +123,21 @@ namespace gtx
typedef detail::tmat4x3<int> int4x3; //!< \brief integer matrix with 4 x 3 components. (From GLM_GTX_compatibility extension)
typedef detail::tmat4x4<int> int4x4; //!< \brief integer matrix with 4 x 4 components. (From GLM_GTX_compatibility extension)
typedef gtc::half half1; //!< \brief half-precision floating-point vector with 1 component. (From GLM_GTX_compatibility extension)
typedef detail::tvec2<gtc::half> half2; //!< \brief half-precision floating-point vector with 2 components. (From GLM_GTX_compatibility extension)
typedef detail::tvec3<gtc::half> half3; //!< \brief half-precision floating-point vector with 2 components. (From GLM_GTX_compatibility extension)
typedef detail::tvec4<gtc::half> half4; //!< \brief half-precision floating-point vector with 2 components. (From GLM_GTX_compatibility extension)
typedef detail::thalf half1; //!< \brief half-precision floating-point vector with 1 component. (From GLM_GTX_compatibility extension)
typedef detail::tvec2<detail::thalf> half2; //!< \brief half-precision floating-point vector with 2 components. (From GLM_GTX_compatibility extension)
typedef detail::tvec3<detail::thalf> half3; //!< \brief half-precision floating-point vector with 2 components. (From GLM_GTX_compatibility extension)
typedef detail::tvec4<detail::thalf> half4; //!< \brief half-precision floating-point vector with 2 components. (From GLM_GTX_compatibility extension)
typedef gtc::half half1x1; //!< \brief half-precision floating-point matrix with 1 component. (From GLM_GTX_compatibility extension)
typedef detail::tmat2x2<gtc::half> half2x2; //!< \brief half-precision floating-point matrix with 2 x 2 components. (From GLM_GTX_compatibility extension)
typedef detail::tmat2x3<gtc::half> half2x3; //!< \brief half-precision floating-point matrix with 2 x 3 components. (From GLM_GTX_compatibility extension)
typedef detail::tmat2x4<gtc::half> half2x4; //!< \brief half-precision floating-point matrix with 2 x 4 components. (From GLM_GTX_compatibility extension)
typedef detail::tmat3x2<gtc::half> half3x2; //!< \brief half-precision floating-point matrix with 3 x 2 components. (From GLM_GTX_compatibility extension)
typedef detail::tmat3x3<gtc::half> half3x3; //!< \brief half-precision floating-point matrix with 3 x 3 components. (From GLM_GTX_compatibility extension)
typedef detail::tmat3x4<gtc::half> half3x4; //!< \brief half-precision floating-point matrix with 3 x 3 components. (From GLM_GTX_compatibility extension)
typedef detail::tmat4x2<gtc::half> half4x2; //!< \brief half-precision floating-point matrix with 4 x 2 components. (From GLM_GTX_compatibility extension)
typedef detail::tmat4x3<gtc::half> half4x3; //!< \brief half-precision floating-point matrix with 4 x 3 components. (From GLM_GTX_compatibility extension)
typedef detail::tmat4x4<gtc::half> half4x4; //!< \brief half-precision floating-point matrix with 4 x 4 components. (From GLM_GTX_compatibility extension)
typedef detail::thalf half1x1; //!< \brief half-precision floating-point matrix with 1 component. (From GLM_GTX_compatibility extension)
typedef detail::tmat2x2<detail::thalf> half2x2; //!< \brief half-precision floating-point matrix with 2 x 2 components. (From GLM_GTX_compatibility extension)
typedef detail::tmat2x3<detail::thalf> half2x3; //!< \brief half-precision floating-point matrix with 2 x 3 components. (From GLM_GTX_compatibility extension)
typedef detail::tmat2x4<detail::thalf> half2x4; //!< \brief half-precision floating-point matrix with 2 x 4 components. (From GLM_GTX_compatibility extension)
typedef detail::tmat3x2<detail::thalf> half3x2; //!< \brief half-precision floating-point matrix with 3 x 2 components. (From GLM_GTX_compatibility extension)
typedef detail::tmat3x3<detail::thalf> half3x3; //!< \brief half-precision floating-point matrix with 3 x 3 components. (From GLM_GTX_compatibility extension)
typedef detail::tmat3x4<detail::thalf> half3x4; //!< \brief half-precision floating-point matrix with 3 x 3 components. (From GLM_GTX_compatibility extension)
typedef detail::tmat4x2<detail::thalf> half4x2; //!< \brief half-precision floating-point matrix with 4 x 2 components. (From GLM_GTX_compatibility extension)
typedef detail::tmat4x3<detail::thalf> half4x3; //!< \brief half-precision floating-point matrix with 4 x 3 components. (From GLM_GTX_compatibility extension)
typedef detail::tmat4x4<detail::thalf> half4x4; //!< \brief half-precision floating-point matrix with 4 x 4 components. (From GLM_GTX_compatibility extension)
typedef float float1; //!< \brief single-precision floating-point vector with 1 component. (From GLM_GTX_compatibility extension)
typedef detail::tvec2<float> float2; //!< \brief single-precision floating-point vector with 2 components. (From GLM_GTX_compatibility extension)
@ -173,7 +172,6 @@ namespace gtx
typedef detail::tmat4x4<double> double4x4; //!< \brief double-precision floating-point matrix with 4 x 4 components. (From GLM_GTX_compatibility extension)
/// @}
}//namespace gtx
}//namespace glm
#include "compatibility.inl"

View File

@ -8,8 +8,6 @@
///////////////////////////////////////////////////////////////////////////////////////////////////
namespace glm{
namespace gtx{
namespace compatibility{
// isfinite
template <typename genType>
@ -136,6 +134,4 @@ GLM_FUNC_QUALIFIER detail::tvec4<bool> isnan(
isnan(x.w));
}
}//namespace compatibility
}//namespace gtx
}//namespace glm

View File

@ -45,8 +45,7 @@
# pragma message("GLM: GLM_GTX_component_wise extension included")
#endif
namespace glm{
namespace gtx
namespace glm
{
/// @addtogroup gtx_component_wise
/// @{
@ -76,7 +75,6 @@ namespace gtx
genType const & v);
/// @}
}//namespace gtx
}//namespace glm
#include "component_wise.inl"

View File

@ -8,8 +8,7 @@
///////////////////////////////////////////////////////////////////////////////////////////////////
namespace glm{
namespace gtx
{
template <typename genType>
GLM_FUNC_QUALIFIER typename genType::value_type compAdd(genType const & v)
{
@ -46,5 +45,4 @@ namespace gtx
return result;
}
}//namespace gtx
}//namespace glm

View File

@ -49,8 +49,7 @@
# pragma message("GLM: GLM_GTX_epsilon extension included")
#endif
namespace glm{
namespace gtx
namespace glm
{
/// @addtogroup gtx_epsilon
/// @{
@ -72,7 +71,6 @@ namespace gtx
genTypeU const & epsilon);
/// @}
}//namespace gtx
}//namespace glm
#include "epsilon.inl"

View File

@ -8,7 +8,6 @@
///////////////////////////////////////////////////////////////////////////////////////////////////
namespace glm{
namespace gtx{
template <typename genType>
GLM_FUNC_QUALIFIER bool equalEpsilon
@ -228,5 +227,4 @@ GLM_FUNC_QUALIFIER detail::tvec4<bool> notEqualEpsilon
abs(x.w - y.w) >= epsilon.w);
}
}//namespace gtx
}//namespace glm

View File

@ -50,8 +50,7 @@
# pragma message("GLM: GLM_GTX_euler_angles extension included")
#endif
namespace glm{
namespace gtx
namespace glm
{
/// @addtogroup gtx_euler_angles
/// @{
@ -153,7 +152,6 @@ namespace gtx
detail::tmat4x4<T> orientate4(detail::tvec3<T> const & angles);
/// @}
}//namespace gtx
}//namespace glm
#include "euler_angles.inl"

View File

@ -8,7 +8,6 @@
///////////////////////////////////////////////////////////////////////////////////////////////////
namespace glm{
namespace gtx{
template <typename valType>
GLM_FUNC_QUALIFIER detail::tmat4x4<valType> eulerAngleX
@ -243,5 +242,4 @@ GLM_FUNC_QUALIFIER detail::tmat4x4<valType> orientate4
return yawPitchRoll(angles.z, angles.x, angles.y);
}
}//namespace gtx
}//namespace glm

View File

@ -45,8 +45,7 @@
# pragma message("GLM: GLM_GTX_extend extension included")
#endif
namespace glm{
namespace gtx
namespace glm
{
/// @addtogroup gtx_extend
/// @{
@ -60,7 +59,6 @@ namespace gtx
typename genType::value_type const Length);
/// @}
}//namespace gtx
}//namespace glm
#include "extend.inl"

View File

@ -8,7 +8,6 @@
///////////////////////////////////////////////////////////////////////////////////////////////////
namespace glm{
namespace gtx{
template <typename genType>
genType extend
@ -54,5 +53,4 @@ detail::tvec4<valType> extend
return Origin + (Source - Origin) * Distance;
}
}//namespace gtx
}//namespace glm

View File

@ -47,8 +47,7 @@
# pragma message("GLM: GLM_GTX_extented_min_max extension included")
#endif
namespace glm{
namespace gtx
namespace glm
{
/// @addtogroup gtx_extented_min_max
/// @{
@ -188,7 +187,6 @@ namespace gtx
C<T> const & w);
/// @}
}//namespace gtx
}//namespace glm
#include "extented_min_max.inl"

View File

@ -7,8 +7,7 @@
// File : gtx_extented_min_max.inl
///////////////////////////////////////////////////////////////////////////////////////////////////
namespace glm{
namespace gtx
namespace glm
{
template <typename T>
GLM_FUNC_QUALIFIER T min(
@ -176,5 +175,4 @@ namespace gtx
return glm::max(glm::max(x, y), glm::max(z, w));
}
}//namespace gtx
}//namespace glm

View File

@ -47,8 +47,7 @@
# pragma message("GLM: GLM_GTX_fast_exponential extension included")
#endif
namespace glm{
namespace gtx
namespace glm
{
/// @addtogroup gtx_fast_exponential
/// @{
@ -93,7 +92,6 @@ namespace gtx
T fastLn(const T& x);
/// @}
}//namespace gtx
}//namespace glm
#include "fast_exponential.inl"

View File

@ -8,8 +8,7 @@
///////////////////////////////////////////////////////////////////////////////////////////////////
namespace glm{
namespace gtx
{
// fastPow:
template <typename T>
GLM_FUNC_QUALIFIER T fastPow(const T x, const T y)
@ -288,5 +287,4 @@ namespace gtx
fastLog2(x.w));
}
}//namespace gtx
}//namespace glm

View File

@ -47,8 +47,7 @@
# pragma message("GLM: GLM_GTX_fast_square_root extension included")
#endif
namespace glm{
namespace gtx
namespace glm
{
/// @addtogroup gtx_fast_square_root
/// @{
@ -79,7 +78,6 @@ namespace gtx
genType fastNormalize(genType const & x);
/// @}
}// namespace gtx
}// namespace glm
#include "fast_square_root.inl"

View File

@ -8,7 +8,6 @@
///////////////////////////////////////////////////////////////////////////////////////////////////
namespace glm{
namespace gtx{
// fastSqrt
template <typename genType>
@ -231,5 +230,4 @@ GLM_FUNC_QUALIFIER detail::tvec4<valType> fastNormalize
return x * fastInverseSqrt(sqr);
}
}//namespace gtx
}//namespace glm

View File

@ -45,8 +45,7 @@
# pragma message("GLM: GLM_GTX_fast_trigonometry extension included")
#endif
namespace glm{
namespace gtx
namespace glm
{
/// @addtogroup gtx_fast_trigonometry
/// @{
@ -94,7 +93,6 @@ namespace gtx
T fastAtan(const T& angle);
/// @}
}//namespace gtx
}//namespace glm
#include "fast_trigonometry.inl"

View File

@ -8,8 +8,7 @@
///////////////////////////////////////////////////////////////////////////////////////////////////
namespace glm{
namespace gtx
{
// sin
template <typename T>
GLM_FUNC_QUALIFIER T fastSin(const T x)
@ -266,5 +265,4 @@ namespace gtx
fastAtan(x.w));
}
}//namespace gtx
}//namespace glm

View File

@ -46,8 +46,7 @@
# pragma message("GLM: GLM_GTX_gradient_paint extension included")
#endif
namespace glm{
namespace gtx
namespace glm
{
/// @addtogroup gtx_gradient_paint
/// @{
@ -70,7 +69,6 @@ namespace gtx
glm::detail::tvec2<valType> const & Position);
/// @}
}// namespace gtx
}// namespace glm
#include "gradient_paint.inl"

View File

@ -8,7 +8,6 @@
///////////////////////////////////////////////////////////////////////////////////////////////////
namespace glm{
namespace gtx{
template <typename valType>
valType radialGradient(
@ -38,5 +37,4 @@ namespace gtx{
return (Dist.x * (Position.x - Point0.x) + Dist.y * (Position.y - Point0.y)) / glm::dot(Dist, Dist);
}
}//namespace gtx
}//namespace glm

View File

@ -45,8 +45,7 @@
# pragma message("GLM: GLM_GTX_handed_coordinate_space extension included")
#endif
namespace glm{
namespace gtx
namespace glm
{
/// @addtogroup gtx_handed_coordinate_space
/// @{
@ -68,7 +67,6 @@ namespace gtx
detail::tvec3<T> const & normal);
/// @}
}// namespace gtx
}// namespace glm
#include "handed_coordinate_space.inl"

View File

@ -8,8 +8,7 @@
///////////////////////////////////////////////////////////////////////////////////////////////////
namespace glm{
namespace gtx
{
template <typename T>
GLM_FUNC_QUALIFIER bool rightHanded(
detail::tvec3<T> const & tangent,
@ -28,5 +27,4 @@ namespace gtx
return dot(cross(normal, tangent), binormal) < T(0);
}
}//namespace gtx
}//namespace glm

View File

@ -46,8 +46,7 @@
# pragma message("GLM: GLM_GTX_inertia extension included")
#endif
namespace glm{
namespace gtx
namespace glm
{
/// @addtogroup gtx_inertia
/// @{
@ -109,7 +108,6 @@ namespace gtx
const T Radius);
/// @}
}// namespace gtx
}// namespace glm
#include "inertia.inl"

View File

@ -8,7 +8,6 @@
///////////////////////////////////////////////////////////////////////////////////////////////////
namespace glm{
namespace gtx{
template <typename T>
GLM_FUNC_QUALIFIER detail::tmat3x3<T> boxInertia3(
@ -97,5 +96,4 @@ namespace gtx{
return Result;
}
}//namespace gtx
}//namespace glm

View File

@ -47,8 +47,7 @@
# pragma message("GLM: GLM_GTX_int_10_10_10_2 extension included")
#endif
namespace glm{
namespace gtx
namespace glm
{
/// @addtogroup gtx_int_10_10_10_2
/// @{
@ -58,7 +57,6 @@ namespace gtx
dword uint10_10_10_2_cast(glm::vec4 const & v);
/// @}
}//namespace gtx
}//namespace glm
#include "int_10_10_10_2.inl"

View File

@ -8,12 +8,10 @@
///////////////////////////////////////////////////////////////////////////////////////////////////
namespace glm{
namespace gtx{
GLM_FUNC_QUALIFIER dword uint10_10_10_2_cast(glm::vec4 const & v)
{
return dword(uint(v.x * 2047.f) << 0 | uint(v.y * 2047.f) << 10 | uint(v.z * 2047.f) << 20 | uint(v.w * 3.f) << 30);
}
}//namespace gtx
}//namespace glm

View File

@ -45,8 +45,7 @@
# pragma message("GLM: GLM_GTX_integer extension included")
#endif
namespace glm{
namespace gtx
namespace glm
{
/// @addtogroup gtx_integer
/// @{
@ -69,7 +68,6 @@ namespace gtx
genType factorial(genType const & x);
/// @}
}//namespace gtx
}//namespace glm
#include "integer.inl"

View File

@ -8,7 +8,6 @@
///////////////////////////////////////////////////////////////////////////////////////////////////
namespace glm{
namespace gtx{
// pow
GLM_FUNC_QUALIFIER int pow(int x, int y)
@ -85,5 +84,4 @@ namespace gtx{
factorial(x.w));
}
}//namespace gtx
}//namespace glm

View File

@ -47,8 +47,7 @@
# pragma message("GLM: GLM_GTX_closest_point extension included")
#endif
namespace glm{
namespace gtx
namespace glm
{
/// @addtogroup gtx_intersect
/// @{
@ -86,7 +85,6 @@ namespace gtx
genType & position, genType & normal);
/// @}
}//namespace gtx
}//namespace glm
#include "intersect.inl"

View File

@ -11,7 +11,6 @@
#include <limits>
namespace glm{
namespace gtx{
template <typename genType>
GLM_FUNC_QUALIFIER bool intersectRayTriangle
@ -195,5 +194,4 @@ GLM_FUNC_QUALIFIER bool intersectLineSphere
return false;
}
}//namespace gtx
}//namespace glm

View File

@ -45,8 +45,7 @@
# pragma message("GLM: GLM_GTX_log_base extension included")
#endif
namespace glm{
namespace gtx
namespace glm
{
/// @addtogroup gtx_log_base
/// @{
@ -59,7 +58,6 @@ namespace gtx
genType const & base);
/// @}
}//namespace gtx
}//namespace glm
#include "log_base.inl"

View File

@ -8,7 +8,6 @@
///////////////////////////////////////////////////////////////////////////////////////////////////
namespace glm{
namespace gtx{
template <typename genType>
GLM_FUNC_QUALIFIER genType log(
@ -86,5 +85,4 @@ GLM_FUNC_QUALIFIER detail::tvec4<valType> log(
log(v.w, base.w));
}
}//namespace gtx
}//namespace glm

View File

@ -46,8 +46,7 @@
# pragma message("GLM: GLM_GTX_matrix_cross_product extension included")
#endif
namespace glm{
namespace gtx
namespace glm
{
/// @addtogroup gtx_matrix_cross_product
/// @{
@ -65,7 +64,6 @@ namespace gtx
detail::tvec3<T> const & x);
/// @}
}//namespace gtx
}//namespace glm
#include "matrix_cross_product.inl"

View File

@ -8,7 +8,6 @@
///////////////////////////////////////////////////////////////////////////////////////////////////
namespace glm{
namespace gtx{
template <typename T>
GLM_FUNC_QUALIFIER detail::tmat3x3<T> matrixCross3(
@ -38,5 +37,4 @@ GLM_FUNC_QUALIFIER detail::tmat4x4<T> matrixCross4(
return Result;
}
}//namespace gtx
}//namespace glm

View File

@ -45,8 +45,7 @@
# pragma message("GLM: GLM_GTX_matrix_interpolation extension included")
#endif
namespace glm{
namespace gtx
namespace glm
{
/// @addtogroup gtx_matrix_interpolation
/// @{
@ -76,7 +75,6 @@ namespace gtx
T const delta);
/// @}
}//namespace gtx
}//namespace glm
#include "matrix_interpolation.inl"

View File

@ -8,7 +8,6 @@
///////////////////////////////////////////////////////////////////////////////////////////////////
namespace glm{
namespace gtx{
template <typename T>
GLM_FUNC_QUALIFIER void axisAngle(
@ -111,5 +110,4 @@ namespace gtx{
return out;
}
}//namespace gtx
}//namespace glm

View File

@ -46,10 +46,9 @@
# pragma message("GLM: GLM_GTX_matrix_major_storage extension included")
#endif
namespace glm{
namespace gtx
namespace glm
{
/// \addtogroup gtx_matrix_major_storage
/// @addtogroup gtx_matrix_major_storage
/// @{
//! Build a row major matrix from row vectors.
@ -137,7 +136,6 @@ namespace gtx
const detail::tmat4x4<T>& m);
/// @}
}//namespace gtx
}//namespace glm
#include "matrix_major_storage.inl"

View File

@ -8,7 +8,6 @@
///////////////////////////////////////////////////////////////////////////////////////////////////
namespace glm{
namespace gtx{
template <typename T>
GLM_FUNC_QUALIFIER detail::tmat2x2<T> rowMajor2(
@ -170,5 +169,4 @@ namespace gtx{
return detail::tmat4x4<T>(m);
}
}//namespace gtx
}//namespace glm

View File

@ -45,10 +45,9 @@
# pragma message("GLM: GLM_GTX_matrix_operation extension included")
#endif
namespace glm{
namespace gtx
namespace glm
{
/// \addtogroup gtx_matrix_operation
/// @addtogroup gtx_matrix_operation
/// @{
//! Build a diagonal matrix.
@ -106,7 +105,6 @@ namespace gtx
detail::tvec4<valType> const & v);
/// @}
}//namespace gtx
}//namespace glm
#include "matrix_operation.inl"

View File

@ -8,7 +8,6 @@
///////////////////////////////////////////////////////////////////////////////////////////////////
namespace glm{
namespace gtx{
template <typename valType>
GLM_FUNC_QUALIFIER detail::tmat2x2<valType> diagonal2x2
@ -123,5 +122,4 @@ namespace gtx{
return Result;
}
}//namespace gtx
}//namespace glm

View File

@ -46,8 +46,7 @@
# pragma message("GLM: GLM_GTX_matrix_query extension included")
#endif
namespace glm{
namespace gtx
namespace glm
{
/// @addtogroup gtx_matrix_query
/// @{
@ -109,7 +108,6 @@ namespace gtx
const typename genType::value_type epsilon = std::numeric_limits<typename genType::value_type>::epsilon());
/// @}
}//namespace gtx
}//namespace glm
#include "matrix_query.inl"

View File

@ -11,8 +11,7 @@
///////////////////////////////////////////////////////////////////////////////////////////////////
namespace glm{
namespace gtx
{
template<typename T>
GLM_FUNC_QUALIFIER bool isNull(
const detail::tmat2x2<T>& m,
@ -138,5 +137,4 @@ namespace gtx
return result;
}
}//namespace gtx
}//namespace glm

View File

@ -45,8 +45,7 @@
# pragma message("GLM: GLM_GTX_mixed_product extension included")
#endif
namespace glm{
namespace gtx
namespace glm
{
/// @addtogroup gtx_mixed_product
/// @{
@ -59,7 +58,6 @@ namespace gtx
detail::tvec3<valType> const & v3);
/// @}
}// namespace gtx
}// namespace glm
#include "mixed_product.inl"

View File

@ -8,7 +8,6 @@
///////////////////////////////////////////////////////////////////////////////////////////////////
namespace glm{
namespace gtx{
template <typename valType>
GLM_FUNC_QUALIFIER valType mixedProduct(
@ -19,14 +18,4 @@ GLM_FUNC_QUALIFIER valType mixedProduct(
return dot(cross(v1, v2), v3);
}
}//namespace gtx
}//namespace glm

View File

@ -46,8 +46,7 @@
# pragma message("GLM: GLM_GTX_multiple extension included")
#endif
namespace glm{
namespace gtx
namespace glm
{
/// @addtogroup gtx_multiple
/// @{
@ -67,7 +66,6 @@ namespace gtx
genType const & Multiple);
/// @}
}//namespace gtx
}//namespace glm
#include "multiple.inl"

View File

@ -11,8 +11,7 @@
///////////////////////////////////////////////////////////////////////////////////////////////////
namespace glm{
namespace gtx
{
//////////////////////
// higherMultiple
@ -185,5 +184,4 @@ namespace gtx
return Result;
}
}//namespace gtx
}//namespace glm

View File

@ -49,8 +49,7 @@
# pragma message("GLM: GLM_GTX_noise extension included")
#endif
namespace glm{
namespace gtx
namespace glm
{
/// @addtogroup gtx_noise
/// @{
@ -75,7 +74,6 @@ namespace gtx
vecType<T> const & p);
/// @}
}//namespace gtx
}//namespace glm
#include "noise.inl"

View File

@ -16,7 +16,6 @@
///////////////////////////////////////////////////////////////////////////////////////////////////
namespace glm{
namespace gtx{
template <typename T>
GLM_FUNC_QUALIFIER T permute(T const & x)
@ -62,19 +61,19 @@ namespace gtx{
template <typename T>
GLM_FUNC_QUALIFIER T perlin(detail::tvec2<T> const & P)
{
detail::tvec4<T> Pi = floor(detail::tvec4<T>(P.x, P.y, P.x, P.y)) + detail::tvec4<T>(0.0, 0.0, 1.0, 1.0);
detail::tvec4<T> Pf = fract(detail::tvec4<T>(P.x, P.y, P.x, P.y)) - detail::tvec4<T>(0.0, 0.0, 1.0, 1.0);
detail::tvec4<T> Pi = glm::floor(detail::tvec4<T>(P.x, P.y, P.x, P.y)) + detail::tvec4<T>(0.0, 0.0, 1.0, 1.0);
detail::tvec4<T> Pf = glm::fract(detail::tvec4<T>(P.x, P.y, P.x, P.y)) - detail::tvec4<T>(0.0, 0.0, 1.0, 1.0);
Pi = mod(Pi, T(289)); // To avoid truncation effects in permutation
detail::tvec4<T> ix(Pi.x, Pi.z, Pi.x, Pi.z);
detail::tvec4<T> iy(Pi.y, Pi.y, Pi.w, Pi.w);
detail::tvec4<T> fx(Pf.x, Pf.z, Pf.x, Pf.z);
detail::tvec4<T> fy(Pf.y, Pf.y, Pf.w, Pf.w);
detail::tvec4<T> i = permute(permute(ix) + iy);
detail::tvec4<T> i = glm::permute(glm::permute(ix) + iy);
detail::tvec4<T> gx = T(2) * fract(i / T(41)) - T(1);
detail::tvec4<T> gy = abs(gx) - T(0.5);
detail::tvec4<T> tx = floor(gx + T(0.5));
detail::tvec4<T> gx = T(2) * glm::fract(i / T(41)) - T(1);
detail::tvec4<T> gy = glm::abs(gx) - T(0.5);
detail::tvec4<T> tx = glm::floor(gx + T(0.5));
gx = gx - tx;
detail::tvec2<T> g00(gx.x, gy.x);
@ -785,5 +784,4 @@ namespace gtx{
dot(m1 * m1, detail::tvec2<T>(dot(p3, x3), dot(p4, x4))));
}
}//namespace gtx
}//namespace glm

View File

@ -49,8 +49,7 @@
# pragma message("GLM: GLM_GTX_norm extension included")
#endif
namespace glm{
namespace gtx
namespace glm
{
/// @addtogroup gtx_norm
/// @{
@ -155,7 +154,6 @@ namespace gtx
unsigned int Depth);
/// @}
}//namespace gtx
}//namespace glm
#include "norm.inl"

View File

@ -8,8 +8,7 @@
///////////////////////////////////////////////////////////////////////////////////////////////////
namespace glm{
namespace gtx
{
template <typename T>
GLM_FUNC_QUALIFIER T length2(
const T x)
@ -124,5 +123,4 @@ namespace gtx
return pow(pow(v.x, T(Depth)) + pow(v.y, T(Depth)) + pow(v.z, T(Depth)), T(1) / T(Depth));
}
}//namespace gtx
}//namespace glm

View File

@ -46,8 +46,7 @@
# pragma message("GLM: GLM_GTX_normal extension included")
#endif
namespace glm{
namespace gtx
namespace glm
{
/// @addtogroup gtx_normal
/// @{
@ -61,7 +60,6 @@ namespace gtx
detail::tvec3<T> const & p3);
/// @}
}//namespace gtx
}//namespace glm
#include "normal.inl"

View File

@ -8,7 +8,6 @@
///////////////////////////////////////////////////////////////////////////////////////////////////
namespace glm{
namespace gtx{
template <typename T>
GLM_FUNC_QUALIFIER detail::tvec3<T> triangleNormal
@ -21,5 +20,4 @@ GLM_FUNC_QUALIFIER detail::tvec3<T> triangleNormal
return normalize(cross(p1 - p2, p1 - p3));
}
}//namespace gtx
}//namespace glm

View File

@ -47,8 +47,7 @@
# pragma message("GLM: GLM_GTX_normalize_dot extension included")
#endif
namespace glm{
namespace gtx
namespace glm
{
/// @addtogroup gtx_normalize_dot
/// @{
@ -70,7 +69,6 @@ namespace gtx
genType const & y);
/// @}
}//namespace gtx
}//namespace glm
#include "normalize_dot.inl"

View File

@ -8,7 +8,6 @@
//////////////////////////////////////////////////////////////////////////////////
namespace glm{
namespace gtx{
template <typename genType>
GLM_FUNC_QUALIFIER genType normalizeDot
@ -71,7 +70,7 @@ GLM_FUNC_QUALIFIER genType fastNormalizeDot
{
return
glm::dot(x, y) *
glm::gtx::fastInverseSqrt(glm::dot(x, x) *
fastInverseSqrt(glm::dot(x, x) *
glm::dot(y, y));
}
@ -84,7 +83,7 @@ GLM_FUNC_QUALIFIER valType fastNormalizeDot
{
return
glm::dot(x, y) *
glm::gtx::fastInverseSqrt(glm::dot(x, x) *
fastInverseSqrt(glm::dot(x, x) *
glm::dot(y, y));
}
@ -97,7 +96,7 @@ GLM_FUNC_QUALIFIER valType fastNormalizeDot
{
return
glm::dot(x, y) *
glm::gtx::fastInverseSqrt(glm::dot(x, x) *
fastInverseSqrt(glm::dot(x, x) *
glm::dot(y, y));
}
@ -110,9 +109,8 @@ GLM_FUNC_QUALIFIER valType fastNormalizeDot
{
return
glm::dot(x, y) *
glm::gtx::fastInverseSqrt(glm::dot(x, x) *
fastInverseSqrt(glm::dot(x, x) *
glm::dot(y, y));
}
}//namespace gtx
}//namespace glm

View File

@ -8,7 +8,6 @@
///////////////////////////////////////////////////////////////////////////////////////////////////
namespace glm{
namespace gtx{
template <typename genType>
GLM_FUNC_QUALIFIER genType pow2(const genType& x)
@ -57,5 +56,4 @@ namespace gtx{
powOfTwo(x.w));
}
}//namespace gtx
}//namespace glm

Some files were not shown because too many files have changed in this diff Show More