summaryrefslogtreecommitdiff
path: root/include/cglm/call/clipspace/persp_rh_zo.h
blob: 9d50795927fdd506d700210e44c9d4c57c69038f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
/*
 * Copyright (c), Recep Aslantas.
 *
 * MIT License (MIT), http://opensource.org/licenses/MIT
 * Full license can be found in the LICENSE file
 */

#ifndef cglmc_persp_rh_zo_h
#define cglmc_persp_rh_zo_h
#ifdef __cplusplus
extern "C" {
#endif

#include "../../cglm.h"

CGLM_EXPORT
void
glmc_frustum_rh_zo(float left,    float right,
                   float bottom,  float top,
                   float nearZ,   float farZ,
                   mat4  dest);

CGLM_EXPORT
void
glmc_perspective_rh_zo(float fovy,
                       float aspect,
                       float nearVal,
                       float farVal,
                       mat4 dest);
                       
CGLM_EXPORT
void
glmc_perspective_resize_rh_zo(float aspect, mat4 proj);

CGLM_EXPORT
void
glmc_persp_move_far_rh_zo(mat4 proj, float 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);

CGLM_EXPORT
void
glmc_persp_decompv_rh_zo(mat4 proj, float dest[6]);

CGLM_EXPORT
void
glmc_persp_decomp_x_rh_zo(mat4 proj,
                          float * __restrict left,
                          float * __restrict right);

CGLM_EXPORT
void
glmc_persp_decomp_y_rh_zo(mat4 proj,
                          float * __restrict top,
                          float * __restrict bottom);

CGLM_EXPORT
void
glmc_persp_decomp_z_rh_zo(mat4 proj,
                          float * __restrict nearZ,
                          float * __restrict farZ);

CGLM_EXPORT
void
glmc_persp_decomp_far_rh_zo(mat4 proj, float * __restrict farZ);

CGLM_EXPORT
void
glmc_persp_decomp_near_rh_zo(mat4 proj, float * __restrict nearZ);

CGLM_EXPORT
void
glmc_persp_sizes_rh_zo(mat4 proj, float fovy, vec4 dest);

CGLM_EXPORT
float
glmc_persp_fovy_rh_zo(mat4 proj);

CGLM_EXPORT
float
glmc_persp_aspect_rh_zo(mat4 proj);

#ifdef __cplusplus
}
#endif
#endif /* cglmc_persp_rh_zo_h */