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

This commit is contained in:
John Choi
2023-12-28 09:21:05 -06:00
parent d820410435
commit a94861dd5d
3 changed files with 112 additions and 12 deletions

View File

@@ -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*/

View File

@@ -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

View File