global functions
- glm::angle()
- glm::angleAxis()
- glm::axis()
- glm::conjugate()
- glm::dot()
- glm::equal()
- glm::eulerAngles()
- glm::greaterThan()
- glm::greaterThanEqual()
- glm::inverse()
- glm::isinf()
- glm::isnan()
- glm::length()
- glm::lerp()
- glm::lessThan()
- glm::lessThanEqual()
- glm::mat3_cast()
- glm::mat4_cast()
- glm::mix()
- glm::normalize()
- glm::notEqual()
- glm::pitch()
- glm::quat_cast()
- glm::roll()
- glm::rotate()
- glm::slerp()
- glm::yaw()
glm::angle(...)
T glm::angle(const glm::quat &x=P)
Documentation from code comments
Returns the quaternion rotation angle.
See also: gtc_quaternion
glm::angleAxis(...)
glm::quat glm::angleAxis(const T &angle, const glm::vec3 &axis=P)
Documentation from code comments
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)
Documentation from code comments
Returns the q rotation axis.
See also: gtc_quaternion
glm::conjugate(...)
glm::quat glm::conjugate(const glm::quat &q=P)
Documentation from code comments
Returns the q conjugate.
See also: gtc_quaternion
glm::dot(...)
T glm::dot(const quatType< T, P > &x=P, const quatType< T, P > &y=P)
Documentation from code comments
Returns dot product of q1 and q2, i.e., q1[0] * q2[0] + q1[1] * q2[1] + ...
See also: gtc_quaternion
glm::equal(...)
tvec4< bool, P > glm::equal(const glm::quat &x=P, const glm::quat &y=P)
Documentation from code comments
Returns the component-wise comparison of result x == y.
Type parameters:
quatType Floating-point quaternion types.
See also: gtc_quaternion
glm::eulerAngles(...)
glm::vec3 glm::eulerAngles(const glm::quat &x=P)
Documentation from code comments
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::greaterThan(...)
tvec4< bool, P > glm::greaterThan(const glm::quat &x=P, const glm::quat &y=P)
Documentation from code comments
Returns the component-wise comparison of result x > y.
Type parameters:
quatType Floating-point quaternion types.
See also: gtc_quaternion
glm::greaterThanEqual(...)
tvec4< bool, P > glm::greaterThanEqual(const glm::quat &x=P, const glm::quat &y=P)
Documentation from code comments
Returns the component-wise comparison of result x >= y.
Type parameters:
quatType Floating-point quaternion types.
See also: gtc_quaternion
glm::inverse(...)
glm::quat glm::inverse(const glm::quat &q=P)
Documentation from code comments
Returns the q inverse.
See also: gtc_quaternion
glm::isinf(...)
tvec4< bool, P > glm::isinf(const glm::quat &x=P)
Documentation from code comments
Returns true if x holds a positive infinity or negative infinity representation in the underlying implementation's set of floating point representations. Returns false otherwise, including for implementations with no infinity representations.
Type parameters:
genType Floating-point scalar or vector types.
glm::isnan(...)
tvec4< bool, P > glm::isnan(const glm::quat &x=P)
Documentation from code comments
Returns true if x holds a NaN (not a number) representation in the underlying implementation's set of floating point representations. Returns false otherwise, including for implementations with no NaN representations.
/!\ When using compiler fast math, this function may fail.
Type parameters:
genType Floating-point scalar or vector types.
glm::length(...)
T glm::length(const glm::quat &q=P)
Documentation from code comments
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)
Documentation from code comments
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::lessThan(...)
tvec4< bool, P > glm::lessThan(const glm::quat &x=P, const glm::quat &y=P)
Documentation from code comments
Returns the component-wise comparison result of x < y.
Type parameters:
quatType Floating-point quaternion types.
See also: gtc_quaternion
glm::lessThanEqual(...)
tvec4< bool, P > glm::lessThanEqual(const glm::quat &x=P, const glm::quat &y=P)
Documentation from code comments
Returns the component-wise comparison of result x <= y.
Type parameters:
quatType Floating-point quaternion types.
See also: gtc_quaternion
glm::mat3_cast(...)
glm::mat3 glm::mat3_cast(const glm::quat &x=P)
Documentation from code comments
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)
Documentation from code comments
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)
Documentation from code comments
Spherical linear interpolation of two quaternions. The interpolation is oriented and the rotation is performed at constant speed. For short path spherical linear interpolation, use the slerp function.
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
See also: - slerp(tquat
glm::normalize(...)
glm::quat glm::normalize(const glm::quat &q=P)
Documentation from code comments
Returns the normalized quaternion.
See also: gtc_quaternion
glm::notEqual(...)
tvec4< bool, P > glm::notEqual(const glm::quat &x=P, const glm::quat &y=P)
Documentation from code comments
Returns the component-wise comparison of result x != y.
Type parameters:
quatType Floating-point quaternion types.
See also: gtc_quaternion
glm::pitch(...)
T glm::pitch(const glm::quat &x=P)
Documentation from code comments
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)
Documentation from code comments
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)
Documentation from code comments
Converts a 4 * 4 matrix to a quaternion.
See also: gtc_quaternion
glm::roll(...)
T glm::roll(const glm::quat &x=P)
Documentation from code comments
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)
Documentation from code comments
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)
Documentation from code comments
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)
Documentation from code comments
Returns yaw value of euler angles expressed in radians.
See also: gtx_quaternion
Last updated 星期二, 19 十一月 2024 17:25:56 UTC - 2537ee49f6d46d5fe98e408849448314fd1f180e
If you have any doubt about the usage of this module you can ask in the forum.
If you want to contribute better documentation or start documenting this section you can do so here
If you find anything wrong with this docs you can report any error by opening an issue