diff --git a/include/cglm/euler.h b/include/cglm/euler.h index 358e9bf..d069f10 100644 --- a/include/cglm/euler.h +++ b/include/cglm/euler.h @@ -43,7 +43,46 @@ #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]... diff --git a/include/cglm/handed/euler_to_quat_lh.h b/include/cglm/handed/euler_to_quat_lh.h index 67b5e22..def40c9 100644 --- a/include/cglm/handed/euler_to_quat_lh.h +++ b/include/cglm/handed/euler_to_quat_lh.h @@ -15,6 +15,11 @@ 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 #define cglm_euler_to_quat_lh_h diff --git a/include/cglm/handed/euler_to_quat_rh.h b/include/cglm/handed/euler_to_quat_rh.h index 9782ad1..aeb6f81 100644 --- a/include/cglm/handed/euler_to_quat_rh.h +++ b/include/cglm/handed/euler_to_quat_rh.h @@ -15,6 +15,11 @@ 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 #define cglm_euler_to_quat_rh_h