Merge branch '0.9.3' of github.com:Groovounet/glm into 0.9.3

master
Christophe Riccio ago%!(EXTRA string=13 years)
commit a2833dcb3c
  1. 7
      glm/gtc/quaternion.hpp
  2. 15
      glm/gtc/quaternion.inl
  3. 6
      glm/gtx/quaternion.hpp
  4. 9
      glm/gtx/quaternion.inl
  5. 4
      test/gtx/gtx_simd_mat4.cpp

@ -204,6 +204,13 @@ namespace detail
typename detail::tquat<T>::value_type const & angle, typename detail::tquat<T>::value_type const & angle,
detail::tvec3<T> const & v); detail::tvec3<T> const & v);
/// Returns euler angles, yitch as x, yaw as y, roll as z.
///
/// @see gtc_quaternion
template <typename T>
detail::tvec3<T> eulerAngles(
detail::tquat<T> const & x);
/// Converts a quaternion to a 3 * 3 matrix. /// Converts a quaternion to a 3 * 3 matrix.
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion

@ -31,6 +31,12 @@
namespace glm{ namespace glm{
namespace detail namespace detail
{ {
template <typename T>
GLM_FUNC_QUALIFIER typename tquat<T>::size_type tquat<T>::length() const
{
return 4;
}
template <typename T> template <typename T>
GLM_FUNC_QUALIFIER tquat<T>::tquat() : GLM_FUNC_QUALIFIER tquat<T>::tquat() :
x(0), x(0),
@ -494,6 +500,15 @@ namespace detail
//return gtc::quaternion::cross(q, detail::tquat<T>(cos(AngleRad * T(0.5)), Tmp.x * fSin, Tmp.y * fSin, Tmp.z * fSin)); //return gtc::quaternion::cross(q, detail::tquat<T>(cos(AngleRad * T(0.5)), Tmp.x * fSin, Tmp.y * fSin, Tmp.z * fSin));
} }
template <typename T>
GLM_FUNC_QUALIFIER detail::tvec3<T> eulerAngles
(
detail::tquat<T> const & x
)
{
return detail::tvec3<T>(pitch(x), yaw(x), roll(x));
}
template <typename T> template <typename T>
GLM_FUNC_QUALIFIER detail::tmat3x3<T> mat3_cast GLM_FUNC_QUALIFIER detail::tmat3x3<T> mat3_cast
( (

@ -177,12 +177,6 @@ namespace glm
valType yaw( valType yaw(
detail::tquat<valType> const & x); detail::tquat<valType> const & x);
//! Returns euler angles, yitch as x, yaw as y, roll as z.
//! From GLM_GTX_quaternion extension.
template <typename valType>
detail::tvec3<valType> eulerAngles(
detail::tquat<valType> const & x);
//! Converts a quaternion to a 3 * 3 matrix. //! Converts a quaternion to a 3 * 3 matrix.
//! From GLM_GTX_quaternion extension. //! From GLM_GTX_quaternion extension.
template <typename valType> template <typename valType>

@ -234,15 +234,6 @@ namespace glm
return glm::degrees(asin(valType(-2) * (q.x * q.z - q.w * q.y))); return glm::degrees(asin(valType(-2) * (q.x * q.z - q.w * q.y)));
} }
template <typename valType>
GLM_FUNC_QUALIFIER detail::tvec3<valType> eulerAngles
(
detail::tquat<valType> const & x
)
{
return detail::tvec3<valType>(pitch(x), yaw(x), roll(x));
}
template <typename T> template <typename T>
GLM_FUNC_QUALIFIER detail::tquat<T> shortMix GLM_FUNC_QUALIFIER detail::tquat<T> shortMix
( (

@ -181,7 +181,9 @@ void test_mulD(std::vector<glm::mat4> const & Data, std::vector<glm::mat4> & Out
{ {
_mm_prefetch((char*)&Data[i + 1], _MM_HINT_T0); _mm_prefetch((char*)&Data[i + 1], _MM_HINT_T0);
glm::simdMat4 m(Data[i]); glm::simdMat4 m(Data[i]);
glm::detail::sse_mul_ps((__m128 const * const)&m, (__m128 const * const)&m, (__m128*)&Out[i]); glm::simdMat4 o;
glm::detail::sse_mul_ps((__m128 const * const)&m, (__m128 const * const)&m, (__m128*)&o);
Out[i] = *(glm::mat4*)&o;
} }
std::clock_t TimeEnd = clock(); std::clock_t TimeEnd = clock();

Loading…
Cancel
Save