30 #ifndef MATH_STANDALONE
38 memset(m, 0,
sizeof(
float[2][2]));
43 memset(m, 0,
sizeof(
float[3][3]));
48 memset(m, 0,
sizeof(
float[4][4]));
53 m[0][0] = m[1][1] = 1.0f;
60 m[0][0] = m[1][1] = m[2][2] = 1.0f;
61 m[0][1] = m[0][2] = 0.0f;
62 m[1][0] = m[1][2] = 0.0f;
63 m[2][0] = m[2][1] = 0.0f;
68 m[0][0] = m[1][1] = m[2][2] = m[3][3] = 1.0f;
69 m[0][1] = m[0][2] = m[0][3] = 0.0f;
70 m[1][0] = m[1][2] = m[1][3] = 0.0f;
71 m[2][0] = m[2][1] = m[2][3] = 0.0f;
72 m[3][0] = m[3][1] = m[3][2] = 0.0f;
77 m[0][0] = m[1][1] = m[2][2] = m[3][3] = 1.0f;
78 m[0][1] = m[0][2] = m[0][3] = 0.0f;
79 m[1][0] = m[1][2] = m[1][3] = 0.0f;
80 m[2][0] = m[2][1] = m[2][3] = 0.0f;
81 m[3][0] = m[3][1] = m[3][2] = 0.0f;
86 memcpy(m1, m2,
sizeof(
float[2][2]));
92 memcpy(m1, m2,
sizeof(
float[3][3]));
97 memcpy(m1, m2,
sizeof(
float[4][4]));
102 memcpy(m1, m2,
sizeof(
double[4][4]));
209 m1[0][0] = (
float)m2[0][0];
210 m1[0][1] = (
float)m2[0][1];
211 m1[0][2] = (
float)m2[0][2];
213 m1[1][0] = (
float)m2[1][0];
214 m1[1][1] = (
float)m2[1][1];
215 m1[1][2] = (
float)m2[1][2];
217 m1[2][0] = (
float)m2[2][0];
218 m1[2][1] = (
float)m2[2][1];
219 m1[2][2] = (
float)m2[2][2];
227 for (i = 0; i < 3; i++) {
228 for (j = 0; j < 3; j++) {
241 for (i = 0; i < 4; i++) {
242 for (j = 0; j < 4; j++) {
253 for (
int k = 0; k < 4; k++) {
255 R[index[k]][k] = 1.0f;
281 __m128
A0 = _mm_loadu_ps(
A[0]);
282 __m128
A1 = _mm_loadu_ps(
A[1]);
283 __m128
A2 = _mm_loadu_ps(
A[2]);
284 __m128 A3 = _mm_loadu_ps(
A[3]);
286 for (
int i = 0; i < 4; i++) {
287 __m128
B0 = _mm_set1_ps(
B[i][0]);
288 __m128
B1 = _mm_set1_ps(
B[i][1]);
289 __m128
B2 = _mm_set1_ps(
B[i][2]);
290 __m128
B3 = _mm_set1_ps(
B[i][3]);
292 __m128
sum = _mm_add_ps(_mm_add_ps(_mm_mul_ps(
B0,
A0), _mm_mul_ps(
B1,
A1)),
293 _mm_add_ps(_mm_mul_ps(
B2,
A2), _mm_mul_ps(
B3, A3)));
295 _mm_storeu_ps(
R[i],
sum);
298 R[0][0] =
B[0][0] *
A[0][0] +
B[0][1] *
A[1][0] +
B[0][2] *
A[2][0] +
B[0][3] *
A[3][0];
299 R[0][1] =
B[0][0] *
A[0][1] +
B[0][1] *
A[1][1] +
B[0][2] *
A[2][1] +
B[0][3] *
A[3][1];
300 R[0][2] =
B[0][0] *
A[0][2] +
B[0][1] *
A[1][2] +
B[0][2] *
A[2][2] +
B[0][3] *
A[3][2];
301 R[0][3] =
B[0][0] *
A[0][3] +
B[0][1] *
A[1][3] +
B[0][2] *
A[2][3] +
B[0][3] *
A[3][3];
303 R[1][0] =
B[1][0] *
A[0][0] +
B[1][1] *
A[1][0] +
B[1][2] *
A[2][0] +
B[1][3] *
A[3][0];
304 R[1][1] =
B[1][0] *
A[0][1] +
B[1][1] *
A[1][1] +
B[1][2] *
A[2][1] +
B[1][3] *
A[3][1];
305 R[1][2] =
B[1][0] *
A[0][2] +
B[1][1] *
A[1][2] +
B[1][2] *
A[2][2] +
B[1][3] *
A[3][2];
306 R[1][3] =
B[1][0] *
A[0][3] +
B[1][1] *
A[1][3] +
B[1][2] *
A[2][3] +
B[1][3] *
A[3][3];
308 R[2][0] =
B[2][0] *
A[0][0] +
B[2][1] *
A[1][0] +
B[2][2] *
A[2][0] +
B[2][3] *
A[3][0];
309 R[2][1] =
B[2][0] *
A[0][1] +
B[2][1] *
A[1][1] +
B[2][2] *
A[2][1] +
B[2][3] *
A[3][1];
310 R[2][2] =
B[2][0] *
A[0][2] +
B[2][1] *
A[1][2] +
B[2][2] *
A[2][2] +
B[2][3] *
A[3][2];
311 R[2][3] =
B[2][0] *
A[0][3] +
B[2][1] *
A[1][3] +
B[2][2] *
A[2][3] +
B[2][3] *
A[3][3];
313 R[3][0] =
B[3][0] *
A[0][0] +
B[3][1] *
A[1][0] +
B[3][2] *
A[2][0] +
B[3][3] *
A[3][0];
314 R[3][1] =
B[3][0] *
A[0][1] +
B[3][1] *
A[1][1] +
B[3][2] *
A[2][1] +
B[3][3] *
A[3][1];
315 R[3][2] =
B[3][0] *
A[0][2] +
B[3][1] *
A[1][2] +
B[3][2] *
A[2][2] +
B[3][3] *
A[3][2];
316 R[3][3] =
B[3][0] *
A[0][3] +
B[3][1] *
A[1][3] +
B[3][2] *
A[2][3] +
B[3][3] *
A[3][3];
326 R[0][0] =
B[0][0] *
A[0][0] +
B[0][1] *
A[1][0] +
B[0][2] *
A[2][0] +
B[0][3] *
A[3][0];
327 R[0][1] =
B[0][0] *
A[0][1] +
B[0][1] *
A[1][1] +
B[0][2] *
A[2][1] +
B[0][3] *
A[3][1];
328 R[0][2] =
B[0][0] *
A[0][2] +
B[0][1] *
A[1][2] +
B[0][2] *
A[2][2] +
B[0][3] *
A[3][2];
329 R[0][3] =
B[0][0] *
A[0][3] +
B[0][1] *
A[1][3] +
B[0][2] *
A[2][3] +
B[0][3] *
A[3][3];
331 R[1][0] =
B[1][0] *
A[0][0] +
B[1][1] *
A[1][0] +
B[1][2] *
A[2][0] +
B[1][3] *
A[3][0];
332 R[1][1] =
B[1][0] *
A[0][1] +
B[1][1] *
A[1][1] +
B[1][2] *
A[2][1] +
B[1][3] *
A[3][1];
333 R[1][2] =
B[1][0] *
A[0][2] +
B[1][1] *
A[1][2] +
B[1][2] *
A[2][2] +
B[1][3] *
A[3][2];
334 R[1][3] =
B[1][0] *
A[0][3] +
B[1][1] *
A[1][3] +
B[1][2] *
A[2][3] +
B[1][3] *
A[3][3];
336 R[2][0] =
B[2][0] *
A[0][0] +
B[2][1] *
A[1][0] +
B[2][2] *
A[2][0] +
B[2][3] *
A[3][0];
337 R[2][1] =
B[2][0] *
A[0][1] +
B[2][1] *
A[1][1] +
B[2][2] *
A[2][1] +
B[2][3] *
A[3][1];
338 R[2][2] =
B[2][0] *
A[0][2] +
B[2][1] *
A[1][2] +
B[2][2] *
A[2][2] +
B[2][3] *
A[3][2];
339 R[2][3] =
B[2][0] *
A[0][3] +
B[2][1] *
A[1][3] +
B[2][2] *
A[2][3] +
B[2][3] *
A[3][3];
341 R[3][0] =
B[3][0] *
A[0][0] +
B[3][1] *
A[1][0] +
B[3][2] *
A[2][0] +
B[3][3] *
A[3][0];
342 R[3][1] =
B[3][0] *
A[0][1] +
B[3][1] *
A[1][1] +
B[3][2] *
A[2][1] +
B[3][3] *
A[3][1];
343 R[3][2] =
B[3][0] *
A[0][2] +
B[3][1] *
A[1][2] +
B[3][2] *
A[2][2] +
B[3][3] *
A[3][2];
344 R[3][3] =
B[3][0] *
A[0][3] +
B[3][1] *
A[1][3] +
B[3][2] *
A[2][3] +
B[3][3] *
A[3][3];
354 R[0][0] =
B[0][0] *
A[0][0] +
B[0][1] *
A[1][0] +
B[0][2] *
A[2][0] +
B[0][3] *
A[3][0];
355 R[0][1] =
B[0][0] *
A[0][1] +
B[0][1] *
A[1][1] +
B[0][2] *
A[2][1] +
B[0][3] *
A[3][1];
356 R[0][2] =
B[0][0] *
A[0][2] +
B[0][1] *
A[1][2] +
B[0][2] *
A[2][2] +
B[0][3] *
A[3][2];
357 R[0][3] =
B[0][0] *
A[0][3] +
B[0][1] *
A[1][3] +
B[0][2] *
A[2][3] +
B[0][3] *
A[3][3];
359 R[1][0] =
B[1][0] *
A[0][0] +
B[1][1] *
A[1][0] +
B[1][2] *
A[2][0] +
B[1][3] *
A[3][0];
360 R[1][1] =
B[1][0] *
A[0][1] +
B[1][1] *
A[1][1] +
B[1][2] *
A[2][1] +
B[1][3] *
A[3][1];
361 R[1][2] =
B[1][0] *
A[0][2] +
B[1][1] *
A[1][2] +
B[1][2] *
A[2][2] +
B[1][3] *
A[3][2];
362 R[1][3] =
B[1][0] *
A[0][3] +
B[1][1] *
A[1][3] +
B[1][2] *
A[2][3] +
B[1][3] *
A[3][3];
364 R[2][0] =
B[2][0] *
A[0][0] +
B[2][1] *
A[1][0] +
B[2][2] *
A[2][0] +
B[2][3] *
A[3][0];
365 R[2][1] =
B[2][0] *
A[0][1] +
B[2][1] *
A[1][1] +
B[2][2] *
A[2][1] +
B[2][3] *
A[3][1];
366 R[2][2] =
B[2][0] *
A[0][2] +
B[2][1] *
A[1][2] +
B[2][2] *
A[2][2] +
B[2][3] *
A[3][2];
367 R[2][3] =
B[2][0] *
A[0][3] +
B[2][1] *
A[1][3] +
B[2][2] *
A[2][3] +
B[2][3] *
A[3][3];
369 R[3][0] =
B[3][0] *
A[0][0] +
B[3][1] *
A[1][0] +
B[3][2] *
A[2][0] +
B[3][3] *
A[3][0];
370 R[3][1] =
B[3][0] *
A[0][1] +
B[3][1] *
A[1][1] +
B[3][2] *
A[2][1] +
B[3][3] *
A[3][1];
371 R[3][2] =
B[3][0] *
A[0][2] +
B[3][1] *
A[1][2] +
B[3][2] *
A[2][2] +
B[3][3] *
A[3][2];
372 R[3][3] =
B[3][0] *
A[0][3] +
B[3][1] *
A[1][3] +
B[3][2] *
A[2][3] +
B[3][3] *
A[3][3];
424 R[0][0] =
B[0][0] *
A[0][0] +
B[0][1] *
A[1][0] +
B[0][2] *
A[2][0];
425 R[0][1] =
B[0][0] *
A[0][1] +
B[0][1] *
A[1][1] +
B[0][2] *
A[2][1];
426 R[0][2] =
B[0][0] *
A[0][2] +
B[0][1] *
A[1][2] +
B[0][2] *
A[2][2];
428 R[1][0] =
B[1][0] *
A[0][0] +
B[1][1] *
A[1][0] +
B[1][2] *
A[2][0];
429 R[1][1] =
B[1][0] *
A[0][1] +
B[1][1] *
A[1][1] +
B[1][2] *
A[2][1];
430 R[1][2] =
B[1][0] *
A[0][2] +
B[1][1] *
A[1][2] +
B[1][2] *
A[2][2];
432 R[2][0] =
B[2][0] *
A[0][0] +
B[2][1] *
A[1][0] +
B[2][2] *
A[2][0];
433 R[2][1] =
B[2][0] *
A[0][1] +
B[2][1] *
A[1][1] +
B[2][2] *
A[2][1];
434 R[2][2] =
B[2][0] *
A[0][2] +
B[2][1] *
A[1][2] +
B[2][2] *
A[2][2];
439 float B_[3][3], A_[4][4];
446 R[0][0] = B_[0][0] * A_[0][0] + B_[0][1] * A_[1][0] + B_[0][2] * A_[2][0];
447 R[0][1] = B_[0][0] * A_[0][1] + B_[0][1] * A_[1][1] + B_[0][2] * A_[2][1];
448 R[0][2] = B_[0][0] * A_[0][2] + B_[0][1] * A_[1][2] + B_[0][2] * A_[2][2];
449 R[1][0] = B_[1][0] * A_[0][0] + B_[1][1] * A_[1][0] + B_[1][2] * A_[2][0];
450 R[1][1] = B_[1][0] * A_[0][1] + B_[1][1] * A_[1][1] + B_[1][2] * A_[2][1];
451 R[1][2] = B_[1][0] * A_[0][2] + B_[1][1] * A_[1][2] + B_[1][2] * A_[2][2];
452 R[2][0] = B_[2][0] * A_[0][0] + B_[2][1] * A_[1][0] + B_[2][2] * A_[2][0];
453 R[2][1] = B_[2][0] * A_[0][1] + B_[2][1] * A_[1][1] + B_[2][2] * A_[2][1];
454 R[2][2] = B_[2][0] * A_[0][2] + B_[2][1] * A_[1][2] + B_[2][2] * A_[2][2];
460 float B_[4][4], A_[3][3];
468 R[0][0] = B_[0][0] * A_[0][0] + B_[0][1] * A_[1][0] + B_[0][2] * A_[2][0];
469 R[0][1] = B_[0][0] * A_[0][1] + B_[0][1] * A_[1][1] + B_[0][2] * A_[2][1];
470 R[0][2] = B_[0][0] * A_[0][2] + B_[0][1] * A_[1][2] + B_[0][2] * A_[2][2];
472 R[1][0] = B_[1][0] * A_[0][0] + B_[1][1] * A_[1][0] + B_[1][2] * A_[2][0];
473 R[1][1] = B_[1][0] * A_[0][1] + B_[1][1] * A_[1][1] + B_[1][2] * A_[2][1];
474 R[1][2] = B_[1][0] * A_[0][2] + B_[1][1] * A_[1][2] + B_[1][2] * A_[2][2];
476 R[2][0] = B_[2][0] * A_[0][0] + B_[2][1] * A_[1][0] + B_[2][2] * A_[2][0];
477 R[2][1] = B_[2][0] * A_[0][1] + B_[2][1] * A_[1][1] + B_[2][2] * A_[2][1];
478 R[2][2] = B_[2][0] * A_[0][2] + B_[2][1] * A_[1][2] + B_[2][2] * A_[2][2];
484 float B_[3][3], A_[4][4];
492 R[0][0] = B_[0][0] * A_[0][0] + B_[0][1] * A_[1][0] + B_[0][2] * A_[2][0];
493 R[0][1] = B_[0][0] * A_[0][1] + B_[0][1] * A_[1][1] + B_[0][2] * A_[2][1];
494 R[0][2] = B_[0][0] * A_[0][2] + B_[0][1] * A_[1][2] + B_[0][2] * A_[2][2];
496 R[1][0] = B_[1][0] * A_[0][0] + B_[1][1] * A_[1][0] + B_[1][2] * A_[2][0];
497 R[1][1] = B_[1][0] * A_[0][1] + B_[1][1] * A_[1][1] + B_[1][2] * A_[2][1];
498 R[1][2] = B_[1][0] * A_[0][2] + B_[1][1] * A_[1][2] + B_[1][2] * A_[2][2];
500 R[2][0] = B_[2][0] * A_[0][0] + B_[2][1] * A_[1][0] + B_[2][2] * A_[2][0];
501 R[2][1] = B_[2][0] * A_[0][1] + B_[2][1] * A_[1][1] + B_[2][2] * A_[2][1];
502 R[2][2] = B_[2][0] * A_[0][2] + B_[2][1] * A_[1][2] + B_[2][2] * A_[2][2];
507 float B_[4][4], A_[3][3];
514 R[0][0] = B_[0][0] * A_[0][0] + B_[0][1] * A_[1][0] + B_[0][2] * A_[2][0];
515 R[0][1] = B_[0][0] * A_[0][1] + B_[0][1] * A_[1][1] + B_[0][2] * A_[2][1];
516 R[0][2] = B_[0][0] * A_[0][2] + B_[0][1] * A_[1][2] + B_[0][2] * A_[2][2];
517 R[1][0] = B_[1][0] * A_[0][0] + B_[1][1] * A_[1][0] + B_[1][2] * A_[2][0];
518 R[1][1] = B_[1][0] * A_[0][1] + B_[1][1] * A_[1][1] + B_[1][2] * A_[2][1];
519 R[1][2] = B_[1][0] * A_[0][2] + B_[1][1] * A_[1][2] + B_[1][2] * A_[2][2];
520 R[2][0] = B_[2][0] * A_[0][0] + B_[2][1] * A_[1][0] + B_[2][2] * A_[2][0];
521 R[2][1] = B_[2][0] * A_[0][1] + B_[2][1] * A_[1][1] + B_[2][2] * A_[2][1];
522 R[2][2] = B_[2][0] * A_[0][2] + B_[2][1] * A_[1][2] + B_[2][2] * A_[2][2];
527 R[0][0] =
B[0][0] *
A[0][0] +
B[0][1] *
A[1][0] +
B[0][2] *
A[2][0];
528 R[0][1] =
B[0][0] *
A[0][1] +
B[0][1] *
A[1][1] +
B[0][2] *
A[2][1];
529 R[0][2] =
B[0][0] *
A[0][2] +
B[0][1] *
A[1][2] +
B[0][2] *
A[2][2];
530 R[1][0] =
B[1][0] *
A[0][0] +
B[1][1] *
A[1][0] +
B[1][2] *
A[2][0];
531 R[1][1] =
B[1][0] *
A[0][1] +
B[1][1] *
A[1][1] +
B[1][2] *
A[2][1];
532 R[1][2] =
B[1][0] *
A[0][2] +
B[1][1] *
A[1][2] +
B[1][2] *
A[2][2];
533 R[2][0] =
B[2][0] *
A[0][0] +
B[2][1] *
A[1][0] +
B[2][2] *
A[2][0];
534 R[2][1] =
B[2][0] *
A[0][1] +
B[2][1] *
A[1][1] +
B[2][2] *
A[2][1];
535 R[2][2] =
B[2][0] *
A[0][2] +
B[2][1] *
A[1][2] +
B[2][2] *
A[2][2];
547 const float m1[3][3],
548 const float m2[3][3],
549 const float m3[3][3])
555 const float m1[3][3],
556 const float m2[3][3],
557 const float m3[3][3],
558 const float m4[3][3])
565 const float m1[3][3],
566 const float m2[3][3],
567 const float m3[3][3],
568 const float m4[3][3],
569 const float m5[3][3])
577 const float m1[3][3],
578 const float m2[3][3],
579 const float m3[3][3],
580 const float m4[3][3],
581 const float m5[3][3],
582 const float m6[3][3])
591 const float m1[3][3],
592 const float m2[3][3],
593 const float m3[3][3],
594 const float m4[3][3],
595 const float m5[3][3],
596 const float m6[3][3],
597 const float m7[3][3])
607 const float m1[3][3],
608 const float m2[3][3],
609 const float m3[3][3],
610 const float m4[3][3],
611 const float m5[3][3],
612 const float m6[3][3],
613 const float m7[3][3],
614 const float m8[3][3])
635 const float m1[4][4],
636 const float m2[4][4],
637 const float m3[4][4])
643 const float m1[4][4],
644 const float m2[4][4],
645 const float m3[4][4],
646 const float m4[4][4])
653 const float m1[4][4],
654 const float m2[4][4],
655 const float m3[4][4],
656 const float m4[4][4],
657 const float m5[4][4])
665 const float m1[4][4],
666 const float m2[4][4],
667 const float m3[4][4],
668 const float m4[4][4],
669 const float m5[4][4],
670 const float m6[4][4])
679 const float m1[4][4],
680 const float m2[4][4],
681 const float m3[4][4],
682 const float m4[4][4],
683 const float m5[4][4],
684 const float m6[4][4],
685 const float m7[4][4])
695 const float m1[4][4],
696 const float m2[4][4],
697 const float m3[4][4],
698 const float m4[4][4],
699 const float m5[4][4],
700 const float m6[4][4],
701 const float m7[4][4],
702 const float m8[4][4])
716 float temp[3], warped[3];
723 r[0] = warped[0] / warped[2];
724 r[1] = warped[1] / warped[2];
734 const float x =
r[0];
735 const float y =
r[1];
737 r[0] =
x *
M[0][0] +
y *
M[1][0] +
M[2][0] *
r[2] +
M[3][0];
738 r[1] =
x *
M[0][1] +
y *
M[1][1] +
M[2][1] *
r[2] +
M[3][1];
739 r[2] =
x *
M[0][2] +
y *
M[1][2] +
M[2][2] *
r[2] +
M[3][2];
742 void mul_v3_m4v3(
float r[3],
const float mat[4][4],
const float vec[3])
744 const float x = vec[0];
745 const float y = vec[1];
747 r[0] =
x * mat[0][0] +
y * mat[1][0] + mat[2][0] * vec[2] + mat[3][0];
748 r[1] =
x * mat[0][1] +
y * mat[1][1] + mat[2][1] * vec[2] + mat[3][1];
749 r[2] =
x * mat[0][2] +
y * mat[1][2] + mat[2][2] * vec[2] + mat[3][2];
754 const double x = vec[0];
755 const double y = vec[1];
757 r[0] =
x * mat[0][0] +
y * mat[1][0] + mat[2][0] * vec[2] + mat[3][0];
758 r[1] =
x * mat[0][1] +
y * mat[1][1] + mat[2][1] * vec[2] + mat[3][1];
759 r[2] =
x * mat[0][2] +
y * mat[1][2] + mat[2][2] * vec[2] + mat[3][2];
763 const double x = vec[0];
764 const double y = vec[1];
766 r[0] =
x * mat[0][0] +
y * mat[1][0] + mat[2][0] * vec[2] + mat[3][0];
767 r[1] =
x * mat[0][1] +
y * mat[1][1] + mat[2][1] * vec[2] + mat[3][1];
768 r[2] =
x * mat[0][2] +
y * mat[1][2] + mat[2][2] * vec[2] + mat[3][2];
769 r[3] =
x * mat[0][3] +
y * mat[1][3] + mat[2][3] * vec[2] + mat[3][3];
772 void mul_v2_m4v3(
float r[2],
const float mat[4][4],
const float vec[3])
774 const float x = vec[0];
776 r[0] =
x * mat[0][0] + vec[1] * mat[1][0] + mat[2][0] * vec[2] + mat[3][0];
777 r[1] =
x * mat[0][1] + vec[1] * mat[1][1] + mat[2][1] * vec[2] + mat[3][1];
780 void mul_v2_m2v2(
float r[2],
const float mat[2][2],
const float vec[2])
782 const float x = vec[0];
784 r[0] = mat[0][0] *
x + mat[1][0] * vec[1];
785 r[1] = mat[0][1] *
x + mat[1][1] * vec[1];
796 const float x =
r[0];
797 const float y =
r[1];
799 r[0] =
x *
M[0][0] +
y *
M[1][0] +
M[2][0] *
r[2];
800 r[1] =
x *
M[0][1] +
y *
M[1][1] +
M[2][1] *
r[2];
801 r[2] =
x *
M[0][2] +
y *
M[1][2] +
M[2][2] *
r[2];
806 const float x = vec[0];
807 const float y = vec[1];
809 r[0] =
x * mat[0][0] +
y * mat[1][0] + mat[2][0] * vec[2];
810 r[1] =
x * mat[0][1] +
y * mat[1][1] + mat[2][1] * vec[2];
811 r[2] =
x * mat[0][2] +
y * mat[1][2] + mat[2][2] * vec[2];
816 const double x = vec[0];
817 const double y = vec[1];
819 r[0] =
x * mat[0][0] +
y * mat[1][0] + mat[2][0] * vec[2];
820 r[1] =
x * mat[0][1] +
y * mat[1][1] + mat[2][1] * vec[2];
821 r[2] =
x * mat[0][2] +
y * mat[1][2] + mat[2][2] * vec[2];
856 const float x =
v[0];
857 const float y =
v[1];
858 const float z =
v[2];
860 r[0] =
x * mat[0][0] +
y * mat[1][0] +
z * mat[2][0] + mat[3][0] *
v[3];
861 r[1] =
x * mat[0][1] +
y * mat[1][1] +
z * mat[2][1] + mat[3][1] *
v[3];
862 r[2] =
x * mat[0][2] +
y * mat[1][2] +
z * mat[2][2] + mat[3][2] *
v[3];
863 r[3] =
x * mat[0][3] +
y * mat[1][3] +
z * mat[2][3] + mat[3][3] *
v[3];
873 const double x =
v[0];
874 const double y =
v[1];
875 const double z =
v[2];
877 r[0] =
x * (
double)mat[0][0] +
y * (
double)mat[1][0] +
z * (
double)mat[2][0] +
878 (
double)mat[3][0] *
v[3];
879 r[1] =
x * (
double)mat[0][1] +
y * (
double)mat[1][1] +
z * (
double)mat[2][1] +
880 (
double)mat[3][1] *
v[3];
881 r[2] =
x * (
double)mat[0][2] +
y * (
double)mat[1][2] +
z * (
double)mat[2][2] +
882 (
double)mat[3][2] *
v[3];
883 r[3] =
x * (
double)mat[0][3] +
y * (
double)mat[1][3] +
z * (
double)mat[2][3] +
884 (
double)mat[3][3] *
v[3];
895 r[0] =
v[0] *
M[0][0] +
v[1] *
M[1][0] +
M[2][0] *
v[2] +
M[3][0];
896 r[1] =
v[0] *
M[0][1] +
v[1] *
M[1][1] +
M[2][1] *
v[2] +
M[3][1];
897 r[2] =
v[0] *
M[0][2] +
v[1] *
M[1][2] +
M[2][2] *
v[2] +
M[3][2];
898 r[3] =
v[0] *
M[0][3] +
v[1] *
M[1][3] +
M[2][3] *
v[2] +
M[3][3];
906 r[0] =
M[0][0] *
t[0] +
M[1][0] *
t[1] +
M[2][0] *
t[2];
907 r[1] =
M[0][1] *
t[0] +
M[1][1] *
t[1] +
M[2][1] *
t[2];
908 r[2] =
M[0][2] *
t[0] +
M[1][2] *
t[1] +
M[2][2] *
t[2];
916 r[0] =
M[0][0] *
t[0] +
M[1][0] *
t[1] +
M[2][0] *
t[2];
917 r[1] =
M[0][1] *
t[0] +
M[1][1] *
t[1] +
M[2][1] *
t[2];
918 r[2] =
M[0][2] *
t[0] +
M[1][2] *
t[1] +
M[2][2] *
t[2];
926 r[0] =
M[0][0] *
t[0] +
M[1][0] *
t[1] +
M[2][0] *
t[2];
927 r[1] =
M[0][1] *
t[0] +
M[1][1] *
t[1] +
M[2][1] *
t[2];
942 const float x =
r[0];
943 const float y =
r[1];
945 r[0] =
x *
M[0][0] +
y *
M[0][1] +
M[0][2] *
r[2];
946 r[1] =
x *
M[1][0] +
y *
M[1][1] +
M[1][2] *
r[2];
947 r[2] =
x *
M[2][0] +
y *
M[2][1] +
M[2][2] *
r[2];
952 const float x =
r[0];
953 const float y =
r[1];
955 r[0] =
x *
M[0][0] +
y *
M[0][1] +
M[0][2] *
r[2];
956 r[1] =
x *
M[1][0] +
y *
M[1][1] +
M[1][2] *
r[2];
957 r[2] =
x *
M[2][0] +
y *
M[2][1] +
M[2][2] *
r[2];
964 for (i = 0; i < 3; i++) {
965 for (j = 0; j < 3; j++) {
975 for (i = 0; i < 4; i++) {
976 for (j = 0; j < 4; j++) {
986 for (i = 0; i < 3; i++) {
987 for (j = 0; j < 3; j++) {
997 for (i = 0; i < 3; i++) {
998 for (j = 0; j < 3; j++) {
1008 for (i = 0; i < 3; i++) {
1009 for (j = 0; j < 3; j++) {
1019 for (i = 0; i < 4; i++) {
1020 for (j = 0; j < 4; j++) {
1028 const double x =
r[0];
1029 const double y =
r[1];
1040 for (i = 0; i < 3; i++) {
1041 for (j = 0; j < 3; j++) {
1042 R[i][j] =
A[i][j] +
B[i][j];
1051 for (i = 0; i < 4; i++) {
1052 for (j = 0; j < 4; j++) {
1053 R[i][j] =
A[i][j] +
B[i][j];
1062 for (i = 0; i < 3; i++) {
1063 for (j = 0; j < 3; j++) {
1064 R[i][j] =
A[i][j] +
B[i][j] * f;
1073 for (i = 0; i < 4; i++) {
1074 for (j = 0; j < 4; j++) {
1075 R[i][j] =
A[i][j] +
B[i][j] * f;
1084 for (i = 0; i < 3; i++) {
1085 for (j = 0; j < 3; j++) {
1086 R[i][j] =
A[i][j] -
B[i][j];
1095 for (i = 0; i < 4; i++) {
1096 for (j = 0; j < 4; j++) {
1097 R[i][j] =
A[i][j] -
B[i][j];
1104 return (m[0][0] * (m[1][1] * m[2][2] - m[1][2] * m[2][1]) -
1105 m[1][0] * (m[0][1] * m[2][2] - m[0][2] * m[2][1]) +
1106 m[2][0] * (m[0][1] * m[1][2] - m[0][2] * m[1][1]));
1111 return (m[0][0] * (m[1][1] * m[2][2] - m[1][2] * m[2][1]) -
1112 m[1][0] * (m[0][1] * m[2][2] - m[0][2] * m[2][1]) +
1113 m[2][0] * (m[0][1] * m[1][2] - m[0][2] * m[1][1]));
1141 if (
LIKELY(det != 0.0f)) {
1143 for (
a = 0;
a < 3;
a++) {
1144 for (b = 0; b < 3; b++) {
1173 success = (det != 0.0f);
1175 if (
LIKELY(det != 0.0f)) {
1177 for (
a = 0;
a < 3;
a++) {
1178 for (b = 0; b < 3; b++) {
1208 #ifndef MATH_STANDALONE
1216 float tempmat[4][4];
1223 for (i = 0; i < 4; i++) {
1224 for (j = 0; j < 4; j++) {
1228 for (i = 0; i < 4; i++) {
1233 for (i = 0; i < 4; i++) {
1234 for (j = 0; j < 4; j++) {
1235 tempmat[i][j] = mat[i][j];
1239 for (i = 0; i < 4; i++) {
1243 for (j = i + 1; j < 4; j++) {
1251 for (k = 0; k < 4; k++) {
1252 SWAP(
float, tempmat[i][k], tempmat[maxj][k]);
1257 if (
UNLIKELY(tempmat[i][i] == 0.0f)) {
1260 temp = (
double)tempmat[i][i];
1261 for (k = 0; k < 4; k++) {
1262 tempmat[i][k] = (
float)((
double)tempmat[i][k] / temp);
1265 for (j = 0; j < 4; j++) {
1267 temp = tempmat[j][i];
1268 for (k = 0; k < 4; k++) {
1269 tempmat[j][k] -= (
float)((
double)tempmat[i][k] * temp);
1280 #ifndef MATH_STANDALONE
1296 float loc_a[3], rot_a[3][3], size_a[3];
1297 float loc_b[3], rot_b[3][3], size_b[3];
1298 float loc_r[3], rot_r[3][3], size_r[3];
1406 bool compare_m4m4(
const float mat1[4][4],
const float mat2[4][4],
float limit)
1605 if (len_sq_v1 > 0.0f) {
1615 float norm_v2[3], norm_v3[3], tmp[3];
1618 float cos_angle =
dot_v3v3(norm_v2, norm_v3);
1619 float abs_cos_angle =
fabsf(cos_angle);
1622 if (abs_cos_angle > 1e-4f && abs_cos_angle < 1.0f - FLT_EPSILON) {
1720 enum {
X = 1 << 0,
Y = 1 << 1,
Z = 1 << 2 };
1722 for (
int i = 0; i < 3; i++) {
1728 if (
ELEM(flag, 0,
X |
Y |
Z)) {
1764 for (
int i = 0; i < 3; i++) {
1765 if (flag & (1 << i)) {
1767 mat[i][i] = unit_length;
1790 for (i = 0; i < 3; i++) {
1791 for (j = 0; j < i; j++) {
1805 for (i = 0; i < 4; i++) {
1806 for (j = 0; j < i; j++) {
1821 for (i = 0; i < 3; i++) {
1838 for (i = 0; i < 4; i++) {
1852 const float eps = 1e-7f;
1854 float l1, l2, l3, l4, l5, l6;
1884 for (i = 0; i < 2; i++) {
1892 for (i = 0; i < 2; i++) {
1900 for (i = 0; i < 2; i++) {
1907 for (i = 0; i < 2; i++) {
1915 for (i = 0; i < 3; i++) {
1922 for (i = 0; i < 3; i++) {
1930 for (i = 0; i < 3; i++) {
1937 for (i = 0; i < 3; i++) {
1945 for (i = 0; i < 3; i++) {
1947 if (r_scale[i] != 0.0f) {
1948 R[i][3] /= r_scale[i];
1955 for (i = 0; i < 3; i++) {
1966 for (i = 0; i < 3; i++) {
1968 rmat[i][3] = (r_scale[i] != 0.0f) ? (mat[i][3] / r_scale[i]) : mat[i][3];
1975 for (i = 0; i < 3; i++) {
1977 rmat[i][3] = (
len != 0.0f) ? (mat[i][3] /
len) : mat[i][3];
1994 R[0][0] =
M[1][1] *
M[2][2] -
M[1][2] *
M[2][1];
1995 R[0][1] = -
M[0][1] *
M[2][2] +
M[0][2] *
M[2][1];
1996 R[0][2] =
M[0][1] *
M[1][2] -
M[0][2] *
M[1][1];
1998 R[1][0] = -
M[1][0] *
M[2][2] +
M[1][2] *
M[2][0];
1999 R[1][1] =
M[0][0] *
M[2][2] -
M[0][2] *
M[2][0];
2000 R[1][2] = -
M[0][0] *
M[1][2] +
M[0][2] *
M[1][0];
2002 R[2][0] =
M[1][0] *
M[2][1] -
M[1][1] *
M[2][0];
2003 R[2][1] = -
M[0][0] *
M[2][1] +
M[0][1] *
M[2][0];
2004 R[2][2] =
M[0][0] *
M[1][1] -
M[0][1] *
M[1][0];
2009 float a1, a2, a3, a4, b1, b2, b3, b4;
2010 float c1, c2, c3, c4, d1, d2, d3, d4;
2056 return a * d - b *
c;
2060 float a1,
float a2,
float a3,
float b1,
float b2,
float b3,
float c1,
float c2,
float c3)
2073 float a1, a2, a3, a4, b1, b2, b3, b4, c1, c2, c3, c4, d1, d2, d3, d4;
2162 if (volume != 0.0f) {
2281 #ifndef MATH_STANDALONE
2288 float W[3][3], S[3][3],
V[3][3], Vt[3][3];
2303 R[0][0] =
R[1][1] =
R[2][2] = scale;
2304 R[0][1] =
R[0][2] = 0.0;
2305 R[1][0] =
R[1][2] = 0.0;
2306 R[2][0] =
R[2][1] = 0.0;
2311 R[0][0] =
R[1][1] =
R[2][2] = scale;
2313 R[0][1] =
R[0][2] =
R[0][3] = 0.0;
2314 R[1][0] =
R[1][2] =
R[1][3] = 0.0;
2315 R[2][0] =
R[2][1] =
R[2][3] = 0.0;
2316 R[3][0] =
R[3][1] =
R[3][2] = 0.0;
2321 mat[2][0] += (tx * mat[0][0] + ty * mat[1][0]);
2322 mat[2][1] += (tx * mat[0][1] + ty * mat[1][1]);
2327 mat[3][0] += (Tx * mat[0][0] + Ty * mat[1][0] + Tz * mat[2][0]);
2328 mat[3][1] += (Tx * mat[0][1] + Ty * mat[1][1] + Tz * mat[2][1]);
2329 mat[3][2] += (Tx * mat[0][2] + Ty * mat[1][2] + Tz * mat[2][2]);
2338 float temp = angle_cos * mat[0][
col] + angle_sin * mat[1][
col];
2339 mat[1][
col] = -angle_sin * mat[0][
col] + angle_cos * mat[1][
col];
2362 float temp = angle_cos * mat[1][
col] + angle_sin * mat[2][
col];
2363 mat[2][
col] = -angle_sin * mat[1][
col] + angle_cos * mat[2][
col];
2370 float temp = angle_cos * mat[0][
col] - angle_sin * mat[2][
col];
2371 mat[2][
col] = angle_sin * mat[0][
col] + angle_cos * mat[2][
col];
2378 float temp = angle_cos * mat[0][
col] + angle_sin * mat[1][
col];
2379 mat[1][
col] = -angle_sin * mat[0][
col] + angle_cos * mat[1][
col];
2440 const float dst[3][3],
2441 const float src[3][3],
2442 const float srcweight)
2444 float srot[3][3], drot[3][3];
2445 float squat[4], dquat[4], fquat[4];
2446 float sscale[3], dscale[3], fsize[3];
2447 float rmat[3][3], smat[3][3];
2466 const float dst[4][4],
2467 const float src[4][4],
2468 const float srcweight)
2470 float sloc[3], dloc[3], floc[3];
2471 float srot[3][3], drot[3][3];
2472 float squat[4], dquat[4], fquat[4];
2473 float sscale[3], dscale[3], fsize[3];
2491 #ifndef MATH_STANDALONE
2513 float U_A[3][3], U_B[3][3],
U[3][3];
2514 float quat_A[4], quat_B[4], quat[4];
2517 float P_A[3][3], P_B[3][3],
P[3][3];
2545 for (i = 0; i < 3; i++) {
2564 float A3[3][3],
B3[3][3], R3[3][3];
2567 float loc_A[3], loc_B[3], loc[3];
2587 return (
dot_v3v3(vec, mat[2]) < 0.0f);
2594 return (
dot_v3v3(vec, mat[2]) < 0.0f);
2625 const float size[2])
2639 const float rot[3][3],
2640 const float size[3])
2656 const float size[3])
2658 float rmat[3][3], smat[3][3], tmat[3][3];
2684 const float size[3],
2685 const short rotOrder)
2687 float rmat[3][3], smat[3][3], tmat[3][3];
2712 const float quat[4],
2713 const float size[3])
2715 float rmat[3][3], smat[3][3], tmat[3][3];
2735 float R[4][4],
const float loc[3],
const float axis[3],
const float angle,
const float size[3])
2746 printf(
"%s\n",
str);
2747 printf(
"%f %f %f\n", m[0][0], m[1][0], m[2][0]);
2748 printf(
"%f %f %f\n", m[0][1], m[1][1], m[2][1]);
2749 printf(
"%f %f %f\n", m[0][2], m[1][2], m[2][2]);
2755 printf(
"%s\n",
str);
2756 printf(
"%f %f %f %f\n", m[0][0], m[1][0], m[2][0], m[3][0]);
2757 printf(
"%f %f %f %f\n", m[0][1], m[1][1], m[2][1], m[3][1]);
2758 printf(
"%f %f %f %f\n", m[0][2], m[1][2], m[2][2], m[3][2]);
2759 printf(
"%f %f %f %f\n", m[0][3], m[1][3], m[2][3], m[3][3]);
2773 void svd_m4(
float U[4][4],
float s[4],
float V[4][4],
float A_[4][4])
2776 float work1[4], work2[4];
2782 float *work = work1;
2786 int i = 0, j = 0, k = 0, p, pp, iter;
2791 int nct =
min_ii(m - 1, n);
2798 for (k = 0; k <
max_ii(nct, nrt); k++) {
2805 for (i = k; i < m; i++) {
2810 if (
A[k][k] < 0.0f) {
2813 invsk = 1.0f / s[k];
2814 for (i = k; i < m; i++) {
2821 for (j = k + 1; j < n; j++) {
2822 if ((k < nct) && (s[k] != 0.0f)) {
2827 for (i = k; i < m; i++) {
2828 t +=
A[i][k] *
A[i][j];
2831 for (i = k; i < m; i++) {
2832 A[i][j] +=
t *
A[i][k];
2846 for (i = k; i < m; i++) {
2856 for (i = k + 1; i < n; i++) {
2861 if (
e[k + 1] < 0.0f) {
2864 invek = 1.0f /
e[k];
2865 for (i = k + 1; i < n; i++) {
2871 if ((k + 1 < m) & (
e[k] != 0.0f)) {
2876 for (i = k + 1; i < m; i++) {
2879 for (j = k + 1; j < n; j++) {
2880 for (i = k + 1; i < m; i++) {
2881 work[i] +=
e[j] *
A[i][j];
2884 invek1 = 1.0f /
e[k + 1];
2885 for (j = k + 1; j < n; j++) {
2886 float t = -
e[j] * invek1;
2887 for (i = k + 1; i < m; i++) {
2888 A[i][j] +=
t * work[i];
2896 for (i = k + 1; i < n; i++) {
2906 s[nct] =
A[nct][nct];
2912 e[nrt] =
A[nrt][p - 1];
2918 for (j = nct; j < nu; j++) {
2919 for (i = 0; i < m; i++) {
2924 for (k = nct - 1; k >= 0; k--) {
2926 for (j = k + 1; j < nu; j++) {
2928 for (i = k; i < m; i++) {
2929 t +=
U[i][k] *
U[i][j];
2932 for (i = k; i < m; i++) {
2933 U[i][j] +=
t *
U[i][k];
2936 for (i = k; i < m; i++) {
2939 U[k][k] = 1.0f +
U[k][k];
2940 for (i = 0; i < k - 1; i++) {
2945 for (i = 0; i < m; i++) {
2954 for (k = n - 1; k >= 0; k--) {
2955 if ((k < nrt) & (
e[k] != 0.0f)) {
2956 for (j = k + 1; j < nu; j++) {
2958 for (i = k + 1; i < n; i++) {
2959 t +=
V[i][k] *
V[i][j];
2961 t = -
t /
V[k + 1][k];
2962 for (i = k + 1; i < n; i++) {
2963 V[i][j] +=
t *
V[i][k];
2967 for (i = 0; i < n; i++) {
2997 for (k = p - 2; k >= -1; k--) {
3011 for (ks = p - 1; ks >= k; ks--) {
3016 t = (ks != p ?
fabsf(
e[ks]) : 0.0f) + (ks != k + 1 ?
fabsf(
e[ks - 1]) : 0.0f);
3025 else if (ks == p - 1) {
3044 for (j = p - 2; j >= k; j--) {
3046 float invt = 1.0f /
t;
3047 float cs = s[j] * invt;
3048 float sn = f * invt;
3052 e[j - 1] = cs *
e[j - 1];
3055 for (i = 0; i < n; i++) {
3056 t = cs *
V[i][j] + sn *
V[i][p - 1];
3057 V[i][p - 1] = -sn *
V[i][j] + cs *
V[i][p - 1];
3069 for (j = k; j < p; j++) {
3071 float invt = 1.0f /
t;
3072 float cs = s[j] * invt;
3073 float sn = f * invt;
3078 for (i = 0; i < m; i++) {
3079 t = cs *
U[i][j] + sn *
U[i][k - 1];
3080 U[i][k - 1] = -sn *
U[i][j] + cs *
U[i][k - 1];
3096 float invscale = 1.0f / scale;
3097 float sp = s[p - 1] * invscale;
3098 float spm1 = s[p - 2] * invscale;
3099 float epm1 =
e[p - 2] * invscale;
3100 float sk = s[k] * invscale;
3101 float ek =
e[k] * invscale;
3102 float b = ((spm1 + sp) * (spm1 - sp) + epm1 * epm1) * 0.5f;
3103 float c = (sp * epm1) * (sp * epm1);
3106 if ((b != 0.0f) || (
c != 0.0f)) {
3107 shift =
sqrtf(b * b +
c);
3111 shift =
c / (b + shift);
3113 f = (sk + sp) * (sk - sp) + shift;
3118 for (j = k; j < p - 1; j++) {
3121 float cs = (
t == 0.0f) ? 0.0f : f /
t;
3122 float sn = (
t == 0.0f) ? 0.0f : g /
t;
3126 f = cs * s[j] + sn *
e[j];
3127 e[j] = cs *
e[j] - sn * s[j];
3129 s[j + 1] = cs * s[j + 1];
3131 for (i = 0; i < n; i++) {
3132 t = cs *
V[i][j] + sn *
V[i][j + 1];
3133 V[i][j + 1] = -sn *
V[i][j] + cs *
V[i][j + 1];
3139 cs = (
t == 0.0f) ? 0.0f : f /
t;
3140 sn = (
t == 0.0f) ? 0.0f : g /
t;
3142 f = cs *
e[j] + sn * s[j + 1];
3143 s[j + 1] = -sn *
e[j] + cs * s[j + 1];
3145 e[j + 1] = cs *
e[j + 1];
3147 for (i = 0; i < m; i++) {
3148 t = cs *
U[i][j] + sn *
U[i][j + 1];
3149 U[i][j + 1] = -sn *
U[i][j] + cs *
U[i][j + 1];
3165 s[k] = (s[k] < 0.0f ? -s[k] : 0.0f);
3167 for (i = 0; i <= pp; i++) {
3176 if (s[k] >= s[k + 1]) {
3183 for (i = 0; i < n; i++) {
3185 V[i][k + 1] =
V[i][k];
3190 for (i = 0; i < m; i++) {
3192 U[i][k + 1] =
U[i][k];
3210 float A[4][4],
V[4][4], W[4], Wm[4][4],
U[4][4];
3219 for (i = 0; i < 4; i++) {
3220 Wm[i][i] = (W[i] <
epsilon) ? 0.0f : 1.0f / W[i];
3232 float tmp[4][4], tmpinv[4][4];
3256 Atemp[0][0] += 1e-8f;
3257 Atemp[1][1] += 1e-8f;
3258 Atemp[2][2] += 1e-8f;
3343 const float local[4][4],
3344 const float target[4][4])
3346 float itarget[4][4];
3365 const float local[4][4],
3366 const float target[4][4])
typedef float(TangentPoint)[2]
MINLINE float max_ff(float a, float b)
MINLINE int min_ii(int a, int b)
MINLINE int max_ii(int a, int b)
#define mul_m4_series(...)
#define mul_m3_series(...)
void eul_to_mat3(float mat[3][3], const float eul[3])
void mat3_to_quat(float q[4], const float mat[3][3])
void axis_angle_to_quat(float r[4], const float axis[3], const float angle)
void eulO_to_mat3(float mat[3][3], const float eul[3], const short order)
void interp_qt_qtqt(float q[4], const float a[4], const float b[4], const float t)
void quat_to_mat3(float mat[3][3], const float q[4])
void mat3_normalized_to_quat(float q[4], const float mat[3][3])
void BLI_svd_m3(const float m3[3][3], float r_U[3][3], float r_S[], float r_V[3][3])
MINLINE void copy_v4_v4(float r[4], const float a[4])
void interp_v3_v3v3(float r[3], const float a[3], const float b[3], const float t)
MINLINE float len_squared_v3(const float v[3]) ATTR_WARN_UNUSED_RESULT
MINLINE void madd_v3_v3fl(float r[3], const float a[3], float f)
MINLINE bool equals_v4v4(const float a[4], const float b[4]) ATTR_WARN_UNUSED_RESULT
MINLINE void mul_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE float normalize_v3(float r[3])
MINLINE bool is_zero_v4(const float a[4]) ATTR_WARN_UNUSED_RESULT
MINLINE void copy_v2_v2(float r[2], const float a[2])
MINLINE void mul_v3_fl(float r[3], float f)
MINLINE void negate_v2(float r[2])
MINLINE void copy_v3_v3(float r[3], const float a[3])
MINLINE float dot_v4v4(const float a[4], const float b[4]) ATTR_WARN_UNUSED_RESULT
MINLINE bool is_zero_v3(const float a[3]) ATTR_WARN_UNUSED_RESULT
MINLINE float dot_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
MINLINE void cross_v3_v3v3(float r[3], const float a[3], const float b[3])
void ortho_v3_v3(float out[3], const float v[3])
MINLINE void negate_v3(float r[3])
MINLINE void zero_v4(float r[4])
MINLINE float normalize_v3_v3(float r[3], const float a[3])
MINLINE bool compare_v4v4(const float a[4], const float b[4], const float limit) ATTR_WARN_UNUSED_RESULT
MINLINE float mul_project_m4_v3_zfac(const float mat[4][4], const float co[3]) ATTR_WARN_UNUSED_RESULT
MINLINE bool equals_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
MINLINE float normalize_v3_length(float r[3], const float unit_scale)
MINLINE void copy_v3_fl(float r[3], float f)
MINLINE void copy_v3_v3_db(double r[3], const double a[3])
MINLINE void mul_v3_v3fl(float r[3], const float a[3], float f)
MINLINE float normalize_v2(float r[2])
MINLINE float normalize_v2_v2(float r[2], const float a[2])
MINLINE float len_v3(const float a[3]) ATTR_WARN_UNUSED_RESULT
Strict compiler flags for areas of code we want to ensure don't do conversions without us knowing abo...
typedef double(DMatrix)[4][4]
_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 const BMEdge * e
ATTR_WARN_UNUSED_RESULT const BMVert * v
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
btMatrix3x3 inverse() const
Return the inverse of the matrix.
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
static T sum(const btAlignedObjectArray< T > &items)
SIMD_FORCE_INLINE btScalar angle(const btVector3 &v) const
Return the angle between this and another vector.
void mul_v4_m4v3(float r[4], const float M[4][4], const float v[3])
void _va_mul_m4_series_4(float r[4][4], const float m1[4][4], const float m2[4][4], const float m3[4][4])
void mul_v2_m4v3(float r[2], const float mat[4][4], const float vec[3])
void orthogonalize_m3_stable(float R[3][3], int axis, bool normalize)
float mat3_to_scale(const float mat[3][3])
float mat4_to_volume_scale(const float mat[4][4])
bool is_negative_m3(const float mat[3][3])
void mul_v2_project_m4_v3(float r[2], const float mat[4][4], const float vec[3])
bool is_orthogonal_m3(const float m[3][3])
void sub_m3_m3m3(float R[3][3], const float A[3][3], const float B[3][3])
void unit_m2(float m[2][2])
void BLI_space_transform_apply_normal(const SpaceTransform *data, float no[3])
void mul_v4_m4v3_db(double r[4], const double mat[4][4], const double vec[3])
void normalize_m4_m4(float rmat[4][4], const float mat[4][4])
void negate_m3(float R[3][3])
void _va_mul_m3_series_6(float r[3][3], const float m1[3][3], const float m2[3][3], const float m3[3][3], const float m4[3][3], const float m5[3][3])
void _va_mul_m3_series_5(float r[3][3], const float m1[3][3], const float m2[3][3], const float m3[3][3], const float m4[3][3])
float mat4_to_scale(const float mat[4][4])
bool is_zero_m3(const float mat[3][3])
void orthogonalize_m4(float R[4][4], int axis)
void swap_m3m3(float m1[3][3], float m2[3][3])
void mul_v3_project_m4_v3(float r[3], const float mat[4][4], const float vec[3])
void mul_m3_v3(const float M[3][3], float r[3])
void zero_m4(float m[4][4])
void _va_mul_m4_series_9(float r[4][4], const float m1[4][4], const float m2[4][4], const float m3[4][4], const float m4[4][4], const float m5[4][4], const float m6[4][4], const float m7[4][4], const float m8[4][4])
void mul_m4_fl(float R[4][4], float f)
void _va_mul_m3_series_8(float r[3][3], const float m1[3][3], const float m2[3][3], const float m3[3][3], const float m4[3][3], const float m5[3][3], const float m6[3][3], const float m7[3][3])
void mul_m4_m4m4(float R[4][4], const float A[4][4], const float B[4][4])
bool invert_m3(float m[3][3])
void mul_mat3_m4_fl(float R[4][4], float f)
void _va_mul_m4_series_7(float r[4][4], const float m1[4][4], const float m2[4][4], const float m3[4][4], const float m4[4][4], const float m5[4][4], const float m6[4][4])
void mul_v4_m4v4(float r[4], const float mat[4][4], const float v[4])
void mul_m3_m3_pre(float R[3][3], const float A[3][3])
void normalize_m2_m2_ex(float R[2][2], const float M[2][2], float r_scale[2])
void size_to_mat3(float R[3][3], const float size[3])
void normalize_m2(float R[2][2])
void sub_m4_m4m4(float R[4][4], const float A[4][4], const float B[4][4])
void mul_v3_m3v3_db(double r[3], const double M[3][3], const double a[3])
void BLI_space_transform_invert_normal(const SpaceTransform *data, float no[3])
void loc_rot_size_to_mat3(float R[3][3], const float loc[2], const float angle, const float size[2])
void copy_m3_m3(float m1[3][3], const float m2[3][3])
void mat4_decompose(float loc[3], float quat[4], float size[3], const float wmat[4][4])
void madd_m4_m4m4fl(float R[4][4], const float A[4][4], const float B[4][4], const float f)
bool is_orthogonal_m4(const float m[4][4])
void adjoint_m3_m3(float R[3][3], const float M[3][3])
void unit_m3(float m[3][3])
void mul_m3_v2(const float m[3][3], float r[2])
void mat3_to_rot_size(float rot[3][3], float size[3], const float mat3[3][3])
void add_m4_m4m4(float R[4][4], const float A[4][4], const float B[4][4])
void scale_m3_fl(float R[3][3], float scale)
void copy_m3_m4(float m1[3][3], const float m2[4][4])
float determinant_m4_mat3_array(const float m[4][4])
void mul_m4_m4m3(float R[4][4], const float A[4][4], const float B[3][3])
void mul_v3_m4v3_db(double r[3], const double mat[4][4], const double vec[3])
void transpose_m4_m4(float R[4][4], const float M[4][4])
void mul_m4_m4_pre(float R[4][4], const float A[4][4])
void mul_m4_m4m4_db_uniq(double R[4][4], const double A[4][4], const double B[4][4])
bool invert_m3_m3(float m1[3][3], const float m2[3][3])
float mat4_to_xy_scale(const float M[4][4])
void mul_m3_fl(float R[3][3], float f)
void mul_v2_m3v3(float r[2], const float M[3][3], const float a[3])
void zero_m2(float m[2][2])
void _va_mul_m3_series_7(float r[3][3], const float m1[3][3], const float m2[3][3], const float m3[3][3], const float m4[3][3], const float m5[3][3], const float m6[3][3])
void invert_m4_m4_safe_ortho(float Ainv[4][4], const float A[4][4])
void orthogonalize_m3(float R[3][3], int axis)
void copy_m3_m3d(float m1[3][3], const double m2[3][3])
void mul_m3_m3_post(float R[3][3], const float B[3][3])
void add_m3_m3m3(float R[3][3], const float A[3][3], const float B[3][3])
void copy_m4_m3(float m1[4][4], const float m2[3][3])
void translate_m3(float mat[3][3], float tx, float ty)
bool is_uniform_scaled_m3(const float m[3][3])
void mul_mat3_m4_v3(const float M[4][4], float r[3])
void mul_m4_v4d(const float mat[4][4], double r[4])
void loc_rot_size_to_mat4(float R[4][4], const float loc[3], const float rot[3][3], const float size[3])
void mat4_to_rot(float rot[3][3], const float wmat[4][4])
void mat4_to_size_fix_shear(float size[3], const float M[4][4])
bool is_uniform_scaled_m4(const float m[4][4])
void invert_m3_m3_safe_ortho(float Ainv[3][3], const float A[3][3])
void mat4_to_loc_rot_size(float loc[3], float rot[3][3], float size[3], const float wmat[4][4])
void svd_m4(float U[4][4], float s[4], float V[4][4], float A_[4][4])
bool is_orthonormal_m3(const float m[3][3])
void zero_m3(float m[3][3])
void translate_m4(float mat[4][4], float Tx, float Ty, float Tz)
void loc_axisangle_size_to_mat4(float R[4][4], const float loc[3], const float axis[3], const float angle, const float size[3])
bool has_zero_axis_m4(const float matrix[4][4])
void transform_pivot_set_m4(float mat[4][4], const float pivot[3])
void mul_m3_v3_double(const float M[3][3], double r[3])
float determinant_m2(float a, float b, float c, float d)
void transform_pivot_set_m3(float mat[3][3], const float pivot[2])
bool equals_m3m3(const float mat1[3][3], const float mat2[3][3])
void rescale_m4(float mat[4][4], const float scale[3])
void mul_m4_m4m4_uniq(float R[4][4], const float A[4][4], const float B[4][4])
void size_to_mat4(float R[4][4], const float size[3])
void mul_project_m4_v3(const float mat[4][4], float vec[3])
void unit_m4_db(double m[4][4])
void copy_m4d_m4(double m1[4][4], const float m2[4][4])
void mul_v4d_m4v4d(double r[4], const float mat[4][4], const double v[4])
void mul_m4_v3(const float M[4][4], float r[3])
void orthogonalize_m4_stable(float R[4][4], int axis, bool normalize)
void scale_m4_fl(float R[4][4], float scale)
void normalize_m4(float R[4][4])
void adjoint_m4_m4(float R[4][4], const float M[4][4])
bool equals_m4m4(const float mat1[4][4], const float mat2[4][4])
float determinant_m4(const float m[4][4])
void swap_m4m4(float m1[4][4], float m2[4][4])
void _va_mul_m3_series_4(float r[3][3], const float m1[3][3], const float m2[3][3], const float m3[3][3])
void transpose_m3_m4(float R[3][3], const float M[4][4])
static bool orthogonalize_m3_zero_axes_impl(float *mat[3], const float unit_length)
void copy_m2_m2(float m1[2][2], const float m2[2][2])
void mat3_polar_decompose(const float mat3[3][3], float r_U[3][3], float r_P[3][3])
void mul_v2_m2v2(float r[2], const float mat[2][2], const float vec[2])
void normalize_m3(float R[3][3])
void _va_mul_m3_series_9(float r[3][3], const float m1[3][3], const float m2[3][3], const float m3[3][3], const float m4[3][3], const float m5[3][3], const float m6[3][3], const float m7[3][3], const float m8[3][3])
void normalize_m4_ex(float R[4][4], float r_scale[3])
void copy_m4_m4(float m1[4][4], const float m2[4][4])
void normalize_m4_m4_ex(float rmat[4][4], const float mat[4][4], float r_scale[3])
void interp_m4_m4m4(float R[4][4], const float A[4][4], const float B[4][4], const float t)
void mat4_to_loc_quat(float loc[3], float quat[4], const float wmat[4][4])
void normalize_m3_ex(float R[3][3], float r_scale[3])
void mul_transposed_mat3_m4_v3(const float M[4][4], float r[3])
void invert_m4_m4_safe(float Ainv[4][4], const float A[4][4])
void mul_m3_m3m4(float R[3][3], const float A[3][3], const float B[4][4])
bool orthogonalize_m4_zero_axes(float m[4][4], const float unit_length)
void mul_m4db_m4db_m4fl_uniq(double R[4][4], const double A[4][4], const float B[4][4])
void normalize_m3_m3_ex(float R[3][3], const float M[3][3], float r_scale[3])
bool is_orthonormal_m4(const float m[4][4])
void mul_m3_v3_db(const double M[3][3], double r[3])
void mul_v3_m4v3(float r[3], const float mat[4][4], const float vec[3])
float determinant_m3_array(const float m[3][3])
void copy_m4_m2(float m1[4][4], const float m2[2][2])
void shuffle_m4(float R[4][4], const int index[4])
bool is_negative_m4(const float mat[4][4])
void blend_m3_m3m3(float out[3][3], const float dst[3][3], const float src[3][3], const float srcweight)
void negate_mat3_m4(float R[4][4])
void normalize_m2_m2(float R[2][2], const float M[2][2])
void copy_m3_m2(float m1[3][3], const float m2[2][2])
bool invert_m4_m4(float inverse[4][4], const float mat[4][4])
void mul_v2_m3v2(float r[2], const float m[3][3], const float v[2])
void normalize_m2_ex(float R[2][2], float r_scale[2])
static void orthogonalize_stable(float v1[3], float v2[3], float v3[3], bool normalize)
void normalize_m3_m3(float R[3][3], const float M[3][3])
void mul_m4_m4m4_aligned_scale(float R[4][4], const float A[4][4], const float B[4][4])
void print_m3(const char *str, const float m[3][3])
void mul_m3_m3m3_uniq(float R[3][3], const float A[3][3], const float B[3][3])
void mul_m4_v4(const float mat[4][4], float r[4])
void loc_quat_size_to_mat4(float R[4][4], const float loc[3], const float quat[4], const float size[3])
void mul_v3_m3v3(float r[3], const float M[3][3], const float a[3])
void loc_eul_size_to_mat4(float R[4][4], const float loc[3], const float eul[3], const float size[3])
void rescale_m3(float mat[3][3], const float scale[2])
void mat4_to_size(float size[3], const float M[4][4])
bool invert_m3_m3_ex(float m1[3][3], const float m2[3][3], const float epsilon)
void interp_m3_m3m3(float R[3][3], const float A[3][3], const float B[3][3], const float t)
void transpose_m3(float R[3][3])
float determinant_m3(float a1, float a2, float a3, float b1, float b2, float b3, float c1, float c2, float c3)
bool invert_m4(float m[4][4])
void mul_m2_v2(const float mat[2][2], float vec[2])
void blend_m4_m4m4(float out[4][4], const float dst[4][4], const float src[4][4], const float srcweight)
void transpose_m3_m3(float R[3][3], const float M[3][3])
void _va_mul_m4_series_8(float r[4][4], const float m1[4][4], const float m2[4][4], const float m3[4][4], const float m4[4][4], const float m5[4][4], const float m6[4][4], const float m7[4][4])
void _va_mul_m4_series_6(float r[4][4], const float m1[4][4], const float m2[4][4], const float m3[4][4], const float m4[4][4], const float m5[4][4])
void pseudoinverse_m4_m4(float Ainv[4][4], const float A_[4][4], float epsilon)
void BLI_space_transform_global_from_matrices(SpaceTransform *data, const float local[4][4], const float target[4][4])
void negate_m4(float R[4][4])
void mul_transposed_m3_v3(const float M[3][3], float r[3])
bool compare_m4m4(const float mat1[4][4], const float mat2[4][4], float limit)
void BLI_space_transform_apply(const SpaceTransform *data, float co[3])
void mul_v3_mat3_m4v3_db(double r[3], const double mat[4][4], const double vec[3])
void mul_m3_m3m3(float R[3][3], const float A[3][3], const float B[3][3])
void print_m4(const char *str, const float m[4][4])
bool is_zero_m4(const float mat[4][4])
void mat3_to_size(float size[3], const float M[3][3])
void mul_m4_m3m4(float R[4][4], const float A[3][3], const float B[4][4])
void _va_mul_m4_series_3(float r[4][4], const float m1[4][4], const float m2[4][4])
void transpose_m4(float R[4][4])
void rotate_m3(float mat[3][3], const float angle)
void mul_m4_m4_post(float R[4][4], const float B[4][4])
void _va_mul_m3_series_3(float r[3][3], const float m1[3][3], const float m2[3][3])
void mul_v3_mat3_m4v3(float r[3], const float mat[4][4], const float vec[3])
void pseudoinverse_m3_m3(float Ainv[3][3], const float A[3][3], float epsilon)
bool invert_m3_ex(float m[3][3], const float epsilon)
void _va_mul_m4_series_5(float r[4][4], const float m1[4][4], const float m2[4][4], const float m3[4][4], const float m4[4][4])
void loc_eulO_size_to_mat4(float R[4][4], const float loc[3], const float eul[3], const float size[3], const short rotOrder)
void madd_m3_m3m3fl(float R[3][3], const float A[3][3], const float B[3][3], const float f)
void mul_m3_m4m4(float R[3][3], const float A[4][4], const float B[4][4])
void copy_m4_m4_db(double m1[4][4], const double m2[4][4])
void BLI_space_transform_from_matrices(SpaceTransform *data, const float local[4][4], const float target[4][4])
bool invert_m4_m4_fallback(float inverse[4][4], const float mat[4][4])
bool orthogonalize_m3_zero_axes(float m[3][3], const float unit_length)
void BLI_space_transform_invert(const SpaceTransform *data, float co[3])
void mul_m3_m4m3(float R[3][3], const float A[4][4], const float B[3][3])
float mat3_to_volume_scale(const float mat[3][3])
void rotate_m4(float mat[4][4], const char axis, const float angle)
void adjoint_m2_m2(float R[2][2], const float M[2][2])
void unit_m4(float m[4][4])
bool EIG_invert_m4_m4(float inverse[4][4], const float matrix[4][4])
static double B1(double u)
static double B0(double u)
static double B3(double u)
static double B2(double u)
ccl_device_inline float2 normalize(const float2 &a)
CCL_NAMESPACE_BEGIN struct View V