mirror of
https://github.com/g-truc/glm.git
synced 2024-11-26 02:04:35 +00:00
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:
commit
8b919ffe54
@ -311,11 +311,11 @@ void foo()
|
|||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt>glRotate[fd]</dt>
|
<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>
|
<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>
|
<dt>glTranslate[fd]</dt>
|
||||||
<dd>\link glm::gtc::translate glm::translate \endlink</dd>
|
<dd>\link glm::translate glm::translate \endlink</dd>
|
||||||
<dt>glLoadIdentity</dt>
|
<dt>glLoadIdentity</dt>
|
||||||
<dd>The default constructor of all matrix types creates an identity matrix.</dd>
|
<dd>The default constructor of all matrix types creates an identity matrix.</dd>
|
||||||
<dt>glMultMatrix[fd]</dt>
|
<dt>glMultMatrix[fd]</dt>
|
||||||
@ -325,24 +325,24 @@ void foo()
|
|||||||
<dt>glMultTransposeMatrix</dt>
|
<dt>glMultTransposeMatrix</dt>
|
||||||
<dd>Combine the last two.</dd>
|
<dd>Combine the last two.</dd>
|
||||||
<dt>glFrustum</dt>
|
<dt>glFrustum</dt>
|
||||||
<dd>\link glm::gtc::frustum glm::frustum \endlink</dd>
|
<dd>\link glm::frustum glm::frustum \endlink</dd>
|
||||||
<dt>glOrtho</dt>
|
<dt>glOrtho</dt>
|
||||||
<dd>\link glm::gtc::ortho glm::ortho \endlink</dd>
|
<dd>\link glm::ortho glm::ortho \endlink</dd>
|
||||||
<dt>gluLookAt</dt>
|
<dt>gluLookAt</dt>
|
||||||
<dd>\link glm::gtc::lookAt glm::lookAt \endlink</dd>
|
<dd>\link glm::lookAt glm::lookAt \endlink</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
\section deprecated_glu GLU function replacements
|
\section deprecated_glu GLU function replacements
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt>gluOrtho2D</dt>
|
<dt>gluOrtho2D</dt>
|
||||||
<dd>\link glm::gtc::ortho glm::ortho \endlink</dd>
|
<dd>\link glm::ortho glm::ortho \endlink</dd>
|
||||||
<dt>gluPerspective</dt>
|
<dt>gluPerspective</dt>
|
||||||
<dd>\link glm::gtc::perspective glm::perspective \endlink</dd>
|
<dd>\link glm::perspective glm::perspective \endlink</dd>
|
||||||
<dt>gluProject</dt>
|
<dt>gluProject</dt>
|
||||||
<dd>\link glm::gtc::project glm::project \endlink</dd>
|
<dd>\link glm::project glm::project \endlink</dd>
|
||||||
<dt>gluUnProject</dt>
|
<dt>gluUnProject</dt>
|
||||||
<dd>\link glm::gtc::unProject glm::unProject \endlink</dd>
|
<dd>\link glm::unProject glm::unProject \endlink</dd>
|
||||||
</dl>
|
</dl>
|
||||||
**/
|
**/
|
||||||
|
|
||||||
|
@ -31,8 +31,7 @@
|
|||||||
|
|
||||||
#include "_fixes.hpp"
|
#include "_fixes.hpp"
|
||||||
|
|
||||||
namespace glm{
|
namespace glm
|
||||||
namespace core
|
|
||||||
{
|
{
|
||||||
/// @addtogroup core_funcs
|
/// @addtogroup core_funcs
|
||||||
/// @{
|
/// @{
|
||||||
@ -367,7 +366,6 @@ namespace core
|
|||||||
genType ldexp(genType const & x, genIType const & exp);
|
genType ldexp(genType const & x, genIType const & exp);
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
}//namespace core
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#include "func_common.inl"
|
#include "func_common.inl"
|
||||||
|
@ -38,8 +38,6 @@ namespace detail
|
|||||||
};
|
};
|
||||||
}//namespace detail
|
}//namespace detail
|
||||||
|
|
||||||
namespace core
|
|
||||||
{
|
|
||||||
// abs
|
// abs
|
||||||
template <typename genFIType>
|
template <typename genFIType>
|
||||||
GLM_FUNC_QUALIFIER genFIType abs(
|
GLM_FUNC_QUALIFIER genFIType abs(
|
||||||
@ -728,7 +726,7 @@ namespace core
|
|||||||
//if(x >= maxVal) return maxVal;
|
//if(x >= maxVal) return maxVal;
|
||||||
//if(x <= minVal) return minVal;
|
//if(x <= minVal) return minVal;
|
||||||
//return x;
|
//return x;
|
||||||
return glm::max(glm::min(x, maxVal), minVal);
|
return max(min(x, maxVal), minVal);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
@ -1566,5 +1564,4 @@ namespace core
|
|||||||
return std::frexp(x, exp);
|
return std::frexp(x, exp);
|
||||||
}
|
}
|
||||||
|
|
||||||
}//namespace core
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
@ -29,10 +29,9 @@
|
|||||||
#ifndef glm_core_func_exponential
|
#ifndef glm_core_func_exponential
|
||||||
#define glm_core_func_exponential
|
#define glm_core_func_exponential
|
||||||
|
|
||||||
namespace glm{
|
namespace glm
|
||||||
namespace core
|
|
||||||
{
|
{
|
||||||
/// \addtogroup core_funcs
|
/// @addtogroup core_funcs
|
||||||
/// @{
|
/// @{
|
||||||
|
|
||||||
//! Returns x raised to the y power.
|
//! Returns x raised to the y power.
|
||||||
@ -88,7 +87,6 @@ namespace core
|
|||||||
genType inversesqrt(genType const & x);
|
genType inversesqrt(genType const & x);
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
}//namespace core
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#include "func_exponential.inl"
|
#include "func_exponential.inl"
|
||||||
|
@ -7,8 +7,7 @@
|
|||||||
// File : glm/core/func_exponential.inl
|
// File : glm/core/func_exponential.inl
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
namespace glm{
|
namespace glm
|
||||||
namespace core
|
|
||||||
{
|
{
|
||||||
// pow
|
// pow
|
||||||
template <typename genType>
|
template <typename genType>
|
||||||
@ -349,5 +348,4 @@ namespace core
|
|||||||
inversesqrt(x.w));
|
inversesqrt(x.w));
|
||||||
}
|
}
|
||||||
|
|
||||||
}//namespace core
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
@ -29,8 +29,7 @@
|
|||||||
#ifndef glm_core_func_geometric
|
#ifndef glm_core_func_geometric
|
||||||
#define glm_core_func_geometric
|
#define glm_core_func_geometric
|
||||||
|
|
||||||
namespace glm{
|
namespace glm
|
||||||
namespace core
|
|
||||||
{
|
{
|
||||||
/// \addtogroup core_funcs
|
/// \addtogroup core_funcs
|
||||||
/// @{
|
/// @{
|
||||||
@ -111,7 +110,6 @@ namespace core
|
|||||||
typename genType::value_type const & eta);
|
typename genType::value_type const & eta);
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
}//namespace core
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#include "func_geometric.inl"
|
#include "func_geometric.inl"
|
||||||
|
@ -7,8 +7,7 @@
|
|||||||
// File : glm/core/func_geometric.inl
|
// File : glm/core/func_geometric.inl
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
namespace glm{
|
namespace glm
|
||||||
namespace core
|
|
||||||
{
|
{
|
||||||
// length
|
// length
|
||||||
template <typename genType>
|
template <typename genType>
|
||||||
@ -281,5 +280,4 @@ namespace core
|
|||||||
return eta * I - (eta * dotValue + sqrt(k)) * N;
|
return eta * I - (eta * dotValue + sqrt(k)) * N;
|
||||||
}
|
}
|
||||||
|
|
||||||
}//namespace core
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
@ -29,10 +29,9 @@
|
|||||||
#ifndef glm_core_func_integer
|
#ifndef glm_core_func_integer
|
||||||
#define glm_core_func_integer
|
#define glm_core_func_integer
|
||||||
|
|
||||||
namespace glm{
|
namespace glm
|
||||||
namespace core
|
|
||||||
{
|
{
|
||||||
/// \addtogroup core_funcs
|
/// @addtogroup core_funcs
|
||||||
/// @{
|
/// @{
|
||||||
|
|
||||||
//! Adds 32-bit unsigned integer x and y, returning the sum
|
//! 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);
|
typename C<T>::signed_type findMSB(C<T> const & Value);
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
}//namespace core
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#include "func_integer.inl"
|
#include "func_integer.inl"
|
||||||
|
@ -7,8 +7,7 @@
|
|||||||
// File : glm/core/func_integer.inl
|
// File : glm/core/func_integer.inl
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
namespace glm{
|
namespace glm
|
||||||
namespace core
|
|
||||||
{
|
{
|
||||||
// uaddCarry
|
// uaddCarry
|
||||||
template <typename genUType>
|
template <typename genUType>
|
||||||
@ -582,6 +581,4 @@ namespace core
|
|||||||
findMSB(value[2]),
|
findMSB(value[2]),
|
||||||
findMSB(value[3]));
|
findMSB(value[3]));
|
||||||
}
|
}
|
||||||
|
|
||||||
}//namespace core
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
@ -10,10 +10,9 @@
|
|||||||
#ifndef glm_core_func_matrix
|
#ifndef glm_core_func_matrix
|
||||||
#define glm_core_func_matrix
|
#define glm_core_func_matrix
|
||||||
|
|
||||||
namespace glm{
|
namespace glm
|
||||||
namespace core
|
|
||||||
{
|
{
|
||||||
/// \addtogroup core_funcs
|
/// @addtogroup core_funcs
|
||||||
/// @{
|
/// @{
|
||||||
|
|
||||||
//! Multiply matrix x by matrix y component-wise, i.e.,
|
//! Multiply matrix x by matrix y component-wise, i.e.,
|
||||||
@ -94,7 +93,6 @@ namespace core
|
|||||||
detail::tmat4x4<T> const & m);
|
detail::tmat4x4<T> const & m);
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
}//namespace core
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#include "func_matrix.inl"
|
#include "func_matrix.inl"
|
||||||
|
@ -7,8 +7,7 @@
|
|||||||
// File : glm/core/func_matrix.inl
|
// File : glm/core/func_matrix.inl
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
namespace glm{
|
namespace glm
|
||||||
namespace core
|
|
||||||
{
|
{
|
||||||
// matrixCompMult
|
// matrixCompMult
|
||||||
template <typename matType>
|
template <typename matType>
|
||||||
@ -561,6 +560,4 @@ namespace core
|
|||||||
|
|
||||||
return Inverse;
|
return Inverse;
|
||||||
}
|
}
|
||||||
|
|
||||||
}//namespace core
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
@ -10,10 +10,9 @@
|
|||||||
#ifndef glm_core_func_noise
|
#ifndef glm_core_func_noise
|
||||||
#define glm_core_func_noise
|
#define glm_core_func_noise
|
||||||
|
|
||||||
namespace glm{
|
namespace glm
|
||||||
namespace core
|
|
||||||
{
|
{
|
||||||
/// \addtogroup core_funcs
|
/// @addtogroup core_funcs
|
||||||
/// @{
|
/// @{
|
||||||
|
|
||||||
//! Returns a 1D noise value based on the input value x.
|
//! 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);
|
detail::tvec4<typename genType::value_type> noise4(genType const & x);
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
}//namespace core
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#include "func_noise.inl"
|
#include "func_noise.inl"
|
||||||
|
@ -10,10 +10,9 @@
|
|||||||
#ifndef glm_core_func_packing
|
#ifndef glm_core_func_packing
|
||||||
#define glm_core_func_packing
|
#define glm_core_func_packing
|
||||||
|
|
||||||
namespace glm{
|
namespace glm
|
||||||
namespace core
|
|
||||||
{
|
{
|
||||||
/// \addtogroup core_funcs
|
/// @addtogroup core_funcs
|
||||||
/// @{
|
/// @{
|
||||||
|
|
||||||
//! First, converts each component of the normalized floating-point value v into 8- or 16-bit integer values.
|
//! First, converts each component of the normalized floating-point value v into 8- or 16-bit integer values.
|
||||||
@ -114,7 +113,6 @@ namespace core
|
|||||||
detail::tvec2<detail::uint32> unpackDouble2x32(double const & v);
|
detail::tvec2<detail::uint32> unpackDouble2x32(double const & v);
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
}//namespace core
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#include "func_packing.inl"
|
#include "func_packing.inl"
|
||||||
|
@ -8,8 +8,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
namespace glm{
|
namespace glm{
|
||||||
namespace core
|
|
||||||
{
|
|
||||||
GLM_FUNC_QUALIFIER detail::uint32 packUnorm2x16(detail::tvec2<detail::float32> const & v)
|
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));
|
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;
|
return *(detail::tvec2<detail::uint32>*)&v;
|
||||||
}
|
}
|
||||||
|
|
||||||
}//namespace core
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
@ -10,10 +10,9 @@
|
|||||||
#ifndef glm_core_func_trigonometric
|
#ifndef glm_core_func_trigonometric
|
||||||
#define glm_core_func_trigonometric
|
#define glm_core_func_trigonometric
|
||||||
|
|
||||||
namespace glm{
|
namespace glm
|
||||||
namespace core
|
|
||||||
{
|
{
|
||||||
/// \addtogroup core_funcs
|
/// @addtogroup core_funcs
|
||||||
/// @{
|
/// @{
|
||||||
|
|
||||||
//! Converts degrees to radians and returns the result.
|
//! Converts degrees to radians and returns the result.
|
||||||
@ -135,7 +134,6 @@ namespace core
|
|||||||
genType atanh(genType const & x);
|
genType atanh(genType const & x);
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
}//namespace core
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#include "func_trigonometric.inl"
|
#include "func_trigonometric.inl"
|
||||||
|
@ -8,8 +8,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
namespace glm{
|
namespace glm{
|
||||||
namespace core
|
|
||||||
{
|
|
||||||
// radians
|
// radians
|
||||||
template <typename genType>
|
template <typename genType>
|
||||||
GLM_FUNC_QUALIFIER genType radians
|
GLM_FUNC_QUALIFIER genType radians
|
||||||
@ -736,5 +735,4 @@ namespace core
|
|||||||
atanh(x.w));
|
atanh(x.w));
|
||||||
}
|
}
|
||||||
|
|
||||||
}//namespace core
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
@ -12,10 +12,9 @@
|
|||||||
|
|
||||||
#include "_detail.hpp"
|
#include "_detail.hpp"
|
||||||
|
|
||||||
namespace glm{
|
namespace glm
|
||||||
namespace core
|
|
||||||
{
|
{
|
||||||
/// \addtogroup core_funcs
|
/// @addtogroup core_funcs
|
||||||
/// @{
|
/// @{
|
||||||
|
|
||||||
//! Returns the component-wise comparison result of x < y.
|
//! Returns the component-wise comparison result of x < y.
|
||||||
@ -197,7 +196,6 @@ namespace core
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
}//namespace core
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#include "func_vector_relational.inl"
|
#include "func_vector_relational.inl"
|
||||||
|
@ -16,6 +16,6 @@ namespace glm
|
|||||||
class dont_care {};
|
class dont_care {};
|
||||||
class nicest {};
|
class nicest {};
|
||||||
class fastest {};
|
class fastest {};
|
||||||
};
|
}//namespace glm
|
||||||
|
|
||||||
#endif//glm_core_type
|
#endif//glm_core_type
|
||||||
|
10
glm/glm.hpp
10
glm/glm.hpp
@ -43,16 +43,6 @@
|
|||||||
# pragma message("GLM: Core library included")
|
# pragma message("GLM: Core library included")
|
||||||
#endif//GLM_MESSAGE
|
#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/_detail.hpp"
|
||||||
#include "./core/type.hpp"
|
#include "./core/type.hpp"
|
||||||
|
|
||||||
|
@ -35,8 +35,8 @@
|
|||||||
///
|
///
|
||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifndef glm_gtc_half_float
|
#ifndef GLM_GTC_half_float
|
||||||
#define glm_gtc_half_float
|
#define GLM_GTC_half_float 90
|
||||||
|
|
||||||
// Dependency:
|
// Dependency:
|
||||||
#include "../glm.hpp"
|
#include "../glm.hpp"
|
||||||
@ -349,8 +349,6 @@ namespace detail
|
|||||||
}
|
}
|
||||||
//namespace detail
|
//namespace detail
|
||||||
|
|
||||||
namespace gtc
|
|
||||||
{
|
|
||||||
/// @addtogroup gtc_half_float
|
/// @addtogroup gtc_half_float
|
||||||
/// @{
|
/// @{
|
||||||
|
|
||||||
@ -419,9 +417,8 @@ namespace gtc
|
|||||||
typedef detail::tmat4x4<detail::thalf> hmat4x4;
|
typedef detail::tmat4x4<detail::thalf> hmat4x4;
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
}// namespace gtc
|
|
||||||
}// namespace glm
|
}// namespace glm
|
||||||
|
|
||||||
#include "half_float.inl"
|
#include "half_float.inl"
|
||||||
|
|
||||||
#endif//glm_gtc_half_float
|
#endif//GLM_GTC_half_float
|
||||||
|
@ -34,8 +34,8 @@
|
|||||||
/// <glm/gtc/matrix_access.hpp> need to be included to use these functionalities.
|
/// <glm/gtc/matrix_access.hpp> need to be included to use these functionalities.
|
||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifndef glm_gtc_matrix_access
|
#ifndef GLM_GTC_matrix_access
|
||||||
#define glm_gtc_matrix_access
|
#define GLM_GTC_matrix_access 90
|
||||||
|
|
||||||
// Dependency:
|
// Dependency:
|
||||||
#include "../glm.hpp"
|
#include "../glm.hpp"
|
||||||
@ -44,9 +44,8 @@
|
|||||||
# pragma message("GLM: GLM_GTC_matrix_access extension included")
|
# pragma message("GLM: GLM_GTC_matrix_access extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm{
|
namespace glm
|
||||||
namespace gtc{
|
{
|
||||||
|
|
||||||
/// @addtogroup gtc_matrix_access
|
/// @addtogroup gtc_matrix_access
|
||||||
/// @{
|
/// @{
|
||||||
|
|
||||||
@ -81,9 +80,8 @@ namespace gtc{
|
|||||||
typename genType::col_type const & x);
|
typename genType::col_type const & x);
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
}//namespace gtc
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#include "matrix_access.inl"
|
#include "matrix_access.inl"
|
||||||
|
|
||||||
#endif//glm_gtc_matrix_access
|
#endif//GLM_GTC_matrix_access
|
||||||
|
@ -8,8 +8,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
namespace glm{
|
namespace glm{
|
||||||
namespace gtc
|
|
||||||
{
|
|
||||||
template <typename genType>
|
template <typename genType>
|
||||||
GLM_FUNC_QUALIFIER genType row(
|
GLM_FUNC_QUALIFIER genType row(
|
||||||
genType const & m,
|
genType const & m,
|
||||||
@ -52,6 +51,5 @@ namespace gtc
|
|||||||
return m[index];
|
return m[index];
|
||||||
}
|
}
|
||||||
|
|
||||||
}//namespace gtc
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
|
@ -34,8 +34,8 @@
|
|||||||
/// <glm/gtc/matrix_integer.hpp> need to be included to use these functionalities.
|
/// <glm/gtc/matrix_integer.hpp> need to be included to use these functionalities.
|
||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifndef glm_gtc_matrix_integer
|
#ifndef GLM_GTC_matrix_integer
|
||||||
#define glm_gtc_matrix_integer
|
#define GLM_GTC_matrix_integer 90
|
||||||
|
|
||||||
// Dependency:
|
// Dependency:
|
||||||
#include "../glm.hpp"
|
#include "../glm.hpp"
|
||||||
@ -44,10 +44,9 @@
|
|||||||
# pragma message("GLM: GLM_GTC_matrix_integer extension included")
|
# pragma message("GLM: GLM_GTC_matrix_integer extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm{
|
namespace glm
|
||||||
namespace gtc{
|
{
|
||||||
|
/// @addtogroup gtc_matrix_integer
|
||||||
/// \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::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
|
#endif//GLM_PRECISION
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
}//namespace gtc
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#endif//glm_gtc_matrix_integer
|
#endif//GLM_GTC_matrix_integer
|
||||||
|
@ -34,8 +34,8 @@
|
|||||||
/// <glm/gtc/matrix_inverse.hpp> need to be included to use these functionalities.
|
/// <glm/gtc/matrix_inverse.hpp> need to be included to use these functionalities.
|
||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifndef glm_gtc_matrix_inverse
|
#ifndef GLM_GTC_matrix_inverse
|
||||||
#define glm_gtc_matrix_inverse
|
#define GLM_GTC_matrix_inverse 90
|
||||||
|
|
||||||
// Dependency:
|
// Dependency:
|
||||||
#include "../glm.hpp"
|
#include "../glm.hpp"
|
||||||
@ -44,8 +44,7 @@
|
|||||||
# pragma message("GLM: GLM_GTC_matrix_inverse extension included")
|
# pragma message("GLM: GLM_GTC_matrix_inverse extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm{
|
namespace glm
|
||||||
namespace gtc
|
|
||||||
{
|
{
|
||||||
/// @addtogroup gtc_matrix_inverse
|
/// @addtogroup gtc_matrix_inverse
|
||||||
/// @{
|
/// @{
|
||||||
@ -62,9 +61,8 @@ namespace gtc
|
|||||||
genType const & m);
|
genType const & m);
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
}//namespace gtc
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#include "matrix_inverse.inl"
|
#include "matrix_inverse.inl"
|
||||||
|
|
||||||
#endif//glm_gtc_matrix_inverse
|
#endif//GLM_GTC_matrix_inverse
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
namespace glm{
|
namespace glm{
|
||||||
namespace gtc{
|
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
GLM_FUNC_QUALIFIER detail::tmat3x3<T> affineInverse
|
GLM_FUNC_QUALIFIER detail::tmat3x3<T> affineInverse
|
||||||
@ -133,5 +132,4 @@ namespace gtc{
|
|||||||
return Inverse;
|
return Inverse;
|
||||||
}
|
}
|
||||||
|
|
||||||
}//namespace gtc
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
@ -43,8 +43,8 @@
|
|||||||
/// <glm/gtc/matrix_transform.hpp> need to be included to use these functionalities.
|
/// <glm/gtc/matrix_transform.hpp> need to be included to use these functionalities.
|
||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifndef glm_gtc_matrix_transform
|
#ifndef GLM_GTC_matrix_transform
|
||||||
#define glm_gtc_matrix_transform
|
#define GLM_GTC_matrix_transform 90
|
||||||
|
|
||||||
// Dependency:
|
// Dependency:
|
||||||
#include "../glm.hpp"
|
#include "../glm.hpp"
|
||||||
@ -53,8 +53,7 @@
|
|||||||
# pragma message("GLM: GLM_GTC_matrix_transform extension included")
|
# pragma message("GLM: GLM_GTC_matrix_transform extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm{
|
namespace glm
|
||||||
namespace gtc
|
|
||||||
{
|
{
|
||||||
/// @addtogroup gtc_matrix_transform
|
/// @addtogroup gtc_matrix_transform
|
||||||
/// @{
|
/// @{
|
||||||
@ -62,9 +61,9 @@ namespace gtc
|
|||||||
/// Builds a translation 4 * 4 matrix created from a vector of 3 components.
|
/// Builds a translation 4 * 4 matrix created from a vector of 3 components.
|
||||||
/// @see - gtc_matrix_transform
|
/// @see - gtc_matrix_transform
|
||||||
/// @see - gtx_transform:
|
/// @see - gtx_transform:
|
||||||
/// - @link glm::gtx::translate(T x, T y, T z) translate(T x, T y, T z) @endlink
|
/// - @link 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 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(detail::tvec3<T> const & v) translate(vec3<T> const & v) @endlink
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tmat4x4<T> translate(
|
detail::tmat4x4<T> translate(
|
||||||
detail::tmat4x4<T> const & m,
|
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.
|
/// Builds a rotation 4 * 4 matrix created from an axis vector and an angle expressed in degrees.
|
||||||
/// @see - gtc_matrix_transform
|
/// @see - gtc_matrix_transform
|
||||||
/// @see - gtx_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 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 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, detail::tvec3<T> const & v) rotate(T const & angle, vec3<T> const & v) @endlink
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tmat4x4<T> rotate(
|
detail::tmat4x4<T> rotate(
|
||||||
detail::tmat4x4<T> const & m,
|
detail::tmat4x4<T> const & m,
|
||||||
@ -85,9 +84,9 @@ namespace gtc
|
|||||||
/// Builds a scale 4 * 4 matrix created from 3 scalars.
|
/// Builds a scale 4 * 4 matrix created from 3 scalars.
|
||||||
/// @see - gtc_matrix_transform
|
/// @see - gtc_matrix_transform
|
||||||
/// @see - gtx_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 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 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(detail::tvec3<T> const & v) scale(vec3<T> const & v) @endlink
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tmat4x4<T> scale(
|
detail::tmat4x4<T> scale(
|
||||||
detail::tmat4x4<T> const & m,
|
detail::tmat4x4<T> const & m,
|
||||||
@ -95,7 +94,7 @@ namespace gtc
|
|||||||
|
|
||||||
/// Creates a matrix for an orthographic parallel viewing volume.
|
/// Creates a matrix for an orthographic parallel viewing volume.
|
||||||
/// @see - gtc_matrix_transform:
|
/// @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>
|
template <typename T>
|
||||||
detail::tmat4x4<T> ortho(
|
detail::tmat4x4<T> ortho(
|
||||||
T const & left,
|
T const & left,
|
||||||
@ -107,7 +106,7 @@ namespace gtc
|
|||||||
|
|
||||||
/// Creates a matrix for projecting two-dimensional coordinates onto the screen.
|
/// Creates a matrix for projecting two-dimensional coordinates onto the screen.
|
||||||
/// @see - gtc_matrix_transform:
|
/// @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>
|
template <typename T>
|
||||||
detail::tmat4x4<T> ortho(
|
detail::tmat4x4<T> ortho(
|
||||||
T const & left,
|
T const & left,
|
||||||
@ -196,9 +195,8 @@ namespace gtc
|
|||||||
detail::tvec3<T> const & up);
|
detail::tvec3<T> const & up);
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
}//namespace gtc
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#include "matrix_transform.inl"
|
#include "matrix_transform.inl"
|
||||||
|
|
||||||
#endif//glm_gtc_matrix_transform
|
#endif//GLM_GTC_matrix_transform
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
namespace glm{
|
namespace glm{
|
||||||
namespace gtc{
|
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
GLM_FUNC_QUALIFIER detail::tmat4x4<T> translate
|
GLM_FUNC_QUALIFIER detail::tmat4x4<T> translate
|
||||||
@ -389,8 +388,7 @@ namespace gtc{
|
|||||||
Result[3][1] =-dot(y, eye);
|
Result[3][1] =-dot(y, eye);
|
||||||
Result[3][2] = dot(f, eye);
|
Result[3][2] = dot(f, eye);
|
||||||
*/
|
*/
|
||||||
return gtc::translate(Result, -eye);
|
return translate(Result, -eye);
|
||||||
}
|
}
|
||||||
|
|
||||||
}//namespace gtc
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
@ -39,8 +39,8 @@
|
|||||||
/// <glm/gtc/quaternion.hpp> need to be included to use these functionalities.
|
/// <glm/gtc/quaternion.hpp> need to be included to use these functionalities.
|
||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifndef glm_gtc_quaternion
|
#ifndef GLM_GTC_quaternion
|
||||||
#define glm_gtc_quaternion
|
#define GLM_GTC_quaternion 90
|
||||||
|
|
||||||
// Dependency:
|
// Dependency:
|
||||||
#include "../glm.hpp"
|
#include "../glm.hpp"
|
||||||
@ -73,7 +73,7 @@ namespace detail
|
|||||||
tquat();
|
tquat();
|
||||||
explicit tquat(
|
explicit tquat(
|
||||||
value_type const & s,
|
value_type const & s,
|
||||||
tvec3<T> const & v);
|
glm::detail::tvec3<T> const & v);
|
||||||
explicit tquat(
|
explicit tquat(
|
||||||
value_type const & w,
|
value_type const & w,
|
||||||
value_type const & x,
|
value_type const & x,
|
||||||
@ -150,8 +150,6 @@ namespace detail
|
|||||||
|
|
||||||
} //namespace detail
|
} //namespace detail
|
||||||
|
|
||||||
namespace gtc{
|
|
||||||
|
|
||||||
/// @addtogroup gtc_quaternion
|
/// @addtogroup gtc_quaternion
|
||||||
/// @{
|
/// @{
|
||||||
|
|
||||||
@ -255,9 +253,8 @@ namespace gtc{
|
|||||||
typedef detail::tquat<highp_float> highp_quat;
|
typedef detail::tquat<highp_float> highp_quat;
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
} //namespace gtc
|
|
||||||
} //namespace glm
|
} //namespace glm
|
||||||
|
|
||||||
#include "quaternion.inl"
|
#include "quaternion.inl"
|
||||||
|
|
||||||
#endif//glm_gtc_quaternion
|
#endif//GLM_GTC_quaternion
|
||||||
|
@ -211,7 +211,7 @@ namespace detail{
|
|||||||
detail::tquat<T> const & q
|
detail::tquat<T> const & q
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return gtc::inverse(q) * v;
|
return inverse(q) * v;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
@ -231,7 +231,7 @@ namespace detail{
|
|||||||
detail::tquat<T> const & q
|
detail::tquat<T> const & q
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return gtc::inverse(q) * v;
|
return inverse(q) * v;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
@ -291,8 +291,6 @@ namespace detail{
|
|||||||
|
|
||||||
}//namespace detail
|
}//namespace detail
|
||||||
|
|
||||||
namespace gtc{
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////
|
||||||
template <typename T>
|
template <typename T>
|
||||||
GLM_FUNC_QUALIFIER T length
|
GLM_FUNC_QUALIFIER T length
|
||||||
@ -447,7 +445,7 @@ namespace gtc{
|
|||||||
detail::tquat<T> const & q
|
detail::tquat<T> const & q
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return gtc::conjugate(q) / gtc::dot(q, q);
|
return conjugate(q) / dot(q, q);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
@ -473,7 +471,7 @@ namespace gtc{
|
|||||||
typename detail::tquat<T>::value_type AngleRad = radians(angle);
|
typename detail::tquat<T>::value_type AngleRad = radians(angle);
|
||||||
typename detail::tquat<T>::value_type fSin = sin(AngleRad * T(0.5));
|
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>
|
template <typename T>
|
||||||
@ -578,5 +576,4 @@ namespace gtc{
|
|||||||
return quat_cast(detail::tmat3x3<T>(m4));
|
return quat_cast(detail::tmat3x3<T>(m4));
|
||||||
}
|
}
|
||||||
|
|
||||||
}//namespace gtc
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
@ -35,8 +35,8 @@
|
|||||||
/// <glm/gtc/swizzle.hpp> need to be included to use these functionalities.
|
/// <glm/gtc/swizzle.hpp> need to be included to use these functionalities.
|
||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifndef glm_gtc_swizzle
|
#ifndef GLM_GTC_swizzle
|
||||||
#define glm_gtc_swizzle
|
#define GLM_GTC_swizzle 90
|
||||||
|
|
||||||
// Dependency:
|
// Dependency:
|
||||||
#include "../glm.hpp"
|
#include "../glm.hpp"
|
||||||
@ -46,8 +46,7 @@
|
|||||||
# pragma message("GLM: GLM_GTC_swizzle extension included")
|
# pragma message("GLM: GLM_GTC_swizzle extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm{
|
namespace glm
|
||||||
namespace gtc
|
|
||||||
{
|
{
|
||||||
/// @addtogroup gtc_swizzle
|
/// @addtogroup gtc_swizzle
|
||||||
/// @{
|
/// @{
|
||||||
@ -369,9 +368,8 @@ namespace gtc
|
|||||||
static_swizzle4_ref(glm::u64, 4)
|
static_swizzle4_ref(glm::u64, 4)
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
}//namespace gtc
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#include "swizzle.inl"
|
#include "swizzle.inl"
|
||||||
|
|
||||||
#endif//glm_gtc_swizzle
|
#endif//GLM_GTC_swizzle
|
||||||
|
@ -11,7 +11,6 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
namespace glm{
|
namespace glm{
|
||||||
namespace gtc{
|
|
||||||
|
|
||||||
template <typename T, template <typename> class vecType>
|
template <typename T, template <typename> class vecType>
|
||||||
GLM_FUNC_QUALIFIER T swizzle
|
GLM_FUNC_QUALIFIER T swizzle
|
||||||
@ -172,5 +171,4 @@ GLM_FUNC_QUALIFIER detail::tref4<int> swizzle
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
}//namespace gtc
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
@ -40,8 +40,8 @@
|
|||||||
/// <glm/gtc/type_precision.hpp> need to be included to use these functionalities.
|
/// <glm/gtc/type_precision.hpp> need to be included to use these functionalities.
|
||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifndef glm_gtc_type_precision
|
#ifndef GLM_GTC_type_precision
|
||||||
#define glm_gtc_type_precision
|
#define GLM_GTC_type_precision 100
|
||||||
|
|
||||||
// Dependency:
|
// Dependency:
|
||||||
#include "../glm.hpp"
|
#include "../glm.hpp"
|
||||||
@ -52,9 +52,8 @@
|
|||||||
# pragma message("GLM: GLM_GTC_type_precision extension included")
|
# pragma message("GLM: GLM_GTC_type_precision extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm{
|
namespace glm
|
||||||
namespace gtc{
|
{
|
||||||
|
|
||||||
///////////////////////////
|
///////////////////////////
|
||||||
// Signed int vector types
|
// 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)
|
typedef detail::tquat<f64> f64quat; //!< \brief Double-precision floating-point quaternion. (from GLM_GTC_type_precision extension)
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
}//namespace gtc
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#include "type_precision.inl"
|
#include "type_precision.inl"
|
||||||
|
|
||||||
#endif//glm_gtc_type_precision
|
#endif//GLM_GTC_type_precision
|
||||||
|
@ -56,8 +56,8 @@
|
|||||||
/// <glm/gtc/type_ptr.hpp> need to be included to use these functionalities.
|
/// <glm/gtc/type_ptr.hpp> need to be included to use these functionalities.
|
||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifndef glm_gtc_type_ptr
|
#ifndef GLM_GTC_type_ptr
|
||||||
#define glm_gtc_type_ptr
|
#define GLM_GTC_type_ptr 90
|
||||||
|
|
||||||
// Dependency:
|
// Dependency:
|
||||||
#include "../glm.hpp"
|
#include "../glm.hpp"
|
||||||
@ -69,8 +69,7 @@
|
|||||||
# pragma message("GLM: GLM_GTC_type_ptr extension included")
|
# pragma message("GLM: GLM_GTC_type_ptr extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm{
|
namespace glm
|
||||||
namespace gtc
|
|
||||||
{
|
{
|
||||||
/// @addtogroup gtc_type_ptr
|
/// @addtogroup gtc_type_ptr
|
||||||
/// @{
|
/// @{
|
||||||
@ -502,10 +501,9 @@ namespace gtc
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
}//namespace gtc
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#include "type_ptr.inl"
|
#include "type_ptr.inl"
|
||||||
|
|
||||||
#endif//glm_gtx_type_ptr
|
#endif//GLM_GTC_type_ptr
|
||||||
|
|
||||||
|
@ -45,8 +45,7 @@
|
|||||||
# pragma message("GLM: GLM_GTX_associated_min_max extension included")
|
# pragma message("GLM: GLM_GTX_associated_min_max extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm{
|
namespace glm
|
||||||
namespace gtx
|
|
||||||
{
|
{
|
||||||
/// @addtogroup gtx_associated_min_max
|
/// @addtogroup gtx_associated_min_max
|
||||||
/// @{
|
/// @{
|
||||||
@ -94,7 +93,6 @@ namespace gtx
|
|||||||
const genTypeT& w, const genTypeU& d);
|
const genTypeT& w, const genTypeU& d);
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
} //namespace gtx
|
|
||||||
} //namespace glm
|
} //namespace glm
|
||||||
|
|
||||||
#include "associated_min_max.inl"
|
#include "associated_min_max.inl"
|
||||||
|
@ -8,8 +8,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
namespace glm{
|
namespace glm{
|
||||||
namespace gtx
|
|
||||||
{
|
|
||||||
// Min comparison between 2 variables
|
// Min comparison between 2 variables
|
||||||
template<typename T, typename U>
|
template<typename T, typename U>
|
||||||
GLM_FUNC_QUALIFIER U associatedMin(T x, U a, T y, U b)
|
GLM_FUNC_QUALIFIER U associatedMin(T x, U a, T y, U b)
|
||||||
@ -910,5 +909,4 @@ namespace gtx
|
|||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
|
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
@ -47,8 +47,7 @@
|
|||||||
# pragma message("GLM: GLM_GTX_bit extension included")
|
# pragma message("GLM: GLM_GTX_bit extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm{
|
namespace glm
|
||||||
namespace gtx
|
|
||||||
{
|
{
|
||||||
/// @addtogroup gtx_bit
|
/// @addtogroup gtx_bit
|
||||||
/// @{
|
/// @{
|
||||||
@ -134,7 +133,6 @@ namespace gtx
|
|||||||
int const & ToBit);
|
int const & ToBit);
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
}// namespace gtx
|
|
||||||
}// namespace glm
|
}// namespace glm
|
||||||
|
|
||||||
#include "bit.inl"
|
#include "bit.inl"
|
||||||
|
@ -10,7 +10,6 @@
|
|||||||
#include "../core/_detail.hpp"
|
#include "../core/_detail.hpp"
|
||||||
|
|
||||||
namespace glm{
|
namespace glm{
|
||||||
namespace gtx{
|
|
||||||
|
|
||||||
template <typename genIType>
|
template <typename genIType>
|
||||||
GLM_FUNC_QUALIFIER genIType mask
|
GLM_FUNC_QUALIFIER genIType mask
|
||||||
@ -61,13 +60,13 @@ GLM_FUNC_QUALIFIER detail::tvec4<valIType> mask
|
|||||||
template <typename genIType>
|
template <typename genIType>
|
||||||
GLM_FUNC_QUALIFIER genIType extractField
|
GLM_FUNC_QUALIFIER genIType extractField
|
||||||
(
|
(
|
||||||
gtc::half const & value,
|
half const & value,
|
||||||
genIType const & first,
|
genIType const & first,
|
||||||
genIType const & count
|
genIType const & count
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
assert(first + count < sizeof(gtc::half));
|
assert(first + count < sizeof(half));
|
||||||
return (value._data() << first) >> ((sizeof(gtc::half) << 3) - count);
|
return (value._data() << first) >> ((sizeof(half) << 3) - count);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename genIType>
|
template <typename genIType>
|
||||||
@ -771,5 +770,4 @@ GLM_FUNC_QUALIFIER genIUType fillBitfieldWithZero
|
|||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
|
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
@ -45,8 +45,7 @@
|
|||||||
# pragma message("GLM: GLM_GTX_closest_point extension included")
|
# pragma message("GLM: GLM_GTX_closest_point extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm{
|
namespace glm
|
||||||
namespace gtx
|
|
||||||
{
|
{
|
||||||
/// @addtogroup gtx_closest_point
|
/// @addtogroup gtx_closest_point
|
||||||
/// @{
|
/// @{
|
||||||
@ -60,7 +59,6 @@ namespace gtx
|
|||||||
detail::tvec3<T> const & b);
|
detail::tvec3<T> const & b);
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
}// namespace gtx
|
|
||||||
}// namespace glm
|
}// namespace glm
|
||||||
|
|
||||||
#include "closest_point.inl"
|
#include "closest_point.inl"
|
||||||
|
@ -11,7 +11,6 @@
|
|||||||
#define glm_gtx_closest_point
|
#define glm_gtx_closest_point
|
||||||
|
|
||||||
namespace glm{
|
namespace glm{
|
||||||
namespace gtx{
|
|
||||||
|
|
||||||
template <typename valType>
|
template <typename valType>
|
||||||
GLM_FUNC_QUALIFIER detail::tvec3<valType> closestPointOnLine
|
GLM_FUNC_QUALIFIER detail::tvec3<valType> closestPointOnLine
|
||||||
@ -33,7 +32,6 @@ GLM_FUNC_QUALIFIER detail::tvec3<valType> closestPointOnLine
|
|||||||
return a + LineDirection * Distance;
|
return a + LineDirection * Distance;
|
||||||
}
|
}
|
||||||
|
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#endif//glm_gtx_closest_point
|
#endif//glm_gtx_closest_point
|
||||||
|
@ -47,78 +47,76 @@
|
|||||||
# pragma message("GLM: GLM_GTX_color_cast extension included")
|
# pragma message("GLM: GLM_GTX_color_cast extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm{
|
namespace glm
|
||||||
namespace gtx
|
|
||||||
{
|
{
|
||||||
/// @addtogroup gtx_color_cast
|
/// @addtogroup gtx_color_cast
|
||||||
/// @{
|
/// @{
|
||||||
|
|
||||||
//! Conversion of a floating value into a 8bit unsigned int value.
|
//! Conversion of a floating value into a 8bit unsigned int value.
|
||||||
//! From GLM_GTX_color_cast extension.
|
//! 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.
|
//! Conversion of a floating value into a 16bit unsigned int value.
|
||||||
//! From GLM_GTX_color_cast extension.
|
//! 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> 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> 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> 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_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> 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> 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> 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_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> 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> 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> 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_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> 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> 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> 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_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> 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> 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> 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_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> 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> 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> 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_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> 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> 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> 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_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> 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> 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> 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_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> 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> 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> 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_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> 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> 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> 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_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
|
}//namespace glm
|
||||||
|
|
||||||
#include "color_cast.inl"
|
#include "color_cast.inl"
|
||||||
|
@ -8,213 +8,212 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
namespace glm{
|
namespace glm{
|
||||||
namespace gtx{
|
|
||||||
|
|
||||||
template <typename T>
|
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>
|
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>
|
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;
|
uint32 result = 0;
|
||||||
result += static_cast<gtc::uint32>(c.x * detail::tvec3<T>::value_type(255)) << 0;
|
result += static_cast<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<uint32>(c.y * detail::tvec3<T>::value_type(255)) << 8;
|
||||||
result += static_cast<gtc::uint32>(c.z * detail::tvec3<T>::value_type(255)) << 16;
|
result += static_cast<uint32>(c.z * detail::tvec3<T>::value_type(255)) << 16;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
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;
|
uint32 result = 0;
|
||||||
result += static_cast<gtc::uint32>(c.x * detail::tvec3<T>::value_type(255)) << 8;
|
result += static_cast<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<uint32>(c.y * detail::tvec3<T>::value_type(255)) << 16;
|
||||||
result += static_cast<gtc::uint32>(c.z * detail::tvec3<T>::value_type(255)) << 24;
|
result += static_cast<uint32>(c.z * detail::tvec3<T>::value_type(255)) << 24;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
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;
|
uint32 result = 0;
|
||||||
result += static_cast<gtc::uint32>(c.x * detail::tvec3<T>::value_type(255)) << 16;
|
result += static_cast<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<uint32>(c.y * detail::tvec3<T>::value_type(255)) << 8;
|
||||||
result += static_cast<gtc::uint32>(c.z * detail::tvec3<T>::value_type(255)) << 0;
|
result += static_cast<uint32>(c.z * detail::tvec3<T>::value_type(255)) << 0;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
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;
|
uint32 result = 0;
|
||||||
result += static_cast<gtc::uint32>(c.x * detail::tvec3<T>::value_type(255)) << 24;
|
result += static_cast<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<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<uint32>(c.z * detail::tvec3<T>::value_type(255)) << 8;
|
||||||
result += static_cast<gtc::uint32>(c.w * detail::tvec3<T>::value_type(255)) << 0;
|
result += static_cast<uint32>(c.w * detail::tvec3<T>::value_type(255)) << 0;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
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;
|
uint32 result = 0;
|
||||||
result += static_cast<gtc::uint32>(c.x * detail::tvec4<T>::value_type(255)) << 0;
|
result += static_cast<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<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<uint32>(c.z * detail::tvec4<T>::value_type(255)) << 16;
|
||||||
result += static_cast<gtc::uint32>(c.w * detail::tvec4<T>::value_type(255)) << 24;
|
result += static_cast<uint32>(c.w * detail::tvec4<T>::value_type(255)) << 24;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
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;
|
uint32 result = 0;
|
||||||
result += static_cast<gtc::uint32>(c.x * detail::tvec4<T>::value_type(255)) << 8;
|
result += static_cast<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<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<uint32>(c.z * detail::tvec4<T>::value_type(255)) << 24;
|
||||||
result += static_cast<gtc::uint32>(c.w * detail::tvec4<T>::value_type(255)) << 0;
|
result += static_cast<uint32>(c.w * detail::tvec4<T>::value_type(255)) << 0;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
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;
|
uint32 result = 0;
|
||||||
result += static_cast<gtc::uint32>(c.x * detail::tvec4<T>::value_type(255)) << 16;
|
result += static_cast<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<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<uint32>(c.z * detail::tvec4<T>::value_type(255)) << 0;
|
||||||
result += static_cast<gtc::uint32>(c.w * detail::tvec4<T>::value_type(255)) << 24;
|
result += static_cast<uint32>(c.w * detail::tvec4<T>::value_type(255)) << 24;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
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;
|
uint32 result = 0;
|
||||||
result += static_cast<gtc::uint32>(c.x * detail::tvec4<T>::value_type(255)) << 24;
|
result += static_cast<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<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<uint32>(c.z * detail::tvec4<T>::value_type(255)) << 8;
|
||||||
result += static_cast<gtc::uint32>(c.w * detail::tvec4<T>::value_type(255)) << 0;
|
result += static_cast<uint32>(c.w * detail::tvec4<T>::value_type(255)) << 0;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
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;
|
uint64 result = 0;
|
||||||
result += static_cast<gtc::uint64>(c.x * detail::tvec3<T>::value_type(65535)) << 0;
|
result += static_cast<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<uint64>(c.y * detail::tvec3<T>::value_type(65535)) << 16;
|
||||||
result += static_cast<gtc::uint64>(c.z * detail::tvec3<T>::value_type(65535)) << 32;
|
result += static_cast<uint64>(c.z * detail::tvec3<T>::value_type(65535)) << 32;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
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;
|
uint64 result = 0;
|
||||||
result += static_cast<gtc::uint64>(c.x * detail::tvec3<T>::value_type(65535)) << 16;
|
result += static_cast<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<uint64>(c.y * detail::tvec3<T>::value_type(65535)) << 32;
|
||||||
result += static_cast<gtc::uint64>(c.z * detail::tvec3<T>::value_type(65535)) << 48;
|
result += static_cast<uint64>(c.z * detail::tvec3<T>::value_type(65535)) << 48;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
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;
|
uint64 result = 0;
|
||||||
result += static_cast<gtc::uint64>(c.x * detail::tvec3<T>::value_type(65535)) << 32;
|
result += static_cast<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<uint64>(c.y * detail::tvec3<T>::value_type(65535)) << 16;
|
||||||
result += static_cast<gtc::uint64>(c.z * detail::tvec3<T>::value_type(65535)) << 0;
|
result += static_cast<uint64>(c.z * detail::tvec3<T>::value_type(65535)) << 0;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
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;
|
uint64 result = 0;
|
||||||
result += static_cast<gtc::uint64>(c.x * detail::tvec3<T>::value_type(65535)) << 48;
|
result += static_cast<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<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<uint64>(c.z * detail::tvec3<T>::value_type(65535)) << 16;
|
||||||
result += static_cast<gtc::uint64>(c.w * detail::tvec3<T>::value_type(65535)) << 0;
|
result += static_cast<uint64>(c.w * detail::tvec3<T>::value_type(65535)) << 0;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
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;
|
uint64 result = 0;
|
||||||
result += static_cast<gtc::uint64>(c.x * detail::tvec4<T>::value_type(65535)) << 0;
|
result += static_cast<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<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<uint64>(c.z * detail::tvec4<T>::value_type(65535)) << 32;
|
||||||
result += static_cast<gtc::uint64>(c.w * detail::tvec4<T>::value_type(65535)) << 48;
|
result += static_cast<uint64>(c.w * detail::tvec4<T>::value_type(65535)) << 48;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
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;
|
uint64 result = 0;
|
||||||
result += static_cast<gtc::uint64>(c.x * detail::tvec4<T>::value_type(65535)) << 16;
|
result += static_cast<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<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<uint64>(c.z * detail::tvec4<T>::value_type(65535)) << 48;
|
||||||
result += static_cast<gtc::uint64>(c.w * detail::tvec4<T>::value_type(65535)) << 0;
|
result += static_cast<uint64>(c.w * detail::tvec4<T>::value_type(65535)) << 0;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
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;
|
uint64 result = 0;
|
||||||
result += static_cast<gtc::uint64>(c.x * detail::tvec4<T>::value_type(65535)) << 32;
|
result += static_cast<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<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<uint64>(c.z * detail::tvec4<T>::value_type(65535)) << 0;
|
||||||
result += static_cast<gtc::uint64>(c.w * detail::tvec4<T>::value_type(65535)) << 48;
|
result += static_cast<uint64>(c.w * detail::tvec4<T>::value_type(65535)) << 48;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
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;
|
uint64 result = 0;
|
||||||
result += static_cast<gtc::uint64>(c.x * detail::tvec4<T>::value_type(65535)) << 48;
|
result += static_cast<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<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<uint64>(c.z * detail::tvec4<T>::value_type(65535)) << 16;
|
||||||
result += static_cast<gtc::uint64>(c.w * detail::tvec4<T>::value_type(65535)) << 0;
|
result += static_cast<uint64>(c.w * detail::tvec4<T>::value_type(65535)) << 0;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <>
|
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 <>
|
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;
|
f16vec3 result;
|
||||||
result.x = gtc::f16(static_cast<float>(color >> 0) / static_cast<float>(255));
|
result.x = f16(static_cast<float>(color >> 0) / static_cast<float>(255));
|
||||||
result.y = gtc::f16(static_cast<float>(color >> 8) / static_cast<float>(255));
|
result.y = f16(static_cast<float>(color >> 8) / static_cast<float>(255));
|
||||||
result.z = gtc::f16(static_cast<float>(color >> 16) / static_cast<float>(255));
|
result.z = f16(static_cast<float>(color >> 16) / static_cast<float>(255));
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <>
|
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;
|
f16vec3 result;
|
||||||
result.x = gtc::f16(static_cast<float>(color >> 8) / static_cast<float>(255));
|
result.x = f16(static_cast<float>(color >> 8) / static_cast<float>(255));
|
||||||
result.y = gtc::f16(static_cast<float>(color >> 16) / static_cast<float>(255));
|
result.y = f16(static_cast<float>(color >> 16) / static_cast<float>(255));
|
||||||
result.z = gtc::f16(static_cast<float>(color >> 24) / static_cast<float>(255));
|
result.z = f16(static_cast<float>(color >> 24) / static_cast<float>(255));
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -732,5 +731,4 @@ GLM_FUNC_QUALIFIER detail::tvec4<double> f64_abgr_cast<uint64>(uint64 color)
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
@ -45,8 +45,7 @@
|
|||||||
# pragma message("GLM: GLM_GTX_color_space extension included")
|
# pragma message("GLM: GLM_GTX_color_space extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm{
|
namespace glm
|
||||||
namespace gtx
|
|
||||||
{
|
{
|
||||||
/// @addtogroup gtx_color_space
|
/// @addtogroup gtx_color_space
|
||||||
/// @{
|
/// @{
|
||||||
@ -90,7 +89,6 @@ namespace gtx
|
|||||||
detail::tvec3<valType> const & color);
|
detail::tvec3<valType> const & color);
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#include "color_space.inl"
|
#include "color_space.inl"
|
||||||
|
@ -8,8 +8,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
namespace glm{
|
namespace glm{
|
||||||
namespace gtx
|
|
||||||
{
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
GLM_FUNC_QUALIFIER detail::tvec3<T> rgbColor(const detail::tvec3<T>& hsvColor)
|
GLM_FUNC_QUALIFIER detail::tvec3<T> rgbColor(const detail::tvec3<T>& hsvColor)
|
||||||
{
|
{
|
||||||
@ -148,5 +147,4 @@ namespace gtx
|
|||||||
return dot(color, tmp);
|
return dot(color, tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
@ -45,8 +45,7 @@
|
|||||||
# pragma message("GLM: GLM_GTX_color_space_YCoCg extension included")
|
# pragma message("GLM: GLM_GTX_color_space_YCoCg extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm{
|
namespace glm
|
||||||
namespace gtx
|
|
||||||
{
|
{
|
||||||
/// @addtogroup gtx_color_space_YCoCg
|
/// @addtogroup gtx_color_space_YCoCg
|
||||||
/// @{
|
/// @{
|
||||||
@ -78,7 +77,6 @@ namespace gtx
|
|||||||
detail::tvec3<valType> const & YCoCgColor);
|
detail::tvec3<valType> const & YCoCgColor);
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#include "color_space_YCoCg.inl"
|
#include "color_space_YCoCg.inl"
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
namespace glm{
|
namespace glm{
|
||||||
namespace gtx{
|
|
||||||
|
|
||||||
template <typename valType>
|
template <typename valType>
|
||||||
GLM_FUNC_QUALIFIER detail::tvec3<valType> rgb2YCoCg
|
GLM_FUNC_QUALIFIER detail::tvec3<valType> rgb2YCoCg
|
||||||
@ -63,5 +62,4 @@ GLM_FUNC_QUALIFIER detail::tvec3<valType> YCoCgR2rgb
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
@ -53,8 +53,7 @@
|
|||||||
#include <cmath>
|
#include <cmath>
|
||||||
#endif//GLM_COMPILER
|
#endif//GLM_COMPILER
|
||||||
|
|
||||||
namespace glm{
|
namespace glm
|
||||||
namespace gtx
|
|
||||||
{
|
{
|
||||||
/// @addtogroup gtx_compatibility
|
/// @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::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 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::thalf 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::tvec2<detail::thalf> 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::tvec3<detail::thalf> 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::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::thalf 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::tmat2x2<detail::thalf> 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::tmat2x3<detail::thalf> 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::tmat2x4<detail::thalf> 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::tmat3x2<detail::thalf> 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::tmat3x3<detail::thalf> 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::tmat3x4<detail::thalf> 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::tmat4x2<detail::thalf> 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::tmat4x3<detail::thalf> 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::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 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)
|
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)
|
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
|
}//namespace glm
|
||||||
|
|
||||||
#include "compatibility.inl"
|
#include "compatibility.inl"
|
||||||
|
@ -8,8 +8,6 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
namespace glm{
|
namespace glm{
|
||||||
namespace gtx{
|
|
||||||
namespace compatibility{
|
|
||||||
|
|
||||||
// isfinite
|
// isfinite
|
||||||
template <typename genType>
|
template <typename genType>
|
||||||
@ -136,6 +134,4 @@ GLM_FUNC_QUALIFIER detail::tvec4<bool> isnan(
|
|||||||
isnan(x.w));
|
isnan(x.w));
|
||||||
}
|
}
|
||||||
|
|
||||||
}//namespace compatibility
|
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
@ -45,8 +45,7 @@
|
|||||||
# pragma message("GLM: GLM_GTX_component_wise extension included")
|
# pragma message("GLM: GLM_GTX_component_wise extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm{
|
namespace glm
|
||||||
namespace gtx
|
|
||||||
{
|
{
|
||||||
/// @addtogroup gtx_component_wise
|
/// @addtogroup gtx_component_wise
|
||||||
/// @{
|
/// @{
|
||||||
@ -76,7 +75,6 @@ namespace gtx
|
|||||||
genType const & v);
|
genType const & v);
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#include "component_wise.inl"
|
#include "component_wise.inl"
|
||||||
|
@ -8,8 +8,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
namespace glm{
|
namespace glm{
|
||||||
namespace gtx
|
|
||||||
{
|
|
||||||
template <typename genType>
|
template <typename genType>
|
||||||
GLM_FUNC_QUALIFIER typename genType::value_type compAdd(genType const & v)
|
GLM_FUNC_QUALIFIER typename genType::value_type compAdd(genType const & v)
|
||||||
{
|
{
|
||||||
@ -46,5 +45,4 @@ namespace gtx
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
@ -49,8 +49,7 @@
|
|||||||
# pragma message("GLM: GLM_GTX_epsilon extension included")
|
# pragma message("GLM: GLM_GTX_epsilon extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm{
|
namespace glm
|
||||||
namespace gtx
|
|
||||||
{
|
{
|
||||||
/// @addtogroup gtx_epsilon
|
/// @addtogroup gtx_epsilon
|
||||||
/// @{
|
/// @{
|
||||||
@ -72,7 +71,6 @@ namespace gtx
|
|||||||
genTypeU const & epsilon);
|
genTypeU const & epsilon);
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#include "epsilon.inl"
|
#include "epsilon.inl"
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
namespace glm{
|
namespace glm{
|
||||||
namespace gtx{
|
|
||||||
|
|
||||||
template <typename genType>
|
template <typename genType>
|
||||||
GLM_FUNC_QUALIFIER bool equalEpsilon
|
GLM_FUNC_QUALIFIER bool equalEpsilon
|
||||||
@ -228,5 +227,4 @@ GLM_FUNC_QUALIFIER detail::tvec4<bool> notEqualEpsilon
|
|||||||
abs(x.w - y.w) >= epsilon.w);
|
abs(x.w - y.w) >= epsilon.w);
|
||||||
}
|
}
|
||||||
|
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
@ -50,8 +50,7 @@
|
|||||||
# pragma message("GLM: GLM_GTX_euler_angles extension included")
|
# pragma message("GLM: GLM_GTX_euler_angles extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm{
|
namespace glm
|
||||||
namespace gtx
|
|
||||||
{
|
{
|
||||||
/// @addtogroup gtx_euler_angles
|
/// @addtogroup gtx_euler_angles
|
||||||
/// @{
|
/// @{
|
||||||
@ -153,7 +152,6 @@ namespace gtx
|
|||||||
detail::tmat4x4<T> orientate4(detail::tvec3<T> const & angles);
|
detail::tmat4x4<T> orientate4(detail::tvec3<T> const & angles);
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#include "euler_angles.inl"
|
#include "euler_angles.inl"
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
namespace glm{
|
namespace glm{
|
||||||
namespace gtx{
|
|
||||||
|
|
||||||
template <typename valType>
|
template <typename valType>
|
||||||
GLM_FUNC_QUALIFIER detail::tmat4x4<valType> eulerAngleX
|
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);
|
return yawPitchRoll(angles.z, angles.x, angles.y);
|
||||||
}
|
}
|
||||||
|
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
@ -45,8 +45,7 @@
|
|||||||
# pragma message("GLM: GLM_GTX_extend extension included")
|
# pragma message("GLM: GLM_GTX_extend extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm{
|
namespace glm
|
||||||
namespace gtx
|
|
||||||
{
|
{
|
||||||
/// @addtogroup gtx_extend
|
/// @addtogroup gtx_extend
|
||||||
/// @{
|
/// @{
|
||||||
@ -60,7 +59,6 @@ namespace gtx
|
|||||||
typename genType::value_type const Length);
|
typename genType::value_type const Length);
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#include "extend.inl"
|
#include "extend.inl"
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
namespace glm{
|
namespace glm{
|
||||||
namespace gtx{
|
|
||||||
|
|
||||||
template <typename genType>
|
template <typename genType>
|
||||||
genType extend
|
genType extend
|
||||||
@ -54,5 +53,4 @@ detail::tvec4<valType> extend
|
|||||||
return Origin + (Source - Origin) * Distance;
|
return Origin + (Source - Origin) * Distance;
|
||||||
}
|
}
|
||||||
|
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
@ -47,8 +47,7 @@
|
|||||||
# pragma message("GLM: GLM_GTX_extented_min_max extension included")
|
# pragma message("GLM: GLM_GTX_extented_min_max extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm{
|
namespace glm
|
||||||
namespace gtx
|
|
||||||
{
|
{
|
||||||
/// @addtogroup gtx_extented_min_max
|
/// @addtogroup gtx_extented_min_max
|
||||||
/// @{
|
/// @{
|
||||||
@ -188,7 +187,6 @@ namespace gtx
|
|||||||
C<T> const & w);
|
C<T> const & w);
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#include "extented_min_max.inl"
|
#include "extented_min_max.inl"
|
||||||
|
@ -7,8 +7,7 @@
|
|||||||
// File : gtx_extented_min_max.inl
|
// File : gtx_extented_min_max.inl
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
namespace glm{
|
namespace glm
|
||||||
namespace gtx
|
|
||||||
{
|
{
|
||||||
template <typename T>
|
template <typename T>
|
||||||
GLM_FUNC_QUALIFIER T min(
|
GLM_FUNC_QUALIFIER T min(
|
||||||
@ -176,5 +175,4 @@ namespace gtx
|
|||||||
return glm::max(glm::max(x, y), glm::max(z, w));
|
return glm::max(glm::max(x, y), glm::max(z, w));
|
||||||
}
|
}
|
||||||
|
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
@ -47,8 +47,7 @@
|
|||||||
# pragma message("GLM: GLM_GTX_fast_exponential extension included")
|
# pragma message("GLM: GLM_GTX_fast_exponential extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm{
|
namespace glm
|
||||||
namespace gtx
|
|
||||||
{
|
{
|
||||||
/// @addtogroup gtx_fast_exponential
|
/// @addtogroup gtx_fast_exponential
|
||||||
/// @{
|
/// @{
|
||||||
@ -93,7 +92,6 @@ namespace gtx
|
|||||||
T fastLn(const T& x);
|
T fastLn(const T& x);
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#include "fast_exponential.inl"
|
#include "fast_exponential.inl"
|
||||||
|
@ -8,8 +8,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
namespace glm{
|
namespace glm{
|
||||||
namespace gtx
|
|
||||||
{
|
|
||||||
// fastPow:
|
// fastPow:
|
||||||
template <typename T>
|
template <typename T>
|
||||||
GLM_FUNC_QUALIFIER T fastPow(const T x, const T y)
|
GLM_FUNC_QUALIFIER T fastPow(const T x, const T y)
|
||||||
@ -288,5 +287,4 @@ namespace gtx
|
|||||||
fastLog2(x.w));
|
fastLog2(x.w));
|
||||||
}
|
}
|
||||||
|
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
@ -47,8 +47,7 @@
|
|||||||
# pragma message("GLM: GLM_GTX_fast_square_root extension included")
|
# pragma message("GLM: GLM_GTX_fast_square_root extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm{
|
namespace glm
|
||||||
namespace gtx
|
|
||||||
{
|
{
|
||||||
/// @addtogroup gtx_fast_square_root
|
/// @addtogroup gtx_fast_square_root
|
||||||
/// @{
|
/// @{
|
||||||
@ -79,7 +78,6 @@ namespace gtx
|
|||||||
genType fastNormalize(genType const & x);
|
genType fastNormalize(genType const & x);
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
}// namespace gtx
|
|
||||||
}// namespace glm
|
}// namespace glm
|
||||||
|
|
||||||
#include "fast_square_root.inl"
|
#include "fast_square_root.inl"
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
namespace glm{
|
namespace glm{
|
||||||
namespace gtx{
|
|
||||||
|
|
||||||
// fastSqrt
|
// fastSqrt
|
||||||
template <typename genType>
|
template <typename genType>
|
||||||
@ -231,5 +230,4 @@ GLM_FUNC_QUALIFIER detail::tvec4<valType> fastNormalize
|
|||||||
return x * fastInverseSqrt(sqr);
|
return x * fastInverseSqrt(sqr);
|
||||||
}
|
}
|
||||||
|
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
@ -45,8 +45,7 @@
|
|||||||
# pragma message("GLM: GLM_GTX_fast_trigonometry extension included")
|
# pragma message("GLM: GLM_GTX_fast_trigonometry extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm{
|
namespace glm
|
||||||
namespace gtx
|
|
||||||
{
|
{
|
||||||
/// @addtogroup gtx_fast_trigonometry
|
/// @addtogroup gtx_fast_trigonometry
|
||||||
/// @{
|
/// @{
|
||||||
@ -94,7 +93,6 @@ namespace gtx
|
|||||||
T fastAtan(const T& angle);
|
T fastAtan(const T& angle);
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#include "fast_trigonometry.inl"
|
#include "fast_trigonometry.inl"
|
||||||
|
@ -8,8 +8,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
namespace glm{
|
namespace glm{
|
||||||
namespace gtx
|
|
||||||
{
|
|
||||||
// sin
|
// sin
|
||||||
template <typename T>
|
template <typename T>
|
||||||
GLM_FUNC_QUALIFIER T fastSin(const T x)
|
GLM_FUNC_QUALIFIER T fastSin(const T x)
|
||||||
@ -266,5 +265,4 @@ namespace gtx
|
|||||||
fastAtan(x.w));
|
fastAtan(x.w));
|
||||||
}
|
}
|
||||||
|
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
@ -46,8 +46,7 @@
|
|||||||
# pragma message("GLM: GLM_GTX_gradient_paint extension included")
|
# pragma message("GLM: GLM_GTX_gradient_paint extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm{
|
namespace glm
|
||||||
namespace gtx
|
|
||||||
{
|
{
|
||||||
/// @addtogroup gtx_gradient_paint
|
/// @addtogroup gtx_gradient_paint
|
||||||
/// @{
|
/// @{
|
||||||
@ -70,7 +69,6 @@ namespace gtx
|
|||||||
glm::detail::tvec2<valType> const & Position);
|
glm::detail::tvec2<valType> const & Position);
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
}// namespace gtx
|
|
||||||
}// namespace glm
|
}// namespace glm
|
||||||
|
|
||||||
#include "gradient_paint.inl"
|
#include "gradient_paint.inl"
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
namespace glm{
|
namespace glm{
|
||||||
namespace gtx{
|
|
||||||
|
|
||||||
template <typename valType>
|
template <typename valType>
|
||||||
valType radialGradient(
|
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);
|
return (Dist.x * (Position.x - Point0.x) + Dist.y * (Position.y - Point0.y)) / glm::dot(Dist, Dist);
|
||||||
}
|
}
|
||||||
|
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
@ -45,8 +45,7 @@
|
|||||||
# pragma message("GLM: GLM_GTX_handed_coordinate_space extension included")
|
# pragma message("GLM: GLM_GTX_handed_coordinate_space extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm{
|
namespace glm
|
||||||
namespace gtx
|
|
||||||
{
|
{
|
||||||
/// @addtogroup gtx_handed_coordinate_space
|
/// @addtogroup gtx_handed_coordinate_space
|
||||||
/// @{
|
/// @{
|
||||||
@ -68,7 +67,6 @@ namespace gtx
|
|||||||
detail::tvec3<T> const & normal);
|
detail::tvec3<T> const & normal);
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
}// namespace gtx
|
|
||||||
}// namespace glm
|
}// namespace glm
|
||||||
|
|
||||||
#include "handed_coordinate_space.inl"
|
#include "handed_coordinate_space.inl"
|
||||||
|
@ -8,8 +8,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
namespace glm{
|
namespace glm{
|
||||||
namespace gtx
|
|
||||||
{
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
GLM_FUNC_QUALIFIER bool rightHanded(
|
GLM_FUNC_QUALIFIER bool rightHanded(
|
||||||
detail::tvec3<T> const & tangent,
|
detail::tvec3<T> const & tangent,
|
||||||
@ -28,5 +27,4 @@ namespace gtx
|
|||||||
return dot(cross(normal, tangent), binormal) < T(0);
|
return dot(cross(normal, tangent), binormal) < T(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
@ -46,8 +46,7 @@
|
|||||||
# pragma message("GLM: GLM_GTX_inertia extension included")
|
# pragma message("GLM: GLM_GTX_inertia extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm{
|
namespace glm
|
||||||
namespace gtx
|
|
||||||
{
|
{
|
||||||
/// @addtogroup gtx_inertia
|
/// @addtogroup gtx_inertia
|
||||||
/// @{
|
/// @{
|
||||||
@ -109,7 +108,6 @@ namespace gtx
|
|||||||
const T Radius);
|
const T Radius);
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
}// namespace gtx
|
|
||||||
}// namespace glm
|
}// namespace glm
|
||||||
|
|
||||||
#include "inertia.inl"
|
#include "inertia.inl"
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
namespace glm{
|
namespace glm{
|
||||||
namespace gtx{
|
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
GLM_FUNC_QUALIFIER detail::tmat3x3<T> boxInertia3(
|
GLM_FUNC_QUALIFIER detail::tmat3x3<T> boxInertia3(
|
||||||
@ -97,5 +96,4 @@ namespace gtx{
|
|||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
|
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
@ -47,8 +47,7 @@
|
|||||||
# pragma message("GLM: GLM_GTX_int_10_10_10_2 extension included")
|
# pragma message("GLM: GLM_GTX_int_10_10_10_2 extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm{
|
namespace glm
|
||||||
namespace gtx
|
|
||||||
{
|
{
|
||||||
/// @addtogroup gtx_int_10_10_10_2
|
/// @addtogroup gtx_int_10_10_10_2
|
||||||
/// @{
|
/// @{
|
||||||
@ -58,7 +57,6 @@ namespace gtx
|
|||||||
dword uint10_10_10_2_cast(glm::vec4 const & v);
|
dword uint10_10_10_2_cast(glm::vec4 const & v);
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#include "int_10_10_10_2.inl"
|
#include "int_10_10_10_2.inl"
|
||||||
|
@ -8,12 +8,10 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
namespace glm{
|
namespace glm{
|
||||||
namespace gtx{
|
|
||||||
|
|
||||||
GLM_FUNC_QUALIFIER dword uint10_10_10_2_cast(glm::vec4 const & v)
|
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);
|
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
|
}//namespace glm
|
||||||
|
@ -45,8 +45,7 @@
|
|||||||
# pragma message("GLM: GLM_GTX_integer extension included")
|
# pragma message("GLM: GLM_GTX_integer extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm{
|
namespace glm
|
||||||
namespace gtx
|
|
||||||
{
|
{
|
||||||
/// @addtogroup gtx_integer
|
/// @addtogroup gtx_integer
|
||||||
/// @{
|
/// @{
|
||||||
@ -69,7 +68,6 @@ namespace gtx
|
|||||||
genType factorial(genType const & x);
|
genType factorial(genType const & x);
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#include "integer.inl"
|
#include "integer.inl"
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
namespace glm{
|
namespace glm{
|
||||||
namespace gtx{
|
|
||||||
|
|
||||||
// pow
|
// pow
|
||||||
GLM_FUNC_QUALIFIER int pow(int x, int y)
|
GLM_FUNC_QUALIFIER int pow(int x, int y)
|
||||||
@ -85,5 +84,4 @@ namespace gtx{
|
|||||||
factorial(x.w));
|
factorial(x.w));
|
||||||
}
|
}
|
||||||
|
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
@ -47,8 +47,7 @@
|
|||||||
# pragma message("GLM: GLM_GTX_closest_point extension included")
|
# pragma message("GLM: GLM_GTX_closest_point extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm{
|
namespace glm
|
||||||
namespace gtx
|
|
||||||
{
|
{
|
||||||
/// @addtogroup gtx_intersect
|
/// @addtogroup gtx_intersect
|
||||||
/// @{
|
/// @{
|
||||||
@ -86,7 +85,6 @@ namespace gtx
|
|||||||
genType & position, genType & normal);
|
genType & position, genType & normal);
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#include "intersect.inl"
|
#include "intersect.inl"
|
||||||
|
@ -11,7 +11,6 @@
|
|||||||
#include <limits>
|
#include <limits>
|
||||||
|
|
||||||
namespace glm{
|
namespace glm{
|
||||||
namespace gtx{
|
|
||||||
|
|
||||||
template <typename genType>
|
template <typename genType>
|
||||||
GLM_FUNC_QUALIFIER bool intersectRayTriangle
|
GLM_FUNC_QUALIFIER bool intersectRayTriangle
|
||||||
@ -195,5 +194,4 @@ GLM_FUNC_QUALIFIER bool intersectLineSphere
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
@ -45,8 +45,7 @@
|
|||||||
# pragma message("GLM: GLM_GTX_log_base extension included")
|
# pragma message("GLM: GLM_GTX_log_base extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm{
|
namespace glm
|
||||||
namespace gtx
|
|
||||||
{
|
{
|
||||||
/// @addtogroup gtx_log_base
|
/// @addtogroup gtx_log_base
|
||||||
/// @{
|
/// @{
|
||||||
@ -59,7 +58,6 @@ namespace gtx
|
|||||||
genType const & base);
|
genType const & base);
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#include "log_base.inl"
|
#include "log_base.inl"
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
namespace glm{
|
namespace glm{
|
||||||
namespace gtx{
|
|
||||||
|
|
||||||
template <typename genType>
|
template <typename genType>
|
||||||
GLM_FUNC_QUALIFIER genType log(
|
GLM_FUNC_QUALIFIER genType log(
|
||||||
@ -86,5 +85,4 @@ GLM_FUNC_QUALIFIER detail::tvec4<valType> log(
|
|||||||
log(v.w, base.w));
|
log(v.w, base.w));
|
||||||
}
|
}
|
||||||
|
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
@ -46,8 +46,7 @@
|
|||||||
# pragma message("GLM: GLM_GTX_matrix_cross_product extension included")
|
# pragma message("GLM: GLM_GTX_matrix_cross_product extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm{
|
namespace glm
|
||||||
namespace gtx
|
|
||||||
{
|
{
|
||||||
/// @addtogroup gtx_matrix_cross_product
|
/// @addtogroup gtx_matrix_cross_product
|
||||||
/// @{
|
/// @{
|
||||||
@ -65,7 +64,6 @@ namespace gtx
|
|||||||
detail::tvec3<T> const & x);
|
detail::tvec3<T> const & x);
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#include "matrix_cross_product.inl"
|
#include "matrix_cross_product.inl"
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
namespace glm{
|
namespace glm{
|
||||||
namespace gtx{
|
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
GLM_FUNC_QUALIFIER detail::tmat3x3<T> matrixCross3(
|
GLM_FUNC_QUALIFIER detail::tmat3x3<T> matrixCross3(
|
||||||
@ -38,5 +37,4 @@ GLM_FUNC_QUALIFIER detail::tmat4x4<T> matrixCross4(
|
|||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
|
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
@ -45,8 +45,7 @@
|
|||||||
# pragma message("GLM: GLM_GTX_matrix_interpolation extension included")
|
# pragma message("GLM: GLM_GTX_matrix_interpolation extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm{
|
namespace glm
|
||||||
namespace gtx
|
|
||||||
{
|
{
|
||||||
/// @addtogroup gtx_matrix_interpolation
|
/// @addtogroup gtx_matrix_interpolation
|
||||||
/// @{
|
/// @{
|
||||||
@ -76,7 +75,6 @@ namespace gtx
|
|||||||
T const delta);
|
T const delta);
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#include "matrix_interpolation.inl"
|
#include "matrix_interpolation.inl"
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
namespace glm{
|
namespace glm{
|
||||||
namespace gtx{
|
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
GLM_FUNC_QUALIFIER void axisAngle(
|
GLM_FUNC_QUALIFIER void axisAngle(
|
||||||
@ -111,5 +110,4 @@ namespace gtx{
|
|||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
@ -46,10 +46,9 @@
|
|||||||
# pragma message("GLM: GLM_GTX_matrix_major_storage extension included")
|
# pragma message("GLM: GLM_GTX_matrix_major_storage extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm{
|
namespace glm
|
||||||
namespace gtx
|
|
||||||
{
|
{
|
||||||
/// \addtogroup gtx_matrix_major_storage
|
/// @addtogroup gtx_matrix_major_storage
|
||||||
/// @{
|
/// @{
|
||||||
|
|
||||||
//! Build a row major matrix from row vectors.
|
//! Build a row major matrix from row vectors.
|
||||||
@ -137,7 +136,6 @@ namespace gtx
|
|||||||
const detail::tmat4x4<T>& m);
|
const detail::tmat4x4<T>& m);
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#include "matrix_major_storage.inl"
|
#include "matrix_major_storage.inl"
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
namespace glm{
|
namespace glm{
|
||||||
namespace gtx{
|
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
GLM_FUNC_QUALIFIER detail::tmat2x2<T> rowMajor2(
|
GLM_FUNC_QUALIFIER detail::tmat2x2<T> rowMajor2(
|
||||||
@ -170,5 +169,4 @@ namespace gtx{
|
|||||||
return detail::tmat4x4<T>(m);
|
return detail::tmat4x4<T>(m);
|
||||||
}
|
}
|
||||||
|
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
@ -45,10 +45,9 @@
|
|||||||
# pragma message("GLM: GLM_GTX_matrix_operation extension included")
|
# pragma message("GLM: GLM_GTX_matrix_operation extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm{
|
namespace glm
|
||||||
namespace gtx
|
|
||||||
{
|
{
|
||||||
/// \addtogroup gtx_matrix_operation
|
/// @addtogroup gtx_matrix_operation
|
||||||
/// @{
|
/// @{
|
||||||
|
|
||||||
//! Build a diagonal matrix.
|
//! Build a diagonal matrix.
|
||||||
@ -106,7 +105,6 @@ namespace gtx
|
|||||||
detail::tvec4<valType> const & v);
|
detail::tvec4<valType> const & v);
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#include "matrix_operation.inl"
|
#include "matrix_operation.inl"
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
namespace glm{
|
namespace glm{
|
||||||
namespace gtx{
|
|
||||||
|
|
||||||
template <typename valType>
|
template <typename valType>
|
||||||
GLM_FUNC_QUALIFIER detail::tmat2x2<valType> diagonal2x2
|
GLM_FUNC_QUALIFIER detail::tmat2x2<valType> diagonal2x2
|
||||||
@ -123,5 +122,4 @@ namespace gtx{
|
|||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
|
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
@ -46,8 +46,7 @@
|
|||||||
# pragma message("GLM: GLM_GTX_matrix_query extension included")
|
# pragma message("GLM: GLM_GTX_matrix_query extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm{
|
namespace glm
|
||||||
namespace gtx
|
|
||||||
{
|
{
|
||||||
/// @addtogroup gtx_matrix_query
|
/// @addtogroup gtx_matrix_query
|
||||||
/// @{
|
/// @{
|
||||||
@ -109,7 +108,6 @@ namespace gtx
|
|||||||
const typename genType::value_type epsilon = std::numeric_limits<typename genType::value_type>::epsilon());
|
const typename genType::value_type epsilon = std::numeric_limits<typename genType::value_type>::epsilon());
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#include "matrix_query.inl"
|
#include "matrix_query.inl"
|
||||||
|
@ -11,8 +11,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
namespace glm{
|
namespace glm{
|
||||||
namespace gtx
|
|
||||||
{
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
GLM_FUNC_QUALIFIER bool isNull(
|
GLM_FUNC_QUALIFIER bool isNull(
|
||||||
const detail::tmat2x2<T>& m,
|
const detail::tmat2x2<T>& m,
|
||||||
@ -138,5 +137,4 @@ namespace gtx
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
@ -45,8 +45,7 @@
|
|||||||
# pragma message("GLM: GLM_GTX_mixed_product extension included")
|
# pragma message("GLM: GLM_GTX_mixed_product extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm{
|
namespace glm
|
||||||
namespace gtx
|
|
||||||
{
|
{
|
||||||
/// @addtogroup gtx_mixed_product
|
/// @addtogroup gtx_mixed_product
|
||||||
/// @{
|
/// @{
|
||||||
@ -59,7 +58,6 @@ namespace gtx
|
|||||||
detail::tvec3<valType> const & v3);
|
detail::tvec3<valType> const & v3);
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
}// namespace gtx
|
|
||||||
}// namespace glm
|
}// namespace glm
|
||||||
|
|
||||||
#include "mixed_product.inl"
|
#include "mixed_product.inl"
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
namespace glm{
|
namespace glm{
|
||||||
namespace gtx{
|
|
||||||
|
|
||||||
template <typename valType>
|
template <typename valType>
|
||||||
GLM_FUNC_QUALIFIER valType mixedProduct(
|
GLM_FUNC_QUALIFIER valType mixedProduct(
|
||||||
@ -19,14 +18,4 @@ GLM_FUNC_QUALIFIER valType mixedProduct(
|
|||||||
return dot(cross(v1, v2), v3);
|
return dot(cross(v1, v2), v3);
|
||||||
}
|
}
|
||||||
|
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -46,8 +46,7 @@
|
|||||||
# pragma message("GLM: GLM_GTX_multiple extension included")
|
# pragma message("GLM: GLM_GTX_multiple extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm{
|
namespace glm
|
||||||
namespace gtx
|
|
||||||
{
|
{
|
||||||
/// @addtogroup gtx_multiple
|
/// @addtogroup gtx_multiple
|
||||||
/// @{
|
/// @{
|
||||||
@ -67,7 +66,6 @@ namespace gtx
|
|||||||
genType const & Multiple);
|
genType const & Multiple);
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#include "multiple.inl"
|
#include "multiple.inl"
|
||||||
|
@ -11,8 +11,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
namespace glm{
|
namespace glm{
|
||||||
namespace gtx
|
|
||||||
{
|
|
||||||
//////////////////////
|
//////////////////////
|
||||||
// higherMultiple
|
// higherMultiple
|
||||||
|
|
||||||
@ -185,5 +184,4 @@ namespace gtx
|
|||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
|
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
@ -49,8 +49,7 @@
|
|||||||
# pragma message("GLM: GLM_GTX_noise extension included")
|
# pragma message("GLM: GLM_GTX_noise extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm{
|
namespace glm
|
||||||
namespace gtx
|
|
||||||
{
|
{
|
||||||
/// @addtogroup gtx_noise
|
/// @addtogroup gtx_noise
|
||||||
/// @{
|
/// @{
|
||||||
@ -75,7 +74,6 @@ namespace gtx
|
|||||||
vecType<T> const & p);
|
vecType<T> const & p);
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#include "noise.inl"
|
#include "noise.inl"
|
||||||
|
@ -16,7 +16,6 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
namespace glm{
|
namespace glm{
|
||||||
namespace gtx{
|
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
GLM_FUNC_QUALIFIER T permute(T const & x)
|
GLM_FUNC_QUALIFIER T permute(T const & x)
|
||||||
@ -62,19 +61,19 @@ namespace gtx{
|
|||||||
template <typename T>
|
template <typename T>
|
||||||
GLM_FUNC_QUALIFIER T perlin(detail::tvec2<T> const & P)
|
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> 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 = 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> 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
|
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> ix(Pi.x, Pi.z, Pi.x, Pi.z);
|
||||||
detail::tvec4<T> iy(Pi.y, Pi.y, Pi.w, Pi.w);
|
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> fx(Pf.x, Pf.z, Pf.x, Pf.z);
|
||||||
detail::tvec4<T> fy(Pf.y, Pf.y, Pf.w, Pf.w);
|
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> gx = T(2) * glm::fract(i / T(41)) - T(1);
|
||||||
detail::tvec4<T> gy = abs(gx) - T(0.5);
|
detail::tvec4<T> gy = glm::abs(gx) - T(0.5);
|
||||||
detail::tvec4<T> tx = floor(gx + T(0.5));
|
detail::tvec4<T> tx = glm::floor(gx + T(0.5));
|
||||||
gx = gx - tx;
|
gx = gx - tx;
|
||||||
|
|
||||||
detail::tvec2<T> g00(gx.x, gy.x);
|
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))));
|
dot(m1 * m1, detail::tvec2<T>(dot(p3, x3), dot(p4, x4))));
|
||||||
}
|
}
|
||||||
|
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
@ -49,8 +49,7 @@
|
|||||||
# pragma message("GLM: GLM_GTX_norm extension included")
|
# pragma message("GLM: GLM_GTX_norm extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm{
|
namespace glm
|
||||||
namespace gtx
|
|
||||||
{
|
{
|
||||||
/// @addtogroup gtx_norm
|
/// @addtogroup gtx_norm
|
||||||
/// @{
|
/// @{
|
||||||
@ -155,7 +154,6 @@ namespace gtx
|
|||||||
unsigned int Depth);
|
unsigned int Depth);
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#include "norm.inl"
|
#include "norm.inl"
|
||||||
|
@ -8,8 +8,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
namespace glm{
|
namespace glm{
|
||||||
namespace gtx
|
|
||||||
{
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
GLM_FUNC_QUALIFIER T length2(
|
GLM_FUNC_QUALIFIER T length2(
|
||||||
const T x)
|
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));
|
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
|
}//namespace glm
|
||||||
|
@ -46,8 +46,7 @@
|
|||||||
# pragma message("GLM: GLM_GTX_normal extension included")
|
# pragma message("GLM: GLM_GTX_normal extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm{
|
namespace glm
|
||||||
namespace gtx
|
|
||||||
{
|
{
|
||||||
/// @addtogroup gtx_normal
|
/// @addtogroup gtx_normal
|
||||||
/// @{
|
/// @{
|
||||||
@ -61,7 +60,6 @@ namespace gtx
|
|||||||
detail::tvec3<T> const & p3);
|
detail::tvec3<T> const & p3);
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#include "normal.inl"
|
#include "normal.inl"
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
namespace glm{
|
namespace glm{
|
||||||
namespace gtx{
|
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
GLM_FUNC_QUALIFIER detail::tvec3<T> triangleNormal
|
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));
|
return normalize(cross(p1 - p2, p1 - p3));
|
||||||
}
|
}
|
||||||
|
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
@ -47,8 +47,7 @@
|
|||||||
# pragma message("GLM: GLM_GTX_normalize_dot extension included")
|
# pragma message("GLM: GLM_GTX_normalize_dot extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm{
|
namespace glm
|
||||||
namespace gtx
|
|
||||||
{
|
{
|
||||||
/// @addtogroup gtx_normalize_dot
|
/// @addtogroup gtx_normalize_dot
|
||||||
/// @{
|
/// @{
|
||||||
@ -70,7 +69,6 @@ namespace gtx
|
|||||||
genType const & y);
|
genType const & y);
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#include "normalize_dot.inl"
|
#include "normalize_dot.inl"
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
//////////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
namespace glm{
|
namespace glm{
|
||||||
namespace gtx{
|
|
||||||
|
|
||||||
template <typename genType>
|
template <typename genType>
|
||||||
GLM_FUNC_QUALIFIER genType normalizeDot
|
GLM_FUNC_QUALIFIER genType normalizeDot
|
||||||
@ -71,7 +70,7 @@ GLM_FUNC_QUALIFIER genType fastNormalizeDot
|
|||||||
{
|
{
|
||||||
return
|
return
|
||||||
glm::dot(x, y) *
|
glm::dot(x, y) *
|
||||||
glm::gtx::fastInverseSqrt(glm::dot(x, x) *
|
fastInverseSqrt(glm::dot(x, x) *
|
||||||
glm::dot(y, y));
|
glm::dot(y, y));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -84,7 +83,7 @@ GLM_FUNC_QUALIFIER valType fastNormalizeDot
|
|||||||
{
|
{
|
||||||
return
|
return
|
||||||
glm::dot(x, y) *
|
glm::dot(x, y) *
|
||||||
glm::gtx::fastInverseSqrt(glm::dot(x, x) *
|
fastInverseSqrt(glm::dot(x, x) *
|
||||||
glm::dot(y, y));
|
glm::dot(y, y));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -97,7 +96,7 @@ GLM_FUNC_QUALIFIER valType fastNormalizeDot
|
|||||||
{
|
{
|
||||||
return
|
return
|
||||||
glm::dot(x, y) *
|
glm::dot(x, y) *
|
||||||
glm::gtx::fastInverseSqrt(glm::dot(x, x) *
|
fastInverseSqrt(glm::dot(x, x) *
|
||||||
glm::dot(y, y));
|
glm::dot(y, y));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -110,9 +109,8 @@ GLM_FUNC_QUALIFIER valType fastNormalizeDot
|
|||||||
{
|
{
|
||||||
return
|
return
|
||||||
glm::dot(x, y) *
|
glm::dot(x, y) *
|
||||||
glm::gtx::fastInverseSqrt(glm::dot(x, x) *
|
fastInverseSqrt(glm::dot(x, x) *
|
||||||
glm::dot(y, y));
|
glm::dot(y, y));
|
||||||
}
|
}
|
||||||
|
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
namespace glm{
|
namespace glm{
|
||||||
namespace gtx{
|
|
||||||
|
|
||||||
template <typename genType>
|
template <typename genType>
|
||||||
GLM_FUNC_QUALIFIER genType pow2(const genType& x)
|
GLM_FUNC_QUALIFIER genType pow2(const genType& x)
|
||||||
@ -57,5 +56,4 @@ namespace gtx{
|
|||||||
powOfTwo(x.w));
|
powOfTwo(x.w));
|
||||||
}
|
}
|
||||||
|
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user