From 23d03ffe6c6c29dc74b2647b4dd9d986c8d2f678 Mon Sep 17 00:00:00 2001 From: Valeri Ochinski Date: Fri, 8 Dec 2023 10:14:43 +0300 Subject: [PATCH] Fix struct clipspace headers Add missing includes, fix signatures --- include/cglm/struct/clipspace/ortho_lh_no.h | 2 ++ include/cglm/struct/clipspace/ortho_lh_zo.h | 2 ++ include/cglm/struct/clipspace/ortho_rh_no.h | 2 ++ include/cglm/struct/clipspace/ortho_rh_zo.h | 2 ++ include/cglm/struct/clipspace/persp_lh_no.h | 1 + include/cglm/struct/clipspace/persp_lh_zo.h | 1 + include/cglm/struct/clipspace/persp_rh_no.h | 1 + include/cglm/struct/clipspace/persp_rh_zo.h | 1 + include/cglm/struct/clipspace/project_no.h | 12 +++++++----- include/cglm/struct/clipspace/project_zo.h | 12 +++++++----- include/cglm/struct/clipspace/view_lh_no.h | 1 + include/cglm/struct/clipspace/view_lh_zo.h | 1 + include/cglm/struct/clipspace/view_rh_no.h | 1 + include/cglm/struct/clipspace/view_rh_zo.h | 1 + 14 files changed, 30 insertions(+), 10 deletions(-) diff --git a/include/cglm/struct/clipspace/ortho_lh_no.h b/include/cglm/struct/clipspace/ortho_lh_no.h index 4060e59..a743fdf 100644 --- a/include/cglm/struct/clipspace/ortho_lh_no.h +++ b/include/cglm/struct/clipspace/ortho_lh_no.h @@ -24,6 +24,8 @@ #include "../../types-struct.h" #include "../../plane.h" #include "../../cam.h" +#include "../vec3.h" +#include "../../clipspace/ortho_lh_no.h" /*! * @brief set up orthographic projection matrix diff --git a/include/cglm/struct/clipspace/ortho_lh_zo.h b/include/cglm/struct/clipspace/ortho_lh_zo.h index b39a160..4f15656 100644 --- a/include/cglm/struct/clipspace/ortho_lh_zo.h +++ b/include/cglm/struct/clipspace/ortho_lh_zo.h @@ -24,6 +24,8 @@ #include "../../types-struct.h" #include "../../plane.h" #include "../../cam.h" +#include "../vec3.h" +#include "../../clipspace/ortho_lh_zo.h" /*! * @brief set up orthographic projection matrix diff --git a/include/cglm/struct/clipspace/ortho_rh_no.h b/include/cglm/struct/clipspace/ortho_rh_no.h index ab491af..ecb4d32 100644 --- a/include/cglm/struct/clipspace/ortho_rh_no.h +++ b/include/cglm/struct/clipspace/ortho_rh_no.h @@ -24,6 +24,8 @@ #include "../../types-struct.h" #include "../../plane.h" #include "../../cam.h" +#include "../vec3.h" +#include "../../clipspace/ortho_rh_no.h" /*! * @brief set up orthographic projection matrix diff --git a/include/cglm/struct/clipspace/ortho_rh_zo.h b/include/cglm/struct/clipspace/ortho_rh_zo.h index 22848d9..2d50ee1 100644 --- a/include/cglm/struct/clipspace/ortho_rh_zo.h +++ b/include/cglm/struct/clipspace/ortho_rh_zo.h @@ -24,6 +24,8 @@ #include "../../types-struct.h" #include "../../plane.h" #include "../../cam.h" +#include "../vec3.h" +#include "../../clipspace/ortho_rh_zo.h" /*! * @brief set up orthographic projection matrix diff --git a/include/cglm/struct/clipspace/persp_lh_no.h b/include/cglm/struct/clipspace/persp_lh_no.h index f31c4b2..fd3128c 100644 --- a/include/cglm/struct/clipspace/persp_lh_no.h +++ b/include/cglm/struct/clipspace/persp_lh_no.h @@ -39,6 +39,7 @@ #include "../../types-struct.h" #include "../../plane.h" #include "../../cam.h" +#include "../../clipspace/persp_lh_no.h" /*! * @brief set up perspective peprojection matrix diff --git a/include/cglm/struct/clipspace/persp_lh_zo.h b/include/cglm/struct/clipspace/persp_lh_zo.h index 52f1cc7..c3ade3d 100644 --- a/include/cglm/struct/clipspace/persp_lh_zo.h +++ b/include/cglm/struct/clipspace/persp_lh_zo.h @@ -39,6 +39,7 @@ #include "../../types-struct.h" #include "../../plane.h" #include "../../cam.h" +#include "../../clipspace/persp_lh_zo.h" /*! * @brief set up perspective peprojection matrix diff --git a/include/cglm/struct/clipspace/persp_rh_no.h b/include/cglm/struct/clipspace/persp_rh_no.h index d382bcf..5d34b90 100644 --- a/include/cglm/struct/clipspace/persp_rh_no.h +++ b/include/cglm/struct/clipspace/persp_rh_no.h @@ -39,6 +39,7 @@ #include "../../types-struct.h" #include "../../plane.h" #include "../../cam.h" +#include "../../clipspace/persp_rh_no.h" /*! * @brief set up perspective peprojection matrix diff --git a/include/cglm/struct/clipspace/persp_rh_zo.h b/include/cglm/struct/clipspace/persp_rh_zo.h index ca14402..2f98a31 100644 --- a/include/cglm/struct/clipspace/persp_rh_zo.h +++ b/include/cglm/struct/clipspace/persp_rh_zo.h @@ -39,6 +39,7 @@ #include "../../types-struct.h" #include "../../plane.h" #include "../../cam.h" +#include "../../clipspace/persp_rh_zo.h" /*! * @brief set up perspective peprojection matrix diff --git a/include/cglm/struct/clipspace/project_no.h b/include/cglm/struct/clipspace/project_no.h index a12fb61..1a28d47 100644 --- a/include/cglm/struct/clipspace/project_no.h +++ b/include/cglm/struct/clipspace/project_no.h @@ -7,8 +7,9 @@ /* Functions: - CGLM_INLINE vec3s glms_unprojecti_no(vec3s pos, mat4s invMat, vec4s vp, vec3 dest) - CGLM_INLINE vec3s glms_project_no(vec3s pos, mat4s m, vec4s vp, vec3s dest) + CGLM_INLINE vec3s glms_unprojecti_no(vec3s pos, mat4s invMat, vec4s vp) + CGLM_INLINE vec3s glms_project_no(vec3s pos, mat4s m, vec4s vp) + CGLM_INLINE float glms_project_z_no(vec3s v, mat4s m) */ #ifndef cglms_project_no_h @@ -18,6 +19,7 @@ #include "../../types-struct.h" #include "../../plane.h" #include "../../cam.h" +#include "../../clipspace/project_no.h" /*! * @brief maps the specified viewport coordinates into specified space [1] @@ -48,7 +50,7 @@ */ CGLM_INLINE vec3s -glms_unprojecti_no(vec3s pos, mat4s invMat, vec4s vp, vec3 dest) { +glms_unprojecti_no(vec3s pos, mat4s invMat, vec4s vp) { vec3s dest; glm_unprojecti_no(pos.raw, invMat.raw, vp.raw, dest.raw); return dest; @@ -69,7 +71,7 @@ glms_unprojecti_no(vec3s pos, mat4s invMat, vec4s vp, vec3 dest) { */ CGLM_INLINE vec3s -glms_project_no(vec3s pos, mat4s m, vec4s vp, vec3s dest) { +glms_project_no(vec3s pos, mat4s m, vec4s vp) { vec3s dest; glm_project_no(pos.raw, m.raw, vp.raw, dest.raw); return dest; @@ -88,7 +90,7 @@ glms_project_no(vec3s pos, mat4s m, vec4s vp, vec3s dest) { * @returns projected z coordinate */ CGLM_INLINE -vec3s +float glms_project_z_no(vec3s v, mat4s m) { return glm_project_z_no(v.raw, m.raw); } diff --git a/include/cglm/struct/clipspace/project_zo.h b/include/cglm/struct/clipspace/project_zo.h index c510396..13065f1 100644 --- a/include/cglm/struct/clipspace/project_zo.h +++ b/include/cglm/struct/clipspace/project_zo.h @@ -7,8 +7,9 @@ /* Functions: - CGLM_INLINE vec3s glms_unprojecti_no(vec3s pos, mat4s invMat, vec4s vp, vec3 dest) - CGLM_INLINE vec3s glms_project_no(vec3s pos, mat4s m, vec4s vp, vec3s dest) + CGLM_INLINE vec3s glms_unprojecti_no(vec3s pos, mat4s invMat, vec4s vp) + CGLM_INLINE vec3s glms_project_no(vec3s pos, mat4s m, vec4s vp) + CGLM_INLINE float glms_project_z_zo(vec3s v, mat4s m) */ #ifndef cglms_project_zo_h @@ -18,6 +19,7 @@ #include "../../types-struct.h" #include "../../plane.h" #include "../../cam.h" +#include "../../clipspace/project_zo.h" /*! * @brief maps the specified viewport coordinates into specified space [1] @@ -48,7 +50,7 @@ */ CGLM_INLINE vec3s -glms_unprojecti_zo(vec3s pos, mat4s invMat, vec4s vp, vec3 dest) { +glms_unprojecti_zo(vec3s pos, mat4s invMat, vec4s vp) { vec3s dest; glm_unprojecti_zo(pos.raw, invMat.raw, vp.raw, dest.raw); return dest; @@ -69,7 +71,7 @@ glms_unprojecti_zo(vec3s pos, mat4s invMat, vec4s vp, vec3 dest) { */ CGLM_INLINE vec3s -glms_project_zo(vec3s pos, mat4s m, vec4s vp, vec3 dest) { +glms_project_zo(vec3s pos, mat4s m, vec4s vp) { vec3s dest; glm_project_zo(pos.raw, m.raw, vp.raw, dest.raw); return dest; @@ -88,7 +90,7 @@ glms_project_zo(vec3s pos, mat4s m, vec4s vp, vec3 dest) { * @returns projected z coordinate */ CGLM_INLINE -vec3s +float glms_project_z_zo(vec3s v, mat4s m) { return glm_project_z_zo(v.raw, m.raw); } diff --git a/include/cglm/struct/clipspace/view_lh_no.h b/include/cglm/struct/clipspace/view_lh_no.h index cd8b5d9..e4ca5ba 100644 --- a/include/cglm/struct/clipspace/view_lh_no.h +++ b/include/cglm/struct/clipspace/view_lh_no.h @@ -19,6 +19,7 @@ #include "../../types-struct.h" #include "../../plane.h" #include "../../cam.h" +#include "../../clipspace/view_lh_no.h" /*! * @brief set up view matrix diff --git a/include/cglm/struct/clipspace/view_lh_zo.h b/include/cglm/struct/clipspace/view_lh_zo.h index e2f5f5c..ac1ada9 100644 --- a/include/cglm/struct/clipspace/view_lh_zo.h +++ b/include/cglm/struct/clipspace/view_lh_zo.h @@ -19,6 +19,7 @@ #include "../../types-struct.h" #include "../../plane.h" #include "../../cam.h" +#include "../../clipspace/view_lh_zo.h" /*! * @brief set up view matrix diff --git a/include/cglm/struct/clipspace/view_rh_no.h b/include/cglm/struct/clipspace/view_rh_no.h index e49e735..99b03c3 100644 --- a/include/cglm/struct/clipspace/view_rh_no.h +++ b/include/cglm/struct/clipspace/view_rh_no.h @@ -19,6 +19,7 @@ #include "../../types-struct.h" #include "../../plane.h" #include "../../cam.h" +#include "../../clipspace/view_rh_no.h" /*! * @brief set up view matrix diff --git a/include/cglm/struct/clipspace/view_rh_zo.h b/include/cglm/struct/clipspace/view_rh_zo.h index 1347522..14ffe32 100644 --- a/include/cglm/struct/clipspace/view_rh_zo.h +++ b/include/cglm/struct/clipspace/view_rh_zo.h @@ -19,6 +19,7 @@ #include "../../types-struct.h" #include "../../plane.h" #include "../../cam.h" +#include "../../clipspace/view_rh_zo.h" /*! * @brief set up view matrix