FlukyEngine
Functions
GLM_GTC_quaternion

Include <glm/gtc/quaternion.hpp> to use the features of this extension. More...

Collaboration diagram for GLM_GTC_quaternion:

Functions

template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > glm::eulerAngles (qua< T, Q > const &x)
 Returns euler angles, pitch as x, yaw as y, roll as z. More...
 
template<typename T , qualifier Q>
GLM_FUNC_DECL T glm::roll (qua< T, Q > const &x)
 Returns roll value of euler angles expressed in radians. More...
 
template<typename T , qualifier Q>
GLM_FUNC_DECL T glm::pitch (qua< T, Q > const &x)
 Returns pitch value of euler angles expressed in radians. More...
 
template<typename T , qualifier Q>
GLM_FUNC_DECL T glm::yaw (qua< T, Q > const &x)
 Returns yaw value of euler angles expressed in radians. More...
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 3, 3, T, Q > glm::mat3_cast (qua< T, Q > const &x)
 Converts a quaternion to a 3 * 3 matrix. More...
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 4, T, Q > glm::mat4_cast (qua< T, Q > const &x)
 Converts a quaternion to a 4 * 4 matrix. More...
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > glm::quat_cast (mat< 3, 3, T, Q > const &x)
 Converts a pure rotation 3 * 3 matrix to a quaternion. More...
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > glm::quat_cast (mat< 4, 4, T, Q > const &x)
 Converts a pure rotation 4 * 4 matrix to a quaternion. More...
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 4, bool, Q > glm::lessThan (qua< T, Q > const &x, qua< T, Q > const &y)
 Returns the component-wise comparison result of x < y. More...
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 4, bool, Q > glm::lessThanEqual (qua< T, Q > const &x, qua< T, Q > const &y)
 Returns the component-wise comparison of result x <= y. More...
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 4, bool, Q > glm::greaterThan (qua< T, Q > const &x, qua< T, Q > const &y)
 Returns the component-wise comparison of result x > y. More...
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 4, bool, Q > glm::greaterThanEqual (qua< T, Q > const &x, qua< T, Q > const &y)
 Returns the component-wise comparison of result x >= y. More...
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > glm::quatLookAt (vec< 3, T, Q > const &direction, vec< 3, T, Q > const &up)
 Build a look at quaternion based on the default handedness. More...
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > glm::quatLookAtRH (vec< 3, T, Q > const &direction, vec< 3, T, Q > const &up)
 Build a right-handed look at quaternion. More...
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > glm::quatLookAtLH (vec< 3, T, Q > const &direction, vec< 3, T, Q > const &up)
 Build a left-handed look at quaternion. More...
 

Detailed Description

Include <glm/gtc/quaternion.hpp> to use the features of this extension.

Defines a templated quaternion type and several quaternion operations.

Function Documentation

◆ eulerAngles()

template<typename T , qualifier Q>
GLM_FUNC_DECL vec<3, T, Q> glm::eulerAngles ( qua< T, Q > const &  x)

Returns euler angles, pitch as x, yaw as y, roll as z.

The result is expressed in radians.

Template Parameters
TFloating-point scalar types.
See also
GLM_GTC_quaternion

◆ greaterThan()

template<typename T , qualifier Q>
GLM_FUNC_DECL vec<4, bool, Q> glm::greaterThan ( qua< T, Q > const &  x,
qua< T, Q > const &  y 
)

Returns the component-wise comparison of result x > y.

Template Parameters
TFloating-point scalar types
QValue from qualifier enum
See also
GLM_EXT_quaternion_relational

◆ greaterThanEqual()

template<typename T , qualifier Q>
GLM_FUNC_DECL vec<4, bool, Q> glm::greaterThanEqual ( qua< T, Q > const &  x,
qua< T, Q > const &  y 
)

Returns the component-wise comparison of result x >= y.

Template Parameters
TFloating-point scalar types
QValue from qualifier enum
See also
GLM_EXT_quaternion_relational

◆ lessThan()

template<typename T , qualifier Q>
GLM_FUNC_DECL vec<4, bool, Q> glm::lessThan ( qua< T, Q > const &  x,
qua< T, Q > const &  y 
)

