16 # define QUAT_EPSILON 0.0001
30 q[1] = q[2] = q[3] = 0.0f;
43 return (q[0] == 0 && q[1] == 0 && q[2] == 0 && q[3] == 0);
50 t0 =
a[0] *
b[0] -
a[1] *
b[1] -
a[2] *
b[2] -
a[3] *
b[3];
51 t1 =
a[0] *
b[1] +
a[1] *
b[0] +
a[2] *
b[3] -
a[3] *
b[2];
52 t2 =
a[0] *
b[2] +
a[2] *
b[0] +
a[3] *
b[1] -
a[1] *
b[3];
53 q[3] =
a[0] *
b[3] +
a[3] *
b[0] +
a[1] *
b[2] -
a[2] *
b[1];
63 t0 = -q[1] *
r[0] - q[2] *
r[1] - q[3] *
r[2];
64 t1 = q[0] *
r[0] + q[2] *
r[2] - q[3] *
r[1];
65 t2 = q[0] *
r[1] + q[3] *
r[0] - q[1] *
r[2];
66 r[2] = q[0] *
r[2] + q[1] *
r[1] - q[2] *
r[0];
70 t1 = t0 * -q[1] +
r[0] * q[0] -
r[1] * q[3] +
r[2] * q[2];
71 t2 = t0 * -q[2] +
r[1] * q[0] -
r[2] * q[1] +
r[0] * q[3];
72 r[2] = t0 * -q[3] +
r[2] * q[0] -
r[0] * q[2] +
r[1] * q[1];
94 return a[0] *
b[0] +
a[1] *
b[1] +
a[2] *
b[2] +
a[3] *
b[3];
160 const float eps = 1e-4f;
182 double q0,
q1, q2, q3, qda, qdb, qdc, qaa, qab, qac, qbb, qbc, qcc;
199 m[0][0] = (
float)(1.0 - qbb - qcc);
200 m[0][1] = (
float)(qdc + qab);
201 m[0][2] = (
float)(-qdb + qac);
203 m[1][0] = (
float)(-qdc + qab);
204 m[1][1] = (
float)(1.0 - qaa - qcc);
205 m[1][2] = (
float)(qda + qbc);
207 m[2][0] = (
float)(qdb + qac);
208 m[2][1] = (
float)(-qda + qbc);
209 m[2][2] = (
float)(1.0 - qaa - qbb);
216 if (!((f =
dot_qtqt(q, q)) == 0.0f || (
fabsf(f - 1.0f) < (
float)QUAT_EPSILON))) {
218 "Warning! quat_to_mat3() called with non-normalized: size %.8f *** report a bug ***\n",
228 double q0,
q1, q2, q3, qda, qdb, qdc, qaa, qab, qac, qbb, qbc, qcc;
231 if (!((q0 =
dot_qtqt(q, q)) == 0.0 || (
fabs(q0 - 1.0) < QUAT_EPSILON))) {
233 "Warning! quat_to_mat4() called with non-normalized: size %.8f *** report a bug ***\n",
253 m[0][0] = (
float)(1.0 - qbb - qcc);
254 m[0][1] = (
float)(qdc + qab);
255 m[0][2] = (
float)(-qdb + qac);
258 m[1][0] = (
float)(-qdc + qab);
259 m[1][1] = (
float)(1.0 - qaa - qcc);
260 m[1][2] = (
float)(qda + qbc);
263 m[2][0] = (
float)(qdb + qac);
264 m[2][1] = (
float)(-qda + qbc);
265 m[2][2] = (
float)(1.0 - qaa - qbb);
268 m[3][0] = m[3][1] = m[3][2] = 0.0f;
277 const float trace = mat[0][0] + mat[1][1] + mat[2][2];
280 float s = 2.0f *
sqrtf(1.0f + trace);
286 q[1] = (mat[1][2] - mat[2][1]) * s;
287 q[2] = (mat[2][0] - mat[0][2]) * s;
288 q[3] = (mat[0][1] - mat[1][0]) * s;
293 if (mat[0][0] > mat[1][1] && mat[0][0] > mat[2][2]) {
294 float s = 2.0f *
sqrtf(1.0f + mat[0][0] - mat[1][1] - mat[2][2]);
300 q[0] = (mat[1][2] - mat[2][1]) * s;
301 q[2] = (mat[1][0] + mat[0][1]) * s;
302 q[3] = (mat[2][0] + mat[0][2]) * s;
304 else if (mat[1][1] > mat[2][2]) {
305 float s = 2.0f *
sqrtf(1.0f + mat[1][1] - mat[0][0] - mat[2][2]);
311 q[0] = (mat[2][0] - mat[0][2]) * s;
312 q[1] = (mat[1][0] + mat[0][1]) * s;
313 q[3] = (mat[2][1] + mat[1][2]) * s;
316 float s = 2.0f *
sqrtf(1.0f + mat[2][2] - mat[0][0] - mat[1][1]);
322 q[0] = (mat[0][1] - mat[1][0]) * s;
323 q[1] = (mat[2][0] + mat[0][2]) * s;
324 q[2] = (mat[2][1] + mat[1][2]) * s;
337 float unit_mat[3][3];
363 float mat[3][3], matr[3][3], matn[3][3],
q1[4], q2[4],
angle, si, co,
nor[3];
382 q1[1] = -
nor[0] * si;
383 q1[2] = -
nor[1] * si;
384 q1[3] = -
nor[2] * si;
413 q[0] = q[2] = q[3] = 0.0f;
440 if (angle_sin > FLT_EPSILON) {
447 if (angle_cos > 0.0f) {
516 float t =
atan2f(q[axis + 1], q[0]);
518 if (r_swing || r_twist) {
525 twist_inv[0] = cos_t;
527 twist_inv[axis + 1] = -sin_t;
538 r_twist[axis + 1] = sin_t;
556 return 2.0f *
saacos(q[0]);
582 float quat1[4], quat2[4];
606 return 2.0f *
saacos(q[0]);
609 return -2.0f *
saacos(-q[0]);
645 void vec_to_quat(
float q[4],
const float vec[3],
short axis,
const short upflag)
647 const float eps = 1e-4f;
648 float nor[3], tvec[3];
666 axis = (short)(axis - 3);
687 else if (axis == 1) {
715 if (axis != upflag) {
718 const float *fp = mat[2];
729 else if (axis == 1) {
749 q2[1] = tvec[0] * si;
750 q2[2] = tvec[1] * si;
751 q2[3] = tvec[2] * si;
760 void QuatInterpolW(
float *
result,
float quat1[4],
float quat2[4],
float t)
762 float omega, cosom, sinom, sc1, sc2;
764 cosom = quat1[0] * quat2[0] + quat1[1] * quat2[1] + quat1[2] * quat2[2] + quat1[3] * quat2[3];
767 if ((1.0f + cosom) > 0.0001f) {
769 if ((1.0f - cosom) > 0.0001f) {
772 sc1 =
sinf((1.0 -
t) * omega) / sinom;
773 sc2 =
sinf(
t * omega) / sinom;
779 result[0] = sc1 * quat1[0] + sc2 * quat2[0];
780 result[1] = sc1 * quat1[1] + sc2 * quat2[1];
781 result[2] = sc1 * quat1[2] + sc2 * quat2[2];
782 result[3] = sc1 * quat1[3] + sc2 * quat2[3];
803 const float eps = 1e-4f;
811 omega =
acosf(cosom);
813 r_w[0] =
sinf((1.0f -
t) * omega) / sinom;
814 r_w[1] =
sinf(
t * omega) / sinom;
825 float quat[4], cosom,
w[2];
843 q[0] =
w[0] * quat[0] +
w[1] *
b[0];
844 q[1] =
w[0] * quat[1] +
w[1] *
b[1];
845 q[2] =
w[0] * quat[2] +
w[1] *
b[2];
846 q[3] =
w[0] * quat[3] +
w[1] *
b[3];
851 q[0] =
a[0] +
t *
b[0];
852 q[1] =
a[1] +
t *
b[1];
853 q[2] =
a[2] +
t *
b[2];
854 q[3] =
a[3] +
t *
b[3];
858 float quat[4],
const float v1[3],
const float v2[3],
const float v3[3],
const float no_orig[3])
861 float vec[3],
q1[4], q2[4], n[3], si, co,
angle, mat[3][3], imat[3][3];
876 if (n[0] == 0.0f && n[1] == 0.0f) {
909 float tri_to_quat(
float q[4],
const float a[3],
const float b[3],
const float c[3])
932 BLI_assert((numerator <= denominator) && (denominator > 0));
933 enum { NEGATE_SIN_BIT = 0, NEGATE_COS_BIT = 1, SWAP_SIN_COS_BIT = 2 };
935 NEGATE_SIN = (1 << NEGATE_SIN_BIT),
936 NEGATE_COS = (1 << NEGATE_COS_BIT),
937 SWAP_SIN_COS = (1 << SWAP_SIN_COS_BIT),
939 if ((denominator & 3) == 0) {
941 const int denominator_4 = denominator / 4;
942 if (numerator < denominator_4) {
946 if (numerator < denominator_4 * 2) {
947 numerator -= denominator_4;
948 xform = NEGATE_SIN | SWAP_SIN_COS;
950 else if (numerator == denominator_4 * 2) {
954 else if (numerator < denominator_4 * 3) {
955 numerator -= denominator_4 * 2;
956 xform = NEGATE_SIN | NEGATE_COS;
958 else if (numerator == denominator_4 * 3) {
960 xform = NEGATE_COS | SWAP_SIN_COS;
963 numerator -= denominator_4 * 3;
964 xform = NEGATE_COS | SWAP_SIN_COS;
968 const int numerator_test = denominator_4 - numerator;
969 if (numerator_test < numerator) {
970 numerator = numerator_test;
971 xform ^= SWAP_SIN_COS;
973 xform = (xform & (
uint)(~(NEGATE_SIN | NEGATE_COS))) |
974 (((xform & NEGATE_SIN) >> NEGATE_SIN_BIT) << NEGATE_COS_BIT) |
975 (((xform & NEGATE_COS) >> NEGATE_COS_BIT) << NEGATE_SIN_BIT);
978 else if ((denominator & 1) == 0) {
980 const int denominator_2 = denominator / 2;
981 if (numerator < denominator_2) {
984 else if (numerator == denominator_2) {
989 numerator -= denominator_2;
990 xform = NEGATE_SIN | NEGATE_COS;
993 const int numerator_test = denominator_2 - numerator;
994 if (numerator_test < numerator) {
995 numerator = numerator_test;
1001 const int numerator_test = denominator - numerator;
1002 if (numerator_test < numerator) {
1003 numerator = numerator_test;
1004 xform ^= NEGATE_SIN;
1008 const float phi = (
float)(2.0 *
M_PI) * ((
float)numerator / (
float)denominator);
1009 const float sin_phi =
sinf(phi) * ((xform & NEGATE_SIN) ? -1.0f : 1.0f);
1010 const float cos_phi =
cosf(phi) * ((xform & NEGATE_COS) ? -1.0f : 1.0f);
1011 if ((xform & SWAP_SIN_COS) == 0) {
1023 printf(
"%s: %.3f %.3f %.3f %.3f\n",
str, q[0], q[1], q[2], q[3]);
1030 const float phi = 0.5f *
angle;
1031 const float si =
sinf(phi);
1032 const float co =
cosf(phi);
1055 if (!((ha =
dot_qtqt(q, q)) == 0.0f || (
fabsf(ha - 1.0f) < (
float)QUAT_EPSILON))) {
1057 "Warning! quat_to_axis_angle() called with non-normalized: size %.8f *** report a bug "
1071 if (
fabsf(si) < 0.0005f) {
1075 axis[0] = q[1] / si;
1076 axis[1] = q[2] / si;
1077 axis[2] = q[3] / si;
1102 const float axis[3],
1103 const float angle_sin,
1104 const float angle_cos)
1107 float n_00, n_01, n_11, n_02, n_12, n_22;
1113 ico = (1.0f - angle_cos);
1114 nsi[0] = axis[0] * angle_sin;
1115 nsi[1] = axis[1] * angle_sin;
1116 nsi[2] = axis[2] * angle_sin;
1118 n_00 = (axis[0] * axis[0]) * ico;
1119 n_01 = (axis[0] * axis[1]) * ico;
1120 n_11 = (axis[1] * axis[1]) * ico;
1121 n_02 = (axis[0] * axis[2]) * ico;
1122 n_12 = (axis[1] * axis[2]) * ico;
1123 n_22 = (axis[2] * axis[2]) * ico;
1125 mat[0][0] = n_00 + angle_cos;
1126 mat[0][1] = n_01 + nsi[2];
1127 mat[0][2] = n_02 - nsi[1];
1128 mat[1][0] = n_01 - nsi[2];
1129 mat[1][1] = n_11 + angle_cos;
1130 mat[1][2] = n_12 + nsi[0];
1131 mat[2][0] = n_02 + nsi[1];
1132 mat[2][1] = n_12 - nsi[0];
1133 mat[2][2] = n_22 + angle_cos;
1220 R[1][1] = angle_cos;
1221 R[1][2] = angle_sin;
1223 R[2][1] = -angle_sin;
1224 R[2][2] = angle_cos;
1227 R[0][0] = angle_cos;
1229 R[0][2] = -angle_sin;
1233 R[2][0] = angle_sin;
1235 R[2][2] = angle_cos;
1238 R[0][0] = angle_cos;
1239 R[0][1] = angle_sin;
1241 R[1][0] = -angle_sin;
1242 R[1][1] = angle_cos;
1260 R[0][0] = angle_cos;
1261 R[0][1] = angle_sin;
1262 R[1][0] = -angle_sin;
1263 R[1][1] = angle_cos;
1268 const float angle_half =
angle * 0.5f;
1269 const float angle_cos =
cosf(angle_half);
1270 const float angle_sin =
sinf(angle_half);
1271 const int axis_index = (axis -
'X');
1277 q[axis_index + 1] = angle_sin;
1319 double ci, cj, ch, si, sj,
sh, cc, cs, sc, ss;
1332 mat[0][0] = (
float)(cj * ch);
1333 mat[1][0] = (
float)(sj * sc - cs);
1334 mat[2][0] = (
float)(sj * cc + ss);
1336 mat[1][1] = (
float)(sj * ss + cc);
1337 mat[2][1] = (
float)(sj * cs - sc);
1338 mat[0][2] = (
float)-sj;
1339 mat[1][2] = (
float)(cj * si);
1340 mat[2][2] = (
float)(cj * ci);
1345 double ci, cj, ch, si, sj,
sh, cc, cs, sc, ss;
1358 mat[0][0] = (
float)(cj * ch);
1359 mat[1][0] = (
float)(sj * sc - cs);
1360 mat[2][0] = (
float)(sj * cc + ss);
1362 mat[1][1] = (
float)(sj * ss + cc);
1363 mat[2][1] = (
float)(sj * cs - sc);
1364 mat[0][2] = (
float)-sj;
1365 mat[1][2] = (
float)(cj * si);
1366 mat[2][2] = (
float)(cj * ci);
1368 mat[3][0] = mat[3][1] = mat[3][2] = mat[0][3] = mat[1][3] = mat[2][3] = 0.0f;
1377 const float cy =
hypotf(mat[0][0], mat[0][1]);
1381 if (cy > 16.0f * FLT_EPSILON) {
1383 eul1[0] =
atan2f(mat[1][2], mat[2][2]);
1384 eul1[1] =
atan2f(-mat[0][2], cy);
1385 eul1[2] =
atan2f(mat[0][1], mat[0][0]);
1387 eul2[0] =
atan2f(-mat[1][2], -mat[2][2]);
1388 eul2[1] =
atan2f(-mat[0][2], -cy);
1389 eul2[2] =
atan2f(-mat[0][1], -mat[0][0]);
1392 eul1[0] =
atan2f(-mat[2][1], mat[1][1]);
1393 eul1[1] =
atan2f(-mat[0][2], cy);
1402 float eul1[3], eul2[3];
1417 float unit_mat[3][3];
1437 float unit_mat[3][3];
1444 float ti, tj, th, ci, cj, ch, si, sj,
sh, cc, cs, sc, ss;
1460 quat[0] = cj * cc + sj * ss;
1461 quat[1] = cj * sc - sj * cs;
1462 quat[2] = cj * ss + sj * cc;
1463 quat[3] = cj * cs - sj * sc;
1468 float eul[3], mat1[3][3], mat2[3][3], totmat[3][3];
1472 eul[0] = eul[1] = eul[2] = 0.0f;
1476 else if (axis ==
'Y') {
1495 const float pi_thresh = (5.1f);
1496 const float pi_x2 = (2.0f * (
float)
M_PI);
1502 for (i = 0; i < 3; i++) {
1503 deul[i] = eul[i] - oldrot[i];
1504 if (deul[i] > pi_thresh) {
1505 eul[i] -=
floorf((deul[i] / pi_x2) + 0.5f) * pi_x2;
1506 deul[i] = eul[i] - oldrot[i];
1508 else if (deul[i] < -pi_thresh) {
1509 eul[i] +=
floorf((-deul[i] / pi_x2) + 0.5f) * pi_x2;
1510 deul[i] = eul[i] - oldrot[i];
1515 if (
fabsf(deul[0]) > 3.2f &&
fabsf(deul[1]) < 1.6f &&
fabsf(deul[2]) < 1.6f) {
1516 if (deul[0] > 0.0f) {
1523 if (
fabsf(deul[1]) > 3.2f &&
fabsf(deul[2]) < 1.6f &&
fabsf(deul[0]) < 1.6f) {
1524 if (deul[1] > 0.0f) {
1531 if (
fabsf(deul[2]) > 3.2f &&
fabsf(deul[0]) < 1.6f &&
fabsf(deul[1]) < 1.6f) {
1532 if (deul[2] > 0.0f) {
1545 float eul1[3], eul2[3];
1553 d1 =
fabsf(eul1[0] - oldrot[0]) +
fabsf(eul1[1] - oldrot[1]) +
fabsf(eul1[2] - oldrot[2]);
1554 d2 =
fabsf(eul2[0] - oldrot[0]) +
fabsf(eul2[1] - oldrot[1]) +
fabsf(eul2[2] - oldrot[2]);
1566 float unit_mat[3][3];
1573 float unit_mat[3][3];
1628 short i =
R->axis[0], j =
R->axis[1], k =
R->axis[2];
1629 double ti, tj, th, ci, cj, ch, si, sj,
sh, cc, cs, sc, ss;
1633 tj =
e[j] * (
R->parity ? -0.5f : 0.5f);
1648 a[i] = cj * sc - sj * cs;
1649 a[j] = cj * ss + sj * cc;
1650 a[k] = cj * cs - sj * sc;
1652 q[0] = (
float)(cj * cc + sj * ss);
1658 q[j + 1] = -q[j + 1];
1664 float unit_mat[3][3];
1673 short i =
R->axis[0], j =
R->axis[1], k =
R->axis[2];
1674 double ti, tj, th, ci, cj, ch, si, sj,
sh, cc, cs, sc, ss;
1699 M[i][i] = (
float)(cj * ch);
1700 M[j][i] = (
float)(sj * sc - cs);
1701 M[k][i] = (
float)(sj * cc + ss);
1703 M[j][j] = (
float)(sj * ss + cc);
1704 M[k][j] = (
float)(sj * cs - sc);
1706 M[j][k] = (
float)(cj * si);
1707 M[k][k] = (
float)(cj * ci);
1717 short i =
R->axis[0], j =
R->axis[1], k =
R->axis[2];
1722 cy =
hypotf(mat[i][i], mat[i][j]);
1724 if (cy > 16.0f * FLT_EPSILON) {
1725 eul1[i] =
atan2f(mat[j][k], mat[k][k]);
1726 eul1[j] =
atan2f(-mat[i][k], cy);
1727 eul1[k] =
atan2f(mat[i][j], mat[i][i]);
1729 eul2[i] =
atan2f(-mat[j][k], -mat[k][k]);
1730 eul2[j] =
atan2f(-mat[i][k], -cy);
1731 eul2[k] =
atan2f(-mat[i][j], -mat[i][i]);
1734 eul1[i] =
atan2f(-mat[k][j], mat[j][j]);
1735 eul1[j] =
atan2f(-mat[i][k], cy);
1749 float unit_mat[3][3];
1758 float eul1[3], eul2[3];
1776 float unit_mat[3][3];
1799 const float oldrot[3],
1801 const float mat[3][3])
1803 float eul1[3], eul2[3];
1811 d1 =
fabsf(eul1[0] - oldrot[0]) +
fabsf(eul1[1] - oldrot[1]) +
fabsf(eul1[2] - oldrot[2]);
1812 d2 =
fabsf(eul2[0] - oldrot[0]) +
fabsf(eul2[1] - oldrot[1]) +
fabsf(eul2[2] - oldrot[2]);
1823 const float oldrot[3],
1825 const float mat[3][3])
1827 float unit_mat[3][3];
1834 const float oldrot[3],
1836 const float m[4][4])
1845 const float oldrot[3],
1847 const float m[4][4])
1858 const float oldrot[3],
1860 const float quat[4])
1862 float unit_mat[3][3];
1873 float eul[3], mat1[3][3], mat2[3][3], totmat[3][3];
1882 else if (axis ==
'Y') {
1910 teul[
R->axis[0]] = 0;
1916 gmat[
R->axis[2]][
R->axis[2]] = 1;
1921 float quat[4], quat_b[4];
1933 float quat[4], quat_b[4];
1960 float *
t, *q, dscale[3], scale[3], basequat[4], mat3[3][3];
1961 float baseRS[4][4], baseinv[4][4], baseR[4][4], baseRinv[4][4];
1962 float R[4][4], S[4][4];
1969 dscale[0] = scale[0] - 1.0f;
1970 dscale[1] = scale[1] - 1.0f;
1971 dscale[2] = scale[2] - 1.0f;
2010 dq->
trans[0] = -0.5f * (
t[0] * q[1] +
t[1] * q[2] +
t[2] * q[3]);
2011 dq->
trans[1] = 0.5f * (
t[0] * q[0] +
t[1] * q[3] -
t[2] * q[2]);
2012 dq->
trans[2] = 0.5f * (-
t[0] * q[3] +
t[1] * q[0] +
t[2] * q[1]);
2013 dq->
trans[3] = 0.5f * (
t[0] * q[2] -
t[1] * q[1] +
t[2] * q[0]);
2036 R[3][0] = 2.0f * (-
t[0] * q0[1] +
t[1] * q0[0] -
t[2] * q0[3] +
t[3] * q0[2]) *
len;
2037 R[3][1] = 2.0f * (-
t[0] * q0[2] +
t[1] * q0[3] +
t[2] * q0[0] -
t[3] * q0[1]) *
len;
2038 R[3][2] = 2.0f * (-
t[0] * q0[3] -
t[1] * q0[2] +
t[2] * q0[1] +
t[3] * q0[0]) *
len;
2048 bool flipped =
false;
2057 dq_sum->
quat[0] += weight * dq->
quat[0];
2058 dq_sum->
quat[1] += weight * dq->
quat[1];
2059 dq_sum->
quat[2] += weight * dq->
quat[2];
2060 dq_sum->
quat[3] += weight * dq->
quat[3];
2087 const float scale = 1.0f / totweight;
2099 dq->
scale[0][0] += addweight;
2100 dq->
scale[1][1] += addweight;
2101 dq->
scale[2][2] += addweight;
2102 dq->
scale[3][3] += addweight;
2112 float M[3][3],
t[3], scalemat[3][3], len2;
2117 M[0][0] =
w *
w +
x *
x -
y *
y -
z *
z;
2118 M[1][0] = 2 * (
x *
y -
w *
z);
2119 M[2][0] = 2 * (
x *
z +
w *
y);
2121 M[0][1] = 2 * (
x *
y +
w *
z);
2122 M[1][1] =
w *
w +
y *
y -
x *
x -
z *
z;
2123 M[2][1] = 2 * (
y *
z -
w *
x);
2125 M[0][2] = 2 * (
x *
z -
w *
y);
2126 M[1][2] = 2 * (
y *
z +
w *
x);
2127 M[2][2] =
w *
w +
z *
z -
x *
x -
y *
y;
2135 t[0] = 2 * (-t0 *
x +
w * t1 - t2 *
z +
y * t3);
2136 t[1] = 2 * (-t0 *
y + t1 *
z -
x * t3 +
w * t2);
2137 t[2] = 2 * (-t0 *
z +
x * t2 +
w * t3 - t1 *
y);
2146 r[0] = (
r[0] +
t[0]) * len2;
2147 r[1] = (
r[1] +
t[1]) * len2;
2148 r[2] = (
r[2] +
t[2]) * len2;
2172 const float quat_track[][4] = {
2174 {sqrt_1_2, 0.0, -sqrt_1_2, 0.0},
2176 {0.5, 0.5, 0.5, 0.5},
2178 {sqrt_1_2, 0.0, 0.0, sqrt_1_2},
2180 {sqrt_1_2, 0.0, sqrt_1_2, 0.0},
2182 {0.5, -0.5, -0.5, 0.5},
2184 {0.0, sqrt_1_2, sqrt_1_2, 0.0},
2193 axis = (short)(axis - 3);
2199 if (upflag != (2 - axis) >> 1) {
2200 float q[4] = {sqrt_1_2, 0.0, 0.0, 0.0};
2201 q[axis + 1] = ((axis == 1)) ? sqrt_1_2 : -sqrt_1_2;
2250 return 2.0f *
atanf((sensor / 2.0f) / focal_length);
2255 return (sensor / 2.0f) /
tanf(hfov * 0.5f);
2281 {{-1.0, 0.0, 0.0}, {0.0, -1.0, 0.0}, {0.0, 0.0, 1.0}},
2282 {{-1.0, 0.0, 0.0}, {0.0, 0.0, -1.0}, {0.0, -1.0, 0.0}},
2283 {{-1.0, 0.0, 0.0}, {0.0, 0.0, 1.0}, {0.0, 1.0, 0.0}},
2284 {{-1.0, 0.0, 0.0}, {0.0, 1.0, 0.0}, {0.0, 0.0, -1.0}},
2285 {{0.0, -1.0, 0.0}, {-1.0, 0.0, 0.0}, {0.0, 0.0, -1.0}},
2286 {{0.0, 0.0, 1.0}, {-1.0, 0.0, 0.0}, {0.0, -1.0, 0.0}},
2287 {{0.0, 0.0, -1.0}, {-1.0, 0.0, 0.0}, {0.0, 1.0, 0.0}},
2288 {{0.0, 1.0, 0.0}, {-1.0, 0.0, 0.0}, {0.0, 0.0, 1.0}},
2289 {{0.0, -1.0, 0.0}, {0.0, 0.0, 1.0}, {-1.0, 0.0, 0.0}},
2290 {{0.0, 0.0, -1.0}, {0.0, -1.0, 0.0}, {-1.0, 0.0, 0.0}},
2291 {{0.0, 0.0, 1.0}, {0.0, 1.0, 0.0}, {-1.0, 0.0, 0.0}},
2292 {{0.0, 1.0, 0.0}, {0.0, 0.0, -1.0}, {-1.0, 0.0, 0.0}},
2293 {{0.0, -1.0, 0.0}, {0.0, 0.0, -1.0}, {1.0, 0.0, 0.0}},
2294 {{0.0, 0.0, 1.0}, {0.0, -1.0, 0.0}, {1.0, 0.0, 0.0}},
2295 {{0.0, 0.0, -1.0}, {0.0, 1.0, 0.0}, {1.0, 0.0, 0.0}},
2296 {{0.0, 1.0, 0.0}, {0.0, 0.0, 1.0}, {1.0, 0.0, 0.0}},
2297 {{0.0, -1.0, 0.0}, {1.0, 0.0, 0.0}, {0.0, 0.0, 1.0}},
2298 {{0.0, 0.0, -1.0}, {1.0, 0.0, 0.0}, {0.0, -1.0, 0.0}},
2299 {{0.0, 0.0, 1.0}, {1.0, 0.0, 0.0}, {0.0, 1.0, 0.0}},
2300 {{0.0, 1.0, 0.0}, {1.0, 0.0, 0.0}, {0.0, 0.0, -1.0}},
2301 {{1.0, 0.0, 0.0}, {0.0, -1.0, 0.0}, {0.0, 0.0, -1.0}},
2302 {{1.0, 0.0, 0.0}, {0.0, 0.0, 1.0}, {0.0, -1.0, 0.0}},
2303 {{1.0, 0.0, 0.0}, {0.0, 0.0, -1.0}, {0.0, 1.0, 0.0}},
2307 {0x8C8, 0x4D0, 0x2E0, 0xAE8, 0x701, 0x511, 0x119, 0xB29, 0x682, 0x88A, 0x09A, 0x2A2,
2308 0x80B, 0x413, 0x223, 0xA2B, 0x644, 0x454, 0x05C, 0xA6C, 0x745, 0x94D, 0x15D, 0x365},
2309 {0xAC8, 0x8D0, 0x4E0, 0x2E8, 0x741, 0x951, 0x159, 0x369, 0x702, 0xB0A, 0x11A, 0x522,
2310 0xA0B, 0x813, 0x423, 0x22B, 0x684, 0x894, 0x09C, 0x2AC, 0x645, 0xA4D, 0x05D, 0x465},
2311 {0x4C8, 0x2D0, 0xAE0, 0x8E8, 0x681, 0x291, 0x099, 0x8A9, 0x642, 0x44A, 0x05A, 0xA62,
2312 0x40B, 0x213, 0xA23, 0x82B, 0x744, 0x354, 0x15C, 0x96C, 0x705, 0x50D, 0x11D, 0xB25},
2313 {0x2C8, 0xAD0, 0x8E0, 0x4E8, 0x641, 0xA51, 0x059, 0x469, 0x742, 0x34A, 0x15A, 0x962,
2314 0x20B, 0xA13, 0x823, 0x42B, 0x704, 0xB14, 0x11C, 0x52C, 0x685, 0x28D, 0x09D, 0x8A5},
2315 {0x708, 0xB10, 0x120, 0x528, 0x8C1, 0xAD1, 0x2D9, 0x4E9, 0x942, 0x74A, 0x35A, 0x162,
2316 0x64B, 0xA53, 0x063, 0x46B, 0x804, 0xA14, 0x21C, 0x42C, 0x885, 0x68D, 0x29D, 0x0A5},
2317 {0xB08, 0x110, 0x520, 0x728, 0x941, 0x151, 0x359, 0x769, 0x802, 0xA0A, 0x21A, 0x422,
2318 0xA4B, 0x053, 0x463, 0x66B, 0x884, 0x094, 0x29C, 0x6AC, 0x8C5, 0xACD, 0x2DD, 0x4E5},
2319 {0x508, 0x710, 0xB20, 0x128, 0x881, 0x691, 0x299, 0x0A9, 0x8C2, 0x4CA, 0x2DA, 0xAE2,
2320 0x44B, 0x653, 0xA63, 0x06B, 0x944, 0x754, 0x35C, 0x16C, 0x805, 0x40D, 0x21D, 0xA25},
2321 {0x108, 0x510, 0x720, 0xB28, 0x801, 0x411, 0x219, 0xA29, 0x882, 0x08A, 0x29A, 0x6A2,
2322 0x04B, 0x453, 0x663, 0xA6B, 0x8C4, 0x4D4, 0x2DC, 0xAEC, 0x945, 0x14D, 0x35D, 0x765},
2323 {0x748, 0x350, 0x160, 0x968, 0xAC1, 0x2D1, 0x4D9, 0x8E9, 0xA42, 0x64A, 0x45A, 0x062,
2324 0x68B, 0x293, 0x0A3, 0x8AB, 0xA04, 0x214, 0x41C, 0x82C, 0xB05, 0x70D, 0x51D, 0x125},
2325 {0x948, 0x750, 0x360, 0x168, 0xB01, 0x711, 0x519, 0x129, 0xAC2, 0x8CA, 0x4DA, 0x2E2,
2326 0x88B, 0x693, 0x2A3, 0x0AB, 0xA44, 0x654, 0x45C, 0x06C, 0xA05, 0x80D, 0x41D, 0x225},
2327 {0x348, 0x150, 0x960, 0x768, 0xA41, 0x051, 0x459, 0x669, 0xA02, 0x20A, 0x41A, 0x822,
2328 0x28B, 0x093, 0x8A3, 0x6AB, 0xB04, 0x114, 0x51C, 0x72C, 0xAC5, 0x2CD, 0x4DD, 0x8E5},
2329 {0x148, 0x950, 0x760, 0x368, 0xA01, 0x811, 0x419, 0x229, 0xB02, 0x10A, 0x51A, 0x722,
2330 0x08B, 0x893, 0x6A3, 0x2AB, 0xAC4, 0x8D4, 0x4DC, 0x2EC, 0xA45, 0x04D, 0x45D, 0x665},
2331 {0x688, 0x890, 0x0A0, 0x2A8, 0x4C1, 0x8D1, 0xAD9, 0x2E9, 0x502, 0x70A, 0xB1A, 0x122,
2332 0x74B, 0x953, 0x163, 0x36B, 0x404, 0x814, 0xA1C, 0x22C, 0x445, 0x64D, 0xA5D, 0x065},
2333 {0x888, 0x090, 0x2A0, 0x6A8, 0x501, 0x111, 0xB19, 0x729, 0x402, 0x80A, 0xA1A, 0x222,
2334 0x94B, 0x153, 0x363, 0x76B, 0x444, 0x054, 0xA5C, 0x66C, 0x4C5, 0x8CD, 0xADD, 0x2E5},
2335 {0x288, 0x690, 0x8A0, 0x0A8, 0x441, 0x651, 0xA59, 0x069, 0x4C2, 0x2CA, 0xADA, 0x8E2,
2336 0x34B, 0x753, 0x963, 0x16B, 0x504, 0x714, 0xB1C, 0x12C, 0x405, 0x20D, 0xA1D, 0x825},
2337 {0x088, 0x290, 0x6A0, 0x8A8, 0x401, 0x211, 0xA19, 0x829, 0x442, 0x04A, 0xA5A, 0x662,
2338 0x14B, 0x353, 0x763, 0x96B, 0x4C4, 0x2D4, 0xADC, 0x8EC, 0x505, 0x10D, 0xB1D, 0x725},
2339 {0x648, 0x450, 0x060, 0xA68, 0x2C1, 0x4D1, 0x8D9, 0xAE9, 0x282, 0x68A, 0x89A, 0x0A2,
2340 0x70B, 0x513, 0x123, 0xB2B, 0x204, 0x414, 0x81C, 0xA2C, 0x345, 0x74D, 0x95D, 0x165},
2341 {0xA48, 0x650, 0x460, 0x068, 0x341, 0x751, 0x959, 0x169, 0x2C2, 0xACA, 0x8DA, 0x4E2,
2342 0xB0B, 0x713, 0x523, 0x12B, 0x284, 0x694, 0x89C, 0x0AC, 0x205, 0xA0D, 0x81D, 0x425},
2343 {0x448, 0x050, 0xA60, 0x668, 0x281, 0x091, 0x899, 0x6A9, 0x202, 0x40A, 0x81A, 0xA22,
2344 0x50B, 0x113, 0xB23, 0x72B, 0x344, 0x154, 0x95C, 0x76C, 0x2C5, 0x4CD, 0x8DD, 0xAE5},
2345 {0x048, 0xA50, 0x660, 0x468, 0x201, 0xA11, 0x819, 0x429, 0x342, 0x14A, 0x95A, 0x762,
2346 0x10B, 0xB13, 0x723, 0x52B, 0x2C4, 0xAD4, 0x8DC, 0x4EC, 0x285, 0x08D, 0x89D, 0x6A5},
2347 {0x808, 0xA10, 0x220, 0x428, 0x101, 0xB11, 0x719, 0x529, 0x142, 0x94A, 0x75A, 0x362,
2348 0x8CB, 0xAD3, 0x2E3, 0x4EB, 0x044, 0xA54, 0x65C, 0x46C, 0x085, 0x88D, 0x69D, 0x2A5},
2349 {0xA08, 0x210, 0x420, 0x828, 0x141, 0x351, 0x759, 0x969, 0x042, 0xA4A, 0x65A, 0x462,
2350 0xACB, 0x2D3, 0x4E3, 0x8EB, 0x084, 0x294, 0x69C, 0x8AC, 0x105, 0xB0D, 0x71D, 0x525},
2351 {0x408, 0x810, 0xA20, 0x228, 0x081, 0x891, 0x699, 0x2A9, 0x102, 0x50A, 0x71A, 0xB22,
2352 0x4CB, 0x8D3, 0xAE3, 0x2EB, 0x144, 0x954, 0x75C, 0x36C, 0x045, 0x44D, 0x65D, 0xA65},
2359 return (axis < 3) ? axis : axis - 3;
2363 int src_forward,
int src_up,
int dst_forward,
int dst_up,
float r_mat[3][3])
2367 if (src_forward == dst_forward && src_up == dst_up) {
2379 value = ((src_forward << (0 * 3)) | (src_up << (1 * 3)) | (dst_forward << (2 * 3)) |
2380 (dst_up << (3 * 3)));
2396 if (src_axis == dst_axis) {
2402 int src_axis_next = (src_axis + 1) % 3;
2403 int dst_axis_next = (dst_axis + 1) % 3;
2405 if ((src_axis < 3) != (dst_axis < 3)) {
typedef float(TangentPoint)[2]
#define BLI_assert_unreachable()
MINLINE float saacos(float fac)
#define BLI_ASSERT_UNIT_EPSILON
#define BLI_ASSERT_UNIT_M3(m)
MINLINE float square_f(float a)
#define BLI_ASSERT_UNIT_QUAT(q)
#define BLI_ASSERT_UNIT_V3(v)
float normal_tri_v3(float n[3], const float v1[3], const float v2[3], const float v3[3])
void orthogonalize_m4(float R[4][4], int axis)
void mul_m3_v3(const float M[3][3], float r[3])
void mul_m4_fl(float R[4][4], float f)
void mul_m4_m4m4(float R[4][4], const float A[4][4], const float B[4][4])
void normalize_m3_m3(float R[3][3], const float M[3][3]) ATTR_NONNULL()
void copy_m3_m3(float m1[3][3], const float m2[3][3])
void unit_m3(float m[3][3])
void add_m4_m4m4(float R[4][4], const float A[4][4], const float B[4][4])
void copy_m3_m4(float m1[3][3], const float m2[4][4])
void mul_m3_fl(float R[3][3], float f)
void unit_m4(float m[4][4])
void copy_m4_m3(float m1[4][4], const float m2[3][3])
bool invert_m4_m4(float R[4][4], const float A[4][4])
void normalize_m3(float R[3][3]) ATTR_NONNULL()
bool is_orthonormal_m3(const float mat[3][3])
void mul_m4_v3(const float M[4][4], float r[3])
#define mul_m4_series(...)
float determinant_m4(const float m[4][4])
bool invert_m3_m3(float R[3][3], const float A[3][3])
void copy_m4_m4(float m1[4][4], const float m2[4][4])
void mat4_to_size(float size[3], const float M[4][4])
void mul_m3_m3m3(float R[3][3], const float A[3][3], const float B[3][3])
MINLINE void copy_v4_v4(float r[4], const float a[4])
MINLINE float len_squared_v3(const float v[3]) ATTR_WARN_UNUSED_RESULT
MINLINE float normalize_v3(float r[3])
MINLINE void sub_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE void mul_v3_fl(float r[3], float f)
MINLINE void copy_v3_v3(float r[3], const float a[3])
MINLINE void negate_v3_v3(float r[3], const float a[3])
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_v4_v4(float r[4], const float a[4])
MINLINE void negate_v3(float r[3])
MINLINE float normalize_v3_v3(float r[3], const float a[3])
MINLINE float len_squared_v4v4(const float a[4], const float b[4]) ATTR_WARN_UNUSED_RESULT
MINLINE float normalize_v3_length(float r[3], float unit_scale)
MINLINE void zero_v3(float r[3])
MINLINE void mul_v3_v3fl(float r[3], const float a[3], float f)
float angle_normalized_v3v3(const float v1[3], const float v2[3]) ATTR_WARN_UNUSED_RESULT
MINLINE void negate_v4(float r[4])
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...
#define IN_RANGE_INCL(a, b, c)
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 order
_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
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
SIMD_FORCE_INLINE btScalar angle(const btVector3 &v) const
Return the angle between this and another vector.
SyclQueue void void size_t num_bytes void
ccl_gpu_kernel_postfix ccl_global float int int int int sh
ccl_device_inline float2 fabs(const float2 &a)
float angle_compat_rad(float angle, float angle_compat)
void rotation_between_quats_to_quat(float q[4], const float q1[4], const float q2[4])
void eulO_to_quat(float q[4], const float e[3], const short order)
float angle_qtqt(const float q1[4], const float q2[4])
void angle_to_mat2(float R[2][2], const float angle)
void mat3_normalized_to_eulO(float eul[3], const short order, const float m[3][3])
void mat4_to_compatible_eulO(float eul[3], const float oldrot[3], const short order, const float m[4][4])
void mat3_to_quat(float q[4], const float m[3][3])
static const RotOrderInfo * get_rotation_order_info(const short order)
float angle_signed_normalized_qtqt(const float q1[4], const float q2[4])
void rotation_between_vecs_to_quat(float q[4], const float v1[3], const float v2[3])
void print_qt(const char *str, const float q[4])
void vec_apply_track(float vec[3], short axis)
static void mat3_normalized_to_eulo2(const float mat[3][3], float eul1[3], float eul2[3], const short order)
float angle_normalized_qt(const float q[4])
float tri_to_quat(float q[4], const float a[3], const float b[3], const float c[3])
void mat3_normalized_to_compatible_eul(float eul[3], const float oldrot[3], float mat[3][3])
void quat_to_compatible_eulO(float eul[3], const float oldrot[3], const short order, const float quat[4])
void mat3_to_quat_is_ok(float q[4], const float wmat[3][3])
void add_eul_euleul(float r_eul[3], float a[3], float b[3], const short order)
float angle_signed_qt(const float q[4])
void invert_qt_normalized(float q[4])
void invert_qt_qt(float q1[4], const float q2[4])
void conjugate_qt_qt(float q1[4], const float q2[4])
void eul_to_mat3(float mat[3][3], const float eul[3])
static float mod_inline(float a, float b)
void add_weighted_dq_dq(DualQuat *dq_sum, const DualQuat *dq, float weight)
void eulO_to_axis_angle(float axis[3], float *angle, const float eul[3], const short order)
void mul_qt_fl(float q[4], const float f)
void quat_to_mat3(float m[3][3], const float q[4])
void mat3_to_eulO(float eul[3], const short order, const float m[3][3])
void axis_angle_normalized_to_mat3_ex(float mat[3][3], const float axis[3], const float angle_sin, const float angle_cos)
void axis_angle_to_mat3_single(float R[3][3], const char axis, const float angle)
void sub_qt_qtqt(float q[4], const float a[4], const float b[4])
void axis_angle_to_quat(float r[4], const float axis[3], const float angle)
void rotate_eulO(float beul[3], const short order, char axis, float ang)
float normalize_qt(float q[4])
void invert_qt(float q[4])
void quat_normalized_to_expmap(float expmap[3], const float q[4])
void quat_to_mat4(float m[4][4], const float q[4])
void dquat_to_mat4(float R[4][4], const DualQuat *dq)
void mat4_normalized_to_axis_angle(float axis[3], float *angle, const float mat[4][4])
void mat4_normalized_to_eulO(float eul[3], const short order, const float m[4][4])
void mul_qt_v3(const float q[4], float r[3])
void mat3_normalized_to_compatible_eulO(float eul[3], const float oldrot[3], const short order, const float mat[3][3])
void quat_to_eulO(float e[3], short const order, const float q[4])
void axis_angle_normalized_to_mat3(float R[3][3], const float axis[3], const float angle)
void sub_eul_euleul(float r_eul[3], float a[3], float b[3], const short order)
void eul_to_quat(float quat[4], const float eul[3])
void mat4_to_eulO(float eul[3], const short order, const float m[4][4])
float fov_to_focallength(float hfov, float sensor)
void axis_angle_normalized_to_quat(float r[4], const float axis[3], const float angle)
void pow_qt_fl_normalized(float q[4], const float fac)
void mat4_to_axis_angle(float axis[3], float *angle, const float mat[4][4])
void mat4_normalized_to_eul(float eul[3], const float m[4][4])
float angle_signed_normalized_qt(const float q[4])
void quat_to_eul(float eul[3], const float quat[4])
float normalize_qt_qt(float r[4], const float q[4])
float dot_qtqt(const float a[4], const float b[4])
void invert_qt_qt_normalized(float q1[4], const float q2[4])
static void mat3_normalized_to_eul2(const float mat[3][3], float eul1[3], float eul2[3])
void sin_cos_from_fraction(int numerator, const int denominator, float *r_sin, float *r_cos)
bool is_zero_qt(const float q[4])
float quat_split_swing_and_twist(const float q_in[4], int axis, float r_swing[4], float r_twist[4])
void mat4_normalized_to_compatible_eulO(float eul[3], const float oldrot[3], const short order, const float m[4][4])
void mat3_normalized_to_eul(float eul[3], const float mat[3][3])
void mul_qt_qtqt(float q[4], const float a[4], const float b[4])
void axis_angle_to_quat_single(float q[4], const char axis, const float angle)
void quat_to_axis_angle(float axis[3], float *angle, const float q[4])
void mat3_to_eul(float eul[3], const float mat[3][3])
void quat_to_expmap(float expmap[3], const float q[4])
static float _axis_convert_matrix[23][3][3]
static void quat_to_mat3_no_error(float m[3][3], const float q[4])
void mat4_to_dquat(DualQuat *dq, const float basemat[4][4], const float mat[4][4])
void copy_dq_dq(DualQuat *r, const DualQuat *dq)
void mat3_to_compatible_eul(float eul[3], const float oldrot[3], float mat[3][3])
void axis_angle_to_eulO(float eul[3], const short order, const float axis[3], const float angle)
void mat4_to_quat(float q[4], const float m[4][4])
void rotation_between_vecs_to_mat3(float m[3][3], const float v1[3], const float v2[3])
bool mat3_from_axis_conversion(int src_forward, int src_up, int dst_forward, int dst_up, float r_mat[3][3])
float focallength_to_fov(float focal_length, float sensor)
static int _axis_convert_lut[23][24]
void axis_angle_to_mat3(float R[3][3], const float axis[3], const float angle)
void mul_v3m3_dq(float r[3], float R[3][3], DualQuat *dq)
void interp_qt_qtqt(float q[4], const float a[4], const float b[4], const float t)
void conjugate_qt(float q[4])
void compatible_eul(float eul[3], const float oldrot[3])
void quat_apply_track(float quat[4], short axis, short upflag)
void mat3_to_compatible_eulO(float eul[3], const float oldrot[3], const short order, const float mat[3][3])
void tri_to_quat_ex(float quat[4], const float v1[3], const float v2[3], const float v3[3], const float no_orig[3])
void eulO_to_mat4(float mat[4][4], const float e[3], const short order)
void axis_angle_to_mat4(float R[4][4], const float axis[3], const float angle)
void mat4_to_eul(float eul[3], const float m[4][4])
void quat_to_compatible_eul(float eul[3], const float oldrot[3], const float quat[4])
void mat4_normalized_to_quat(float q[4], const float m[4][4])
void axis_angle_to_mat4_single(float R[4][4], const char axis, const float angle)
float angle_wrap_deg(float angle)
void unit_axis_angle(float axis[3], float *angle)
void mat3_to_axis_angle(float axis[3], float *angle, const float mat[3][3])
struct RotOrderInfo RotOrderInfo
float angle_qt(const float q[4])
void copy_qt_qt(float q[4], const float a[4])
float angle_wrap_rad(float angle)
void normalize_dq(DualQuat *dq, float totweight)
void eulO_to_mat3(float M[3][3], const float e[3], const short order)
void quat_to_compatible_quat(float q[4], const float a[4], const float old[4])
void expmap_to_quat(float r[4], const float expmap[3])
BLI_INLINE int _axis_signed(const int axis)
void mat3_normalized_to_quat(float q[4], const float mat[3][3])
void interp_dot_slerp(const float t, const float cosom, float r_w[2])
float angle_signed_qtqt(const float q1[4], const float q2[4])
void rotate_eul(float beul[3], const char axis, const float ang)
static const RotOrderInfo rotOrders[]
void mat3_normalized_to_axis_angle(float axis[3], float *angle, const float mat[3][3])
float angle_normalized_qtqt(const float q1[4], const float q2[4])
void vec_to_quat(float q[4], const float vec[3], short axis, const short upflag)
void eul_to_mat4(float mat[4][4], const float eul[3])
void add_qt_qtqt(float q[4], const float a[4], const float b[4], const float t)
bool mat3_from_axis_conversion_single(int src_axis, int dst_axis, float r_mat[3][3])
void eulO_to_gimbal_axis(float gmat[3][3], const float eul[3], const short order)
INLINE Rall1d< T, V, S > cos(const Rall1d< T, V, S > &arg)
INLINE Rall1d< T, V, S > acos(const Rall1d< T, V, S > &x)
INLINE Rall1d< T, V, S > sin(const Rall1d< T, V, S > &arg)
static const pxr::TfToken b("b", pxr::TfToken::Immortal)