mirror of
https://github.com/g-truc/glm.git
synced 2024-11-10 04:31:47 +00:00
Fixed conflict between GTX_compatibility and GTC_quaternion #286
This commit is contained in:
parent
c556770a32
commit
2117c53dbf
@ -198,7 +198,7 @@ namespace glm
|
||||
/// @see gtc_quaternion
|
||||
/// @see - slerp(tquat<T, P> const & x, tquat<T, P> const & y, T const & a)
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tquat<T, P> mix(tquat<T, P> const & x, tquat<T, P> const & y, T const & a);
|
||||
GLM_FUNC_DECL tquat<T, P> mix(tquat<T, P> const & x, tquat<T, P> const & y, T a);
|
||||
|
||||
/// Linear interpolation of two quaternions.
|
||||
/// The interpolation is oriented.
|
||||
@ -209,7 +209,7 @@ namespace glm
|
||||
/// @tparam T Value type used to build the quaternion. Supported: half, float or double.
|
||||
/// @see gtc_quaternion
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tquat<T, P> lerp(tquat<T, P> const & x, tquat<T, P> const & y, T const & a);
|
||||
GLM_FUNC_DECL tquat<T, P> lerp(tquat<T, P> const & x, tquat<T, P> const & y, T a);
|
||||
|
||||
/// Spherical linear interpolation of two quaternions.
|
||||
/// The interpolation always take the short path and the rotation is performed at constant speed.
|
||||
@ -220,7 +220,7 @@ namespace glm
|
||||
/// @tparam T Value type used to build the quaternion. Supported: half, float or double.
|
||||
/// @see gtc_quaternion
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tquat<T, P> slerp(tquat<T, P> const & x, tquat<T, P> const & y, T const & a);
|
||||
GLM_FUNC_DECL tquat<T, P> slerp(tquat<T, P> const & x, tquat<T, P> const & y, T a);
|
||||
|
||||
/// Returns the q conjugate.
|
||||
///
|
||||
|
@ -451,7 +451,7 @@ namespace detail
|
||||
*/
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tquat<T, P> mix(tquat<T, P> const & x, tquat<T, P> const & y, T const & a)
|
||||
GLM_FUNC_QUALIFIER tquat<T, P> mix(tquat<T, P> const & x, tquat<T, P> const & y, T a)
|
||||
{
|
||||
T cosTheta = dot(x, y);
|
||||
|
||||
@ -474,7 +474,7 @@ namespace detail
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tquat<T, P> lerp(tquat<T, P> const & x, tquat<T, P> const & y, T const & a)
|
||||
GLM_FUNC_QUALIFIER tquat<T, P> lerp(tquat<T, P> const & x, tquat<T, P> const & y, T a)
|
||||
{
|
||||
// Lerp is only defined in [0, 1]
|
||||
assert(a >= static_cast<T>(0));
|
||||
@ -484,7 +484,7 @@ namespace detail
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tquat<T, P> slerp(tquat<T, P> const & x, tquat<T, P> const & y, T const & a)
|
||||
GLM_FUNC_QUALIFIER tquat<T, P> slerp(tquat<T, P> const & x, tquat<T, P> const & y, T a)
|
||||
{
|
||||
tquat<T, P> z = y;
|
||||
|
||||
|
@ -73,8 +73,6 @@ namespace glm
|
||||
template <typename T, precision P> GLM_FUNC_QUALIFIER tvec3<T, P> lerp(const tvec3<T, P>& x, const tvec3<T, P>& y, const tvec3<T, P>& a){return mix(x, y, a);} //!< \brief Returns the component-wise result of x * (1.0 - a) + y * a, i.e., the linear blend of x and y using vector a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility)
|
||||
template <typename T, precision P> GLM_FUNC_QUALIFIER tvec4<T, P> lerp(const tvec4<T, P>& x, const tvec4<T, P>& y, const tvec4<T, P>& a){return mix(x, y, a);} //!< \brief Returns the component-wise result of x * (1.0 - a) + y * a, i.e., the linear blend of x and y using vector a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility)
|
||||
|
||||
template <typename T, precision P> GLM_FUNC_QUALIFIER T slerp(tquat<T, P> const & x, tquat<T, P> const & y, T const & a){return mix(x, y, a);} //!< \brief Returns the slurp interpolation between two quaternions.
|
||||
|
||||
template <typename T, precision P> GLM_FUNC_QUALIFIER T saturate(T x){return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility)
|
||||
template <typename T, precision P> GLM_FUNC_QUALIFIER tvec2<T, P> saturate(const tvec2<T, P>& x){return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility)
|
||||
template <typename T, precision P> GLM_FUNC_QUALIFIER tvec3<T, P> saturate(const tvec3<T, P>& x){return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility)
|
||||
|
@ -82,6 +82,7 @@ Fixes:
|
||||
- Fixed Visual C++ 32 bit build #283
|
||||
- Fixed GLM_FORCE_SIZE_FUNC pragma message
|
||||
- Fixed C++98 only build
|
||||
- Fixed conflict between GTX_compatibility and GTC_quaternion #286
|
||||
|
||||
================================================================================
|
||||
GLM 0.9.6.0: 2014-11-30
|
||||
|
Loading…
Reference in New Issue
Block a user