Returns the component-wise comparison result of x < y.

Template Parameters
TFloating-point scalar types
QValue from qualifier enum
See also
GLM_EXT_quaternion_relational

◆ lessThanEqual()

template<typename T , qualifier Q>
GLM_FUNC_DECL vec<4, bool, Q> glm::lessThanEqual ( qua< T, Q > const &  x,
qua< T, Q > const &  y 
)

Returns the component-wise comparison of result x <= y.

Template Parameters
TFloating-point scalar types
QValue from qualifier enum
See also
GLM_EXT_quaternion_relational

◆ mat3_cast()

template<typename T , qualifier Q>
GLM_FUNC_DECL mat<3, 3, T, Q> glm::mat3_cast ( qua< T, Q > const &  x)

Converts a quaternion to a 3 * 3 matrix.

Template Parameters
TFloating-point scalar types.
See also
GLM_GTC_quaternion

◆ mat4_cast()

template<typename T , qualifier Q>
GLM_FUNC_DECL mat<4, 4, T, Q> glm::mat4_cast ( qua< T, Q > const &  x)

Converts a quaternion to a 4 * 4 matrix.

Template Parameters
TFloating-point scalar types.
See also
GLM_GTC_quaternion

◆ pitch()

template<typename T , qualifier Q>
GLM_FUNC_DECL T glm::pitch ( qua< T, Q > const &  x)

Returns pitch value of euler angles expressed in radians.

Template Parameters
TFloating-point scalar types.
See also
GLM_GTC_quaternion

◆ quat_cast() [1/2]

template<typename T , qualifier Q>
GLM_FUNC_DECL qua<T, Q> glm::quat_cast ( mat< 3, 3, T, Q > const &  x)

Converts a pure rotation 3 * 3 matrix to a quaternion.

Template Parameters
TFloating-point scalar types.
See also
GLM_GTC_quaternion

◆ quat_cast() [2/2]

template<typename T , qualifier Q>
GLM_FUNC_DECL qua<T, Q> glm::quat_cast ( mat< 4, 4, T, Q > const &  x)

Converts a pure rotation 4 * 4 matrix to a quaternion.

Template Parameters
TFloating-point scalar types.
See also
GLM_GTC_quaternion

◆ quatLookAt()

template<typename T , qualifier Q>
GLM_FUNC_DECL qua<T, Q> glm::quatLookAt ( vec< 3, T, Q > const &  direction,
vec< 3, T, Q > const &  up 
)

Build a look at quaternion based on the default handedness.

Parameters
directionDesired forward direction. Needs to be normalized.
upUp vector, how the camera is oriented. Typically (0, 1, 0).

◆ quatLookAtLH()

template<typename T , qualifier Q>
GLM_FUNC_DECL qua<T, Q> glm::quatLookAtLH ( vec< 3, T, Q > const &  direction,
vec< 3, T, Q > const &  up 
)

Build a left-handed look at quaternion.

Parameters
directionDesired forward direction onto which the +z-axis gets mapped. Needs to be normalized.
upUp vector, how the camera is oriented. Typically (0, 1, 0).

◆ quatLookAtRH()

template<typename T , qualifier Q>
GLM_FUNC_DECL qua<T, Q> glm::quatLookAtRH ( vec< 3, T, Q > const &  direction,
vec< 3, T, Q > const &  up 
)

Build a right-handed look at quaternion.

Parameters
directionDesired forward direction onto which the -z-axis gets mapped. Needs to be normalized.
upUp vector, how the camera is oriented. Typically (0, 1, 0).

◆ roll()

template<typename T , qualifier Q>
GLM_FUNC_DECL T glm::roll ( qua< T, Q > const &  x)

Returns roll value of euler angles expressed in radians.

Template Parameters
TFloating-point scalar types.
See also
GLM_GTC_quaternion

◆ yaw()

template<typename T , qualifier Q>
GLM_FUNC_DECL T glm::yaw ( qua< T, Q > const &  x)

Returns yaw value of euler angles expressed in radians.

Template Parameters
TFloating-point scalar types.
See also
GLM_GTC_quaternion