mirror of
https://github.com/recp/cglm.git
synced 2025-12-26 02:25:02 +00:00
clipspace: add initial implementations LH, RH and NO, ZO
Add the initial implementations of the left-handed and right-handed coordinate systems as well as clipspace depth values of [-1, 0] and [0, 1].
This commit is contained in:
@@ -1,23 +0,0 @@
|
||||
/*
|
||||
* Copyright (c), Recep Aslantas.
|
||||
*
|
||||
* MIT License (MIT), http://opensource.org/licenses/MIT
|
||||
* Full license can be found in the LICENSE file
|
||||
*/
|
||||
|
||||
#include "../include/cglm/cglm.h"
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_perspective_lh_no(float fovy,
|
||||
float aspect,
|
||||
float nearVal,
|
||||
float farVal,
|
||||
mat4 dest) {
|
||||
glm_perspective_lh_no(fovy,
|
||||
aspect,
|
||||
nearVal,
|
||||
farVal,
|
||||
dest);
|
||||
}
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
/*
|
||||
* Copyright (c), Recep Aslantas.
|
||||
*
|
||||
* MIT License (MIT), http://opensource.org/licenses/MIT
|
||||
* Full license can be found in the LICENSE file
|
||||
*/
|
||||
|
||||
#include "../include/cglm/cglm.h"
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_perspective_lh_zo(float fovy,
|
||||
float aspect,
|
||||
float nearVal,
|
||||
float farVal,
|
||||
mat4 dest) {
|
||||
glm_perspective_lh_zo(fovy,
|
||||
aspect,
|
||||
nearVal,
|
||||
farVal,
|
||||
dest);
|
||||
}
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
/*
|
||||
* Copyright (c), Recep Aslantas.
|
||||
*
|
||||
* MIT License (MIT), http://opensource.org/licenses/MIT
|
||||
* Full license can be found in the LICENSE file
|
||||
*/
|
||||
|
||||
#include "../include/cglm/cglm.h"
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_perspective_rh_no(float fovy,
|
||||
float aspect,
|
||||
float nearVal,
|
||||
float farVal,
|
||||
mat4 dest) {
|
||||
glm_perspective_rh_no(fovy,
|
||||
aspect,
|
||||
nearVal,
|
||||
farVal,
|
||||
dest);
|
||||
}
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
/*
|
||||
* Copyright (c), Recep Aslantas.
|
||||
*
|
||||
* MIT License (MIT), http://opensource.org/licenses/MIT
|
||||
* Full license can be found in the LICENSE file
|
||||
*/
|
||||
|
||||
#include "../include/cglm/cglm.h"
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_perspective_rh_zo(float fovy,
|
||||
float aspect,
|
||||
float nearVal,
|
||||
float farVal,
|
||||
mat4 dest) {
|
||||
glm_perspective_rh_zo(fovy,
|
||||
aspect,
|
||||
nearVal,
|
||||
farVal,
|
||||
dest);
|
||||
}
|
||||
|
||||
51
src/clipspace/ortho_lh_no.c
Normal file
51
src/clipspace/ortho_lh_no.c
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright (c), Recep Aslantas.
|
||||
*
|
||||
* MIT License (MIT), http://opensource.org/licenses/MIT
|
||||
* Full license can be found in the LICENSE file
|
||||
*/
|
||||
|
||||
#include "../include/cglm/cglm.h"
|
||||
#include "../include/cglm/clipspace/ortho_lh_no.h"
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_ortho_lh_no(float left, float right,
|
||||
float bottom, float top,
|
||||
float nearZ, float farZ,
|
||||
mat4 dest) {
|
||||
glm_ortho_lh_no(left, right,
|
||||
bottom, top,
|
||||
nearZ, farZ,
|
||||
dest);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_ortho_aabb_lh_no(vec3 box[2], mat4 dest) {
|
||||
glm_ortho_aabb_lh_no(box, dest);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_ortho_aabb_p_lh_no(vec3 box[2], float padding, mat4 dest) {
|
||||
glm_ortho_aabb_p_lh_no(box, padding, dest);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_ortho_aabb_pz_lh_no(vec3 box[2], float padding, mat4 dest) {
|
||||
glm_ortho_aabb_pz_lh_no(box, padding, dest);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_ortho_default_lh_no(float aspect, mat4 dest) {
|
||||
glm_ortho_default_lh_no(aspect, dest);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_ortho_default_s_lh_no(float aspect, float size, mat4 dest) {
|
||||
glm_ortho_default_s_lh_no(aspect, size, dest);
|
||||
}
|
||||
51
src/clipspace/ortho_lh_zo.c
Normal file
51
src/clipspace/ortho_lh_zo.c
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright (c), Recep Aslantas.
|
||||
*
|
||||
* MIT License (MIT), http://opensource.org/licenses/MIT
|
||||
* Full license can be found in the LICENSE file
|
||||
*/
|
||||
|
||||
#include "../include/cglm/cglm.h"
|
||||
#include "../include/cglm/clipspace/ortho_lh_zo.h"
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_ortho_lh_zo(float left, float right,
|
||||
float bottom, float top,
|
||||
float nearZ, float farZ,
|
||||
mat4 dest) {
|
||||
glm_ortho_lh_zo(left, right,
|
||||
bottom, top,
|
||||
nearZ, farZ,
|
||||
dest);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_ortho_aabb_lh_zo(vec3 box[2], mat4 dest) {
|
||||
glm_ortho_aabb_lh_zo(box, dest);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_ortho_aabb_p_lh_zo(vec3 box[2], float padding, mat4 dest) {
|
||||
glm_ortho_aabb_p_lh_zo(box, padding, dest);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_ortho_aabb_pz_lh_zo(vec3 box[2], float padding, mat4 dest) {
|
||||
glm_ortho_aabb_pz_lh_zo(box, padding, dest);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_ortho_default_lh_zo(float aspect, mat4 dest) {
|
||||
glm_ortho_default_lh_zo(aspect, dest);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_ortho_default_s_lh_zo(float aspect, float size, mat4 dest) {
|
||||
glm_ortho_default_s_lh_zo(aspect, size, dest);
|
||||
}
|
||||
51
src/clipspace/ortho_rh_no.c
Normal file
51
src/clipspace/ortho_rh_no.c
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright (c), Recep Aslantas.
|
||||
*
|
||||
* MIT License (MIT), http://opensource.org/licenses/MIT
|
||||
* Full license can be found in the LICENSE file
|
||||
*/
|
||||
|
||||
#include "../include/cglm/cglm.h"
|
||||
#include "../include/cglm/clipspace/ortho_rh_no.h"
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_ortho_rh_no(float left, float right,
|
||||
float bottom, float top,
|
||||
float nearZ, float farZ,
|
||||
mat4 dest) {
|
||||
glm_ortho_rh_no(left, right,
|
||||
bottom, top,
|
||||
nearZ, farZ,
|
||||
dest);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_ortho_aabb_rh_no(vec3 box[2], mat4 dest) {
|
||||
glm_ortho_aabb_rh_no(box, dest);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_ortho_aabb_p_rh_no(vec3 box[2], float padding, mat4 dest) {
|
||||
glm_ortho_aabb_p_rh_no(box, padding, dest);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_ortho_aabb_pz_rh_no(vec3 box[2], float padding, mat4 dest) {
|
||||
glm_ortho_aabb_pz_rh_no(box, padding, dest);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_ortho_default_rh_no(float aspect, mat4 dest) {
|
||||
glm_ortho_default_rh_no(aspect, dest);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_ortho_default_s_rh_no(float aspect, float size, mat4 dest) {
|
||||
glm_ortho_default_s_rh_no(aspect, size, dest);
|
||||
}
|
||||
51
src/clipspace/ortho_rh_zo.c
Normal file
51
src/clipspace/ortho_rh_zo.c
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright (c), Recep Aslantas.
|
||||
*
|
||||
* MIT License (MIT), http://opensource.org/licenses/MIT
|
||||
* Full license can be found in the LICENSE file
|
||||
*/
|
||||
|
||||
#include "../include/cglm/cglm.h"
|
||||
#include "../include/cglm/clipspace/ortho_rh_zo.h"
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_ortho_rh_zo(float left, float right,
|
||||
float bottom, float top,
|
||||
float nearZ, float farZ,
|
||||
mat4 dest) {
|
||||
glm_ortho_rh_zo(left, right,
|
||||
bottom, top,
|
||||
nearZ, farZ,
|
||||
dest);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_ortho_aabb_rh_zo(vec3 box[2], mat4 dest) {
|
||||
glm_ortho_aabb_rh_zo(box, dest);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_ortho_aabb_p_rh_zo(vec3 box[2], float padding, mat4 dest) {
|
||||
glm_ortho_aabb_p_rh_zo(box, padding, dest);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_ortho_aabb_pz_rh_zo(vec3 box[2], float padding, mat4 dest) {
|
||||
glm_ortho_aabb_pz_rh_zo(box, padding, dest);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_ortho_default_rh_zo(float aspect, mat4 dest) {
|
||||
glm_ortho_default_rh_zo(aspect, dest);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_ortho_default_s_rh_zo(float aspect, float size, mat4 dest) {
|
||||
glm_ortho_default_s_rh_zo(aspect, size, dest);
|
||||
}
|
||||
109
src/clipspace/persp_lh_no.c
Normal file
109
src/clipspace/persp_lh_no.c
Normal file
@@ -0,0 +1,109 @@
|
||||
/*
|
||||
* Copyright (c), Recep Aslantas.
|
||||
*
|
||||
* MIT License (MIT), http://opensource.org/licenses/MIT
|
||||
* Full license can be found in the LICENSE file
|
||||
*/
|
||||
|
||||
#include "../include/cglm/clipspace/persp_lh_no.h"
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_frustum_lh_no(float left, float right,
|
||||
float bottom, float top,
|
||||
float nearZ, float farZ,
|
||||
mat4 dest) {
|
||||
glm_frustum_lh_no(left, right,
|
||||
bottom, top,
|
||||
nearZ, farZ,
|
||||
dest);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_perspective_lh_no(float fovy,
|
||||
float aspect,
|
||||
float nearVal,
|
||||
float farVal,
|
||||
mat4 dest) {
|
||||
glm_perspective_lh_no(fovy,
|
||||
aspect,
|
||||
nearVal,
|
||||
farVal,
|
||||
dest);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_persp_move_far_lh_no(mat4 proj, float deltaFar) {
|
||||
glm_persp_move_far_lh_no(proj, deltaFar);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_persp_decomp_lh_no(mat4 proj,
|
||||
float * __restrict nearZ, float * __restrict farZ,
|
||||
float * __restrict top, float * __restrict bottom,
|
||||
float * __restrict left, float * __restrict right) {
|
||||
glm_persp_decomp_lh_no(proj, nearZ, farZ, top, bottom, left, right);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_persp_decompv_lh_no(mat4 proj, float dest[6]) {
|
||||
glm_persp_decompv_lh_no(proj, dest);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_persp_decomp_x_lh_no(mat4 proj,
|
||||
float * __restrict left,
|
||||
float * __restrict right) {
|
||||
glm_persp_decomp_x_lh_no(proj, left, right);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_persp_decomp_y_lh_no(mat4 proj,
|
||||
float * __restrict top,
|
||||
float * __restrict bottom) {
|
||||
glm_persp_decomp_y_lh_no(proj, top, bottom);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_persp_decomp_z_lh_no(mat4 proj,
|
||||
float * __restrict nearZ,
|
||||
float * __restrict farZ) {
|
||||
glm_persp_decomp_z_lh_no(proj, nearZ, farZ);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_persp_decomp_far_lh_no(mat4 proj, float * __restrict farZ) {
|
||||
glm_persp_decomp_far_lh_no(proj, farZ);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_persp_decomp_near_lh_no(mat4 proj, float * __restrict nearZ) {
|
||||
glm_persp_decomp_near_lh_no(proj, nearZ);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_persp_sizes_lh_no(mat4 proj, float fovy, vec4 dest) {
|
||||
glm_persp_sizes_lh_no(proj, fovy, dest);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
float
|
||||
glmc_persp_fovy_lh_no(mat4 proj) {
|
||||
return glm_persp_fovy_lh_no(proj);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
float
|
||||
glmc_persp_aspect_lh_no(mat4 proj) {
|
||||
return glm_persp_aspect_lh_no(proj);
|
||||
}
|
||||
109
src/clipspace/persp_lh_zo.c
Normal file
109
src/clipspace/persp_lh_zo.c
Normal file
@@ -0,0 +1,109 @@
|
||||
/*
|
||||
* Copyright (c), Recep Aslantas.
|
||||
*
|
||||
* MIT License (MIT), http://opensource.org/licenses/MIT
|
||||
* Full license can be found in the LICENSE file
|
||||
*/
|
||||
|
||||
#include "../include/cglm/clipspace/persp_lh_zo.h"
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_frustum_lh_zo(float left, float right,
|
||||
float bottom, float top,
|
||||
float nearZ, float farZ,
|
||||
mat4 dest) {
|
||||
glm_frustum_lh_zo(left, right,
|
||||
bottom, top,
|
||||
nearZ, farZ,
|
||||
dest);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_perspective_lh_zo(float fovy,
|
||||
float aspect,
|
||||
float nearVal,
|
||||
float farVal,
|
||||
mat4 dest) {
|
||||
glm_perspective_lh_zo(fovy,
|
||||
aspect,
|
||||
nearVal,
|
||||
farVal,
|
||||
dest);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_persp_move_far_lh_zo(mat4 proj, float deltaFar) {
|
||||
glm_persp_move_far_lh_zo(proj, deltaFar);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_persp_decomp_lh_zo(mat4 proj,
|
||||
float * __restrict nearZ, float * __restrict farZ,
|
||||
float * __restrict top, float * __restrict bottom,
|
||||
float * __restrict left, float * __restrict right) {
|
||||
glm_persp_decomp_lh_zo(proj, nearZ, farZ, top, bottom, left, right);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_persp_decompv_lh_zo(mat4 proj, float dest[6]) {
|
||||
glm_persp_decompv_lh_zo(proj, dest);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_persp_decomp_x_lh_zo(mat4 proj,
|
||||
float * __restrict left,
|
||||
float * __restrict right) {
|
||||
glm_persp_decomp_x_lh_zo(proj, left, right);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_persp_decomp_y_lh_zo(mat4 proj,
|
||||
float * __restrict top,
|
||||
float * __restrict bottom) {
|
||||
glm_persp_decomp_y_lh_zo(proj, top, bottom);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_persp_decomp_z_lh_zo(mat4 proj,
|
||||
float * __restrict nearZ,
|
||||
float * __restrict farZ) {
|
||||
glm_persp_decomp_z_lh_zo(proj, nearZ, farZ);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_persp_decomp_far_lh_zo(mat4 proj, float * __restrict farZ) {
|
||||
glm_persp_decomp_far_lh_zo(proj, farZ);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_persp_decomp_near_lh_zo(mat4 proj, float * __restrict nearZ) {
|
||||
glm_persp_decomp_near_lh_zo(proj, nearZ);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_persp_sizes_lh_zo(mat4 proj, float fovy, vec4 dest) {
|
||||
glm_persp_sizes_lh_zo(proj, fovy, dest);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
float
|
||||
glmc_persp_fovy_lh_zo(mat4 proj) {
|
||||
return glm_persp_fovy_lh_zo(proj);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
float
|
||||
glmc_persp_aspect_lh_zo(mat4 proj) {
|
||||
return glm_persp_aspect_lh_zo(proj);
|
||||
}
|
||||
109
src/clipspace/persp_rh_no.c
Normal file
109
src/clipspace/persp_rh_no.c
Normal file
@@ -0,0 +1,109 @@
|
||||
/*
|
||||
* Copyright (c), Recep Aslantas.
|
||||
*
|
||||
* MIT License (MIT), http://opensource.org/licenses/MIT
|
||||
* Full license can be found in the LICENSE file
|
||||
*/
|
||||
|
||||
#include "../include/cglm/clipspace/persp_rh_no.h"
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_frustum_rh_no(float left, float right,
|
||||
float bottom, float top,
|
||||
float nearZ, float farZ,
|
||||
mat4 dest) {
|
||||
glm_frustum_rh_no(left, right,
|
||||
bottom, top,
|
||||
nearZ, farZ,
|
||||
dest);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_perspective_rh_no(float fovy,
|
||||
float aspect,
|
||||
float nearVal,
|
||||
float farVal,
|
||||
mat4 dest) {
|
||||
glm_perspective_rh_no(fovy,
|
||||
aspect,
|
||||
nearVal,
|
||||
farVal,
|
||||
dest);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_persp_move_far_rh_no(mat4 proj, float deltaFar) {
|
||||
glm_persp_move_far_rh_no(proj, deltaFar);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_persp_decomp_rh_no(mat4 proj,
|
||||
float * __restrict nearZ, float * __restrict farZ,
|
||||
float * __restrict top, float * __restrict bottom,
|
||||
float * __restrict left, float * __restrict right) {
|
||||
glm_persp_decomp_rh_no(proj, nearZ, farZ, top, bottom, left, right);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_persp_decompv_rh_no(mat4 proj, float dest[6]) {
|
||||
glm_persp_decompv_rh_no(proj, dest);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_persp_decomp_x_rh_no(mat4 proj,
|
||||
float * __restrict left,
|
||||
float * __restrict right) {
|
||||
glm_persp_decomp_x_rh_no(proj, left, right);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_persp_decomp_y_rh_no(mat4 proj,
|
||||
float * __restrict top,
|
||||
float * __restrict bottom) {
|
||||
glm_persp_decomp_y_rh_no(proj, top, bottom);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_persp_decomp_z_rh_no(mat4 proj,
|
||||
float * __restrict nearZ,
|
||||
float * __restrict farZ) {
|
||||
glm_persp_decomp_z_rh_no(proj, nearZ, farZ);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_persp_decomp_far_rh_no(mat4 proj, float * __restrict farZ) {
|
||||
glm_persp_decomp_far_rh_no(proj, farZ);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_persp_decomp_near_rh_no(mat4 proj, float * __restrict nearZ) {
|
||||
glm_persp_decomp_near_rh_no(proj, nearZ);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_persp_sizes_rh_no(mat4 proj, float fovy, vec4 dest) {
|
||||
glm_persp_sizes_rh_no(proj, fovy, dest);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
float
|
||||
glmc_persp_fovy_rh_no(mat4 proj) {
|
||||
return glm_persp_fovy_rh_no(proj);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
float
|
||||
glmc_persp_aspect_rh_no(mat4 proj) {
|
||||
return glm_persp_aspect_rh_no(proj);
|
||||
}
|
||||
109
src/clipspace/persp_rh_zo.c
Normal file
109
src/clipspace/persp_rh_zo.c
Normal file
@@ -0,0 +1,109 @@
|
||||
/*
|
||||
* Copyright (c), Recep Aslantas.
|
||||
*
|
||||
* MIT License (MIT), http://opensource.org/licenses/MIT
|
||||
* Full license can be found in the LICENSE file
|
||||
*/
|
||||
|
||||
#include "../include/cglm/clipspace/persp_rh_zo.h"
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_frustum_rh_zo(float left, float right,
|
||||
float bottom, float top,
|
||||
float nearZ, float farZ,
|
||||
mat4 dest) {
|
||||
glm_frustum_rh_zo(left, right,
|
||||
bottom, top,
|
||||
nearZ, farZ,
|
||||
dest);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_perspective_rh_zo(float fovy,
|
||||
float aspect,
|
||||
float nearVal,
|
||||
float farVal,
|
||||
mat4 dest) {
|
||||
glm_perspective_rh_zo(fovy,
|
||||
aspect,
|
||||
nearVal,
|
||||
farVal,
|
||||
dest);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_persp_move_far_rh_zo(mat4 proj, float deltaFar) {
|
||||
glm_persp_move_far_rh_zo(proj, deltaFar);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_persp_decomp_rh_zo(mat4 proj,
|
||||
float * __restrict nearZ, float * __restrict farZ,
|
||||
float * __restrict top, float * __restrict bottom,
|
||||
float * __restrict left, float * __restrict right) {
|
||||
glm_persp_decomp_rh_zo(proj, nearZ, farZ, top, bottom, left, right);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_persp_decompv_rh_zo(mat4 proj, float dest[6]) {
|
||||
glm_persp_decompv_rh_zo(proj, dest);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_persp_decomp_x_rh_zo(mat4 proj,
|
||||
float * __restrict left,
|
||||
float * __restrict right) {
|
||||
glm_persp_decomp_x_rh_zo(proj, left, right);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_persp_decomp_y_rh_zo(mat4 proj,
|
||||
float * __restrict top,
|
||||
float * __restrict bottom) {
|
||||
glm_persp_decomp_y_rh_zo(proj, top, bottom);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_persp_decomp_z_rh_zo(mat4 proj,
|
||||
float * __restrict nearZ,
|
||||
float * __restrict farZ) {
|
||||
glm_persp_decomp_z_rh_zo(proj, nearZ, farZ);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_persp_decomp_far_rh_zo(mat4 proj, float * __restrict farZ) {
|
||||
glm_persp_decomp_far_rh_zo(proj, farZ);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_persp_decomp_near_rh_zo(mat4 proj, float * __restrict nearZ) {
|
||||
glm_persp_decomp_near_rh_zo(proj, nearZ);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_persp_sizes_rh_zo(mat4 proj, float fovy, vec4 dest) {
|
||||
glm_persp_sizes_rh_zo(proj, fovy, dest);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
float
|
||||
glmc_persp_fovy_rh_zo(mat4 proj) {
|
||||
return glm_persp_fovy_rh_zo(proj);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
float
|
||||
glmc_persp_aspect_rh_zo(mat4 proj) {
|
||||
return glm_persp_aspect_rh_zo(proj);
|
||||
}
|
||||
27
src/clipspace/view_lh_no.c
Normal file
27
src/clipspace/view_lh_no.c
Normal file
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Copyright (c), Recep Aslantas.
|
||||
*
|
||||
* MIT License (MIT), http://opensource.org/licenses/MIT
|
||||
* Full license can be found in the LICENSE file
|
||||
*/
|
||||
|
||||
#include "../include/cglm/cglm.h"
|
||||
#include "../include/cglm/clipspace/view_lh_no.h"
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_lookat_lh_no(vec3 eye, vec3 center, vec3 up, mat4 dest) {
|
||||
glm_lookat_lh_no(eye, center, up, dest);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_look_lh_no(vec3 eye, vec3 dir, vec3 up, mat4 dest) {
|
||||
glm_look_lh_no(eye, dir, up, dest);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_look_anyup_lh_no(vec3 eye, vec3 dir, mat4 dest) {
|
||||
glm_look_anyup_lh_no(eye, dir, dest);
|
||||
}
|
||||
27
src/clipspace/view_lh_zo.c
Normal file
27
src/clipspace/view_lh_zo.c
Normal file
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Copyright (c), Recep Aslantas.
|
||||
*
|
||||
* MIT License (MIT), http://opensource.org/licenses/MIT
|
||||
* Full license can be found in the LICENSE file
|
||||
*/
|
||||
|
||||
#include "../include/cglm/cglm.h"
|
||||
#include "../include/cglm/clipspace/view_lh_zo.h"
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_lookat_lh_zo(vec3 eye, vec3 center, vec3 up, mat4 dest) {
|
||||
glm_lookat_lh_zo(eye, center, up, dest);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_look_lh_zo(vec3 eye, vec3 dir, vec3 up, mat4 dest) {
|
||||
glm_look_lh_zo(eye, dir, up, dest);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_look_anyup_lh_zo(vec3 eye, vec3 dir, mat4 dest) {
|
||||
glm_look_anyup_lh_zo(eye, dir, dest);
|
||||
}
|
||||
27
src/clipspace/view_rh_no.c
Normal file
27
src/clipspace/view_rh_no.c
Normal file
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Copyright (c), Recep Aslantas.
|
||||
*
|
||||
* MIT License (MIT), http://opensource.org/licenses/MIT
|
||||
* Full license can be found in the LICENSE file
|
||||
*/
|
||||
|
||||
#include "../include/cglm/cglm.h"
|
||||
#include "../include/cglm/clipspace/view_rh_no.h"
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_lookat_rh_no(vec3 eye, vec3 center, vec3 up, mat4 dest) {
|
||||
glm_lookat_rh_no(eye, center, up, dest);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_look_rh_no(vec3 eye, vec3 dir, vec3 up, mat4 dest) {
|
||||
glm_look_rh_no(eye, dir, up, dest);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_look_anyup_rh_no(vec3 eye, vec3 dir, mat4 dest) {
|
||||
glm_look_anyup_rh_no(eye, dir, dest);
|
||||
}
|
||||
27
src/clipspace/view_rh_zo.c
Normal file
27
src/clipspace/view_rh_zo.c
Normal file
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Copyright (c), Recep Aslantas.
|
||||
*
|
||||
* MIT License (MIT), http://opensource.org/licenses/MIT
|
||||
* Full license can be found in the LICENSE file
|
||||
*/
|
||||
|
||||
#include "../include/cglm/cglm.h"
|
||||
#include "../include/cglm/clipspace/view_rh_zo.h"
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_lookat_rh_zo(vec3 eye, vec3 center, vec3 up, mat4 dest) {
|
||||
glm_lookat_rh_zo(eye, center, up, dest);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_look_rh_zo(vec3 eye, vec3 dir, vec3 up, mat4 dest) {
|
||||
glm_look_rh_zo(eye, dir, up, dest);
|
||||
}
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_look_anyup_rh_zo(vec3 eye, vec3 dir, mat4 dest) {
|
||||
glm_look_anyup_rh_zo(eye, dir, dest);
|
||||
}
|
||||
Reference in New Issue
Block a user