gtcquaternion (functions)
glm::angle( ... )
T glm::angle(const glm::quat &x=P)Returns the quaternion rotation angle.
See also: gtc_quaternion
glm::angleAxis( ... )
glm::quat glm::angleAxis(const T &angle, const glm::vec3 &axis=P)Build a quaternion from an angle and a normalized axis.
Parameters:
angle Angle expressed in radians.
axis Axis of the quaternion, must be normalized.
See also: gtc_quaternion
glm::axis( ... )
glm::vec3 glm::axis(const glm::quat &x=P)Returns the q rotation axis.
See also: gtc_quaternion
glm::conjugate( ... )
glm::quat glm::conjugate(const glm::quat &q=P)Returns the q conjugate.
See also: gtc_quaternion
glm::eulerAngles( ... )
glm::vec3 glm::eulerAngles(const glm::quat &x=P)Returns euler angles, pitch as x, yaw as y, roll as z. The result is expressed in radians if GLM_FORCE_RADIANS is defined or degrees otherwise.
See also: gtc_quaternion
glm::inverse( ... )
glm::quat glm::inverse(const glm::quat &q=P)Returns the q inverse.
See also: gtc_quaternion
glm::length( ... )
T glm::length(const glm::quat &q=P)Returns the length of the quaternion.
See also: gtc_quaternion
glm::lerp( ... )
glm::quat glm::lerp(const glm::quat &x=P, const glm::quat &y=P, T a)Linear interpolation of two quaternions. The interpolation is oriented.
Parameters:
x A quaternion
y A quaternion
a Interpolation factor. The interpolation is defined in the range [0, 1].
Type parameters:
T Value type used to build the quaternion. Supported: half, float or double.
See also: gtc_quaternion
glm::mat3_cast( ... )
glm::mat3 glm::mat3_cast(const glm::quat &x=P)Converts a quaternion to a 3 * 3 matrix.
See also: gtc_quaternion
glm::mat4_cast( ... )
glm::mat4 glm::mat4_cast(const glm::quat &x=P)Converts a quaternion to a 4 * 4 matrix.
See also: gtc_quaternion
glm::mix( ... )
glm::quat glm::mix(const glm::quat &x=P, const glm::quat &y=P, T a)glm::normalize( ... )
glm::quat glm::normalize(const glm::quat &q=P)Returns the normalized quaternion.
See also: gtc_quaternion
glm::pitch( ... )
T glm::pitch(const glm::quat &x=P)Returns pitch value of euler angles expressed in radians.
See also: gtx_quaternion
glm::quat_cast( ... )
glm::quat glm::quat_cast(const glm::mat3 &x=P)Converts a 3 * 3 matrix to a quaternion.
See also: gtc_quaternion
glm::quat_cast( ... )
glm::quat glm::quat_cast(const glm::mat4 &x=P)Converts a 4 * 4 matrix to a quaternion.
See also: gtc_quaternion
glm::roll( ... )
T glm::roll(const glm::quat &x=P)Returns roll value of euler angles expressed in radians.
See also: gtx_quaternion
glm::rotate( ... )
glm::quat glm::rotate(const glm::quat &q=P, const T &angle, const glm::vec3 &axis=P)Rotates a quaternion from a vector of 3 components axis and an angle.
Parameters:
q Source orientation
angle Angle expressed in radians.
axis Axis of the rotation
See also: gtc_quaternion
glm::slerp( ... )
glm::quat glm::slerp(const glm::quat &x=P, const glm::quat &y=P, T a)Spherical linear interpolation of two quaternions. The interpolation always take the short path and the rotation is performed at constant speed.
Parameters:
x A quaternion
y A quaternion
a Interpolation factor. The interpolation is defined beyond the range [0, 1].
Type parameters:
T Value type used to build the quaternion. Supported: half, float or double.
See also: gtc_quaternion
glm::yaw( ... )
T glm::yaw(const glm::quat &x=P)Returns yaw value of euler angles expressed in radians.
See also: gtx_quaternion