Blender  V3.3
BLI_math_vector.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2001-2002 NaN Holding BV. All rights reserved. */
3 
4 #pragma once
5 
10 #include "BLI_compiler_attrs.h"
11 #include "BLI_math_inline.h"
12 #include "BLI_utildefines.h"
13 
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17 
18 /* -------------------------------------------------------------------- */
22 #ifdef BLI_MATH_GCC_WARN_PRAGMA
23 # pragma GCC diagnostic push
24 # pragma GCC diagnostic ignored "-Wredundant-decls"
25 #endif
26 
27 MINLINE void zero_v2(float r[2]);
28 MINLINE void zero_v3(float r[3]);
29 MINLINE void zero_v4(float r[4]);
30 
31 MINLINE void copy_v2_v2(float r[2], const float a[2]);
32 MINLINE void copy_v3_v3(float r[3], const float a[3]);
33 MINLINE void copy_v4_v4(float r[4], const float a[4]);
34 
35 MINLINE void copy_v2_fl(float r[2], float f);
36 MINLINE void copy_v3_fl(float r[3], float f);
37 MINLINE void copy_v4_fl(float r[4], float f);
38 
39 MINLINE void swap_v2_v2(float a[2], float b[2]);
40 MINLINE void swap_v3_v3(float a[3], float b[3]);
41 MINLINE void swap_v4_v4(float a[4], float b[4]);
42 
43 MINLINE void swap_v2_v2_db(double a[2], double b[2]);
44 MINLINE void swap_v3_v3_db(double a[3], double b[3]);
45 MINLINE void swap_v4_v4_db(double a[4], double b[4]);
46 
47 /* unsigned char */
48 
49 MINLINE void copy_v2_v2_uchar(unsigned char r[2], const unsigned char a[2]);
50 MINLINE void copy_v3_v3_uchar(unsigned char r[3], const unsigned char a[3]);
51 MINLINE void copy_v4_v4_uchar(unsigned char r[4], const unsigned char a[4]);
52 
53 MINLINE void copy_v2_uchar(unsigned char r[2], unsigned char a);
54 MINLINE void copy_v3_uchar(unsigned char r[3], unsigned char a);
55 MINLINE void copy_v4_uchar(unsigned char r[4], unsigned char a);
56 
57 /* char */
58 
59 MINLINE void copy_v2_v2_char(char r[2], const char a[2]);
60 MINLINE void copy_v3_v3_char(char r[3], const char a[3]);
61 MINLINE void copy_v4_v4_char(char r[4], const char a[4]);
62 
63 /* short */
64 
65 MINLINE void copy_v2_v2_short(short r[2], const short a[2]);
66 MINLINE void copy_v3_v3_short(short r[3], const short a[3]);
67 MINLINE void copy_v4_v4_short(short r[4], const short a[4]);
68 
69 /* int */
70 
71 MINLINE void zero_v3_int(int r[3]);
72 MINLINE void copy_v2_v2_int(int r[2], const int a[2]);
73 MINLINE void copy_v3_v3_int(int r[3], const int a[3]);
74 MINLINE void copy_v4_v4_int(int r[4], const int a[4]);
75 
76 /* double */
77 
78 MINLINE void zero_v3_db(double r[3]);
79 MINLINE void copy_v2_v2_db(double r[2], const double a[2]);
80 MINLINE void copy_v3_v3_db(double r[3], const double a[3]);
81 MINLINE void copy_v4_v4_db(double r[4], const double a[4]);
82 
83 /* short -> float */
84 
85 MINLINE void copy_v3fl_v3s(float r[3], const short a[3]);
86 
87 /* int <-> float */
88 
89 MINLINE void copy_v2fl_v2i(float r[2], const int a[2]);
90 
91 /* int <-> float */
92 
93 MINLINE void round_v2i_v2fl(int r[2], const float a[2]);
94 
95 /* double -> float */
96 
97 MINLINE void copy_v2fl_v2db(float r[2], const double a[2]);
98 MINLINE void copy_v3fl_v3db(float r[3], const double a[3]);
99 MINLINE void copy_v4fl_v4db(float r[4], const double a[4]);
100 
101 /* float -> double */
102 
103 MINLINE void copy_v2db_v2fl(double r[2], const float a[2]);
104 MINLINE void copy_v3db_v3fl(double r[3], const float a[3]);
105 MINLINE void copy_v4db_v4fl(double r[4], const float a[4]);
106 
107 /* float args -> vec */
108 
109 MINLINE void copy_v2_fl2(float v[2], float x, float y);
110 MINLINE void copy_v3_fl3(float v[3], float x, float y, float z);
111 MINLINE void copy_v4_fl4(float v[4], float x, float y, float z, float w);
112 
115 /* -------------------------------------------------------------------- */
119 MINLINE void add_v2_fl(float r[2], float f);
120 MINLINE void add_v3_fl(float r[3], float f);
121 MINLINE void add_v4_fl(float r[4], float f);
122 MINLINE void add_v2_v2(float r[2], const float a[2]);
123 MINLINE void add_v2_v2_db(double r[2], const double a[2]);
124 MINLINE void add_v2_v2v2(float r[2], const float a[2], const float b[2]);
125 MINLINE void add_v2_v2_int(int r[2], const int a[2]);
126 MINLINE void add_v2_v2v2_int(int r[2], const int a[2], const int b[2]);
127 MINLINE void add_v3_v3(float r[3], const float a[3]);
128 MINLINE void add_v3_v3_db(double r[3], const double a[3]);
129 MINLINE void add_v3_v3v3(float r[3], const float a[3], const float b[3]);
130 MINLINE void add_v4_v4(float r[4], const float a[4]);
131 MINLINE void add_v4_v4v4(float r[4], const float a[4], const float b[4]);
132 
133 MINLINE void add_v3fl_v3fl_v3i(float r[3], const float a[3], const int b[3]);
134 
135 MINLINE void sub_v2_v2(float r[2], const float a[2]);
136 MINLINE void sub_v2_v2v2(float r[2], const float a[2], const float b[2]);
137 MINLINE void sub_v2_v2v2_db(double r[2], const double a[2], const double b[2]);
138 MINLINE void sub_v2_v2v2_int(int r[2], const int a[2], const int b[2]);
139 MINLINE void sub_v3_v3(float r[3], const float a[3]);
140 MINLINE void sub_v3_v3v3(float r[3], const float a[3], const float b[3]);
141 MINLINE void sub_v3_v3v3_int(int r[3], const int a[3], const int b[3]);
142 MINLINE void sub_v3_v3v3_db(double r[3], const double a[3], const double b[3]);
143 MINLINE void sub_v4_v4(float r[4], const float a[4]);
144 MINLINE void sub_v4_v4v4(float r[4], const float a[4], const float b[4]);
145 
146 MINLINE void sub_v2db_v2fl_v2fl(double r[2], const float a[2], const float b[2]);
147 MINLINE void sub_v3db_v3fl_v3fl(double r[3], const float a[3], const float b[3]);
148 
149 MINLINE void mul_v2_fl(float r[2], float f);
150 MINLINE void mul_v2_v2fl(float r[2], const float a[2], float f);
151 MINLINE void mul_v3_fl(float r[3], float f);
152 MINLINE void mul_v3db_db(double r[3], double f);
153 MINLINE void mul_v3_v3fl(float r[3], const float a[3], float f);
154 MINLINE void mul_v3_v3db_db(double r[3], const double a[3], double f);
155 MINLINE void mul_v2_v2(float r[2], const float a[2]);
156 MINLINE void mul_v2_v2v2(float r[2], const float a[2], const float b[2]);
157 MINLINE void mul_v3_v3(float r[3], const float a[3]);
158 MINLINE void mul_v3_v3v3(float r[3], const float a[3], const float b[3]);
159 MINLINE void mul_v4_fl(float r[4], float f);
160 MINLINE void mul_v4_v4(float r[4], const float a[4]);
161 MINLINE void mul_v4_v4fl(float r[4], const float a[4], float f);
162 MINLINE void mul_v2_v2_cw(float r[2], const float mat[2], const float vec[2]);
163 MINLINE void mul_v2_v2_ccw(float r[2], const float mat[2], const float vec[2]);
176 MINLINE float mul_project_m4_v3_zfac(const float mat[4][4],
177  const float co[3]) ATTR_WARN_UNUSED_RESULT;
181 MINLINE float dot_m3_v3_row_x(const float M[3][3], const float a[3]) ATTR_WARN_UNUSED_RESULT;
182 MINLINE float dot_m3_v3_row_y(const float M[3][3], const float a[3]) ATTR_WARN_UNUSED_RESULT;
183 MINLINE float dot_m3_v3_row_z(const float M[3][3], const float a[3]) ATTR_WARN_UNUSED_RESULT;
188 MINLINE float dot_m4_v3_row_x(const float M[4][4], const float a[3]) ATTR_WARN_UNUSED_RESULT;
189 MINLINE float dot_m4_v3_row_y(const float M[4][4], const float a[3]) ATTR_WARN_UNUSED_RESULT;
190 MINLINE float dot_m4_v3_row_z(const float M[4][4], const float a[3]) ATTR_WARN_UNUSED_RESULT;
191 
192 MINLINE void madd_v2_v2fl(float r[2], const float a[2], float f);
193 MINLINE void madd_v3_v3fl(float r[3], const float a[3], float f);
194 MINLINE void madd_v3_v3v3(float r[3], const float a[3], const float b[3]);
195 MINLINE void madd_v2_v2v2fl(float r[2], const float a[2], const float b[2], float f);
196 MINLINE void madd_v3_v3v3fl(float r[3], const float a[3], const float b[3], float f);
197 MINLINE void madd_v3_v3v3db_db(double r[3], const double a[3], const double b[3], double f);
198 MINLINE void madd_v3_v3v3v3(float r[3], const float a[3], const float b[3], const float c[3]);
199 MINLINE void madd_v4_v4fl(float r[4], const float a[4], float f);
200 MINLINE void madd_v4_v4v4(float r[4], const float a[4], const float b[4]);
201 
202 MINLINE void madd_v3fl_v3fl_v3fl_v3i(float r[3],
203  const float a[3],
204  const float b[3],
205  const int c[3]);
206 
207 MINLINE void negate_v2(float r[2]);
208 MINLINE void negate_v2_v2(float r[2], const float a[2]);
209 MINLINE void negate_v3(float r[3]);
210 MINLINE void negate_v3_v3(float r[3], const float a[3]);
211 MINLINE void negate_v4(float r[4]);
212 MINLINE void negate_v4_v4(float r[4], const float a[4]);
213 
214 /* could add more... */
215 
216 MINLINE void negate_v3_short(short r[3]);
217 MINLINE void negate_v3_db(double r[3]);
218 
219 MINLINE void invert_v2(float r[2]);
220 MINLINE void invert_v3(float r[3]);
224 MINLINE void invert_v3_safe(float r[3]);
225 
226 MINLINE void abs_v2(float r[2]);
227 MINLINE void abs_v2_v2(float r[2], const float a[2]);
228 MINLINE void abs_v3(float r[3]);
229 MINLINE void abs_v3_v3(float r[3], const float a[3]);
230 MINLINE void abs_v4(float r[4]);
231 MINLINE void abs_v4_v4(float r[4], const float a[4]);
232 
233 MINLINE float dot_v2v2(const float a[2], const float b[2]) ATTR_WARN_UNUSED_RESULT;
234 MINLINE double dot_v2v2_db(const double a[2], const double b[2]) ATTR_WARN_UNUSED_RESULT;
235 MINLINE float dot_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT;
236 MINLINE float dot_v3v3v3(const float p[3],
237  const float a[3],
238  const float b[3]) ATTR_WARN_UNUSED_RESULT;
239 MINLINE float dot_v4v4(const float a[4], const float b[4]) ATTR_WARN_UNUSED_RESULT;
240 
241 MINLINE double dot_v3db_v3fl(const double a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT;
242 
243 MINLINE double dot_v3v3_db(const double a[3], const double b[3]) ATTR_WARN_UNUSED_RESULT;
244 
245 MINLINE float cross_v2v2(const float a[2], const float b[2]) ATTR_WARN_UNUSED_RESULT;
246 MINLINE double cross_v2v2_db(const double a[2], const double b[2]) ATTR_WARN_UNUSED_RESULT;
247 MINLINE void cross_v3_v3v3(float r[3], const float a[3], const float b[3]);
252 MINLINE void cross_v3_v3v3_hi_prec(float r[3], const float a[3], const float b[3]);
253 MINLINE void cross_v3_v3v3_db(double r[3], const double a[3], const double b[3]);
254 
259 MINLINE void add_newell_cross_v3_v3v3(float n[3], const float v_prev[3], const float v_curr[3]);
260 
261 MINLINE void star_m3_v3(float rmat[3][3], const float a[3]);
262 
265 /* -------------------------------------------------------------------- */
269 MINLINE float len_squared_v2(const float v[2]) ATTR_WARN_UNUSED_RESULT;
270 MINLINE float len_squared_v3(const float v[3]) ATTR_WARN_UNUSED_RESULT;
271 MINLINE float len_manhattan_v2(const float v[2]) ATTR_WARN_UNUSED_RESULT;
273 MINLINE float len_manhattan_v3(const float v[3]) ATTR_WARN_UNUSED_RESULT;
274 MINLINE float len_v2(const float a[2]) ATTR_WARN_UNUSED_RESULT;
275 MINLINE double len_v2_db(const double v[2]) ATTR_WARN_UNUSED_RESULT;
276 MINLINE float len_v2v2(const float a[2], const float b[2]) ATTR_WARN_UNUSED_RESULT;
277 MINLINE double len_v2v2_db(const double a[2], const double b[2]) ATTR_WARN_UNUSED_RESULT;
278 MINLINE float len_v2v2_int(const int v1[2], const int v2[2]);
279 MINLINE float len_squared_v2v2(const float a[2], const float b[2]) ATTR_WARN_UNUSED_RESULT;
280 MINLINE double len_squared_v2v2_db(const double a[2], const double b[2]) ATTR_WARN_UNUSED_RESULT;
281 MINLINE float len_squared_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT;
282 MINLINE float len_squared_v4v4(const float a[4], const float b[4]) ATTR_WARN_UNUSED_RESULT;
283 MINLINE float len_manhattan_v2v2(const float a[2], const float b[2]) ATTR_WARN_UNUSED_RESULT;
284 MINLINE int len_manhattan_v2v2_int(const int a[2], const int b[2]) ATTR_WARN_UNUSED_RESULT;
285 MINLINE float len_manhattan_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT;
286 MINLINE float len_v3(const float a[3]) ATTR_WARN_UNUSED_RESULT;
287 MINLINE float len_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT;
288 
289 MINLINE double len_v3_db(const double a[3]) ATTR_WARN_UNUSED_RESULT;
290 MINLINE double len_squared_v3_db(const double v[3]) ATTR_WARN_UNUSED_RESULT;
291 MINLINE float normalize_v2_length(float r[2], float unit_scale);
295 MINLINE float normalize_v2_v2_length(float r[2], const float a[2], float unit_scale);
296 MINLINE float normalize_v3_length(float r[3], float unit_scale);
300 MINLINE float normalize_v3_v3_length(float r[3], const float a[3], float unit_scale);
301 MINLINE double normalize_v3_length_db(double n[3], double unit_scale);
302 MINLINE double normalize_v3_v3_length_db(double r[3], const double a[3], double unit_scale);
303 
304 MINLINE float normalize_v2(float r[2]);
305 MINLINE float normalize_v2_v2(float r[2], const float a[2]);
306 MINLINE float normalize_v3(float r[3]);
307 MINLINE float normalize_v3_v3(float r[3], const float a[3]);
308 MINLINE double normalize_v3_v3_db(double r[3], const double a[3]);
309 MINLINE double normalize_v3_db(double n[3]);
310 
313 /* -------------------------------------------------------------------- */
317 void interp_v2_v2v2(float r[2], const float a[2], const float b[2], float t);
318 void interp_v2_v2v2_db(double target[2], const double a[2], const double b[2], double t);
323 void interp_v2_v2v2v2(
324  float r[2], const float a[2], const float b[2], const float c[2], const float t[3]);
325 void interp_v3_v3v3(float r[3], const float a[3], const float b[3], float t);
326 void interp_v3_v3v3_db(double target[3], const double a[3], const double b[3], double t);
331 void interp_v3_v3v3v3(
332  float p[3], const float v1[3], const float v2[3], const float v3[3], const float w[3]);
337 void interp_v3_v3v3v3v3(float p[3],
338  const float v1[3],
339  const float v2[3],
340  const float v3[3],
341  const float v4[3],
342  const float w[4]);
343 void interp_v4_v4v4(float r[4], const float a[4], const float b[4], float t);
344 void interp_v4_v4v4v4(
345  float p[4], const float v1[4], const float v2[4], const float v3[4], const float w[3]);
346 void interp_v4_v4v4v4v4(float p[4],
347  const float v1[4],
348  const float v2[4],
349  const float v3[4],
350  const float v4[4],
351  const float w[4]);
353  float p[3], const float v1[3], const float v2[3], const float v3[3], const float uv[2]);
354 
361 bool interp_v3_v3v3_slerp(float target[3], const float a[3], const float b[3], float t)
363 bool interp_v2_v2v2_slerp(float target[2], const float a[2], const float b[2], float t)
365 
369 void interp_v3_v3v3_slerp_safe(float target[3], const float a[3], const float b[3], float t);
370 void interp_v2_v2v2_slerp_safe(float target[2], const float a[2], const float b[2], float t);
371 
372 void interp_v2_v2v2v2v2_cubic(float p[2],
373  const float v1[2],
374  const float v2[2],
375  const float v3[2],
376  const float v4[2],
377  float u);
378 
379 void interp_v3_v3v3_char(char target[3], const char a[3], const char b[3], float t);
380 void interp_v3_v3v3_uchar(unsigned char target[3],
381  const unsigned char a[3],
382  const unsigned char b[3],
383  float t);
384 void interp_v4_v4v4_char(char target[4], const char a[4], const char b[4], float t);
385 void interp_v4_v4v4_uchar(unsigned char target[4],
386  const unsigned char a[4],
387  const unsigned char b[4],
388  float t);
389 
390 void mid_v3_v3v3(float r[3], const float a[3], const float b[3]);
391 void mid_v2_v2v2(float r[2], const float a[2], const float b[2]);
392 void mid_v3_v3v3v3(float v[3], const float v1[3], const float v2[3], const float v3[3]);
393 void mid_v2_v2v2v2(float v[2], const float v1[2], const float v2[2], const float v3[2]);
394 void mid_v3_v3v3v3v3(
395  float v[3], const float v1[3], const float v2[3], const float v3[3], const float v4[3]);
396 void mid_v3_v3_array(float r[3], const float (*vec_arr)[3], unsigned int vec_arr_num);
397 
410 void mid_v3_v3v3_angle_weighted(float r[3], const float a[3], const float b[3]);
415 void mid_v3_angle_weighted(float r[3]);
416 
417 void flip_v4_v4v4(float v[4], const float v1[4], const float v2[4]);
418 void flip_v3_v3v3(float v[3], const float v1[3], const float v2[3]);
419 void flip_v2_v2v2(float v[2], const float v1[2], const float v2[2]);
420 
423 /* -------------------------------------------------------------------- */
427 MINLINE bool is_zero_v2(const float a[2]) ATTR_WARN_UNUSED_RESULT;
428 MINLINE bool is_zero_v3(const float a[3]) ATTR_WARN_UNUSED_RESULT;
429 MINLINE bool is_zero_v4(const float a[4]) ATTR_WARN_UNUSED_RESULT;
430 
431 MINLINE bool is_zero_v2_db(const double a[2]) ATTR_WARN_UNUSED_RESULT;
432 MINLINE bool is_zero_v3_db(const double a[3]) ATTR_WARN_UNUSED_RESULT;
433 MINLINE bool is_zero_v4_db(const double a[4]) ATTR_WARN_UNUSED_RESULT;
434 
435 bool is_finite_v2(const float a[2]) ATTR_WARN_UNUSED_RESULT;
436 bool is_finite_v3(const float a[3]) ATTR_WARN_UNUSED_RESULT;
437 bool is_finite_v4(const float a[4]) ATTR_WARN_UNUSED_RESULT;
438 
439 MINLINE bool is_one_v3(const float a[3]) ATTR_WARN_UNUSED_RESULT;
440 
441 MINLINE bool equals_v2v2(const float v1[2], const float v2[2]) ATTR_WARN_UNUSED_RESULT;
442 MINLINE bool equals_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT;
443 MINLINE bool equals_v4v4(const float a[4], const float b[4]) ATTR_WARN_UNUSED_RESULT;
444 
445 MINLINE bool equals_v2v2_int(const int v1[2], const int v2[2]) ATTR_WARN_UNUSED_RESULT;
446 MINLINE bool equals_v3v3_int(const int v1[3], const int v2[3]) ATTR_WARN_UNUSED_RESULT;
447 MINLINE bool equals_v4v4_int(const int v1[4], const int v2[4]) ATTR_WARN_UNUSED_RESULT;
448 
449 MINLINE bool compare_v2v2(const float a[2], const float b[2], float limit) ATTR_WARN_UNUSED_RESULT;
450 MINLINE bool compare_v3v3(const float a[3], const float b[3], float limit) ATTR_WARN_UNUSED_RESULT;
451 MINLINE bool compare_v4v4(const float a[4], const float b[4], float limit) ATTR_WARN_UNUSED_RESULT;
452 
453 MINLINE bool compare_v2v2_relative(const float a[2], const float b[2], float limit, int max_ulps)
455 MINLINE bool compare_v3v3_relative(const float a[3], const float b[3], float limit, int max_ulps)
457 MINLINE bool compare_v4v4_relative(const float a[4], const float b[4], float limit, int max_ulps)
459 
460 MINLINE bool compare_len_v3v3(const float a[3],
461  const float b[3],
462  float limit) ATTR_WARN_UNUSED_RESULT;
463 
464 MINLINE bool compare_size_v3v3(const float a[3],
465  const float b[3],
466  float limit) ATTR_WARN_UNUSED_RESULT;
467 
480 MINLINE float line_point_side_v2(const float l1[2],
481  const float l2[2],
482  const float pt[2]) ATTR_WARN_UNUSED_RESULT;
483 
486 /* -------------------------------------------------------------------- */
490 /* - angle with 2 arguments is angle between vector.
491  * - angle with 3 arguments is angle between 3 points at the middle point.
492  * - angle_normalized_* is faster equivalent if vectors are normalized.
493  */
494 
498 float angle_v2v2(const float a[2], const float b[2]) ATTR_WARN_UNUSED_RESULT;
499 float angle_signed_v2v2(const float v1[2], const float v2[2]) ATTR_WARN_UNUSED_RESULT;
500 float angle_v2v2v2(const float a[2], const float b[2], const float c[2]) ATTR_WARN_UNUSED_RESULT;
501 float angle_normalized_v2v2(const float a[2], const float b[2]) ATTR_WARN_UNUSED_RESULT;
505 float angle_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT;
514 float angle_v3v3v3(const float a[3], const float b[3], const float c[3]) ATTR_WARN_UNUSED_RESULT;
518 float cos_v3v3v3(const float p1[3], const float p2[3], const float p3[3]) ATTR_WARN_UNUSED_RESULT;
522 float cos_v2v2v2(const float p1[2], const float p2[2], const float p3[2]) ATTR_WARN_UNUSED_RESULT;
526 float angle_on_axis_v3v3_v3(const float v1[3],
527  const float v2[3],
528  const float axis[3]) ATTR_WARN_UNUSED_RESULT;
529 float angle_signed_on_axis_v3v3_v3(const float v1[3],
530  const float v2[3],
531  const float axis[3]) ATTR_WARN_UNUSED_RESULT;
532 float angle_normalized_v3v3(const float v1[3], const float v2[3]) ATTR_WARN_UNUSED_RESULT;
536 float angle_on_axis_v3v3v3_v3(const float v1[3],
537  const float v2[3],
538  const float v3[3],
539  const float axis[3]) ATTR_WARN_UNUSED_RESULT;
540 float angle_signed_on_axis_v3v3v3_v3(const float v1[3],
541  const float v2[3],
542  const float v3[3],
543  const float axis[3]) ATTR_WARN_UNUSED_RESULT;
544 void angle_tri_v3(float angles[3], const float v1[3], const float v2[3], const float v3[3]);
545 void angle_quad_v3(
546  float angles[4], const float v1[3], const float v2[3], const float v3[3], const float v4[3]);
547 void angle_poly_v3(float *angles, const float *verts[3], int len);
548 
551 /* -------------------------------------------------------------------- */
558 void project_v2_v2v2(float out[2], const float p[2], const float v_proj[2]);
562 void project_v3_v3v3(float out[3], const float p[3], const float v_proj[3]);
563 void project_v3_v3v3_db(double out[3], const double p[3], const double v_proj[3]);
567 void project_v2_v2v2_normalized(float out[2], const float p[2], const float v_proj[2]);
571 void project_v3_v3v3_normalized(float out[3], const float p[3], const float v_proj[3]);
585 void project_plane_v3_v3v3(float out[3], const float p[3], const float v_plane[3]);
586 void project_plane_v2_v2v2(float out[2], const float p[2], const float v_plane[2]);
587 void project_plane_normalized_v3_v3v3(float out[3], const float p[3], const float v_plane[3]);
588 void project_plane_normalized_v2_v2v2(float out[2], const float p[2], const float v_plane[2]);
592 void project_v3_plane(float out[3], const float plane_no[3], const float plane_co[3]);
609 void reflect_v3_v3v3(float out[3], const float vec[3], const float normal[3]);
610 void reflect_v3_v3v3_db(double out[3], const double vec[3], const double normal[3]);
616 void ortho_basis_v3v3_v3(float r_n1[3], float r_n2[3], const float n[3]);
622 void ortho_v3_v3(float out[3], const float v[3]);
626 void ortho_v2_v2(float out[2], const float v[2]);
630 void bisect_v3_v3v3v3(float r[3], const float a[3], const float b[3], const float c[3]);
634 void rotate_v2_v2fl(float r[2], const float p[2], float angle);
635 void rotate_v3_v3v3fl(float r[3], const float p[3], const float axis[3], float angle);
640 void rotate_normalized_v3_v3v3fl(float out[3], const float p[3], const float axis[3], float angle);
641 
644 /* -------------------------------------------------------------------- */
648 void print_v2(const char *str, const float v[2]);
649 void print_v3(const char *str, const float v[3]);
650 void print_v4(const char *str, const float v[4]);
651 void print_vn(const char *str, const float v[], int n);
652 
653 #define print_v2_id(v) print_v2(STRINGIFY(v), v)
654 #define print_v3_id(v) print_v3(STRINGIFY(v), v)
655 #define print_v4_id(v) print_v4(STRINGIFY(v), v)
656 #define print_vn_id(v, n) print_vn(STRINGIFY(v), v, n)
657 
658 MINLINE void normal_float_to_short_v2(short r[2], const float n[2]);
659 MINLINE void normal_short_to_float_v3(float r[3], const short n[3]);
660 MINLINE void normal_float_to_short_v3(short r[3], const float n[3]);
661 MINLINE void normal_float_to_short_v4(short r[4], const float n[4]);
662 
663 void minmax_v4v4_v4(float min[4], float max[4], const float vec[4]);
664 void minmax_v3v3_v3(float min[3], float max[3], const float vec[3]);
665 void minmax_v2v2_v2(float min[2], float max[2], const float vec[2]);
666 
667 void minmax_v3v3_v3_array(float r_min[3],
668  float r_max[3],
669  const float (*vec_arr)[3],
670  int var_arr_num);
671 
673 void dist_ensure_v3_v3fl(float v1[3], const float v2[3], float dist);
674 void dist_ensure_v2_v2fl(float v1[2], const float v2[2], float dist);
675 
676 void axis_sort_v3(const float axis_values[3], int r_axis_order[3]);
677 
678 MINLINE void clamp_v2(float vec[2], float min, float max);
679 MINLINE void clamp_v3(float vec[3], float min, float max);
680 MINLINE void clamp_v4(float vec[4], float min, float max);
681 MINLINE void clamp_v2_v2v2(float vec[2], const float min[2], const float max[2]);
682 MINLINE void clamp_v3_v3v3(float vec[3], const float min[3], const float max[3]);
683 MINLINE void clamp_v4_v4v4(float vec[4], const float min[4], const float max[4]);
684 
687 /* -------------------------------------------------------------------- */
695 double dot_vn_vn(const float *array_src_a,
696  const float *array_src_b,
698 double len_squared_vn(const float *array, int size) ATTR_WARN_UNUSED_RESULT;
699 float normalize_vn_vn(float *array_tar, const float *array_src, int size);
700 float normalize_vn(float *array_tar, int size);
701 void range_vn_i(int *array_tar, int size, int start);
702 void range_vn_u(unsigned int *array_tar, int size, unsigned int start);
703 void range_vn_fl(float *array_tar, int size, float start, float step);
704 void negate_vn(float *array_tar, int size);
705 void negate_vn_vn(float *array_tar, const float *array_src, int size);
706 void mul_vn_vn(float *array_tar, const float *array_src, int size);
707 void mul_vn_vnvn(float *array_tar, const float *array_src_a, const float *array_src_b, int size);
708 void mul_vn_fl(float *array_tar, int size, float f);
709 void mul_vn_vn_fl(float *array_tar, const float *array_src, int size, float f);
710 void add_vn_vn(float *array_tar, const float *array_src, int size);
711 void add_vn_vnvn(float *array_tar, const float *array_src_a, const float *array_src_b, int size);
712 void madd_vn_vn(float *array_tar, const float *array_src, float f, int size);
713 void madd_vn_vnvn(
714  float *array_tar, const float *array_src_a, const float *array_src_b, float f, int size);
715 void sub_vn_vn(float *array_tar, const float *array_src, int size);
716 void sub_vn_vnvn(float *array_tar, const float *array_src_a, const float *array_src_b, int size);
717 void msub_vn_vn(float *array_tar, const float *array_src, float f, int size);
718 void msub_vn_vnvn(
719  float *array_tar, const float *array_src_a, const float *array_src_b, float f, int size);
720 void interp_vn_vn(float *array_tar, const float *array_src, float t, int size);
721 void copy_vn_i(int *array_tar, int size, int val);
722 void copy_vn_short(short *array_tar, int size, short val);
723 void copy_vn_ushort(unsigned short *array_tar, int size, unsigned short val);
724 void copy_vn_uchar(unsigned char *array_tar, int size, unsigned char val);
725 void copy_vn_fl(float *array_tar, int size, float val);
726 
727 void add_vn_vn_d(double *array_tar, const double *array_src, int size);
728 void add_vn_vnvn_d(double *array_tar,
729  const double *array_src_a,
730  const double *array_src_b,
731  int size);
732 void mul_vn_db(double *array_tar, int size, double f);
733 
736 /* -------------------------------------------------------------------- */
740 #if BLI_MATH_DO_INLINE
741 # include "intern/math_vector_inline.c"
742 #endif
743 
744 #ifdef BLI_MATH_GCC_WARN_PRAGMA
745 # pragma GCC diagnostic pop
746 #endif
747 
750 #ifdef __cplusplus
751 }
752 #endif
#define ATTR_WARN_UNUSED_RESULT
#define MINLINE
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:263
void project_v2_v2v2_normalized(float out[2], const float p[2], const float v_proj[2])
Definition: math_vector.c:622
MINLINE bool is_zero_v3_db(const double a[3]) ATTR_WARN_UNUSED_RESULT
MINLINE double normalize_v3_length_db(double n[3], double unit_scale)
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 void mul_v4_fl(float r[4], float f)
float angle_v2v2v2(const float a[2], const float b[2], const float c[2]) ATTR_WARN_UNUSED_RESULT
Definition: math_vector.c:395
MINLINE double len_squared_v2v2_db(const double a[2], const double b[2]) ATTR_WARN_UNUSED_RESULT
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])
void minmax_v3v3_v3_array(float r_min[3], float r_max[3], const float(*vec_arr)[3], int var_arr_num)
Definition: math_vector.c:907
void add_vn_vn(float *array_tar, const float *array_src, int size)
Definition: math_vector.c:1112
MINLINE double len_v2v2_db(const double a[2], const double b[2]) ATTR_WARN_UNUSED_RESULT
void copy_vn_short(short *array_tar, int size, short val)
Definition: math_vector.c:1232
MINLINE bool compare_v3v3(const float a[3], const float b[3], float limit) ATTR_WARN_UNUSED_RESULT
MINLINE float normalize_v2_v2_length(float r[2], const float a[2], float unit_scale)
void rotate_v3_v3v3fl(float r[3], const float p[3], const float axis[3], float angle)
Definition: math_vector.c:800
void interp_v2_v2v2_slerp_safe(float target[2], const float a[2], const float b[2], float t)
Definition: math_vector.c:113
MINLINE void copy_v2fl_v2i(float r[2], const int a[2])
void interp_v3_v3v3_db(double target[3], const double a[3], const double b[3], double t)
Definition: math_vector.c:1305
MINLINE float normalize_v3_v3_length(float r[3], const float a[3], float unit_scale)
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:477
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:552
void axis_sort_v3(const float axis_values[3], int r_axis_order[3])
Definition: math_vector.c:939
MINLINE void abs_v4(float r[4])
double len_squared_vn(const float *array, int size) ATTR_WARN_UNUSED_RESULT
Definition: math_vector.c:990
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:385
void msub_vn_vn(float *array_tar, const float *array_src, float f, int size)
Definition: math_vector.c:1185
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:867
void madd_vn_vn(float *array_tar, const float *array_src, float f, int size)
Definition: math_vector.c:1136
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)
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:461
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
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:818
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])
MINLINE void madd_v2_v2v2fl(float r[2], const float a[2], const float b[2], float f)
void mul_vn_fl(float *array_tar, int size, float f)
Definition: math_vector.c:1093
void reflect_v3_v3v3(float out[3], const float vec[3], const float normal[3])
Definition: math_vector.c:691
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])
bool interp_v3_v3v3_slerp(float target[3], const float a[3], const float b[3], float t) ATTR_WARN_UNUSED_RESULT
Definition: math_vector.c:48
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:373
bool interp_v2_v2v2_slerp(float target[2], const float a[2], const float b[2], float t) ATTR_WARN_UNUSED_RESULT
Definition: math_vector.c:70
void project_plane_normalized_v2_v2v2(float out[2], const float p[2], const float v_plane[2])
Definition: math_vector.c:660
void mid_v3_v3_array(float r[3], const float(*vec_arr)[3], unsigned int vec_arr_num)
Definition: math_vector.c:271
MINLINE void clamp_v3(float vec[3], float min, float max)
MINLINE void mul_v4_v4(float r[4], const float a[4])
float normalize_vn(float *array_tar, int size)
Definition: math_vector.c:1016
float angle_v2v2(const float a[2], const float b[2]) ATTR_WARN_UNUSED_RESULT
Definition: math_vector.c:423
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])
MINLINE void madd_v3_v3v3db_db(double r[3], const double a[3], const double b[3], double f)
MINLINE void copy_v2_uchar(unsigned char r[2], unsigned char a)
void negate_vn(float *array_tar, int size)
Definition: math_vector.c:1050
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 madd_vn_vnvn(float *array_tar, const float *array_src_a, const float *array_src_b, float f, int size)
Definition: math_vector.c:1146
void interp_v2_v2v2v2v2_cubic(float p[2], const float v1[2], const float v2[2], const float v3[2], const float v4[2], float u)
Definition: math_vector.c:139
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:160
MINLINE void mul_v2_v2_ccw(float r[2], const float mat[2], const float vec[2])
MINLINE void copy_v4_uchar(unsigned char r[4], unsigned char a)
MINLINE void clamp_v4(float vec[4], float min, float max)
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:189
MINLINE double dot_v3db_v3fl(const double a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
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 swap_v3_v3_db(double a[3], double b[3])
MINLINE void sub_v3_v3v3(float r[3], const float a[3], const float b[3])
void add_vn_vnvn_d(double *array_tar, const double *array_src_a, const double *array_src_b, int size)
Definition: math_vector.c:1282
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])
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:534
void interp_v4_v4v4_char(char target[4], const char a[4], const char b[4], float t)
Definition: math_vector.c:232
MINLINE void copy_v3_v3_char(char r[3], const char a[3])
MINLINE bool compare_v4v4_relative(const float a[4], const float b[4], float limit, int max_ulps) ATTR_WARN_UNUSED_RESULT
void mid_v3_angle_weighted(float r[3])
Definition: math_vector.c:299
MINLINE void mul_v3db_db(double r[3], double f)
MINLINE void mul_v2_fl(float r[2], float f)
void interp_v2_v2v2(float r[2], const float a[2], const float b[2], float t)
Definition: math_vector.c:14
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 mid_v2_v2v2v2(float v[2], const float v1[2], const float v2[2], const float v3[2])
Definition: math_vector.c:250
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:668
MINLINE void mul_v3_fl(float r[3], float f)
MINLINE void copy_v2_v2_int(int r[2], const int a[2])
void range_vn_fl(float *array_tar, int size, float start, float step)
Definition: math_vector.c:1041
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])
void dist_ensure_v2_v2fl(float v1[2], const float v2[2], float dist)
Definition: math_vector.c:928
MINLINE void mul_v3_v3db_db(double r[3], const double a[3], double f)
void sub_vn_vnvn(float *array_tar, const float *array_src_a, const float *array_src_b, int size)
Definition: math_vector.c:1171
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 void mul_v4_v4fl(float r[4], const float a[4], float f)
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:521
MINLINE void copy_v3_v3(float r[3], const float a[3])
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
void add_vn_vnvn(float *array_tar, const float *array_src_a, const float *array_src_b, int size)
Definition: math_vector.c:1122
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:630
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:22
void print_v4(const char *str, const float v[4])
Definition: math_vector.c:823
void interp_v4_v4v4(float r[4], const float a[4], const float b[4], float t)
Definition: math_vector.c:38
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
void msub_vn_vnvn(float *array_tar, const float *array_src_a, const float *array_src_b, float f, int size)
Definition: math_vector.c:1195
MINLINE void copy_v3_v3_int(int r[3], const int a[3])
void copy_vn_fl(float *array_tar, int size, float val)
Definition: math_vector.c:1259
void project_v3_v3v3(float out[3], const float p[3], const float v_proj[3])
Definition: math_vector.c:600
void interp_v3_v3v3_slerp_safe(float target[3], const float a[3], const float b[3], float t)
Definition: math_vector.c:92
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:890
float cos_v2v2v2(const float p1[2], const float p2[2], const float p3[2]) ATTR_WARN_UNUSED_RESULT
Definition: math_vector.c:411
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)
MINLINE void invert_v3_safe(float r[3])
void project_plane_v3_v3v3(float out[3], const float p[3], const float v_plane[3])
Definition: math_vector.c:638
bool is_finite_v3(const float a[3]) ATTR_WARN_UNUSED_RESULT
Definition: math_vector.c:349
void project_plane_normalized_v3_v3v3(float out[3], const float p[3], const float v_plane[3])
Definition: math_vector.c:652
MINLINE float dot_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
MINLINE void negate_v2_v2(float r[2], const float a[2])
MINLINE bool compare_v2v2(const float a[2], const float b[2], float limit) ATTR_WARN_UNUSED_RESULT
void interp_v3_v3v3(float r[3], const float a[3], const float b[3], float t)
Definition: math_vector.c:29
MINLINE void add_v3_v3v3(float r[3], const float a[3], const float b[3])
void rotate_normalized_v3_v3v3fl(float out[3], const float p[3], const float axis[3], float angle)
Definition: math_vector.c:776
MINLINE void cross_v3_v3v3(float r[3], const float a[3], const float b[3])
void print_v2(const char *str, const float v[2])
Definition: math_vector.c:813
void mid_v3_v3v3_angle_weighted(float r[3], const float a[3], const float b[3])
Definition: math_vector.c:281
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])
float normalize_vn_vn(float *array_tar, const float *array_src, int size)
Definition: math_vector.c:1001
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:508
bool is_finite_v2(const float a[2]) ATTR_WARN_UNUSED_RESULT
Definition: math_vector.c:344
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:488
MINLINE void zero_v3_int(int r[3])
void ortho_v3_v3(float out[3], const float v[3])
Definition: math_vector.c:732
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])
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 double normalize_v3_v3_length_db(double r[3], const double a[3], double unit_scale)
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:180
MINLINE void copy_v3_uchar(unsigned char r[3], unsigned char a)
void flip_v2_v2v2(float v[2], const float v1[2], const float v2[2])
Definition: math_vector.c:336
MINLINE void negate_v4_v4(float r[4], const float a[4])
double dot_vn_vn(const float *array_src_a, const float *array_src_b, int size) ATTR_WARN_UNUSED_RESULT
Definition: math_vector.c:978
void copy_vn_ushort(unsigned short *array_tar, int size, unsigned short val)
Definition: math_vector.c:1241
MINLINE void copy_v2_v2_short(short r[2], const short a[2])
void range_vn_i(int *array_tar, int size, int start)
Definition: math_vector.c:1021
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])
MINLINE void clamp_v2(float vec[2], float min, float max)
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:168
float angle_signed_v2v2(const float v1[2], const float v2[2]) ATTR_WARN_UNUSED_RESULT
Definition: math_vector.c:439
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 minmax_v4v4_v4(float min[4], float max[4], const float vec[4])
Definition: math_vector.c:838
MINLINE void clamp_v2_v2v2(float vec[2], const float min[2], const float max[2])
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])
void mid_v2_v2v2(float r[2], const float a[2], const float b[2])
Definition: math_vector.c:244
void print_vn(const char *str, const float v[], int n)
Definition: math_vector.c:828
MINLINE float normalize_v3_v3(float r[3], const float a[3])
void copy_vn_i(int *array_tar, int size, int val)
Definition: math_vector.c:1223
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 void star_m3_v3(float rmat[3][3], const float a[3])
MINLINE float normalize_v3_length(float r[3], float unit_scale)
MINLINE bool compare_v2v2_relative(const float a[2], const float b[2], float limit, int max_ulps) ATTR_WARN_UNUSED_RESULT
MINLINE float len_manhattan_v2v2(const float a[2], const float b[2]) ATTR_WARN_UNUSED_RESULT
void mul_vn_vn(float *array_tar, const float *array_src, int size)
Definition: math_vector.c:1069
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:757
MINLINE void copy_v2fl_v2db(float r[2], const double a[2])
void negate_vn_vn(float *array_tar, const float *array_src, int size)
Definition: math_vector.c:1059
MINLINE void sub_v2_v2v2(float r[2], const float a[2], const float b[2])
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])
void copy_vn_uchar(unsigned char *array_tar, int size, unsigned char val)
Definition: math_vector.c:1250
MINLINE void zero_v2(float r[2])
MINLINE void copy_v4fl_v4db(float r[4], const double a[4])
bool is_finite_v4(const float a[4]) ATTR_WARN_UNUSED_RESULT
Definition: math_vector.c:354
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])
void range_vn_u(unsigned int *array_tar, int size, unsigned int start)
Definition: math_vector.c:1031
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:573
MINLINE void swap_v4_v4_db(double a[4], double b[4])
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])
MINLINE bool compare_size_v3v3(const float a[3], const float b[3], float limit) ATTR_WARN_UNUSED_RESULT
void rotate_v2_v2fl(float r[2], const float p[2], float angle)
Definition: math_vector.c:765
void mid_v3_v3v3(float r[3], const float a[3], const float b[3])
Definition: math_vector.c:237
MINLINE bool is_zero_v2(const float a[2]) ATTR_WARN_UNUSED_RESULT
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:707
MINLINE void swap_v3_v3(float a[3], float b[3])
void reflect_v3_v3v3_db(double out[3], const double vec[3], const double normal[3])
Definition: math_vector.c:699
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 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
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 mul_vn_vn_fl(float *array_tar, const float *array_src, int size, float f)
Definition: math_vector.c:1102
void flip_v4_v4v4(float v[4], const float v1[4], const float v2[4])
Definition: math_vector.c:321
void flip_v3_v3v3(float v[3], const float v1[3], const float v2[3])
Definition: math_vector.c:329
MINLINE void clamp_v3_v3v3(float vec[3], const float min[3], const float max[3])
MINLINE bool compare_v3v3_relative(const float a[3], const float b[3], float limit, int max_ulps) ATTR_WARN_UNUSED_RESULT
MINLINE float normalize_v2_length(float r[2], float unit_scale)
void interp_v3_v3v3_uchar(unsigned char target[3], const unsigned char a[3], const unsigned char b[3], float t)
Definition: math_vector.c:210
float angle_v3v3v3(const float a[3], const float b[3], const float c[3]) ATTR_WARN_UNUSED_RESULT
Definition: math_vector.c:361
MINLINE void copy_v4_v4_db(double r[4], const double a[4])
MINLINE void negate_v3_db(double r[3])
void add_vn_vn_d(double *array_tar, const double *array_src, int size)
Definition: math_vector.c:1272
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:645
void interp_v3_v3v3_char(char target[3], const char a[3], const char b[3], float t)
Definition: math_vector.c:218
MINLINE float normalize_v2(float r[2])
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 mul_vn_db(double *array_tar, int size, double f)
Definition: math_vector.c:1296
void interp_v2_v2v2_db(double target[2], const double a[2], const double b[2], double t)
Definition: math_vector.c:1314
float angle_normalized_v3v3(const float v1[3], const float v2[3]) ATTR_WARN_UNUSED_RESULT
Definition: math_vector.c:445
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 bool compare_v4v4(const float a[4], const float b[4], float limit) ATTR_WARN_UNUSED_RESULT
MINLINE void invert_v2(float r[2])
MINLINE bool compare_len_v3v3(const float a[3], const float b[3], float limit) ATTR_WARN_UNUSED_RESULT
void project_v3_v3v3_db(double out[3], const double p[3], const double v_proj[3])
Definition: math_vector.c:611
MINLINE int len_manhattan_v2_int(const int v[2]) ATTR_WARN_UNUSED_RESULT
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:202
void mul_vn_vnvn(float *array_tar, const float *array_src_a, const float *array_src_b, int size)
Definition: math_vector.c:1079
MINLINE bool is_zero_v4_db(const double a[4]) ATTR_WARN_UNUSED_RESULT
void dist_ensure_v3_v3fl(float v1[3], const float v2[3], float dist)
Definition: math_vector.c:917
MINLINE void copy_v2_v2_uchar(unsigned char r[2], const unsigned char a[2])
MINLINE void swap_v2_v2_db(double a[2], double b[2])
void interp_vn_vn(float *array_tar, const float *array_src, float t, int size)
Definition: math_vector.c:1210
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 normal_float_to_short_v2(short r[2], const float n[2])
void sub_vn_vn(float *array_tar, const float *array_src, int size)
Definition: math_vector.c:1161
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:256
void project_v2_v2v2(float out[2], const float p[2], const float v_proj[2])
Definition: math_vector.c:589
void interp_v4_v4v4_uchar(unsigned char target[4], const unsigned char a[4], const unsigned char b[4], float t)
Definition: math_vector.c:223
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:680
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
int len
Definition: draw_manager.c:108
#define str(s)
static float verts[][3]
IconTextureDrawCall normal
#define M
static unsigned c
Definition: RandGen.cpp:83
static unsigned a[3]
Definition: RandGen.cpp:78
static const pxr::TfToken out("out", pxr::TfToken::Immortal)
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
#define min(a, b)
Definition: sort.c:35
float max