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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
|
/*
* 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/call.h"
CGLM_EXPORT
void
glmc_quat_identity(versor q) {
glm_quat_identity(q);
}
CGLM_EXPORT
void
glmc_quat_identity_array(versor * __restrict q, size_t count) {
glm_quat_identity_array(q, count);
}
CGLM_EXPORT
void
glmc_quat_init(versor q, float x, float y, float z, float w) {
glm_quat_init(q, x, y, z, w);
}
CGLM_EXPORT
void
glmc_quat(versor q, float angle, float x, float y, float z) {
glm_quat(q, angle, x, y, z);
}
CGLM_EXPORT
void
glmc_quatv(versor q, float angle, vec3 axis) {
glm_quatv(q, angle, axis);
}
CGLM_EXPORT
void
glmc_quat_copy(versor q, versor dest) {
glm_quat_copy(q, dest);
}
CGLM_EXPORT
void
glmc_quat_from_vecs(vec3 a, vec3 b, versor dest) {
glm_quat_from_vecs(a, b, dest);
}
CGLM_EXPORT
float
glmc_quat_norm(versor q) {
return glm_quat_norm(q);
}
CGLM_EXPORT
void
glmc_quat_normalize_to(versor q, versor dest) {
glm_quat_normalize_to(q, dest);
}
CGLM_EXPORT
void
glmc_quat_normalize(versor q) {
glm_quat_normalize(q);
}
CGLM_EXPORT
float
glmc_quat_dot(versor p, versor q) {
return glm_quat_dot(p, q);
}
CGLM_EXPORT
void
glmc_quat_conjugate(versor q, versor dest) {
glm_quat_conjugate(q, dest);
}
CGLM_EXPORT
void
glmc_quat_inv(versor q, versor dest) {
glm_quat_inv(q, dest);
}
CGLM_EXPORT
void
glmc_quat_add(versor p, versor q, versor dest) {
glm_quat_add(p, q, dest);
}
CGLM_EXPORT
void
glmc_quat_sub(versor p, versor q, versor dest) {
glm_quat_sub(p, q, dest);
}
CGLM_EXPORT
float
glmc_quat_real(versor q) {
return glm_quat_real(q);
}
CGLM_EXPORT
void
glmc_quat_imag(versor q, vec3 dest) {
glm_quat_imag(q, dest);
}
CGLM_EXPORT
void
glmc_quat_imagn(versor q, vec3 dest) {
glm_quat_imagn(q, dest);
}
CGLM_EXPORT
float
glmc_quat_imaglen(versor q) {
return glm_quat_imaglen(q);
}
CGLM_EXPORT
float
glmc_quat_angle(versor q) {
return glm_quat_angle(q);
}
CGLM_EXPORT
void
glmc_quat_axis(versor q, vec3 dest) {
glm_quat_axis(q, dest);
}
CGLM_EXPORT
void
glmc_quat_mul(versor p, versor q, versor dest) {
glm_quat_mul(p, q, dest);
}
CGLM_EXPORT
void
glmc_quat_mat4(versor q, mat4 dest) {
glm_quat_mat4(q, dest);
}
CGLM_EXPORT
void
glmc_quat_mat4t(versor q, mat4 dest) {
glm_quat_mat4t(q, dest);
}
CGLM_EXPORT
void
glmc_quat_mat3(versor q, mat3 dest) {
glm_quat_mat3(q, dest);
}
CGLM_EXPORT
void
glmc_quat_mat3t(versor q, mat3 dest) {
glm_quat_mat3t(q, dest);
}
CGLM_EXPORT
void
glmc_quat_lerp(versor from, versor to, float t, versor dest) {
glm_quat_lerp(from, to, t, dest);
}
CGLM_EXPORT
void
glmc_quat_lerpc(versor from, versor to, float t, versor dest) {
glm_quat_lerpc(from, to, t, dest);
}
CGLM_EXPORT
void
glmc_quat_nlerp(versor from, versor to, float t, versor dest) {
glm_quat_nlerp(from, to, t, dest);
}
CGLM_EXPORT
void
glmc_quat_slerp(versor from, versor to, float t, versor dest) {
glm_quat_slerp(from, to, t, dest);
}
CGLM_EXPORT
void
glmc_quat_look(vec3 eye, versor ori, mat4 dest) {
glm_quat_look(eye, ori, dest);
}
CGLM_EXPORT
void
glmc_quat_for(vec3 dir, vec3 up, versor dest) {
glm_quat_for(dir, up, dest);
}
CGLM_EXPORT
void
glmc_quat_forp(vec3 from, vec3 to, vec3 up, versor dest) {
glm_quat_forp(from, to, up, dest);
}
CGLM_EXPORT
void
glmc_quat_rotatev(versor q, vec3 v, vec3 dest) {
glm_quat_rotatev(q, v, dest);
}
CGLM_EXPORT
void
glmc_quat_rotate(mat4 m, versor q, mat4 dest) {
glm_quat_rotate(m, q, dest);
}
CGLM_EXPORT
void
glmc_quat_rotate_at(mat4 model, versor q, vec3 pivot) {
glm_quat_rotate_at(model, q, pivot);
}
CGLM_EXPORT
void
glmc_quat_rotate_atm(mat4 m, versor q, vec3 pivot) {
glm_quat_rotate_atm(m, q, pivot);
}
|