Blender  V2.93
BLI_math_vector.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
17  * All rights reserved.
18  *
19  * The Original Code is: some of this file.
20  */
21 
22 #pragma once
23 
28 #include "BLI_compiler_attrs.h"
29 #include "BLI_math_inline.h"
30 #include "BLI_utildefines.h"
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
36 /************************************* Init ***********************************/
37 
38 #ifdef BLI_MATH_GCC_WARN_PRAGMA
39 # pragma GCC diagnostic push
40 # pragma GCC diagnostic ignored "-Wredundant-decls"
41 #endif
42 
43 MINLINE void zero_v2(float r[2]);
44 MINLINE void zero_v3(float r[3]);
45 MINLINE void zero_v4(float r[4]);
46 
47 MINLINE void copy_v2_v2(float r[2], const float a[2]);
48 MINLINE void copy_v3_v3(float r[3], const float a[3]);
49 MINLINE void copy_v4_v4(float r[4], const float a[4]);
50 
51 MINLINE void copy_v2_fl(float r[2], float f);
52 MINLINE void copy_v3_fl(float r[3], float f);
53 MINLINE void copy_v4_fl(float r[4], float f);
54 
55 MINLINE void swap_v2_v2(float a[2], float b[2]);
56 MINLINE void swap_v3_v3(float a[3], float b[3]);
57 MINLINE void swap_v4_v4(float a[4], float b[4]);
58 
59 /* unsigned char */
60 MINLINE void copy_v2_v2_uchar(unsigned char r[2], const unsigned char a[2]);
61 MINLINE void copy_v3_v3_uchar(unsigned char r[3], const unsigned char a[3]);
62 MINLINE void copy_v4_v4_uchar(unsigned char r[4], const unsigned char a[4]);
63 
64 MINLINE void copy_v2_uchar(unsigned char r[2], const unsigned char a);
65 MINLINE void copy_v3_uchar(unsigned char r[3], const unsigned char a);
66 MINLINE void copy_v4_uchar(unsigned char r[4], const unsigned char a);
67 
68 /* char */
69 MINLINE void copy_v2_v2_char(char r[2], const char a[2]);
70 MINLINE void copy_v3_v3_char(char r[3], const char a[3]);
71 MINLINE void copy_v4_v4_char(char r[4], const char a[4]);
72 /* short */
73 MINLINE void copy_v2_v2_short(short r[2], const short a[2]);
74 MINLINE void copy_v3_v3_short(short r[3], const short a[3]);
75 MINLINE void copy_v4_v4_short(short r[4], const short a[4]);
76 /* int */
77 MINLINE void zero_v3_int(int r[3]);
78 MINLINE void copy_v2_v2_int(int r[2], const int a[2]);
79 MINLINE void copy_v3_v3_int(int r[3], const int a[3]);
80 MINLINE void copy_v4_v4_int(int r[4], const int a[4]);
81 /* double */
82 MINLINE void zero_v3_db(double r[3]);
83 MINLINE void copy_v2_v2_db(double r[2], const double a[2]);
84 MINLINE void copy_v3_v3_db(double r[3], const double a[3]);
85 MINLINE void copy_v4_v4_db(double r[4], const double a[4]);
86 /* short -> float */
87 MINLINE void copy_v3fl_v3s(float r[3], const short a[3]);
88 /* int <-> float */
89 MINLINE void copy_v2fl_v2i(float r[2], const int a[2]);
90 MINLINE void round_v2i_v2fl(int r[2], const float a[2]);
91 /* double -> float */
92 MINLINE void copy_v2fl_v2db(float r[2], const double a[2]);
93 MINLINE void copy_v3fl_v3db(float r[3], const double a[3]);
94 MINLINE void copy_v4fl_v4db(float r[4], const double a[4]);
95 /* float -> double */
96 MINLINE void copy_v2db_v2fl(double r[2], const float a[2]);
97 MINLINE void copy_v3db_v3fl(double r[3], const float a[3]);
98 MINLINE void copy_v4db_v4fl(double r[4], const float a[4]);
99 /* float args -> vec */
100 MINLINE void copy_v2_fl2(float v[2], float x, float y);
101 MINLINE void copy_v3_fl3(float v[3], float x, float y, float z);
102 MINLINE void copy_v4_fl4(float v[4], float x, float y, float z, float w);
103 
104 /********************************* Arithmetic ********************************/
105 
106 MINLINE void add_v2_fl(float r[2], float f);
107 MINLINE void add_v3_fl(float r[3], float f);
108 MINLINE void add_v4_fl(float r[4], float f);
109 MINLINE void add_v2_v2(float r[2], const float a[2]);
110 MINLINE void add_v2_v2_db(double r[2], const double a[2]);
111 MINLINE void add_v2_v2v2(float r[2], const float a[2], const float b[2]);
112 MINLINE void add_v2_v2_int(int r[2], const int a[2]);
113 MINLINE void add_v2_v2v2_int(int r[2], const int a[2], const int b[2]);
114 MINLINE void add_v3_v3(float r[3], const float a[3]);
115 MINLINE void add_v3_v3_db(double r[3], const double a[3]);
116 MINLINE void add_v3_v3v3(float r[3], const float a[3], const float b[3]);
117 MINLINE void add_v4_v4(float r[4], const float a[4]);
118 MINLINE void add_v4_v4v4(float r[4], const float a[4], const float b[4]);
119 
120 MINLINE void add_v3fl_v3fl_v3i(float r[3], const float a[3], const int b[3]);
121 MINLINE void add_v3fl_v3fl_v3s(float r[3], const float a[3], const short b[3]);
122 
123 MINLINE void sub_v2_v2(float r[2], const float a[2]);
124 MINLINE void sub_v2_v2v2(float r[2], const float a[2], const float b[2]);
125 MINLINE void sub_v2_v2v2_db(double r[2], const double a[2], const double b[2]);
126 MINLINE void sub_v2_v2v2_int(int r[2], const int a[2], const int b[2]);
127 MINLINE void sub_v3_v3(float r[3], const float a[3]);
128 MINLINE void sub_v3_v3v3(float r[3], const float a[3], const float b[3]);
129 MINLINE void sub_v3_v3v3_int(int r[3], const int a[3], const int b[3]);
130 MINLINE void sub_v3_v3v3_db(double r[3], const double a[3], const double b[3]);
131 MINLINE void sub_v4_v4(float r[4], const float a[4]);
132 MINLINE void sub_v4_v4v4(float r[4], const float a[4], const float b[4]);
133 
134 MINLINE void sub_v2db_v2fl_v2fl(double r[2], const float a[2], const float b[2]);
135 MINLINE void sub_v3db_v3fl_v3fl(double r[3], const float a[3], const float b[3]);
136 
137 MINLINE void mul_v2_fl(float r[2], float f);
138 MINLINE void mul_v2_v2fl(float r[2], const float a[2], float f);
139 MINLINE void mul_v3_fl(float r[3], float f);
140 MINLINE void mul_v3db_db(double r[3], double f);
141 MINLINE void mul_v3_v3fl(float r[3], const float a[3], float f);
142 MINLINE void mul_v3_v3db_db(double r[3], const double a[3], double f);
143 MINLINE void mul_v2_v2(float r[2], const float a[2]);
144 MINLINE void mul_v2_v2v2(float r[2], const float a[2], const float b[2]);
145 MINLINE void mul_v3_v3(float r[3], const float a[3]);
146 MINLINE void mul_v3_v3v3(float r[3], const float a[3], const float b[3]);
147 MINLINE void mul_v4_fl(float r[4], float f);
148 MINLINE void mul_v4_v4(float r[4], const float a[4]);
149 MINLINE void mul_v4_v4fl(float r[3], const float a[4], float f);
150 MINLINE void mul_v2_v2_cw(float r[2], const float mat[2], const float vec[2]);
151 MINLINE void mul_v2_v2_ccw(float r[2], const float mat[2], const float vec[2]);
152 MINLINE float mul_project_m4_v3_zfac(const float mat[4][4],
153  const float co[3]) ATTR_WARN_UNUSED_RESULT;
154 MINLINE float dot_m3_v3_row_x(const float M[3][3], const float a[3]) ATTR_WARN_UNUSED_RESULT;
155 MINLINE float dot_m3_v3_row_y(const float M[3][3], const float a[3]) ATTR_WARN_UNUSED_RESULT;
156 MINLINE float dot_m3_v3_row_z(const float M[3][3], const float a[3]) ATTR_WARN_UNUSED_RESULT;
157 MINLINE float dot_m4_v3_row_x(const float M[4][4], const float a[3]) ATTR_WARN_UNUSED_RESULT;
158 MINLINE float dot_m4_v3_row_y(const float M[4][4], const float a[3]) ATTR_WARN_UNUSED_RESULT;
159 MINLINE float dot_m4_v3_row_z(const float M[4][4], const float a[3]) ATTR_WARN_UNUSED_RESULT;
160 
161 MINLINE void madd_v2_v2fl(float r[2], const float a[2], float f);
162 MINLINE void madd_v3_v3fl(float r[3], const float a[3], float f);
163 MINLINE void madd_v3_v3v3(float r[3], const float a[3], const float b[3]);
164 MINLINE void madd_v2_v2v2fl(float r[2], const float a[2], const float b[2], float f);
165 MINLINE void madd_v3_v3v3fl(float r[3], const float a[3], const float b[3], float f);
166 MINLINE void madd_v3_v3v3v3(float r[3], const float a[3], const float b[3], const float c[3]);
167 MINLINE void madd_v4_v4fl(float r[4], const float a[4], float f);
168 MINLINE void madd_v4_v4v4(float r[4], const float a[4], const float b[4]);
169 
170 MINLINE void madd_v3fl_v3fl_v3fl_v3i(float r[3],
171  const float a[3],
172  const float b[3],
173  const int c[3]);
174 
175 MINLINE void negate_v2(float r[2]);
176 MINLINE void negate_v2_v2(float r[2], const float a[2]);
177 MINLINE void negate_v3(float r[3]);
178 MINLINE void negate_v3_v3(float r[3], const float a[3]);
179 MINLINE void negate_v4(float r[4]);
180 MINLINE void negate_v4_v4(float r[4], const float a[3]);
181 
182 MINLINE void negate_v3_short(short r[3]);
183 MINLINE void negate_v3_db(double r[3]);
184 
185 MINLINE void invert_v2(float r[2]);
186 MINLINE void invert_v3(float r[3]);
187 
188 MINLINE void abs_v2(float r[2]);
189 MINLINE void abs_v2_v2(float r[2], const float a[2]);
190 MINLINE void abs_v3(float r[3]);
191 MINLINE void abs_v3_v3(float r[3], const float a[3]);
192 MINLINE void abs_v4(float r[4]);
193 MINLINE void abs_v4_v4(float r[4], const float a[4]);
194 
195 MINLINE float dot_v2v2(const float a[2], const float b[2]) ATTR_WARN_UNUSED_RESULT;
196 MINLINE double dot_v2v2_db(const double a[2], const double b[2]) ATTR_WARN_UNUSED_RESULT;
197 MINLINE float dot_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT;
198 MINLINE float dot_v3v3v3(const float p[3],
199  const float a[3],
200  const float b[3]) ATTR_WARN_UNUSED_RESULT;
201 MINLINE float dot_v4v4(const float a[4], const float b[4]) ATTR_WARN_UNUSED_RESULT;
202 
203 MINLINE double dot_v3db_v3fl(const double a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT;
204 
205 MINLINE double dot_v3v3_db(const double a[3], const double b[3]) ATTR_WARN_UNUSED_RESULT;
206 
207 MINLINE float cross_v2v2(const float a[2], const float b[2]) ATTR_WARN_UNUSED_RESULT;
208 MINLINE double cross_v2v2_db(const double a[2], const double b[2]) ATTR_WARN_UNUSED_RESULT;
209 MINLINE void cross_v3_v3v3(float r[3], const float a[3], const float b[3]);
210 MINLINE void cross_v3_v3v3_hi_prec(float r[3], const float a[3], const float b[3]);
211 MINLINE void cross_v3_v3v3_db(double r[3], const double a[3], const double b[3]);
212 
213 MINLINE void add_newell_cross_v3_v3v3(float n[3], const float v_prev[3], const float v_curr[3]);
214 
215 MINLINE void star_m3_v3(float rmat[3][3], float a[3]);
216 
217 /*********************************** Length **********************************/
218 
219 MINLINE float len_squared_v2(const float v[2]) ATTR_WARN_UNUSED_RESULT;
220 MINLINE float len_squared_v3(const float v[3]) ATTR_WARN_UNUSED_RESULT;
221 MINLINE float len_manhattan_v2(const float v[2]) ATTR_WARN_UNUSED_RESULT;
223 MINLINE float len_manhattan_v3(const float v[3]) ATTR_WARN_UNUSED_RESULT;
224 MINLINE float len_v2(const float a[2]) ATTR_WARN_UNUSED_RESULT;
225 MINLINE double len_v2_db(const double v[2]) ATTR_WARN_UNUSED_RESULT;
226 MINLINE float len_v2v2(const float a[2], const float b[2]) ATTR_WARN_UNUSED_RESULT;
227 MINLINE double len_v2v2_db(const double a[2], const double b[2]) ATTR_WARN_UNUSED_RESULT;
228 MINLINE float len_v2v2_int(const int v1[2], const int v2[2]);
229 MINLINE float len_squared_v2v2(const float a[2], const float b[2]) ATTR_WARN_UNUSED_RESULT;
230 MINLINE double len_squared_v2v2_db(const double a[2], const double b[2]) ATTR_WARN_UNUSED_RESULT;
231 MINLINE float len_squared_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT;
232 MINLINE float len_squared_v4v4(const float a[4], const float b[4]) ATTR_WARN_UNUSED_RESULT;
233 MINLINE float len_manhattan_v2v2(const float a[2], const float b[2]) ATTR_WARN_UNUSED_RESULT;
234 MINLINE int len_manhattan_v2v2_int(const int a[2], const int b[2]) ATTR_WARN_UNUSED_RESULT;
235 MINLINE float len_manhattan_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT;
236 MINLINE float len_v3(const float a[3]) ATTR_WARN_UNUSED_RESULT;
237 MINLINE float len_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT;
238 
239 MINLINE double len_v3_db(const double a[3]) ATTR_WARN_UNUSED_RESULT;
240 MINLINE double len_squared_v3_db(const double v[3]) ATTR_WARN_UNUSED_RESULT;
241 MINLINE float normalize_v2_length(float r[2], const float unit_scale);
242 MINLINE float normalize_v2_v2_length(float r[2], const float a[2], const float unit_scale);
243 MINLINE float normalize_v3_length(float r[3], const float unit_scale);
244 MINLINE float normalize_v3_v3_length(float r[3], const float a[3], const float unit_scale);
245 MINLINE double normalize_v3_length_db(double n[3], const double unit_scale);
246 MINLINE double normalize_v3_v3_length_db(double r[3], const double a[3], const double unit_scale);
247 
248 MINLINE float normalize_v2(float r[2]);
249 MINLINE float normalize_v2_v2(float r[2], const float a[2]);
250 MINLINE float normalize_v3(float r[3]);
251 MINLINE float normalize_v3_v3(float r[3], const float a[3]);
252 MINLINE double normalize_v3_v3_db(double r[3], const double a[3]);
253 MINLINE double normalize_v3_db(double n[3]);
254 
255 /******************************* Interpolation *******************************/
256 
257 void interp_v2_v2v2(float r[2], const float a[2], const float b[2], const float t);
258 void interp_v2_v2v2_db(double target[2], const double a[2], const double b[2], const double t);
259 void interp_v2_v2v2v2(
260  float r[2], const float a[2], const float b[2], const float c[2], const float t[3]);
261 void interp_v3_v3v3(float r[3], const float a[3], const float b[3], const float t);
262 void interp_v3_v3v3_db(double target[3], const double a[3], const double b[3], const double t);
263 void interp_v3_v3v3v3(
264  float p[3], const float v1[3], const float v2[3], const float v3[3], const float w[3]);
265 void interp_v3_v3v3v3v3(float p[3],
266  const float v1[3],
267  const float v2[3],
268  const float v3[3],
269  const float v4[3],
270  const float w[4]);
271 void interp_v4_v4v4(float r[4], const float a[4], const float b[4], const float t);
272 void interp_v4_v4v4v4(
273  float p[4], const float v1[4], const float v2[4], const float v3[4], const float w[3]);
274 void interp_v4_v4v4v4v4(float p[4],
275  const float v1[4],
276  const float v2[4],
277  const float v3[4],
278  const float v4[4],
279  const float w[4]);
281  float p[3], const float v1[3], const float v2[3], const float v3[3], const float uv[2]);
282 
283 bool interp_v3_v3v3_slerp(float target[3], const float a[3], const float b[3], const float t)
285 bool interp_v2_v2v2_slerp(float target[2], const float a[2], const float b[2], const float t)
287 
288 void interp_v3_v3v3_slerp_safe(float target[3], const float a[3], const float b[3], const float t);
289 void interp_v2_v2v2_slerp_safe(float target[2], const float a[2], const float b[2], const float t);
290 
291 void interp_v2_v2v2v2v2_cubic(float p[2],
292  const float v1[2],
293  const float v2[2],
294  const float v3[2],
295  const float v4[2],
296  const float u);
297 
298 void interp_v3_v3v3_char(char target[3], const char a[3], const char b[3], const float t);
299 void interp_v3_v3v3_uchar(unsigned char target[3],
300  const unsigned char a[3],
301  const unsigned char b[3],
302  const float t);
303 void interp_v4_v4v4_char(char target[4], const char a[4], const char b[4], const float t);
304 void interp_v4_v4v4_uchar(unsigned char target[4],
305  const unsigned char a[4],
306  const unsigned char b[4],
307  const float t);
308 
309 void mid_v3_v3v3(float r[3], const float a[3], const float b[3]);
310 void mid_v2_v2v2(float r[2], const float a[2], const float b[2]);
311 void mid_v3_v3v3v3(float v[3], const float v1[3], const float v2[3], const float v3[3]);
312 void mid_v2_v2v2v2(float v[2], const float v1[2], const float v2[2], const float v3[2]);
313 void mid_v3_v3v3v3v3(
314  float v[3], const float v1[3], const float v2[3], const float v3[3], const float v4[3]);
315 void mid_v3_v3_array(float r[3], const float (*vec_arr)[3], const unsigned int nbr);
316 
317 void mid_v3_v3v3_angle_weighted(float r[3], const float a[3], const float b[3]);
318 void mid_v3_angle_weighted(float r[3]);
319 
320 void flip_v4_v4v4(float v[4], const float v1[4], const float v2[4]);
321 void flip_v3_v3v3(float v[3], const float v1[3], const float v2[3]);
322 void flip_v2_v2v2(float v[2], const float v1[2], const float v2[2]);
323 
324 /********************************* Comparison ********************************/
325 
327 MINLINE bool is_zero_v3(const float a[3]) ATTR_WARN_UNUSED_RESULT;
328 MINLINE bool is_zero_v4(const float a[4]) ATTR_WARN_UNUSED_RESULT;
329 
330 MINLINE bool is_zero_v2_db(const double a[2]) ATTR_WARN_UNUSED_RESULT;
331 MINLINE bool is_zero_v3_db(const double a[3]) ATTR_WARN_UNUSED_RESULT;
332 MINLINE bool is_zero_v4_db(const double a[4]) ATTR_WARN_UNUSED_RESULT;
333 
334 bool is_finite_v2(const float a[2]) ATTR_WARN_UNUSED_RESULT;
335 bool is_finite_v3(const float a[3]) ATTR_WARN_UNUSED_RESULT;
336 bool is_finite_v4(const float a[4]) ATTR_WARN_UNUSED_RESULT;
337 
338 MINLINE bool is_one_v3(const float a[3]) ATTR_WARN_UNUSED_RESULT;
339 
340 MINLINE bool equals_v2v2(const float v1[2], const float v2[2]) ATTR_WARN_UNUSED_RESULT;
341 MINLINE bool equals_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT;
342 MINLINE bool equals_v4v4(const float a[4], const float b[4]) ATTR_WARN_UNUSED_RESULT;
343 
344 MINLINE bool equals_v2v2_int(const int v1[2], const int v2[2]) ATTR_WARN_UNUSED_RESULT;
345 MINLINE bool equals_v3v3_int(const int v1[3], const int v2[3]) ATTR_WARN_UNUSED_RESULT;
346 MINLINE bool equals_v4v4_int(const int v1[4], const int v2[4]) ATTR_WARN_UNUSED_RESULT;
347 
348 MINLINE bool compare_v2v2(const float a[2],
349  const float b[2],
350  const float limit) ATTR_WARN_UNUSED_RESULT;
351 MINLINE bool compare_v3v3(const float a[3],
352  const float b[3],
353  const float limit) ATTR_WARN_UNUSED_RESULT;
354 MINLINE bool compare_v4v4(const float a[4],
355  const float b[4],
356  const float limit) ATTR_WARN_UNUSED_RESULT;
357 
358 MINLINE bool compare_v2v2_relative(const float a[2],
359  const float b[2],
360  const float limit,
361  const int max_ulps) ATTR_WARN_UNUSED_RESULT;
362 MINLINE bool compare_v3v3_relative(const float a[3],
363  const float b[3],
364  const float limit,
365  const int max_ulps) ATTR_WARN_UNUSED_RESULT;
366 MINLINE bool compare_v4v4_relative(const float a[4],
367  const float b[4],
368  const float limit,
369  const int max_ulps) ATTR_WARN_UNUSED_RESULT;
370 
371 MINLINE bool compare_len_v3v3(const float a[3],
372  const float b[3],
373  const float limit) ATTR_WARN_UNUSED_RESULT;
374 
375 MINLINE bool compare_size_v3v3(const float a[3],
376  const float b[3],
377  const float limit) ATTR_WARN_UNUSED_RESULT;
378 
379 MINLINE float line_point_side_v2(const float l1[2],
380  const float l2[2],
381  const float pt[2]) ATTR_WARN_UNUSED_RESULT;
382 
383 /********************************** Angles ***********************************/
384 /* - angle with 2 arguments is angle between vector */
385 /* - angle with 3 arguments is angle between 3 points at the middle point */
386 /* - angle_normalized_* is faster equivalent if vectors are normalized */
387 
388 float angle_v2v2(const float a[2], const float b[2]) ATTR_WARN_UNUSED_RESULT;
389 float angle_signed_v2v2(const float v1[2], const float v2[2]) ATTR_WARN_UNUSED_RESULT;
390 float angle_v2v2v2(const float a[2], const float b[2], const float c[2]) ATTR_WARN_UNUSED_RESULT;
391 float angle_normalized_v2v2(const float a[2], const float b[2]) ATTR_WARN_UNUSED_RESULT;
392 float angle_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT;
393 float angle_v3v3v3(const float a[3], const float b[3], const float c[3]) ATTR_WARN_UNUSED_RESULT;
394 float cos_v3v3v3(const float p1[3], const float p2[3], const float p3[3]) ATTR_WARN_UNUSED_RESULT;
395 float cos_v2v2v2(const float p1[2], const float p2[2], const float p3[2]) ATTR_WARN_UNUSED_RESULT;
396 float angle_on_axis_v3v3_v3(const float v1[3],
397  const float v2[3],
398  const float axis[3]) ATTR_WARN_UNUSED_RESULT;
399 float angle_signed_on_axis_v3v3_v3(const float v1[3],
400  const float v2[3],
401  const float axis[3]) ATTR_WARN_UNUSED_RESULT;
402 float angle_normalized_v3v3(const float v1[3], const float v2[3]) ATTR_WARN_UNUSED_RESULT;
403 float angle_on_axis_v3v3v3_v3(const float v1[3],
404  const float v2[3],
405  const float v3[3],
406  const float axis[3]) ATTR_WARN_UNUSED_RESULT;
407 float angle_signed_on_axis_v3v3v3_v3(const float v1[3],
408  const float v2[3],
409  const float v3[3],
410  const float axis[3]) ATTR_WARN_UNUSED_RESULT;
411 void angle_tri_v3(float angles[3], const float v1[3], const float v2[3], const float v3[3]);
412 void angle_quad_v3(
413  float angles[4], const float v1[3], const float v2[3], const float v3[3], const float v4[3]);
414 void angle_poly_v3(float *angles, const float *verts[3], int len);
415 
416 /********************************* Geometry **********************************/
417 
418 void project_v2_v2v2(float out[2], const float p[2], const float v_proj[2]);
419 void project_v3_v3v3(float out[3], const float p[3], const float v_proj[3]);
420 void project_v3_v3v3_db(double out[3], const double p[3], const double v_proj[3]);
421 void project_v2_v2v2_normalized(float out[2], const float p[2], const float v_proj[2]);
422 void project_v3_v3v3_normalized(float out[3], const float p[3], const float v_proj[3]);
423 void project_plane_v3_v3v3(float out[3], const float p[3], const float v_plane[3]);
424 void project_plane_v2_v2v2(float out[2], const float p[2], const float v_plane[2]);
425 void project_plane_normalized_v3_v3v3(float out[3], const float p[3], const float v_plane[3]);
426 void project_plane_normalized_v2_v2v2(float out[2], const float p[2], const float v_plane[2]);
427 void project_v3_plane(float out[3], const float plane_no[3], const float plane_co[3]);
428 void reflect_v3_v3v3(float out[3], const float vec[3], const float normal[3]);
429 void reflect_v3_v3v3_db(double out[3], const double vec[3], const double normal[3]);
430 void ortho_basis_v3v3_v3(float r_n1[3], float r_n2[3], const float n[3]);
431 void ortho_v3_v3(float out[3], const float v[3]);
432 void ortho_v2_v2(float out[2], const float v[2]);
433 void bisect_v3_v3v3v3(float r[3], const float a[3], const float b[3], const float c[3]);
434 void rotate_v2_v2fl(float r[2], const float p[2], const float angle);
435 void rotate_v3_v3v3fl(float r[3], const float p[3], const float axis[3], const float angle);
436 void rotate_normalized_v3_v3v3fl(float out[3],
437  const float p[3],
438  const float axis[3],
439  const float angle);
440 
441 /*********************************** Other ***********************************/
442 
443 void print_v2(const char *str, const float v[2]);
444 void print_v3(const char *str, const float v[3]);
445 void print_v4(const char *str, const float v[4]);
446 void print_vn(const char *str, const float v[], const int n);
447 
448 #define print_v2_id(v) print_v2(STRINGIFY(v), v)
449 #define print_v3_id(v) print_v3(STRINGIFY(v), v)
450 #define print_v4_id(v) print_v4(STRINGIFY(v), v)
451 #define print_vn_id(v, n) print_vn(STRINGIFY(v), v, n)
452 
453 MINLINE void normal_float_to_short_v2(short r[2], const float n[2]);
454 MINLINE void normal_short_to_float_v3(float r[3], const short n[3]);
455 MINLINE void normal_float_to_short_v3(short r[3], const float n[3]);
456 MINLINE void normal_float_to_short_v4(short r[4], const float n[4]);
457 
458 void minmax_v4v4_v4(float min[4], float max[4], const float vec[4]);
459 void minmax_v3v3_v3(float min[3], float max[3], const float vec[3]);
460 void minmax_v2v2_v2(float min[2], float max[2], const float vec[2]);
461 
462 void minmax_v3v3_v3_array(float r_min[3], float r_max[3], const float (*vec_arr)[3], int nbr);
463 
464 void dist_ensure_v3_v3fl(float v1[3], const float v2[3], const float dist);
465 void dist_ensure_v2_v2fl(float v1[2], const float v2[2], const float dist);
466 
467 void axis_sort_v3(const float axis_values[3], int r_axis_order[3]);
468 
469 MINLINE void clamp_v2(float vec[2], const float min, const float max);
470 MINLINE void clamp_v3(float vec[3], const float min, const float max);
471 MINLINE void clamp_v4(float vec[4], const float min, const float max);
472 MINLINE void clamp_v2_v2v2(float vec[2], const float min[2], const float max[2]);
473 MINLINE void clamp_v3_v3v3(float vec[3], const float min[3], const float max[3]);
474 MINLINE void clamp_v4_v4v4(float vec[4], const float min[4], const float max[4]);
475 
476 /***************************** Array Functions *******************************/
477 /* follow fixed length vector function conventions. */
478 double dot_vn_vn(const float *array_src_a,
479  const float *array_src_b,
480  const int size) ATTR_WARN_UNUSED_RESULT;
481 double len_squared_vn(const float *array, const int size) ATTR_WARN_UNUSED_RESULT;
482 float normalize_vn_vn(float *array_tar, const float *array_src, const int size);
483 float normalize_vn(float *array_tar, const int size);
484 void range_vn_i(int *array_tar, const int size, const int start);
485 void range_vn_u(unsigned int *array_tar, const int size, const unsigned int start);
486 void range_vn_fl(float *array_tar, const int size, const float start, const float step);
487 void negate_vn(float *array_tar, const int size);
488 void negate_vn_vn(float *array_tar, const float *array_src, const int size);
489 void mul_vn_vn(float *array_tar, const float *array_src, const int size);
490 void mul_vn_vnvn(float *array_tar,
491  const float *array_src_a,
492  const float *array_src_b,
493  const int size);
494 void mul_vn_fl(float *array_tar, const int size, const float f);
495 void mul_vn_vn_fl(float *array_tar, const float *array_src, const int size, const float f);
496 void add_vn_vn(float *array_tar, const float *array_src, const int size);
497 void add_vn_vnvn(float *array_tar,
498  const float *array_src_a,
499  const float *array_src_b,
500  const int size);
501 void madd_vn_vn(float *array_tar, const float *array_src, const float f, const int size);
502 void madd_vn_vnvn(float *array_tar,
503  const float *array_src_a,
504  const float *array_src_b,
505  const float f,
506  const int size);
507 void sub_vn_vn(float *array_tar, const float *array_src, const int size);
508 void sub_vn_vnvn(float *array_tar,
509  const float *array_src_a,
510  const float *array_src_b,
511  const int size);
512 void msub_vn_vn(float *array_tar, const float *array_src, const float f, const int size);
513 void msub_vn_vnvn(float *array_tar,
514  const float *array_src_a,
515  const float *array_src_b,
516  const float f,
517  const int size);
518 void interp_vn_vn(float *array_tar, const float *array_src, const float t, const int size);
519 void copy_vn_i(int *array_tar, const int size, const int val);
520 void copy_vn_short(short *array_tar, const int size, const short val);
521 void copy_vn_ushort(unsigned short *array_tar, const int size, const unsigned short val);
522 void copy_vn_uchar(unsigned char *array_tar, const int size, const unsigned char val);
523 void copy_vn_fl(float *array_tar, const int size, const float val);
524 
525 void add_vn_vn_d(double *array_tar, const double *array_src, const int size);
526 void add_vn_vnvn_d(double *array_tar,
527  const double *array_src_a,
528  const double *array_src_b,
529  const int size);
530 void mul_vn_db(double *array_tar, const int size, const double f);
531 
532 /**************************** Inline Definitions ******************************/
533 
534 #if BLI_MATH_DO_INLINE
535 # include "intern/math_vector_inline.c"
536 #endif
537 
538 #ifdef BLI_MATH_GCC_WARN_PRAGMA
539 # pragma GCC diagnostic pop
540 #endif
541 
542 #ifdef __cplusplus
543 }
544 #endif
void BLI_kdtree_nd_() int BLI_kdtree_nd_() int BLI_kdtree_nd_() int BLI_kdtree_nd_() ATTR_WARN_UNUSED_RESULT
#define MINLINE
MINLINE void mul_v4_v4fl(float r[3], const float a[4], float f)
void mid_v3_v3v3v3v3(float v[3], const float v1[3], const float v2[3], const float v3[3], const float v4[3])
Definition: math_vector.c:296
void copy_vn_fl(float *array_tar, const int size, const float val)
Definition: math_vector.c:1410
void project_v2_v2v2_normalized(float out[2], const float p[2], const float v_proj[2])
Definition: math_vector.c:705
MINLINE bool is_zero_v3_db(const double a[3]) ATTR_WARN_UNUSED_RESULT
MINLINE void sub_v3db_v3fl_v3fl(double r[3], const float a[3], const float b[3])
MINLINE double normalize_v3_db(double n[3])
MINLINE bool compare_len_v3v3(const float a[3], const float b[3], const float limit) ATTR_WARN_UNUSED_RESULT
MINLINE void mul_v4_fl(float r[4], float f)
void madd_vn_vn(float *array_tar, const float *array_src, const float f, const int size)
Definition: math_vector.c:1287
float angle_v2v2v2(const float a[2], const float b[2], const float c[2]) ATTR_WARN_UNUSED_RESULT
Definition: math_vector.c:453
MINLINE double len_squared_v2v2_db(const double a[2], const double b[2]) ATTR_WARN_UNUSED_RESULT
void add_vn_vn_d(double *array_tar, const double *array_src, const int size)
Definition: math_vector.c:1423
MINLINE double normalize_v3_v3_db(double r[3], const double a[3])
MINLINE void madd_v3_v3v3v3(float r[3], const float a[3], const float b[3], const float c[3])
MINLINE void sub_v2_v2v2_int(int r[2], const int a[2], const int b[2])
MINLINE void round_v2i_v2fl(int r[2], const float a[2])
MINLINE void add_v4_v4(float r[4], const float a[4])
MINLINE void copy_v4_v4(float r[4], const float a[4])
MINLINE double len_v2v2_db(const double a[2], const double b[2]) ATTR_WARN_UNUSED_RESULT
void negate_vn(float *array_tar, const int size)
Definition: math_vector.c:1201
MINLINE float normalize_v2_v2_length(float r[2], const float a[2], const float unit_scale)
MINLINE void copy_v2fl_v2i(float r[2], const int a[2])
void interp_v2_v2v2(float r[2], const float a[2], const float b[2], const float t)
Definition: math_vector.c:32
float angle_on_axis_v3v3_v3(const float v1[3], const float v2[3], const float axis[3]) ATTR_WARN_UNUSED_RESULT
Definition: math_vector.c:540
MINLINE void swap_v4_v4(float a[4], float b[4])
MINLINE void copy_v3fl_v3s(float r[3], const short a[3])
void angle_quad_v3(float angles[4], const float v1[3], const float v2[3], const float v3[3], const float v4[3])
Definition: math_vector.c:618
void axis_sort_v3(const float axis_values[3], int r_axis_order[3])
Definition: math_vector.c:1090
MINLINE void abs_v4(float r[4])
void interp_v3_v3v3(float r[3], const float a[3], const float b[3], const float t)
Definition: math_vector.c:49
void sub_vn_vn(float *array_tar, const float *array_src, const int size)
Definition: math_vector.c:1312
MINLINE float len_squared_v2(const float v[2]) ATTR_WARN_UNUSED_RESULT
float angle_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
Definition: math_vector.c:443
void mul_vn_db(double *array_tar, const int size, const double f)
Definition: math_vector.c:1447
MINLINE void copy_v3_uchar(unsigned char r[3], const unsigned char a)
MINLINE float len_squared_v3(const float v[3]) ATTR_WARN_UNUSED_RESULT
MINLINE float len_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
void minmax_v3v3_v3(float min[3], float max[3], const float vec[3])
Definition: math_vector.c:1020
MINLINE void add_v3fl_v3fl_v3i(float r[3], const float a[3], const int b[3])
MINLINE void madd_v3_v3fl(float r[3], const float a[3], float f)
void rotate_v2_v2fl(float r[2], const float p[2], const float angle)
Definition: math_vector.c:914
MINLINE float len_squared_v2v2(const float a[2], const float b[2]) ATTR_WARN_UNUSED_RESULT
float angle_normalized_v2v2(const float a[2], const float b[2]) ATTR_WARN_UNUSED_RESULT
Definition: math_vector.c:521
void mul_vn_vn_fl(float *array_tar, const float *array_src, const int size, const float f)
Definition: math_vector.c:1253
MINLINE void add_v3_fl(float r[3], float f)
MINLINE void mul_v2_v2_cw(float r[2], const float mat[2], const float vec[2])
MINLINE bool equals_v4v4_int(const int v1[4], const int v2[4]) ATTR_WARN_UNUSED_RESULT
MINLINE double dot_v2v2_db(const double a[2], const double b[2]) ATTR_WARN_UNUSED_RESULT
void copy_vn_i(int *array_tar, const int size, const int val)
Definition: math_vector.c:1374
MINLINE void clamp_v4_v4v4(float vec[4], const float min[4], const float max[4])
MINLINE void copy_v2_fl2(float v[2], float x, float y)
MINLINE void mul_v2_v2v2(float r[2], const float a[2], const float b[2])
MINLINE void madd_v2_v2fl(float r[2], const float a[2], float f)
MINLINE void copy_v4_fl4(float v[4], float x, float y, float z, float w)
void print_v3(const char *str, const float v[3])
Definition: math_vector.c:971
MINLINE void add_v4_v4v4(float r[4], const float a[4], const float b[4])
MINLINE void normal_float_to_short_v3(short r[3], const float n[3])
void madd_vn_vnvn(float *array_tar, const float *array_src_a, const float *array_src_b, const float f, const int size)
Definition: math_vector.c:1297
MINLINE void madd_v2_v2v2fl(float r[2], const float a[2], const float b[2], float f)
MINLINE void add_v3fl_v3fl_v3s(float r[3], const float a[3], const short b[3])
void reflect_v3_v3v3(float out[3], const float vec[3], const float normal[3])
Definition: math_vector.c:818
void minmax_v3v3_v3_array(float r_min[3], float r_max[3], const float(*vec_arr)[3], int nbr)
Definition: math_vector.c:1060
MINLINE bool equals_v4v4(const float a[4], const float b[4]) ATTR_WARN_UNUSED_RESULT
MINLINE void swap_v2_v2(float a[2], float b[2])
MINLINE void madd_v3fl_v3fl_v3fl_v3i(float r[3], const float a[3], const float b[3], const int c[3])
MINLINE void copy_v2db_v2fl(double r[2], const float a[2])
MINLINE void copy_v2_v2_db(double r[2], const double a[2])
float cos_v3v3v3(const float p1[3], const float p2[3], const float p3[3]) ATTR_WARN_UNUSED_RESULT
Definition: math_vector.c:430
void project_plane_normalized_v2_v2v2(float out[2], const float p[2], const float v_plane[2])
Definition: math_vector.c:767
void interp_v4_v4v4_char(char target[4], const char a[4], const char b[4], const float t)
Definition: math_vector.c:265
MINLINE bool compare_v3v3(const float a[3], const float b[3], const float limit) ATTR_WARN_UNUSED_RESULT
MINLINE void mul_v4_v4(float r[4], const float a[4])
float angle_v2v2(const float a[2], const float b[2]) ATTR_WARN_UNUSED_RESULT
Definition: math_vector.c:483
MINLINE void sub_v2_v2(float r[2], const float a[2])
MINLINE void mul_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE void copy_v4_v4_char(char r[4], const char a[4])
float normalize_vn(float *array_tar, const int size)
Definition: math_vector.c:1167
MINLINE double normalize_v3_v3_length_db(double r[3], const double a[3], const double unit_scale)
MINLINE void copy_v4_uchar(unsigned char r[4], const unsigned char a)
MINLINE float normalize_v3(float r[3])
MINLINE void mul_v3_v3(float r[3], const float a[3])
MINLINE float len_v2v2_int(const int v1[2], const int v2[2])
MINLINE double len_squared_v3_db(const double v[3]) ATTR_WARN_UNUSED_RESULT
MINLINE void sub_v3_v3(float r[3], const float a[3])
void copy_vn_ushort(unsigned short *array_tar, const int size, const unsigned short val)
Definition: math_vector.c:1392
void interp_v3_v3v3v3(float p[3], const float v1[3], const float v2[3], const float v3[3], const float w[3])
Definition: math_vector.c:191
MINLINE void mul_v2_v2_ccw(float r[2], const float mat[2], const float vec[2])
MINLINE float dot_v3v3v3(const float p[3], const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
MINLINE void cross_v3_v3v3_hi_prec(float r[3], const float a[3], const float b[3])
MINLINE void add_v2_v2v2_int(int r[2], const int a[2], const int b[2])
MINLINE void mul_v2_v2(float r[2], const float a[2])
MINLINE float len_squared_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
void interp_v4_v4v4v4v4(float p[4], const float v1[4], const float v2[4], const float v3[4], const float v4[4], const float w[4])
Definition: math_vector.c:222
MINLINE double dot_v3db_v3fl(const double a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
void sub_vn_vnvn(float *array_tar, const float *array_src_a, const float *array_src_b, const int size)
Definition: math_vector.c:1322
MINLINE void abs_v2(float r[2])
MINLINE void add_newell_cross_v3_v3v3(float n[3], const float v_prev[3], const float v_curr[3])
MINLINE void sub_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE void clamp_v3(float vec[3], const float min, const float max)
MINLINE void normal_short_to_float_v3(float r[3], const short n[3])
MINLINE void copy_v4_v4_uchar(unsigned char r[4], const unsigned char a[4])
void interp_v3_v3v3_db(double target[3], const double a[3], const double b[3], const double t)
Definition: math_vector.c:1456
MINLINE void normal_float_to_short_v4(short r[4], const float n[4])
void angle_tri_v3(float angles[3], const float v1[3], const float v2[3], const float v3[3])
Definition: math_vector.c:600
MINLINE void copy_v3_v3_char(char r[3], const char a[3])
void add_vn_vnvn(float *array_tar, const float *array_src_a, const float *array_src_b, const int size)
Definition: math_vector.c:1273
MINLINE bool compare_v2v2(const float a[2], const float b[2], const float limit) ATTR_WARN_UNUSED_RESULT
void interp_v3_v3v3_char(char target[3], const char a[3], const char b[3], const float t)
Definition: math_vector.c:251
void mid_v3_angle_weighted(float r[3])
Definition: math_vector.c:348
MINLINE void mul_v3db_db(double r[3], double f)
MINLINE void mul_v2_fl(float r[2], float f)
MINLINE double normalize_v3_length_db(double n[3], const double unit_scale)
MINLINE bool is_zero_v4(const float a[4]) ATTR_WARN_UNUSED_RESULT
MINLINE double len_v3_db(const double a[3]) ATTR_WARN_UNUSED_RESULT
void interp_v4_v4v4(float r[4], const float a[4], const float b[4], const float t)
Definition: math_vector.c:58
void mid_v2_v2v2v2(float v[2], const float v1[2], const float v2[2], const float v3[2])
Definition: math_vector.c:283
MINLINE void copy_v3_v3_uchar(unsigned char r[3], const unsigned char a[3])
MINLINE void copy_v2_v2(float r[2], const float a[2])
void project_v3_plane(float out[3], const float plane_no[3], const float plane_co[3])
Definition: math_vector.c:777
MINLINE void mul_v3_fl(float r[3], float f)
MINLINE void copy_v2_v2_int(int r[2], const int a[2])
MINLINE void madd_v4_v4v4(float r[4], const float a[4], const float b[4])
MINLINE void add_v3_v3_db(double r[3], const double a[3])
MINLINE void mul_v3_v3db_db(double r[3], const double a[3], double f)
MINLINE void copy_v4db_v4fl(double r[4], const float a[4])
MINLINE void negate_v2(float r[2])
MINLINE float dot_m3_v3_row_x(const float M[3][3], const float a[3]) ATTR_WARN_UNUSED_RESULT
MINLINE bool is_zero_v2_db(const double a[2]) ATTR_WARN_UNUSED_RESULT
float angle_signed_on_axis_v3v3v3_v3(const float v1[3], const float v2[3], const float v3[3], const float axis[3]) ATTR_WARN_UNUSED_RESULT
Definition: math_vector.c:587
MINLINE void copy_v3_v3(float r[3], const float a[3])
void add_vn_vn(float *array_tar, const float *array_src, const int size)
Definition: math_vector.c:1263
MINLINE bool equals_v3v3_int(const int v1[3], const int v2[3]) ATTR_WARN_UNUSED_RESULT
MINLINE float dot_m3_v3_row_y(const float M[3][3], const float a[3]) ATTR_WARN_UNUSED_RESULT
MINLINE float dot_v4v4(const float a[4], const float b[4]) ATTR_WARN_UNUSED_RESULT
MINLINE void negate_v3_v3(float r[3], const float a[3])
void project_v3_v3v3_normalized(float out[3], const float p[3], const float v_proj[3])
Definition: math_vector.c:717
void interp_v2_v2v2v2(float r[2], const float a[2], const float b[2], const float c[2], const float t[3])
Definition: math_vector.c:42
void print_v4(const char *str, const float v[4])
Definition: math_vector.c:976
float normalize_vn_vn(float *array_tar, const float *array_src, const int size)
Definition: math_vector.c:1152
MINLINE double dot_v3v3_db(const double a[3], const double b[3]) ATTR_WARN_UNUSED_RESULT
MINLINE bool is_zero_v3(const float a[3]) ATTR_WARN_UNUSED_RESULT
MINLINE void copy_v3_v3_int(int r[3], const int a[3])
void negate_vn_vn(float *array_tar, const float *array_src, const int size)
Definition: math_vector.c:1210
void project_v3_v3v3(float out[3], const float p[3], const float v_proj[3])
Definition: math_vector.c:674
MINLINE void copy_v2_v2_char(char r[2], const char a[2])
void minmax_v2v2_v2(float min[2], float max[2], const float vec[2])
Definition: math_vector.c:1043
float cos_v2v2v2(const float p1[2], const float p2[2], const float p3[2]) ATTR_WARN_UNUSED_RESULT
Definition: math_vector.c:470
void interp_v3_v3v3_uchar(unsigned char target[3], const unsigned char a[3], const unsigned char b[3], const float t)
Definition: math_vector.c:243
MINLINE void add_v2_v2(float r[2], const float a[2])
MINLINE void copy_v3_fl3(float v[3], float x, float y, float z)
void project_plane_v3_v3v3(float out[3], const float p[3], const float v_plane[3])
Definition: math_vector.c:740
void interp_v3_v3v3_slerp_safe(float target[3], const float a[3], const float b[3], const float t)
Definition: math_vector.c:121
void copy_vn_short(short *array_tar, const int size, const short val)
Definition: math_vector.c:1383
bool is_finite_v3(const float a[3]) ATTR_WARN_UNUSED_RESULT
Definition: math_vector.c:398
void project_plane_normalized_v3_v3v3(float out[3], const float p[3], const float v_plane[3])
Definition: math_vector.c:757
void msub_vn_vnvn(float *array_tar, const float *array_src_a, const float *array_src_b, const float f, const int size)
Definition: math_vector.c:1346
MINLINE float dot_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
MINLINE bool compare_size_v3v3(const float a[3], const float b[3], const float limit) ATTR_WARN_UNUSED_RESULT
MINLINE void negate_v2_v2(float r[2], const float a[2])
MINLINE bool compare_v3v3_relative(const float a[3], const float b[3], const float limit, const int max_ulps) ATTR_WARN_UNUSED_RESULT
MINLINE void add_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE bool compare_v2v2_relative(const float a[2], const float b[2], const float limit, const int max_ulps) ATTR_WARN_UNUSED_RESULT
MINLINE void cross_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE void clamp_v2(float vec[2], const float min, const float max)
void print_v2(const char *str, const float v[2])
Definition: math_vector.c:966
MINLINE float normalize_v2_length(float r[2], const float unit_scale)
void mid_v3_v3v3_angle_weighted(float r[3], const float a[3], const float b[3])
Definition: math_vector.c:326
MINLINE int len_manhattan_v2v2_int(const int a[2], const int b[2]) ATTR_WARN_UNUSED_RESULT
MINLINE void copy_v4_v4_short(short r[4], const short a[4])
MINLINE void add_v2_fl(float r[2], float f)
float angle_on_axis_v3v3v3_v3(const float v1[3], const float v2[3], const float v3[3], const float axis[3]) ATTR_WARN_UNUSED_RESULT
Definition: math_vector.c:574
bool is_finite_v2(const float a[2]) ATTR_WARN_UNUSED_RESULT
Definition: math_vector.c:393
float angle_signed_on_axis_v3v3_v3(const float v1[3], const float v2[3], const float axis[3]) ATTR_WARN_UNUSED_RESULT
Definition: math_vector.c:551
MINLINE void zero_v3_int(int r[3])
void rotate_v3_v3v3fl(float r[3], const float p[3], const float axis[3], const float angle)
Definition: math_vector.c:953
void ortho_v3_v3(float out[3], const float v[3])
Definition: math_vector.c:875
MINLINE bool equals_v2v2(const float v1[2], const float v2[2]) ATTR_WARN_UNUSED_RESULT
MINLINE float dot_m4_v3_row_z(const float M[4][4], const float a[3]) ATTR_WARN_UNUSED_RESULT
MINLINE void abs_v3(float r[3])
void interp_v2_v2v2_db(double target[2], const double a[2], const double b[2], const double t)
Definition: math_vector.c:1465
MINLINE void madd_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE void copy_v3_v3_short(short r[3], const short a[3])
MINLINE void copy_v2_uchar(unsigned char r[2], const unsigned char a)
void interp_v4_v4v4v4(float p[4], const float v1[4], const float v2[4], const float v3[4], const float w[3])
Definition: math_vector.c:213
void flip_v2_v2v2(float v[2], const float v1[2], const float v2[2])
Definition: math_vector.c:385
MINLINE void copy_v2_v2_short(short r[2], const short a[2])
MINLINE float len_manhattan_v2(const float v[2]) ATTR_WARN_UNUSED_RESULT
MINLINE void negate_v3(float r[3])
MINLINE void sub_v2db_v2fl_v2fl(double r[2], const float a[2], const float b[2])
void print_vn(const char *str, const float v[], const int n)
Definition: math_vector.c:981
MINLINE float dot_m3_v3_row_z(const float M[3][3], const float a[3]) ATTR_WARN_UNUSED_RESULT
void interp_v3_v3v3v3v3(float p[3], const float v1[3], const float v2[3], const float v3[3], const float v4[3], const float w[4])
Definition: math_vector.c:201
float angle_signed_v2v2(const float v1[2], const float v2[2]) ATTR_WARN_UNUSED_RESULT
Definition: math_vector.c:499
MINLINE float cross_v2v2(const float a[2], const float b[2]) ATTR_WARN_UNUSED_RESULT
MINLINE void copy_v3fl_v3db(float r[3], const double a[3])
void mid_v3_v3_array(float r[3], const float(*vec_arr)[3], const unsigned int nbr)
Definition: math_vector.c:304
void minmax_v4v4_v4(float min[4], float max[4], const float vec[4])
Definition: math_vector.c:991
void dist_ensure_v2_v2fl(float v1[2], const float v2[2], const float dist)
Definition: math_vector.c:1079
MINLINE void clamp_v2_v2v2(float vec[2], const float min[2], const float max[2])
void copy_vn_uchar(unsigned char *array_tar, const int size, const unsigned char val)
Definition: math_vector.c:1401
MINLINE void zero_v4(float r[4])
MINLINE void copy_v3db_v3fl(double r[3], const float a[3])
MINLINE void invert_v3(float r[3])
MINLINE void clamp_v4(float vec[4], const float min, const float max)
void mid_v2_v2v2(float r[2], const float a[2], const float b[2])
Definition: math_vector.c:277
MINLINE float normalize_v3_v3(float r[3], const float a[3])
MINLINE float len_squared_v4v4(const float a[4], const float b[4]) ATTR_WARN_UNUSED_RESULT
MINLINE bool is_one_v3(const float a[3]) ATTR_WARN_UNUSED_RESULT
MINLINE double len_v2_db(const double v[2]) ATTR_WARN_UNUSED_RESULT
MINLINE float len_manhattan_v2v2(const float a[2], const float b[2]) ATTR_WARN_UNUSED_RESULT
MINLINE void add_v2_v2v2(float r[2], const float a[2], const float b[2])
MINLINE void negate_v3_short(short r[3])
void ortho_v2_v2(float out[2], const float v[2])
Definition: math_vector.c:903
MINLINE void copy_v2fl_v2db(float r[2], const double a[2])
bool interp_v2_v2v2_slerp(float target[2], const float a[2], const float b[2], const float t) ATTR_WARN_UNUSED_RESULT
Definition: math_vector.c:96
MINLINE void sub_v2_v2v2(float r[2], const float a[2], const float b[2])
MINLINE bool compare_v4v4(const float a[4], const float b[4], const float limit) ATTR_WARN_UNUSED_RESULT
MINLINE float line_point_side_v2(const float l1[2], const float l2[2], const float pt[2]) ATTR_WARN_UNUSED_RESULT
MINLINE void sub_v3_v3v3_int(int r[3], const int a[3], const int b[3])
MINLINE void zero_v2(float r[2])
void mul_vn_vnvn(float *array_tar, const float *array_src_a, const float *array_src_b, const int size)
Definition: math_vector.c:1230
MINLINE void copy_v4fl_v4db(float r[4], const double a[4])
void interp_v2_v2v2_slerp_safe(float target[2], const float a[2], const float b[2], const float t)
Definition: math_vector.c:142
bool is_finite_v4(const float a[4]) ATTR_WARN_UNUSED_RESULT
Definition: math_vector.c:403
MINLINE float mul_project_m4_v3_zfac(const float mat[4][4], const float co[3]) ATTR_WARN_UNUSED_RESULT
MINLINE void cross_v3_v3v3_db(double r[3], const double a[3], const double b[3])
MINLINE void copy_v4_v4_int(int r[4], const int a[4])
MINLINE bool compare_v4v4_relative(const float a[4], const float b[4], const float limit, const int max_ulps) ATTR_WARN_UNUSED_RESULT
MINLINE float len_manhattan_v3(const float v[3]) ATTR_WARN_UNUSED_RESULT
void angle_poly_v3(float *angles, const float *verts[3], int len)
Definition: math_vector.c:639
void range_vn_fl(float *array_tar, const int size, const float start, const float step)
Definition: math_vector.c:1192
void interp_vn_vn(float *array_tar, const float *array_src, const float t, const int size)
Definition: math_vector.c:1361
MINLINE float len_manhattan_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
MINLINE float dot_v2v2(const float a[2], const float b[2]) ATTR_WARN_UNUSED_RESULT
MINLINE bool equals_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
MINLINE void abs_v4_v4(float r[4], const float a[4])
void mid_v3_v3v3(float r[3], const float a[3], const float b[3])
Definition: math_vector.c:270
MINLINE void abs_v2_v2(float r[2], const float a[2])
void ortho_basis_v3v3_v3(float r_n1[3], float r_n2[3], const float n[3])
Definition: math_vector.c:845
void mul_vn_vn(float *array_tar, const float *array_src, const int size)
Definition: math_vector.c:1220
void msub_vn_vn(float *array_tar, const float *array_src, const float f, const int size)
Definition: math_vector.c:1336
MINLINE void swap_v3_v3(float a[3], float b[3])
void add_vn_vnvn_d(double *array_tar, const double *array_src_a, const double *array_src_b, const int size)
Definition: math_vector.c:1433
void reflect_v3_v3v3_db(double out[3], const double vec[3], const double normal[3])
Definition: math_vector.c:829
MINLINE float normalize_v3_length(float r[3], const float unit_scale)
MINLINE void copy_v3_fl(float r[3], float f)
MINLINE void abs_v3_v3(float r[3], const float a[3])
MINLINE void madd_v3_v3v3fl(float r[3], const float a[3], const float b[3], float f)
MINLINE bool is_zero_v2(const float a[3]) ATTR_WARN_UNUSED_RESULT
MINLINE float len_v2v2(const float a[2], const float b[2]) ATTR_WARN_UNUSED_RESULT
MINLINE float len_v2(const float a[2]) ATTR_WARN_UNUSED_RESULT
void range_vn_i(int *array_tar, const int size, const int start)
Definition: math_vector.c:1172
MINLINE float normalize_v3_v3_length(float r[3], const float a[3], const float unit_scale)
MINLINE void sub_v4_v4(float r[4], const float a[4])
MINLINE void madd_v4_v4fl(float r[4], const float a[4], float f)
MINLINE void copy_v3_v3_db(double r[3], const double a[3])
MINLINE void zero_v3(float r[3])
void flip_v4_v4v4(float v[4], const float v1[4], const float v2[4])
Definition: math_vector.c:370
void flip_v3_v3v3(float v[3], const float v1[3], const float v2[3])
Definition: math_vector.c:378
MINLINE void clamp_v3_v3v3(float vec[3], const float min[3], const float max[3])
float angle_v3v3v3(const float a[3], const float b[3], const float c[3]) ATTR_WARN_UNUSED_RESULT
Definition: math_vector.c:417
MINLINE void copy_v4_v4_db(double r[4], const double a[4])
MINLINE void negate_v3_db(double r[3])
MINLINE void mul_v3_v3fl(float r[3], const float a[3], float f)
MINLINE void add_v4_fl(float r[4], float f)
void project_plane_v2_v2v2(float out[2], const float p[2], const float v_plane[2])
Definition: math_vector.c:749
MINLINE float normalize_v2(float r[2])
MINLINE void star_m3_v3(float rmat[3][3], float a[3])
MINLINE void mul_v2_v2fl(float r[2], const float a[2], float f)
MINLINE void add_v2_v2_int(int r[2], const int a[2])
void interp_v4_v4v4_uchar(unsigned char target[4], const unsigned char a[4], const unsigned char b[4], const float t)
Definition: math_vector.c:256
void dist_ensure_v3_v3fl(float v1[3], const float v2[3], const float dist)
Definition: math_vector.c:1068
float angle_normalized_v3v3(const float v1[3], const float v2[3]) ATTR_WARN_UNUSED_RESULT
Definition: math_vector.c:505
MINLINE bool equals_v2v2_int(const int v1[2], const int v2[2]) ATTR_WARN_UNUSED_RESULT
MINLINE void add_v2_v2_db(double r[2], const double a[2])
MINLINE float dot_m4_v3_row_x(const float M[4][4], const float a[3]) ATTR_WARN_UNUSED_RESULT
MINLINE void add_v3_v3(float r[3], const float a[3])
MINLINE void invert_v2(float r[2])
void project_v3_v3v3_db(double out[3], const double p[3], const double v_proj[3])
Definition: math_vector.c:688
MINLINE int len_manhattan_v2_int(const int v[2]) ATTR_WARN_UNUSED_RESULT
double len_squared_vn(const float *array, const int size) ATTR_WARN_UNUSED_RESULT
Definition: math_vector.c:1141
void mul_vn_fl(float *array_tar, const int size, const float f)
Definition: math_vector.c:1244
MINLINE void copy_v4_fl(float r[4], float f)
MINLINE float normalize_v2_v2(float r[2], const float a[2])
void interp_v3_v3v3v3_uv(float p[3], const float v1[3], const float v2[3], const float v3[3], const float uv[2])
Definition: math_vector.c:235
bool interp_v3_v3v3_slerp(float target[3], const float a[3], const float b[3], const float t) ATTR_WARN_UNUSED_RESULT
Definition: math_vector.c:74
MINLINE bool is_zero_v4_db(const double a[4]) ATTR_WARN_UNUSED_RESULT
MINLINE void copy_v2_v2_uchar(unsigned char r[2], const unsigned char a[2])
MINLINE void zero_v3_db(double r[3])
MINLINE float dot_m4_v3_row_y(const float M[4][4], const float a[3]) ATTR_WARN_UNUSED_RESULT
MINLINE void negate_v4_v4(float r[4], const float a[3])
double dot_vn_vn(const float *array_src_a, const float *array_src_b, const int size) ATTR_WARN_UNUSED_RESULT
Definition: math_vector.c:1129
MINLINE void normal_float_to_short_v2(short r[2], const float n[2])
void range_vn_u(unsigned int *array_tar, const int size, const unsigned int start)
Definition: math_vector.c:1182
void rotate_normalized_v3_v3v3fl(float out[3], const float p[3], const float axis[3], const float angle)
Definition: math_vector.c:929
MINLINE void sub_v4_v4v4(float r[4], const float a[4], const float b[4])
MINLINE void negate_v4(float r[4])
void mid_v3_v3v3v3(float v[3], const float v1[3], const float v2[3], const float v3[3])
Definition: math_vector.c:289
void interp_v2_v2v2v2v2_cubic(float p[2], const float v1[2], const float v2[2], const float v3[2], const float v4[2], const float u)
Definition: math_vector.c:168
void project_v2_v2v2(float out[2], const float p[2], const float v_proj[2])
Definition: math_vector.c:658
MINLINE double cross_v2v2_db(const double a[2], const double b[2]) ATTR_WARN_UNUSED_RESULT
void bisect_v3_v3v3v3(float r[3], const float a[3], const float b[3], const float c[3])
Definition: math_vector.c:791
MINLINE float len_v3(const float a[3]) ATTR_WARN_UNUSED_RESULT
MINLINE void sub_v3_v3v3_db(double r[3], const double a[3], const double b[3])
MINLINE void copy_v2_fl(float r[2], float f)
MINLINE void sub_v2_v2v2_db(double r[2], const double a[2], const double b[2])
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble z
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble y2 _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat y2 _GL_VOID_RET _GL_VOID GLint GLint GLint y2 _GL_VOID_RET _GL_VOID GLshort GLshort GLshort y2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLuint *buffer _GL_VOID_RET _GL_VOID GLdouble t _GL_VOID_RET _GL_VOID GLfloat t _GL_VOID_RET _GL_VOID GLint t _GL_VOID_RET _GL_VOID GLshort t _GL_VOID_RET _GL_VOID GLdouble GLdouble r _GL_VOID_RET _GL_VOID GLfloat GLfloat r _GL_VOID_RET _GL_VOID GLint GLint r _GL_VOID_RET _GL_VOID GLshort GLshort r _GL_VOID_RET _GL_VOID GLdouble GLdouble r
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble y2 _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat y2 _GL_VOID_RET _GL_VOID GLint GLint GLint y2 _GL_VOID_RET _GL_VOID GLshort GLshort GLshort y2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLuint *buffer _GL_VOID_RET _GL_VOID GLdouble t _GL_VOID_RET _GL_VOID GLfloat t _GL_VOID_RET _GL_VOID GLint t _GL_VOID_RET _GL_VOID GLshort t _GL_VOID_RET _GL_VOID GLdouble t
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble v1
ATTR_WARN_UNUSED_RESULT const BMVert * v2
ATTR_WARN_UNUSED_RESULT const BMVert * v
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
Definition: btDbvt.cpp:52
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
Definition: btQuadWord.h:119
SIMD_FORCE_INLINE btScalar angle(const btVector3 &v) const
Return the angle between this and another vector.
Definition: btVector3.h:356
#define str(s)
static float verts[][3]
IconTextureDrawCall normal
#define M
static unsigned c
Definition: RandGen.cpp:97
static unsigned a[3]
Definition: RandGen.cpp:92
#define min(a, b)
Definition: sort.c:51
float max
uint len