|
|
@@ -177,6 +177,34 @@ namespace glm
|
|
|
vec<3, T, P> const & orig,
|
|
|
vec<3, T, P> const & dest);
|
|
|
|
|
|
+ /// Build a look at quaternion based on the default handedness.
|
|
|
+ ///
|
|
|
+ /// @param direction Desired direction of the camera.
|
|
|
+ /// @param up Up vector, how the camera is oriented.. Typically (0, 0, 1).
|
|
|
+ template<typename T, precision P>
|
|
|
+ GLM_FUNC_DECL tquat<T, P> quatLookAt(
|
|
|
+ tvec3<T, P> const & direction,
|
|
|
+ tvec3<T, P> const & up);
|
|
|
+
|
|
|
+ /// Build a right-handed look at quaternion.
|
|
|
+ ///
|
|
|
+ /// @param direction Desired direction of the camera.
|
|
|
+ /// @param up Up vector, how the camera is oriented. Typically (0, 0, 1).
|
|
|
+ template<typename T, precision P>
|
|
|
+ GLM_FUNC_DECL tquat<T, P> quatLookAtRH(
|
|
|
+ tvec3<T, P> const & direction,
|
|
|
+ tvec3<T, P> const & up);
|
|
|
+
|
|
|
+ /// Build a left-handed look at quaternion.
|
|
|
+ ///
|
|
|
+ /// @param eye Position of the camera
|
|
|
+ /// @param direction Desired direction onto which the +z-axis gets mapped
|
|
|
+ /// @param up Up vector, how the camera is oriented. Typically (0, 0, 1).
|
|
|
+ template <typename T, precision P>
|
|
|
+ GLM_FUNC_DECL tquat<T, P> quatLookAtLH(
|
|
|
+ tvec3<T, P> const & direction,
|
|
|
+ tvec3<T, P> const & up);
|
|
|
+
|
|
|
/// Returns the squared length of x.
|
|
|
///
|
|
|
/// @see gtx_quaternion
|