mirror of
https://github.com/g-truc/glm.git
synced 2024-11-10 12:41:54 +00:00
Removed namespaces
This commit is contained in:
parent
6215aff4b4
commit
b9ab6d94cc
@ -272,8 +272,8 @@ namespace glm
|
||||
)
|
||||
{
|
||||
return detail::tvec2<T>(
|
||||
sqrt(x.x),
|
||||
sqrt(x.y));
|
||||
glm::sqrt(x.x),
|
||||
glm::sqrt(x.y));
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
@ -283,9 +283,9 @@ namespace glm
|
||||
)
|
||||
{
|
||||
return detail::tvec3<T>(
|
||||
sqrt(x.x),
|
||||
sqrt(x.y),
|
||||
sqrt(x.z));
|
||||
glm::sqrt(x.x),
|
||||
glm::sqrt(x.y),
|
||||
glm::sqrt(x.z));
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
@ -295,10 +295,10 @@ namespace glm
|
||||
)
|
||||
{
|
||||
return detail::tvec4<T>(
|
||||
sqrt(x.x),
|
||||
sqrt(x.y),
|
||||
sqrt(x.z),
|
||||
sqrt(x.w));
|
||||
glm::sqrt(x.x),
|
||||
glm::sqrt(x.y),
|
||||
glm::sqrt(x.z),
|
||||
glm::sqrt(x.w));
|
||||
}
|
||||
|
||||
template <typename genType>
|
||||
|
@ -19,9 +19,9 @@ namespace glm
|
||||
//!
|
||||
//! \li <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/length.xml">GLSL length man page</a>
|
||||
//! \li GLSL 1.30.08 specification, section 8.4
|
||||
template <typename genType>
|
||||
typename genType::value_type length(
|
||||
genType const & x);
|
||||
//template <typename genType>
|
||||
//typename genType::value_type length(
|
||||
// genType const & x);
|
||||
|
||||
//! Returns the distance betwwen p0 and p1, i.e., length(p0 - p1).
|
||||
//!
|
||||
|
@ -20,7 +20,7 @@ namespace detail
|
||||
float toFloat32(hdata value);
|
||||
hdata toFloat16(float const & value);
|
||||
|
||||
///16-bit floating point type.
|
||||
/// 16-bit floating point type.
|
||||
/// \ingroup gtc_half_float
|
||||
class thalf
|
||||
{
|
||||
|
@ -74,11 +74,11 @@ namespace detail
|
||||
typedef detail::highp_uint_t highp_uint;
|
||||
|
||||
#if(!defined(GLM_PRECISION_HIGHP_INT) && !defined(GLM_PRECISION_MEDIUMP_INT) && !defined(GLM_PRECISION_LOWP_INT))
|
||||
typedef mediump_int int_t;
|
||||
typedef mediump_int int_t;
|
||||
#elif(defined(GLM_PRECISION_HIGHP_INT) && !defined(GLM_PRECISION_MEDIUMP_INT) && !defined(GLM_PRECISION_LOWP_INT))
|
||||
typedef highp_int int_t;
|
||||
#elif(!defined(GLM_PRECISION_HIGHP_INT) && defined(GLM_PRECISION_MEDIUMP_INT) && !defined(GLM_PRECISION_LOWP_INT))
|
||||
typedef mediump_int int_t;
|
||||
typedef mediump_int int_t;
|
||||
#elif(!defined(GLM_PRECISION_HIGHP_INT) && !defined(GLM_PRECISION_MEDIUMP_INT) && defined(GLM_PRECISION_LOWP_INT))
|
||||
typedef lowp_int int_t;
|
||||
#else
|
||||
|
@ -152,7 +152,7 @@ namespace quaternion ///< GLM_GTC_quaternion extension: Quaternion types and fun
|
||||
//! Returns the length of the quaternion.
|
||||
//! From GLM_GTC_quaternion extension.
|
||||
template <typename T>
|
||||
typename detail::tquat<T>::value_type length(
|
||||
T length(
|
||||
detail::tquat<T> const & q);
|
||||
|
||||
//! Returns the normalized quaternion.
|
||||
@ -164,17 +164,10 @@ namespace quaternion ///< GLM_GTC_quaternion extension: Quaternion types and fun
|
||||
//! Returns dot product of q1 and q2, i.e., q1[0] * q2[0] + q1[1] * q2[1] + ...
|
||||
//! From GLM_GTC_quaternion extension.
|
||||
template <typename T>
|
||||
typename detail::tquat<T>::value_type dot(
|
||||
T dot(
|
||||
detail::tquat<T> const & q1,
|
||||
detail::tquat<T> const & q2);
|
||||
|
||||
//! Returns the cross product of q1 and q2.
|
||||
//! From GLM_GTC_quaternion extension.
|
||||
template <typename T>
|
||||
GLM_DEPRECATED detail::tquat<T> cross(
|
||||
detail::tquat<T> const & q1,
|
||||
detail::tquat<T> const & q2);
|
||||
|
||||
//! Returns a SLERP interpolated quaternion of x and y according a.
|
||||
//! From GLM_GTC_quaternion extension.
|
||||
template <typename T>
|
||||
@ -254,8 +247,8 @@ namespace quaternion ///< GLM_GTC_quaternion extension: Quaternion types and fun
|
||||
//! Quaternion of high precision floating-point numbers.
|
||||
//! From GLM_GTC_quaternion extension.
|
||||
typedef detail::tquat<highp_float> highp_quat;
|
||||
///@}
|
||||
|
||||
|
||||
/// @}
|
||||
} //namespace quaternion
|
||||
} //namespace gtc
|
||||
} //namespace glm
|
||||
|
@ -296,7 +296,7 @@ namespace quaternion{
|
||||
|
||||
////////////////////////////////////////////////////////
|
||||
template <typename T>
|
||||
GLM_FUNC_QUALIFIER typename detail::tquat<T>::value_type length
|
||||
GLM_FUNC_QUALIFIER T length
|
||||
(
|
||||
detail::tquat<T> const & q
|
||||
)
|
||||
@ -318,7 +318,7 @@ namespace quaternion{
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
GLM_FUNC_QUALIFIER typename detail::tquat<T>::value_type dot
|
||||
GLM_FUNC_QUALIFIER T dot
|
||||
(
|
||||
detail::tquat<T> const & q1,
|
||||
detail::tquat<T> const & q2
|
||||
@ -462,8 +462,8 @@ namespace quaternion{
|
||||
detail::tvec3<T> Tmp = v;
|
||||
|
||||
// Axis of rotation must be normalised
|
||||
typename detail::tquat<T>::value_type len = glm::core::function::geometric::length(Tmp);
|
||||
if(abs(len - typename detail::tquat<T>::value_type(1)) > typename detail::tquat<T>::value_type(0.001))
|
||||
typename detail::tquat<T>::value_type len = glm::length(Tmp);
|
||||
if(abs(len - T(1)) > T(0.001))
|
||||
{
|
||||
T oneOverLen = T(1) / len;
|
||||
Tmp.x *= oneOverLen;
|
||||
@ -483,7 +483,7 @@ namespace quaternion{
|
||||
detail::tquat<T> const & q
|
||||
)
|
||||
{
|
||||
detail::tmat3x3<T> Result(typename detail::tquat<T>::value_type(1));
|
||||
detail::tmat3x3<T> Result(T(1));
|
||||
Result[0][0] = 1 - 2 * q.y * q.y - 2 * q.z * q.z;
|
||||
Result[0][1] = 2 * q.x * q.y + 2 * q.w * q.z;
|
||||
Result[0][2] = 2 * q.x * q.z - 2 * q.w * q.y;
|
||||
@ -536,8 +536,8 @@ namespace quaternion{
|
||||
biggestIndex = 3;
|
||||
}
|
||||
|
||||
typename detail::tquat<T>::value_type biggestVal = sqrt(fourBiggestSquaredMinus1 + typename detail::tquat<T>::value_type(1)) * typename detail::tquat<T>::value_type(0.5);
|
||||
typename detail::tquat<T>::value_type mult = typename detail::tquat<T>::value_type(0.25) / biggestVal;
|
||||
typename detail::tquat<T>::value_type biggestVal = sqrt(fourBiggestSquaredMinus1 + T(1)) * T(0.5);
|
||||
typename detail::tquat<T>::value_type mult = T(0.25) / biggestVal;
|
||||
|
||||
detail::tquat<T> Result;
|
||||
switch(biggestIndex)
|
||||
|
@ -35,6 +35,8 @@
|
||||
|
||||
// Dependency:
|
||||
#include "../glm.hpp"
|
||||
#include "../gtc/half_float.hpp"
|
||||
#include "../gtc/quaternion.hpp"
|
||||
#include <cstring>
|
||||
|
||||
#if(defined(GLM_MESSAGES) && !defined(glm_ext))
|
||||
|
Loading…
Reference in New Issue
Block a user