mirror of
https://github.com/recp/cglm.git
synced 2025-10-04 09:08:53 +00:00
Fix struct clipspace headers
Add missing includes, fix signatures
This commit is contained in:
@@ -24,6 +24,8 @@
|
|||||||
#include "../../types-struct.h"
|
#include "../../types-struct.h"
|
||||||
#include "../../plane.h"
|
#include "../../plane.h"
|
||||||
#include "../../cam.h"
|
#include "../../cam.h"
|
||||||
|
#include "../vec3.h"
|
||||||
|
#include "../../clipspace/ortho_lh_no.h"
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief set up orthographic projection matrix
|
* @brief set up orthographic projection matrix
|
||||||
|
@@ -24,6 +24,8 @@
|
|||||||
#include "../../types-struct.h"
|
#include "../../types-struct.h"
|
||||||
#include "../../plane.h"
|
#include "../../plane.h"
|
||||||
#include "../../cam.h"
|
#include "../../cam.h"
|
||||||
|
#include "../vec3.h"
|
||||||
|
#include "../../clipspace/ortho_lh_zo.h"
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief set up orthographic projection matrix
|
* @brief set up orthographic projection matrix
|
||||||
|
@@ -24,6 +24,8 @@
|
|||||||
#include "../../types-struct.h"
|
#include "../../types-struct.h"
|
||||||
#include "../../plane.h"
|
#include "../../plane.h"
|
||||||
#include "../../cam.h"
|
#include "../../cam.h"
|
||||||
|
#include "../vec3.h"
|
||||||
|
#include "../../clipspace/ortho_rh_no.h"
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief set up orthographic projection matrix
|
* @brief set up orthographic projection matrix
|
||||||
|
@@ -24,6 +24,8 @@
|
|||||||
#include "../../types-struct.h"
|
#include "../../types-struct.h"
|
||||||
#include "../../plane.h"
|
#include "../../plane.h"
|
||||||
#include "../../cam.h"
|
#include "../../cam.h"
|
||||||
|
#include "../vec3.h"
|
||||||
|
#include "../../clipspace/ortho_rh_zo.h"
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief set up orthographic projection matrix
|
* @brief set up orthographic projection matrix
|
||||||
|
@@ -39,6 +39,7 @@
|
|||||||
#include "../../types-struct.h"
|
#include "../../types-struct.h"
|
||||||
#include "../../plane.h"
|
#include "../../plane.h"
|
||||||
#include "../../cam.h"
|
#include "../../cam.h"
|
||||||
|
#include "../../clipspace/persp_lh_no.h"
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief set up perspective peprojection matrix
|
* @brief set up perspective peprojection matrix
|
||||||
|
@@ -39,6 +39,7 @@
|
|||||||
#include "../../types-struct.h"
|
#include "../../types-struct.h"
|
||||||
#include "../../plane.h"
|
#include "../../plane.h"
|
||||||
#include "../../cam.h"
|
#include "../../cam.h"
|
||||||
|
#include "../../clipspace/persp_lh_zo.h"
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief set up perspective peprojection matrix
|
* @brief set up perspective peprojection matrix
|
||||||
|
@@ -39,6 +39,7 @@
|
|||||||
#include "../../types-struct.h"
|
#include "../../types-struct.h"
|
||||||
#include "../../plane.h"
|
#include "../../plane.h"
|
||||||
#include "../../cam.h"
|
#include "../../cam.h"
|
||||||
|
#include "../../clipspace/persp_rh_no.h"
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief set up perspective peprojection matrix
|
* @brief set up perspective peprojection matrix
|
||||||
|
@@ -39,6 +39,7 @@
|
|||||||
#include "../../types-struct.h"
|
#include "../../types-struct.h"
|
||||||
#include "../../plane.h"
|
#include "../../plane.h"
|
||||||
#include "../../cam.h"
|
#include "../../cam.h"
|
||||||
|
#include "../../clipspace/persp_rh_zo.h"
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief set up perspective peprojection matrix
|
* @brief set up perspective peprojection matrix
|
||||||
|
@@ -7,8 +7,9 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
Functions:
|
Functions:
|
||||||
CGLM_INLINE vec3s glms_unprojecti_no(vec3s pos, mat4s invMat, vec4s vp, vec3 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, vec3s dest)
|
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
|
#ifndef cglms_project_no_h
|
||||||
@@ -18,6 +19,7 @@
|
|||||||
#include "../../types-struct.h"
|
#include "../../types-struct.h"
|
||||||
#include "../../plane.h"
|
#include "../../plane.h"
|
||||||
#include "../../cam.h"
|
#include "../../cam.h"
|
||||||
|
#include "../../clipspace/project_no.h"
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief maps the specified viewport coordinates into specified space [1]
|
* @brief maps the specified viewport coordinates into specified space [1]
|
||||||
@@ -48,7 +50,7 @@
|
|||||||
*/
|
*/
|
||||||
CGLM_INLINE
|
CGLM_INLINE
|
||||||
vec3s
|
vec3s
|
||||||
glms_unprojecti_no(vec3s pos, mat4s invMat, vec4s vp, vec3 dest) {
|
glms_unprojecti_no(vec3s pos, mat4s invMat, vec4s vp) {
|
||||||
vec3s dest;
|
vec3s dest;
|
||||||
glm_unprojecti_no(pos.raw, invMat.raw, vp.raw, dest.raw);
|
glm_unprojecti_no(pos.raw, invMat.raw, vp.raw, dest.raw);
|
||||||
return dest;
|
return dest;
|
||||||
@@ -69,7 +71,7 @@ glms_unprojecti_no(vec3s pos, mat4s invMat, vec4s vp, vec3 dest) {
|
|||||||
*/
|
*/
|
||||||
CGLM_INLINE
|
CGLM_INLINE
|
||||||
vec3s
|
vec3s
|
||||||
glms_project_no(vec3s pos, mat4s m, vec4s vp, vec3s dest) {
|
glms_project_no(vec3s pos, mat4s m, vec4s vp) {
|
||||||
vec3s dest;
|
vec3s dest;
|
||||||
glm_project_no(pos.raw, m.raw, vp.raw, dest.raw);
|
glm_project_no(pos.raw, m.raw, vp.raw, dest.raw);
|
||||||
return dest;
|
return dest;
|
||||||
@@ -88,7 +90,7 @@ glms_project_no(vec3s pos, mat4s m, vec4s vp, vec3s dest) {
|
|||||||
* @returns projected z coordinate
|
* @returns projected z coordinate
|
||||||
*/
|
*/
|
||||||
CGLM_INLINE
|
CGLM_INLINE
|
||||||
vec3s
|
float
|
||||||
glms_project_z_no(vec3s v, mat4s m) {
|
glms_project_z_no(vec3s v, mat4s m) {
|
||||||
return glm_project_z_no(v.raw, m.raw);
|
return glm_project_z_no(v.raw, m.raw);
|
||||||
}
|
}
|
||||||
|
@@ -7,8 +7,9 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
Functions:
|
Functions:
|
||||||
CGLM_INLINE vec3s glms_unprojecti_no(vec3s pos, mat4s invMat, vec4s vp, vec3 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, vec3s dest)
|
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
|
#ifndef cglms_project_zo_h
|
||||||
@@ -18,6 +19,7 @@
|
|||||||
#include "../../types-struct.h"
|
#include "../../types-struct.h"
|
||||||
#include "../../plane.h"
|
#include "../../plane.h"
|
||||||
#include "../../cam.h"
|
#include "../../cam.h"
|
||||||
|
#include "../../clipspace/project_zo.h"
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief maps the specified viewport coordinates into specified space [1]
|
* @brief maps the specified viewport coordinates into specified space [1]
|
||||||
@@ -48,7 +50,7 @@
|
|||||||
*/
|
*/
|
||||||
CGLM_INLINE
|
CGLM_INLINE
|
||||||
vec3s
|
vec3s
|
||||||
glms_unprojecti_zo(vec3s pos, mat4s invMat, vec4s vp, vec3 dest) {
|
glms_unprojecti_zo(vec3s pos, mat4s invMat, vec4s vp) {
|
||||||
vec3s dest;
|
vec3s dest;
|
||||||
glm_unprojecti_zo(pos.raw, invMat.raw, vp.raw, dest.raw);
|
glm_unprojecti_zo(pos.raw, invMat.raw, vp.raw, dest.raw);
|
||||||
return dest;
|
return dest;
|
||||||
@@ -69,7 +71,7 @@ glms_unprojecti_zo(vec3s pos, mat4s invMat, vec4s vp, vec3 dest) {
|
|||||||
*/
|
*/
|
||||||
CGLM_INLINE
|
CGLM_INLINE
|
||||||
vec3s
|
vec3s
|
||||||
glms_project_zo(vec3s pos, mat4s m, vec4s vp, vec3 dest) {
|
glms_project_zo(vec3s pos, mat4s m, vec4s vp) {
|
||||||
vec3s dest;
|
vec3s dest;
|
||||||
glm_project_zo(pos.raw, m.raw, vp.raw, dest.raw);
|
glm_project_zo(pos.raw, m.raw, vp.raw, dest.raw);
|
||||||
return dest;
|
return dest;
|
||||||
@@ -88,7 +90,7 @@ glms_project_zo(vec3s pos, mat4s m, vec4s vp, vec3 dest) {
|
|||||||
* @returns projected z coordinate
|
* @returns projected z coordinate
|
||||||
*/
|
*/
|
||||||
CGLM_INLINE
|
CGLM_INLINE
|
||||||
vec3s
|
float
|
||||||
glms_project_z_zo(vec3s v, mat4s m) {
|
glms_project_z_zo(vec3s v, mat4s m) {
|
||||||
return glm_project_z_zo(v.raw, m.raw);
|
return glm_project_z_zo(v.raw, m.raw);
|
||||||
}
|
}
|
||||||
|
@@ -19,6 +19,7 @@
|
|||||||
#include "../../types-struct.h"
|
#include "../../types-struct.h"
|
||||||
#include "../../plane.h"
|
#include "../../plane.h"
|
||||||
#include "../../cam.h"
|
#include "../../cam.h"
|
||||||
|
#include "../../clipspace/view_lh_no.h"
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief set up view matrix
|
* @brief set up view matrix
|
||||||
|
@@ -19,6 +19,7 @@
|
|||||||
#include "../../types-struct.h"
|
#include "../../types-struct.h"
|
||||||
#include "../../plane.h"
|
#include "../../plane.h"
|
||||||
#include "../../cam.h"
|
#include "../../cam.h"
|
||||||
|
#include "../../clipspace/view_lh_zo.h"
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief set up view matrix
|
* @brief set up view matrix
|
||||||
|
@@ -19,6 +19,7 @@
|
|||||||
#include "../../types-struct.h"
|
#include "../../types-struct.h"
|
||||||
#include "../../plane.h"
|
#include "../../plane.h"
|
||||||
#include "../../cam.h"
|
#include "../../cam.h"
|
||||||
|
#include "../../clipspace/view_rh_no.h"
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief set up view matrix
|
* @brief set up view matrix
|
||||||
|
@@ -19,6 +19,7 @@
|
|||||||
#include "../../types-struct.h"
|
#include "../../types-struct.h"
|
||||||
#include "../../plane.h"
|
#include "../../plane.h"
|
||||||
#include "../../cam.h"
|
#include "../../cam.h"
|
||||||
|
#include "../../clipspace/view_rh_zo.h"
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief set up view matrix
|
* @brief set up view matrix
|
||||||
|
Reference in New Issue
Block a user