Fixed quatLookAt #659

master
Christophe Riccio ago%!(EXTRA string=8 years)
parent 950d226154
commit 6c70e74f3c
  1. 12
      glm/gtx/quaternion.hpp
  2. 6
      glm/gtx/quaternion.inl

@ -189,8 +189,8 @@ namespace glm
/// @param up Up vector, how the camera is oriented. Typically (0, 1, 0). /// @param up Up vector, how the camera is oriented. Typically (0, 1, 0).
template<typename T, precision P> template<typename T, precision P>
GLM_FUNC_DECL tquat<T, P> quatLookAt( GLM_FUNC_DECL tquat<T, P> quatLookAt(
tvec3<T, P> const & direction, vec<3, T, P> const& direction,
tvec3<T, P> const & up); vec<3, T, P> const& up);
/// Build a right-handed look at quaternion. /// Build a right-handed look at quaternion.
/// ///
@ -198,8 +198,8 @@ namespace glm
/// @param up Up vector, how the camera is oriented. Typically (0, 1, 0). /// @param up Up vector, how the camera is oriented. Typically (0, 1, 0).
template<typename T, precision P> template<typename T, precision P>
GLM_FUNC_DECL tquat<T, P> quatLookAtRH( GLM_FUNC_DECL tquat<T, P> quatLookAtRH(
tvec3<T, P> const & direction, vec<3, T, P> const& direction,
tvec3<T, P> const & up); vec<3, T, P> const& up);
/// Build a left-handed look at quaternion. /// Build a left-handed look at quaternion.
/// ///
@ -208,8 +208,8 @@ namespace glm
/// @param up Up vector, how the camera is oriented. Typically (0, 1, 0). /// @param up Up vector, how the camera is oriented. Typically (0, 1, 0).
template<typename T, precision P> template<typename T, precision P>
GLM_FUNC_DECL tquat<T, P> quatLookAtLH( GLM_FUNC_DECL tquat<T, P> quatLookAtLH(
tvec3<T, P> const & direction, vec<3, T, P> const& direction,
tvec3<T, P> const & up); vec<3, T, P> const& up);
/// Returns the squared length of x. /// Returns the squared length of x.
/// ///

@ -216,7 +216,7 @@ namespace glm
} }
template<typename T, precision P> template<typename T, precision P>
GLM_FUNC_QUALIFIER tquat<T, P> quatLookAt(tvec3<T, P> const& direction, tvec3<T, P> const& up) GLM_FUNC_QUALIFIER tquat<T, P> quatLookAt(vec<3, T, P> const& direction, vec<3, T, P> const& up)
{ {
# if GLM_COORDINATE_SYSTEM == GLM_LEFT_HANDED # if GLM_COORDINATE_SYSTEM == GLM_LEFT_HANDED
return quatLookAtLH(direction, up); return quatLookAtLH(direction, up);
@ -226,7 +226,7 @@ namespace glm
} }
template<typename T, precision P> template<typename T, precision P>
GLM_FUNC_QUALIFIER tquat<T, P> quatLookAtRH(tvec3<T, P> const& direction, tvec3<T, P> const& up) GLM_FUNC_QUALIFIER tquat<T, P> quatLookAtRH(vec<3, T, P> const& direction, vec<3, T, P> const& up)
{ {
tmat3x3<T, P> Result; tmat3x3<T, P> Result;
@ -238,7 +238,7 @@ namespace glm
} }
template<typename T, precision P> template<typename T, precision P>
GLM_FUNC_QUALIFIER tquat<T, P> quatLookAtLH(tvec3<T, P> const& direction, tvec3<T, P> const& up) GLM_FUNC_QUALIFIER tquat<T, P> quatLookAtLH(vec<3, T, P> const& direction, vec<3, T, P> const& up)
{ {
tmat3x3<T, P> Result; tmat3x3<T, P> Result;

Loading…
Cancel
Save