From a94861dd5d51d01aecc994443dcdbc8e1cf46bdb Mon Sep 17 00:00:00 2001 From: John Choi Date: Thu, 28 Dec 2023 09:21:05 -0600 Subject: [PATCH] cleaned up documentation for euler to quat functions and also created the lh file. Made a handed struct file so I remember to do that --- include/cglm/handed/euler_to_quat_lh.h | 100 +++++++++++++++++++++++ include/cglm/handed/euler_to_quat_rh.h | 24 +++--- include/cglm/struct/handed/TODO THIS.txt | 0 3 files changed, 112 insertions(+), 12 deletions(-) create mode 100644 include/cglm/handed/euler_to_quat_lh.h create mode 100644 include/cglm/struct/handed/TODO THIS.txt diff --git a/include/cglm/handed/euler_to_quat_lh.h b/include/cglm/handed/euler_to_quat_lh.h new file mode 100644 index 000000000..2b683d7ed --- /dev/null +++ b/include/cglm/handed/euler_to_quat_lh.h @@ -0,0 +1,100 @@ +/* + * Copyright (c), Recep Aslantas. + * + * MIT License (MIT), http://opensource.org/licenses/MIT + * Full license can be found in the LICENSE file + */ + +/* + Functions: + CGLM_INLINE void glm_euler_xyz_quat_lh(vec3 angles, versor dest); + CGLM_INLINE void glm_euler_xzy_quat_lh(vec3 angles, versor dest); + CGLM_INLINE void glm_euler_yxz_quat_lh(vec3 angles, versor dest); + CGLM_INLINE void glm_euler_yzx_quat_lh(vec3 angles, versor dest); + CGLM_INLINE void glm_euler_zxy_quat_lh(vec3 angles, versor dest); + CGLM_INLINE void glm_euler_zyx_quat_lh(vec3 angles, versor dest); + */ + +#ifndef cglm_euler_to_quat_lh_h +#define cglm_euler_to_quat_lh_h + +#include "../common.h" + + +/*! + * @brief creates NEW quaternion using rotation angles and does + * rotations in x y z order in left hand (roll pitch yaw) + * + * @param[in] angles angles x y z (radians) + * @param[out] dest quaternion + */ +CGLM_INLINE +void +glm_euler_xyz_quat_lh(vec3 angles, versor dest) { +} + +/*! + * @brief creates NEW quaternion using rotation angles and does + * rotations in x z y order in left hand (roll yaw pitch) + * + * @param[in] angles angles x y z (radians) + * @param[out] dest quaternion + */ +CGLM_INLINE +void +glm_euler_xzy_quat_lh(vec3 angles, versor dest) { + +} + +/*! + * @brief creates NEW quaternion using rotation angles and does + * rotations in y x z order in left hand (pitch roll yaw) + * + * @param[in] angles angles x y z (radians) + * @param[out] dest quaternion + */ +CGLM_INLINE +void +glm_euler_yxz_quat_lh(vec3 angles, versor dest) { + +} + +/*! + * @brief creates NEW quaternion using rotation angles and does + * rotations in y z x order in left hand (pitch yaw roll) + * + * @param[in] angles angles x y z (radians) + * @param[out] dest quaternion + */ +CGLM_INLINE +void +glm_euler_yzx_quat_lh(vec3 angles, versor dest) { + +} + +/*! + * @brief creates NEW quaternion using rotation angles and does + * rotations in z x y order in left hand (yaw roll pitch) + * + * @param[in] angles angles x y z (radians) + * @param[out] dest quaternion + */ +CGLM_INLINE +void +glm_euler_zxy_quat_lh(vec3 angles, versor dest) { +} + +/*! + * @brief creates NEW quaternion using rotation angles and does + * rotations in z y x order in left hand (yaw pitch roll) + * + * @param[in] angles angles x y z (radians) + * @param[out] dest quaternion + */ +CGLM_INLINE +void +glm_euler_zyx_quat_lh(vec3 angles, versor dest) { + +} + +#endif /*cglm_euler_to_quat_lh_h*/ \ No newline at end of file diff --git a/include/cglm/handed/euler_to_quat_rh.h b/include/cglm/handed/euler_to_quat_rh.h index b65108c96..9782ad154 100644 --- a/include/cglm/handed/euler_to_quat_rh.h +++ b/include/cglm/handed/euler_to_quat_rh.h @@ -24,8 +24,8 @@ * @brief creates NEW quaternion using rotation angles and does * rotations in x y z order in right hand (roll pitch yaw) * - * @param[out] q quaternion - * @param[in] angle angles x y z (radians) + * @param[in] angles angles x y z (radians) + * @param[out] dest quaternion */ CGLM_INLINE void @@ -48,8 +48,8 @@ glm_euler_xyz_quat_rh(vec3 angles, versor dest) { * @brief creates NEW quaternion using rotation angles and does * rotations in x z y order in right hand (roll yaw pitch) * - * @param[out] q quaternion - * @param[in] angle angles x y z (radians) + * @param[in] angles angles x y z (radians) + * @param[out] dest quaternion */ CGLM_INLINE void @@ -72,8 +72,8 @@ glm_euler_xzy_quat_rh(vec3 angles, versor dest) { * @brief creates NEW quaternion using rotation angles and does * rotations in y x z order in right hand (pitch roll yaw) * - * @param[out] q quaternion - * @param[in] angle angles x y z (radians) + * @param[in] angles angles x y z (radians) + * @param[out] dest quaternion */ CGLM_INLINE void @@ -95,8 +95,8 @@ glm_euler_yxz_quat_rh(vec3 angles, versor dest) { * @brief creates NEW quaternion using rotation angles and does * rotations in y z x order in right hand (pitch yaw roll) * - * @param[out] q quaternion - * @param[in] angle angles x y z (radians) + * @param[in] angles angles x y z (radians) + * @param[out] dest quaternion */ CGLM_INLINE void @@ -119,8 +119,8 @@ glm_euler_yzx_quat_rh(vec3 angles, versor dest) { * @brief creates NEW quaternion using rotation angles and does * rotations in z x y order in right hand (yaw roll pitch) * - * @param[out] q quaternion - * @param[in] angle angles x y z (radians) + * @param[in] angles angles x y z (radians) + * @param[out] dest quaternion */ CGLM_INLINE void @@ -142,8 +142,8 @@ glm_euler_zxy_quat_rh(vec3 angles, versor dest) { * @brief creates NEW quaternion using rotation angles and does * rotations in z y x order in right hand (yaw pitch roll) * - * @param[out] q quaternion - * @param[in] angle angles x y z (radians) + * @param[in] angles angles x y z (radians) + * @param[out] dest quaternion */ CGLM_INLINE void diff --git a/include/cglm/struct/handed/TODO THIS.txt b/include/cglm/struct/handed/TODO THIS.txt new file mode 100644 index 000000000..e69de29bb