added comment about rh vs lh zsin

This commit is contained in:
John Choi
2023-12-30 12:06:40 -06:00
parent aa20b8ae7f
commit 1ccd9af866
3 changed files with 50 additions and 1 deletions

View File

@@ -43,7 +43,46 @@
#include "common.h" #include "common.h"
#include "handed/euler_to_quat_rh.h" #ifdef CGLM_FORCE_LEFT_HANDED
# include "handed/euler_to_quat_lh.h"
#else
# include "handed/euler_to_quat_rh.h"
#endif
#ifndef CGLM_CLIPSPACE_INCLUDE_ALL
# if CGLM_CONFIG_CLIP_CONTROL == CGLM_CLIP_CONTROL_LH_ZO
# include "clipspace/ortho_lh_zo.h"
# include "clipspace/persp_lh_zo.h"
# include "clipspace/view_lh_zo.h"
# elif CGLM_CONFIG_CLIP_CONTROL == CGLM_CLIP_CONTROL_LH_NO
# include "clipspace/ortho_lh_no.h"
# include "clipspace/persp_lh_no.h"
# include "clipspace/view_lh_no.h"
# elif CGLM_CONFIG_CLIP_CONTROL == CGLM_CLIP_CONTROL_RH_ZO
# include "clipspace/ortho_rh_zo.h"
# include "clipspace/persp_rh_zo.h"
# include "clipspace/view_rh_zo.h"
# elif CGLM_CONFIG_CLIP_CONTROL == CGLM_CLIP_CONTROL_RH_NO
# include "clipspace/ortho_rh_no.h"
# include "clipspace/persp_rh_no.h"
# include "clipspace/view_rh_no.h"
# endif
#else
# include "clipspace/ortho_lh_zo.h"
# include "clipspace/persp_lh_zo.h"
# include "clipspace/ortho_lh_no.h"
# include "clipspace/persp_lh_no.h"
# include "clipspace/ortho_rh_zo.h"
# include "clipspace/persp_rh_zo.h"
# include "clipspace/ortho_rh_no.h"
# include "clipspace/persp_rh_no.h"
# include "clipspace/view_lh_zo.h"
# include "clipspace/view_lh_no.h"
# include "clipspace/view_rh_zo.h"
# include "clipspace/view_rh_no.h"
#endif
/*! /*!
* if you have axis order like vec3 orderVec = [0, 1, 2] or [0, 2, 1]... * if you have axis order like vec3 orderVec = [0, 1, 2] or [0, 2, 1]...

View File

@@ -15,6 +15,11 @@
CGLM_INLINE void glm_euler_zyx_quat_lh(vec3 angles, versor dest); CGLM_INLINE void glm_euler_zyx_quat_lh(vec3 angles, versor dest);
*/ */
/*
Things to note:
The only difference between euler to quat rh vs lh is that the zsin part is negative
*/
#ifndef cglm_euler_to_quat_lh_h #ifndef cglm_euler_to_quat_lh_h
#define cglm_euler_to_quat_lh_h #define cglm_euler_to_quat_lh_h

View File

@@ -15,6 +15,11 @@
CGLM_INLINE void glm_euler_zyx_quat_rh(vec3 angles, versor dest); CGLM_INLINE void glm_euler_zyx_quat_rh(vec3 angles, versor dest);
*/ */
/*
Things to note:
The only difference between euler to quat rh vs lh is that the zsin part is negative
*/
#ifndef cglm_euler_to_quat_rh_h #ifndef cglm_euler_to_quat_rh_h
#define cglm_euler_to_quat_rh_h #define cglm_euler_to_quat_rh_h