40 n1[0] =
v1[0] -
v2[0];
41 n2[0] =
v2[0] - v3[0];
42 n1[1] =
v1[1] -
v2[1];
43 n2[1] =
v2[1] - v3[1];
44 n1[2] =
v1[2] -
v2[2];
45 n2[2] =
v2[2] - v3[2];
46 n[0] = n1[1] * n2[2] - n1[2] * n2[1];
47 n[1] = n1[2] * n2[0] - n1[0] * n2[2];
48 n[2] = n1[0] * n2[1] - n1[1] * n2[0];
55 n1[0] =
v1[0] -
v2[0];
56 n2[0] =
v2[0] - v3[0];
57 n1[1] =
v1[1] -
v2[1];
58 n2[1] =
v2[1] - v3[1];
59 n1[2] =
v1[2] -
v2[2];
60 n2[2] =
v2[2] - v3[2];
61 n[0] = n1[1] * n2[2] - n1[2] * n2[1];
62 n[1] = n1[2] * n2[0] - n1[0] * n2[2];
63 n[2] = n1[0] * n2[1] - n1[1] * n2[0];
69 float n[3],
const float v1[3],
const float v2[3],
const float v3[3],
const float v4[3])
74 n1[0] =
v1[0] - v3[0];
75 n1[1] =
v1[1] - v3[1];
76 n1[2] =
v1[2] - v3[2];
78 n2[0] =
v2[0] - v4[0];
79 n2[1] =
v2[1] - v4[1];
80 n2[2] =
v2[2] - v4[2];
82 n[0] = n1[1] * n2[2] - n1[2] * n2[1];
83 n[1] = n1[2] * n2[0] - n1[0] * n2[2];
84 n[2] = n1[0] * n2[1] - n1[1] * n2[0];
100 float area_quad_v3(
const float v1[3],
const float v2[3],
const float v3[3],
const float v4[3])
175 const float *co_curr, *co_prev;
178 co_prev =
verts[nr - 1];
181 for (
a = 0;
a < nr;
a++) {
182 cross += (co_curr[0] - co_prev[0]) * (co_curr[1] + co_prev[1]);
192 const float *v_prev =
verts[nr - 1];
193 const float *v_curr =
verts[0];
199 for (i = 0; i < nr; v_prev = v_curr, v_curr =
verts[++i]) {
222 float a[3], b[3],
c[3], c_len;
230 if (c_len > FLT_EPSILON) {
246 r_plane[3] = -
dot_v3v3(r_plane, plane_co);
311 float tetra_volume =
dot_v3v3(v_cross, v3);
363 if (!(lambda > 0.0f)) {
366 else if (!(lambda < 1.0f)) {
385 if (!(lambda > 0.0f)) {
388 else if (!(lambda < 1.0f)) {
422 const float side =
dot_v3v3(plane, pt);
428 const float side =
dot_v3v3(plane, pt);
437 const float fac = side / len_sq;
438 return copysignf(len_sq * (fac * fac), side);
444 const float fac = side / len_sq;
446 return len_sq * (fac * fac);
452 const float side =
dot_v3v3(plane, pt);
453 const float fac = side / len_sq;
454 return copysignf(len_sq * (fac * fac), side);
459 const float side =
dot_v3v3(plane, pt);
460 const float fac = side / len_sq;
462 return len_sq * (fac * fac);
472 const float fac = side / len_sq;
473 return sqrtf(len_sq) * fac;
483 const float side =
dot_v3v3(plane, pt);
484 const float fac = side / len_sq;
485 return sqrtf(len_sq) * fac;
547 const float axis_ref[3])
549 float dir_a[3], dir_b[3];
550 float plane_a[3], plane_b[3];
551 float dist_a, dist_b;
564 else if (
dot_v3v3(axis, axis_ref) < 0.0f) {
588 return min_ff(dist_a, dist_b);
591 return max_ff(dist_a, dist_b);
601 const float ray_direction[3],
604 float origin_to_co[3];
607 float origin_to_proj[3];
610 float co_projected_on_ray[3];
611 add_v3_v3v3(co_projected_on_ray, ray_origin, origin_to_proj);
623 const float ray_direction[3],
631 if (lambda <= 0.0f) {
634 else if (lambda >= 1.0f) {
649 depth =
dot_v3v3(dvec, ray_direction);
661 const float bbmin[3],
662 const float bbmax[3],
666 if (plane_no[0] < 0.0f) {
667 bb_near[0] = bbmax[0];
668 bb_afar[0] = bbmin[0];
671 bb_near[0] = bbmin[0];
672 bb_afar[0] = bbmax[0];
674 if (plane_no[1] < 0.0f) {
675 bb_near[1] = bbmax[1];
676 bb_afar[1] = bbmin[1];
679 bb_near[1] = bbmin[1];
680 bb_afar[1] = bbmax[1];
682 if (plane_no[2] < 0.0f) {
683 bb_near[2] = bbmax[2];
684 bb_afar[2] = bbmin[2];
687 bb_near[2] = bbmin[2];
688 bb_afar[2] = bbmax[2];
697 const float ray_origin[3],
698 const float ray_direction[3])
703 for (
int i = 0; i < 3; i++) {
714 const float bb_min[3],
715 const float bb_max[3],
720 float local_bvmin[3], local_bvmax[3];
723 const float tmin[3] = {
724 (local_bvmin[0] -
data->ray_origin[0]) *
data->ray_inv_dir[0],
725 (local_bvmin[1] -
data->ray_origin[1]) *
data->ray_inv_dir[1],
726 (local_bvmin[2] -
data->ray_origin[2]) *
data->ray_inv_dir[2],
728 const float tmax[3] = {
729 (local_bvmax[0] -
data->ray_origin[0]) *
data->ray_inv_dir[0],
730 (local_bvmax[1] -
data->ray_origin[1]) *
data->ray_inv_dir[1],
731 (local_bvmax[2] -
data->ray_origin[2]) *
data->ray_inv_dir[2],
739 if ((tmax[0] <= tmax[1]) && (tmax[0] <= tmax[2])) {
741 va[0] = vb[0] = local_bvmax[0];
745 else if ((tmax[1] <= tmax[0]) && (tmax[1] <= tmax[2])) {
747 va[1] = vb[1] = local_bvmax[1];
753 va[2] = vb[2] = local_bvmax[2];
758 if ((tmin[0] >= tmin[1]) && (tmin[0] >= tmin[2])) {
760 va[0] = vb[0] = local_bvmin[0];
764 else if ((tmin[1] >= tmin[0]) && (tmin[1] >= tmin[2])) {
766 va[1] = vb[1] = local_bvmin[1];
772 va[2] = vb[2] = local_bvmin[2];
781 if (rtmin <= rtmax) {
789 if (
data->ray_direction[main_axis] >= 0.0f) {
790 va[main_axis] = local_bvmin[main_axis];
791 vb[main_axis] = local_bvmax[main_axis];
794 va[main_axis] = local_bvmax[main_axis];
795 vb[main_axis] = local_bvmin[main_axis];
799 data->ray_origin,
data->ray_direction, va, vb, r_point, r_depth);
803 const float ray_direction[3],
804 const float bb_min[3],
805 const float bb_max[3],
824 const float projmat[4][4],
825 const float winsize[2],
828 float win_half[2], relative_mval[2], px[4], py[4];
833 relative_mval[0] = precalc->
mval[0] / win_half[0];
834 relative_mval[1] = precalc->
mval[1] / win_half[1];
837 for (
int i = 0; i < 4; i++) {
838 px[i] = precalc->
pmat[i][0] - precalc->
pmat[i][3] * relative_mval[0];
839 py[i] = precalc->
pmat[i][1] - precalc->
pmat[i][3] * relative_mval[1];
841 precalc->
pmat[i][0] *= win_half[0];
842 precalc->
pmat[i][1] *= win_half[1];
845 float projmat_trans[4][4];
848 projmat_trans[0], projmat_trans[1], projmat_trans[3], precalc->
ray_origin)) {
867 for (
int i = 0; i < 3; i++) {
876 const float bbmin[3],
877 const float bbmax[3],
878 bool r_axis_closest[3])
880 float local_bvmin[3], local_bvmax[3];
883 const float tmin[3] = {
884 (local_bvmin[0] -
data->ray_origin[0]) *
data->ray_inv_dir[0],
885 (local_bvmin[1] -
data->ray_origin[1]) *
data->ray_inv_dir[1],
886 (local_bvmin[2] -
data->ray_origin[2]) *
data->ray_inv_dir[2],
888 const float tmax[3] = {
889 (local_bvmax[0] -
data->ray_origin[0]) *
data->ray_inv_dir[0],
890 (local_bvmax[1] -
data->ray_origin[1]) *
data->ray_inv_dir[1],
891 (local_bvmax[2] -
data->ray_origin[2]) *
data->ray_inv_dir[2],
899 r_axis_closest[0] =
false;
900 r_axis_closest[1] =
false;
901 r_axis_closest[2] =
false;
903 if ((tmax[0] <= tmax[1]) && (tmax[0] <= tmax[2])) {
905 va[0] = vb[0] = local_bvmax[0];
907 r_axis_closest[0] =
data->ray_direction[0] < 0.0f;
909 else if ((tmax[1] <= tmax[0]) && (tmax[1] <= tmax[2])) {
911 va[1] = vb[1] = local_bvmax[1];
913 r_axis_closest[1] =
data->ray_direction[1] < 0.0f;
917 va[2] = vb[2] = local_bvmax[2];
919 r_axis_closest[2] =
data->ray_direction[2] < 0.0f;
922 if ((tmin[0] >= tmin[1]) && (tmin[0] >= tmin[2])) {
924 va[0] = vb[0] = local_bvmin[0];
926 r_axis_closest[0] =
data->ray_direction[0] >= 0.0f;
928 else if ((tmin[1] >= tmin[0]) && (tmin[1] >= tmin[2])) {
930 va[1] = vb[1] = local_bvmin[1];
932 r_axis_closest[1] =
data->ray_direction[1] >= 0.0f;
936 va[2] = vb[2] = local_bvmin[2];
938 r_axis_closest[2] =
data->ray_direction[2] >= 0.0f;
945 if (rtmin <= rtmax) {
949 if (
data->ray_direction[main_axis] >= 0.0f) {
950 va[main_axis] = local_bvmin[main_axis];
951 vb[main_axis] = local_bvmax[main_axis];
954 va[main_axis] = local_bvmax[main_axis];
955 vb[main_axis] = local_bvmin[main_axis];
957 float scale =
fabsf(local_bvmax[main_axis] - local_bvmin[main_axis]);
964 (va2d[0] +
data->pmat[main_axis][0] * scale),
965 (va2d[1] +
data->pmat[main_axis][1] * scale),
971 float w_b = w_a +
data->pmat[main_axis][3] * scale;
978 float dvec[2], edge[2], lambda, rdist_sq;
982 if (lambda != 0.0f) {
984 if (lambda <= 0.0f) {
986 r_axis_closest[main_axis] =
true;
988 else if (lambda >= 1.0f) {
990 r_axis_closest[main_axis] =
false;
995 r_axis_closest[main_axis] = lambda < 0.5f;
1006 const float winsize[2],
1007 const float mval[2],
1008 const float bbmin[3],
1009 const float bbmax[3])
1014 bool dummy[3] = {
true,
true,
true};
1024 float r[3],
const float p[3],
const float v1[3],
const float v2[3],
const float v3[3])
1026 float ab[3], ac[3], ap[3], d1, d2;
1027 float bp[3], d3, d4, vc, cp[3], d5, d6, vb, va;
1036 if (d1 <= 0.0f && d2 <= 0.0f) {
1046 if (d3 >= 0.0f && d4 <= d3) {
1052 vc = d1 * d4 - d3 * d2;
1053 if (vc <= 0.0f && d1 >= 0.0f && d3 <= 0.0f) {
1063 if (d6 >= 0.0f && d5 <= d6) {
1069 vb = d5 * d2 - d1 * d6;
1070 if (vb <= 0.0f && d2 >= 0.0f && d6 <= 0.0f) {
1077 va = d3 * d6 - d5 * d4;
1078 if (va <= 0.0f && (d4 - d3) >= 0.0f && (d5 - d6) >= 0.0f) {
1079 w = (d4 - d3) / ((d4 - d3) + (d5 - d6));
1088 denom = 1.0f / (va + vb + vc);
1106 float div, lambda, mu;
1108 div = (
float)((
v2[0] -
v1[0]) * (v4[1] - v3[1]) - (
v2[1] -
v1[1]) * (v4[0] - v3[0]));
1113 lambda = (
float)((
v1[1] - v3[1]) * (v4[0] - v3[0]) - (
v1[0] - v3[0]) * (v4[1] - v3[1])) / div;
1115 mu = (
float)((
v1[1] - v3[1]) * (
v2[0] -
v1[0]) - (
v1[0] - v3[0]) * (
v2[1] -
v1[1])) / div;
1117 if (lambda >= 0.0f && lambda <= 1.0f && mu >= 0.0f && mu <= 1.0f) {
1118 if (lambda == 0.0f || lambda == 1.0f || mu == 0.0f || mu == 1.0f) {
1128 const float v0[2],
const float v1[2],
const float v2[2],
const float v3[2],
float r_vi[2])
1130 float s10[2], s32[2];
1141 r_vi[0] = ((s32[0] * u) - (s10[0] *
v)) / div;
1142 r_vi[1] = ((s32[1] * u) - (s10[1] *
v)) / div;
1153 float div, lambda, mu;
1155 div = (
v2[0] -
v1[0]) * (v4[1] - v3[1]) - (
v2[1] -
v1[1]) * (v4[0] - v3[0]);
1160 lambda = ((
float)(
v1[1] - v3[1]) * (v4[0] - v3[0]) - (
v1[0] - v3[0]) * (v4[1] - v3[1])) / div;
1162 mu = ((
float)(
v1[1] - v3[1]) * (
v2[0] -
v1[0]) - (
v1[0] - v3[0]) * (
v2[1] -
v1[1])) / div;
1164 if (lambda >= 0.0f && lambda <= 1.0f && mu >= 0.0f && mu <= 1.0f) {
1165 if (lambda == 0.0f || lambda == 1.0f || mu == 0.0f || mu == 1.0f) {
1182 float a_dir[3], b_dir[3], a0b0[3], crs_ab[3];
1193 float a0b1[3], a1b0[3], len_a, len_b, fac1, fac2;
1202 CLAMP(fac1, 0.0f, len_a);
1203 CLAMP(fac2, 0.0f, len_a);
1204 fac_a = (fac1 + fac2) / (2 * len_a);
1213 CLAMP(fac1, 0.0f, len_b);
1214 CLAMP(fac2, 0.0f, len_b);
1215 fac_b = (fac1 + fac2) / (2 * len_b);
1222 float c[3], cray[3];
1226 fac_a =
dot_v3v3(cray, crs_ab) / nlen;
1229 fac_b =
dot_v3v3(cray, crs_ab) / nlen;
1231 CLAMP(fac_a, 0.0f, 1.0f);
1232 CLAMP(fac_b, 0.0f, 1.0f);
1256 const float endpoint_bias,
1259 float s10[2], s32[2], s30[2], d;
1260 const float eps = 1e-6f;
1261 const float endpoint_min = -endpoint_bias;
1262 const float endpoint_max = endpoint_bias + 1.0f;
1276 if ((u >= endpoint_min && u <= endpoint_max) && (
v >= endpoint_min &&
v <= endpoint_max)) {
1294 if (
v >= endpoint_min &&
v <= endpoint_max) {
1312 SWAP(
const float *, v0,
v2);
1313 SWAP(
const float *,
v1, v3);
1335 SWAP(
float, u_a, u_b);
1338 if (u_a > endpoint_max || u_b < endpoint_min) {
1354 const float v0[2],
const float v1[2],
const float v2[2],
const float v3[2],
float r_vi[2])
1356 const float endpoint_bias = 1e-6f;
1365 #define CCW(A, B, C) ((C[1] - A[1]) * (B[0] - A[0]) > (B[1] - A[1]) * (C[0] - A[0]))
1391 double div, lambda, mu;
1393 div = (
v2[0] -
v1[0]) * (v4[1] - v3[1]) - (
v2[1] -
v1[1]) * (v4[0] - v3[0]);
1394 if (
fabs(div) < DBL_EPSILON) {
1398 lambda = ((
v1[1] - v3[1]) * (v4[0] - v3[0]) - (
v1[0] - v3[0]) * (v4[1] - v3[1])) / div;
1400 mu = ((
v1[1] - v3[1]) * (
v2[0] -
v1[0]) - (
v1[0] - v3[0]) * (
v2[1] -
v1[1])) / div;
1409 if (lambda >= 0.0 && lambda <= 1.0 && mu >= 0.0 && mu <= 1.0) {
1410 if (lambda == 0.0 || lambda == 1.0 || mu == 0.0 || mu == 1.0) {
1449 const float ldir[3] = {
1457 const float b = 2.0f * (ldir[0] * (l1[0] - sp[0]) + ldir[1] * (l1[1] - sp[1]) +
1458 ldir[2] * (l1[2] - sp[2]));
1462 const float i = b * b - 4.0f *
a *
c;
1472 mu = -b / (2.0f *
a);
1477 const float i_sqrt =
sqrtf(i);
1480 mu = (-b + i_sqrt) / (2.0f *
a);
1484 mu = (-b - i_sqrt) / (2.0f *
a);
1501 const float ldir[2] = {l2[0] - l1[0], l2[1] - l1[1]};
1505 const float b = 2.0f * (ldir[0] * (l1[0] - sp[0]) + ldir[1] * (l1[1] - sp[1]));
1509 const float i = b * b - 4.0f *
a *
c;
1519 mu = -b / (2.0f *
a);
1524 const float i_sqrt =
sqrtf(i);
1527 mu = (-b + i_sqrt) / (2.0f *
a);
1531 mu = (-b - i_sqrt) / (2.0f *
a);
1542 const float verts[][2],
1543 const unsigned int nr,
1544 const bool UNUSED(use_holes))
1548 for (i = 0, j = nr - 1; i < nr; j = i++) {
1549 if (((
verts[i][1] > pt[1]) != (
verts[j][1] > pt[1])) &&
1559 const int verts[][2],
1560 const unsigned int nr,
1561 const bool UNUSED(use_holes))
1565 for (i = 0, j = nr - 1; i < nr; j = i++) {
1566 if (((
verts[i][1] > pt[1]) != (
verts[j][1] > pt[1])) &&
1617 const float pt[2],
const float v1[2],
const float v2[2],
const float v3[2],
const float v4[2])
1654 float p[3], s[3], d[3], e1[3], e2[3], q[3];
1671 if ((u < 0.0f) || (u > 1.0f)) {
1678 if ((
v < 0.0f) || ((u +
v) > 1.0f)) {
1683 if ((*r_lambda < 0.0f) || (*r_lambda > 1.0f)) {
1706 float p[3], s[3], d[3], e1[3], e2[3], q[3];
1735 if ((*r_lambda < 0.0f) || (*r_lambda > 1.0f)) {
1761 const float epsilon = 0.00000001f;
1762 float p[3], s[3], e1[3], e2[3], q[3];
1778 if ((u < 0.0f) || (u > 1.0f)) {
1785 if ((
v < 0.0f) || ((u +
v) > 1.0f)) {
1790 if ((*r_lambda < 0.0f)) {
1810 const float plane[4],
1814 float h[3], plane_co[3];
1824 if (clip && (*r_lambda < 0.0f)) {
1839 float p[3], s[3], e1[3], e2[3], q[3];
1867 if ((*r_lambda < 0.0f)) {
1886 int kx = (kz != 2) ? (kz + 1) : 0;
1887 int ky = (kx != 2) ? (kx + 1) : 0;
1898 isect_precalc->
sz = inv_dir_z;
1901 isect_precalc->
kx = kx;
1902 isect_precalc->
ky = ky;
1903 isect_precalc->
kz = kz;
1914 const int kx = isect_precalc->
kx;
1915 const int ky = isect_precalc->
ky;
1916 const int kz = isect_precalc->
kz;
1917 const float sx = isect_precalc->
sx;
1918 const float sy = isect_precalc->
sy;
1919 const float sz = isect_precalc->
sz;
1926 const float a_kx =
a[kx], a_ky =
a[ky], a_kz =
a[kz];
1927 const float b_kx = b[kx], b_ky = b[ky], b_kz = b[kz];
1928 const float c_kx =
c[kx], c_ky =
c[ky], c_kz =
c[kz];
1931 const float ax = a_kx - sx * a_kz;
1932 const float ay = a_ky - sy * a_kz;
1933 const float bx = b_kx - sx * b_kz;
1934 const float by = b_ky - sy * b_kz;
1935 const float cx = c_kx - sx * c_kz;
1936 const float cy = c_ky - sy * c_kz;
1939 const float u = cx * by - cy * bx;
1940 const float v = ax * cy - ay * cx;
1941 const float w = bx * ay - by * ax;
1944 if ((u < 0.0f ||
v < 0.0f ||
w < 0.0f) && (u > 0.0f ||
v > 0.0f ||
w > 0.0f)) {
1957 const int sign_det = (
float_as_int(det) & (int)0x80000000);
1958 const float t = (u * a_kz +
v * b_kz +
w * c_kz) * sz;
1959 const float sign_t =
xor_fl(
t, sign_det);
1972 const float inv_det = 1.0f / det;
1974 r_uv[0] = u * inv_det;
1975 r_uv[1] =
v * inv_det;
1977 *r_lambda =
t * inv_det;
2000 const float ray_direction[3],
2006 const float threshold)
2008 const float epsilon = 0.00000001f;
2009 float p[3], s[3], e1[3], e2[3], q[3];
2027 if ((*r_lambda < 0.0f)) {
2034 if (u > 0 &&
v > 0 && u +
v > 1) {
2035 float t = (u +
v - 1) / 2;
2078 const float ray_direction[2],
2084 float v0_local[2], v1_local[2];
2096 const float p[2] = {(ray_direction[0] *
v) / det, (ray_direction[1] *
v) / det};
2098 const float t = (
dot_v2v2(p, ray_direction) /
dot_v2v2(ray_direction, ray_direction));
2099 if ((
t >= 0.0f) == 0) {
2106 if ((u >= 0.0f && u <= 1.0f) == 0) {
2124 const float ray_direction[3],
2129 float a[3],
t[3], n[3];
2140 float c[3], cray[3];
2144 *r_lambda =
dot_v3v3(cray, n) / nlen;
2156 for (i = 0; i < totplane; i++) {
2171 for (
int i = 0; i < totplane; i++) {
2194 const float plane_co[3],
2195 const float plane_no[3])
2222 const float plane_b[4],
2223 const float plane_c[4],
2224 float r_isect_co[3])
2266 const float plane_b[4],
2267 float r_isect_co[3],
2268 float r_isect_no[3])
2270 float det, plane_c[3];
2313 const float planes[][4],
2314 const int planes_len,
2315 const float eps_coplanar,
2316 const float eps_isect,
2317 void (*callback_fn)(
const float co[3],
int i,
int j,
int k,
void *
user_data),
2322 float n1n2[3], n2n3[3], n3n1[3];
2324 for (
int i = 0; i < planes_len; i++) {
2325 const float *n1 = planes[i];
2326 for (
int j = i + 1; j < planes_len; j++) {
2327 const float *n2 = planes[j];
2332 for (
int k = j + 1; k < planes_len; k++) {
2333 const float *n3 = planes[k];
2343 const float quotient = -
dot_v3v3(n1, n2n3);
2344 if (
fabsf(quotient) < eps_coplanar) {
2347 const float co_test[3] = {
2348 ((n2n3[0] * n1[3]) + (n3n1[0] * n2[3]) + (n1n2[0] * n3[3])) / quotient,
2349 ((n2n3[1] * n1[3]) + (n3n1[1] * n2[3]) + (n1n2[1] * n3[3])) / quotient,
2350 ((n2n3[2] * n1[3]) + (n3n1[2] * n2[3]) + (n1n2[2] * n3[3])) / quotient,
2353 for (i_test = 0; i_test < planes_len; i_test++) {
2354 const float *np_test = planes[i_test];
2355 if (((
dot_v3v3(np_test, co_test) + np_test[3]) > eps_isect)) {
2357 if (!
ELEM(i_test, i, j, k)) {
2363 if (i_test == planes_len) {
2364 callback_fn(co_test, i, j, k,
user_data);
2385 const float tri_b[3][3],
2388 int *r_tri_a_edge_isect_count)
2399 double ba[3], bc[3], plane_a[4], plane_b[4];
2400 *r_tri_a_edge_isect_count = 0;
2410 if (!side[1][0] && !side[1][1] && !side[1][2]) {
2415 if ((side[1][0] && side[1][1] && side[1][2]) && (side[1][0] < 0.0f) == (side[1][1] < 0.0f) &&
2416 (side[1][0] < 0.0f) == (side[1][2] < 0.0f)) {
2430 if ((side[0][0] && side[0][1] && side[0][2]) && (side[0][0] < 0.0f) == (side[0][1] < 0.0f) &&
2431 (side[0][0] < 0.0f) == (side[0][2] < 0.0f)) {
2438 double isect_dir[3];
2440 for (
int i = 0; i < 2; i++) {
2441 const float(*tri)[3] = i == 0 ? tri_a : tri_b;
2445 if ((side[i][0] && side[i][1]) && (side[i][0] < 0.0f) == (side[i][1] < 0.0f)) {
2450 else if ((side[i][1] && side[i][2]) && (side[i][1] < 0.0f) == (side[i][2] < 0.0f)) {
2462 float sidec = side[i][tri_i[1]];
2466 float fac0 = sidec / (sidec - side[i][tri_i[0]]);
2467 float fac1 = sidec / (sidec - side[i][tri_i[2]]);
2468 double offset0 = fac0 * (dot_a - dot_b);
2469 double offset1 = fac1 * (dot_c - dot_b);
2470 if (offset0 > offset1) {
2472 SWAP(
double, offset0, offset1);
2473 SWAP(
float, fac0, fac1);
2474 SWAP(
int, tri_i[0], tri_i[2]);
2477 range[i].min = (
float)(dot_b + offset0);
2478 range[i].max = (
float)(dot_b + offset1);
2479 interp_v3_v3v3(range[i].loc[0], tri[tri_i[1]], tri[tri_i[0]], fac0);
2480 interp_v3_v3v3(range[i].loc[1], tri[tri_i[1]], tri[tri_i[2]], fac1);
2483 range[i].min = range[i].max = (
float)dot_b;
2489 if ((range[0].
max > range[1].
min) && (range[0].
min < range[1].
max)) {
2493 if (range[0].
min >= range[1].
min) {
2495 if (range[0].
max <= range[1].
max) {
2497 *r_tri_a_edge_isect_count = 2;
2501 *r_tri_a_edge_isect_count = 1;
2505 if (range[0].
max <= range[1].
max) {
2508 *r_tri_a_edge_isect_count = 1;
2522 const float t_a1[3],
2523 const float t_a2[3],
2524 const float t_b0[3],
2525 const float t_b1[3],
2526 const float t_b2[3],
2530 float tri_a[3][3], tri_b[3][3];
2551 const float t_a1[2],
2552 const float t_a2[2],
2553 const float t_b0[2],
2554 const float t_b1[2],
2555 const float t_b2[2])
2614 const float t_a1[2],
2615 const float t_a2[2],
2616 const float t_b0[2],
2617 const float t_b1[2],
2618 const float t_b2[2])
2662 const float t_a1[2],
2663 const float t_a2[2],
2664 const float t_b0[2],
2665 const float t_b1[2],
2666 const float t_b2[2])
2696 const float t_a1[2],
2697 const float t_a2[2],
2698 const float t_b0[2],
2699 const float t_b1[2],
2700 const float t_b2[2])
2723 const float a,
const float b,
const float c,
const float maxR,
float *root)
2733 float r1 = (-b - sqrtD) / (2.0f *
a);
2734 float r2 = (-b + sqrtD) / (2.0f *
a);
2738 SWAP(
float, r1, r2);
2742 if (r1 > 0.0f && r1 < maxR) {
2749 if (r2 > 0.0f && r2 < maxR) {
2768 const float bbmin[3],
2769 const float bbmax[3])
2773 float bb_near[3], bb_far[3];
2774 for (
int i = 0; i < totplane; i++) {
2797 float e1[3], e2[3], e3[3], point[3], vel[3],
nor[3], temp[3], bv[3];
2798 float a, b,
c, d,
e,
x,
y,
z, radius2 = radius * radius;
2799 float elen2, edotv, edotbv, nordotv;
2801 bool found_by_sweep =
false;
2819 if (
fabsf(nordotv) < 0.000001f) {
2820 if (
fabsf(
a) >= radius) {
2825 float t0 = (-
a + radius) / nordotv;
2826 float t1 = (-
a - radius) / nordotv;
2829 SWAP(
float, t0, t1);
2832 if (t0 > 1.0f || t1 < 0.0f) {
2837 CLAMP(t0, 0.0f, 1.0f);
2838 CLAMP(t1, 0.0f, 1.0f);
2843 point[0] = p1[0] + vel[0] * t0 -
nor[0] * radius;
2844 point[1] = p1[1] + vel[1] * t0 -
nor[1] * radius;
2845 point[2] = p1[2] + vel[2] * t0 -
nor[2] * radius;
2858 z =
x +
y - (
a *
c - b * b);
2860 if (
z <= 0.0f && (
x >= 0.0f &&
y >= 0.0f)) {
2880 found_by_sweep =
true;
2890 found_by_sweep =
true;
2900 found_by_sweep =
true;
2913 a = elen2 * (-
dot_v3v3(vel, vel)) + edotv * edotv;
2914 b = 2.0f * (elen2 *
dot_v3v3(vel, bv) - edotv * edotbv);
2915 c = elen2 * (radius2 -
dot_v3v3(bv, bv)) + edotbv * edotbv;
2918 e = (edotv * newLambda - edotbv) / elen2;
2920 if (
e >= 0.0f &&
e <= 1.0f) {
2921 *r_lambda = newLambda;
2925 found_by_sweep =
true;
2935 a = elen2 * (-
dot_v3v3(vel, vel)) + edotv * edotv;
2936 b = 2.0f * (elen2 *
dot_v3v3(vel, bv) - edotv * edotbv);
2937 c = elen2 * (radius2 -
dot_v3v3(bv, bv)) + edotbv * edotbv;
2940 e = (edotv * newLambda - edotbv) / elen2;
2942 if (
e >= 0.0f &&
e <= 1.0f) {
2943 *r_lambda = newLambda;
2947 found_by_sweep =
true;
2962 a = elen2 * (-
dot_v3v3(vel, vel)) + edotv * edotv;
2963 b = 2.0f * (elen2 *
dot_v3v3(vel, bv) - edotv * edotbv);
2964 c = elen2 * (radius2 -
dot_v3v3(bv, bv)) + edotbv * edotbv;
2967 e = (edotv * newLambda - edotbv) / elen2;
2969 if (
e >= 0.0f &&
e <= 1.0f) {
2970 *r_lambda = newLambda;
2974 found_by_sweep =
true;
2978 return found_by_sweep;
2989 const float epsilon = 0.000001f;
2990 float p[3], e1[3], e2[3];
2992 int a0 = axis, a1 = (axis + 1) % 3, a2 = (axis + 2) % 3;
2998 f = (e2[a1] * e1[a2] - e2[a2] * e1[a1]);
3003 v = (p[a2] * e1[a1] - p[a1] * e1[a2]) / f;
3004 if ((
v < 0.0f) || (
v > 1.0f)) {
3014 u = (-p[a2] -
v * e2[a2]) / f;
3017 u = (-p[a1] -
v * e2[a1]) / f;
3020 if ((u < 0.0f) || ((u +
v) > 1.0f)) {
3024 *r_lambda = (p[a0] + u * e1[a0] +
v * e2[a0]) / (p2[a0] - p1[a0]);
3026 if ((*r_lambda < 0.0f) || (*r_lambda > 1.0f)) {
3047 float a[3], b[3],
c[3], ab[3], cb[3];
3076 float v3t[3], v4t[3];
3110 const float epsilon = 0.000001f;
3125 const float epsilon = 0.000001f;
3126 float a[3], b[3],
c[3], ab[3], cb[3], ca[3];
3154 if (f1 >= 0 && f1 <= 1 && f2 >= 0 && f2 <= 1) {
3175 const float ray_direction_a[3],
3176 const float ray_origin_b[3],
3177 const float ray_direction_b[3],
3193 float t[3],
c[3], cray[3];
3197 if (r_lambda_a !=
NULL) {
3199 *r_lambda_a =
dot_v3v3(cray, n) / nlen;
3202 if (r_lambda_b !=
NULL) {
3204 *r_lambda_b =
dot_v3v3(cray, n) / nlen;
3211 const float ray_direction_a[3],
3212 const float ray_origin_b[3],
3213 const float ray_direction_b[3],
3227 const float max1[3],
3228 const float min2[3],
3229 const float max2[3])
3231 return (min1[0] < max2[0] && min1[1] < max2[1] && min1[2] < max2[2] && min2[0] < max1[0] &&
3232 min2[1] < max1[1] && min2[2] < max1[2]);
3236 const float ray_origin[3],
3237 const float ray_direction[3])
3241 data->ray_inv_dir[0] = 1.0f / ray_direction[0];
3242 data->ray_inv_dir[1] = 1.0f / ray_direction[1];
3243 data->ray_inv_dir[2] = 1.0f / ray_direction[2];
3245 data->sign[0] =
data->ray_inv_dir[0] < 0.0f;
3246 data->sign[1] =
data->ray_inv_dir[1] < 0.0f;
3247 data->sign[2] =
data->ray_inv_dir[2] < 0.0f;
3252 const float bb_min[3],
3253 const float bb_max[3],
3261 float tmin = (bbox[
data->sign[0]][0] -
data->ray_origin[0]) *
data->ray_inv_dir[0];
3262 float tmax = (bbox[1 -
data->sign[0]][0] -
data->ray_origin[0]) *
data->ray_inv_dir[0];
3264 const float tymin = (bbox[
data->sign[1]][1] -
data->ray_origin[1]) *
data->ray_inv_dir[1];
3265 const float tymax = (bbox[1 -
data->sign[1]][1] -
data->ray_origin[1]) *
data->ray_inv_dir[1];
3267 if ((tmin > tymax) || (tymin > tmax)) {
3279 const float tzmin = (bbox[
data->sign[2]][2] -
data->ray_origin[2]) *
data->ray_inv_dir[2];
3280 const float tzmax = (bbox[1 -
data->sign[2]][2] -
data->ray_origin[2]) *
data->ray_inv_dir[2];
3282 if ((tmin > tzmax) || (tzmin > tmax)) {
3310 const float bb_min[3],
3311 const float bb_max[3],
3317 const double invdirx = (dir[0] > 1e-35f || dir[0] < -1e-35f) ? 1.0 / (
double)dir[0] : DBL_MAX;
3318 const double invdiry = (dir[1] > 1e-35f || dir[1] < -1e-35f) ? 1.0 / (
double)dir[1] : DBL_MAX;
3319 const double invdirz = (dir[2] > 1e-35f || dir[2] < -1e-35f) ? 1.0 / (
double)dir[2] : DBL_MAX;
3320 t[0] = (
double)(bb_min[0] - orig[0]) * invdirx;
3321 t[1] = (
double)(bb_max[0] - orig[0]) * invdirx;
3322 t[2] = (
double)(bb_min[1] - orig[1]) * invdiry;
3323 t[3] = (
double)(bb_max[1] - orig[1]) * invdiry;
3324 t[4] = (
double)(bb_min[2] - orig[2]) * invdirz;
3325 t[5] = (
double)(bb_max[2] - orig[2]) * invdirz;
3326 hit_dist[0] = (
float)fmax(fmax(fmin(
t[0],
t[1]), fmin(
t[2],
t[3])), fmin(
t[4],
t[5]));
3327 hit_dist[1] = (
float)fmin(fmin(fmax(
t[0],
t[1]), fmax(
t[2],
t[3])), fmax(
t[4],
t[5]));
3328 if ((hit_dist[1] < 0.0f || hit_dist[0] > hit_dist[1])) {
3333 *tmin = hit_dist[0];
3336 *tmax = hit_dist[1];
3343 const float ray_orig[3],
3344 const float ray_dir[3])
3373 float h[2], u[2], lambda, denom;
3377 if (denom == 0.0f) {
3383 r_close[0] = l1[0] + u[0] * lambda;
3384 r_close[1] = l1[1] + u[1] * lambda;
3393 double h[2], u[2], lambda, denom;
3403 r_close[0] = l1[0] + u[0] * lambda;
3404 r_close[1] = l1[1] + u[1] * lambda;
3409 const float ray_origin[3],
3410 const float ray_direction[3],
3412 const float fallback)
3414 float p_relative[3];
3421 const float ray_origin[3],
3422 const float ray_direction[3])
3438 const float fallback)
3458 const float fallback)
3478 const float plane_no[3],
3498 if (dist_old > dist) {
3501 float fac = (dist / dist_old) * 0.5f;
3519 const int x1,
const int y1,
const int x2,
const int y2,
const int a,
const int b)
3521 float v1[2],
v2[2], v3[2], p[2];
3555 float h, rp[3], cp[3], q[3];
3564 return (h >= 0.0f && h <= 1.0f);
3574 if (h < 0.0f || h > 1.0f) {
3613 const float p[3],
const float v1[3],
const float v2[3],
const float v3[3],
float r_isect_co[3])
3633 const float p1[3],
const float p2[3],
const float plane[4],
float r_p1[3],
float r_p2[3])
3653 const float p1_copy[3] = {
UNPACK3(p1)};
3665 const float p1_copy[3] = {
UNPACK3(p1)};
3673 const float p1_copy[3] = {
UNPACK3(p1)};
3681 const float plane_array[][4],
3682 const int plane_tot,
3687 float p1_fac = 0.0f, p2_fac = 1.0f;
3692 for (
int i = 0; i < plane_tot; i++) {
3693 const float *plane = plane_array[i];
3694 const float div =
dot_v3v3(dp, plane);
3707 if (p1_fac > p2_fac) {
3713 else if (div < 0.0f) {
3722 if (p1_fac > p2_fac) {
3732 const float p1_copy[3] = {
UNPACK3(p1)};
3791 const float v1[3],
const float v2[3],
const float v3[3],
const int i,
const int j)
3793 return 0.5f * ((
v1[i] -
v2[i]) * (
v2[j] - v3[j]) + (
v1[j] -
v2[j]) * (v3[i] -
v2[i]));
3815 wtot =
w[0] +
w[1] +
w[2];
3832 float w[3],
const float v1[3],
const float v2[3],
const float v3[3],
const float co[3])
3866 float n1[3], n2[3], n[3];
3876 if (!ok || (
w[0] < 0.0f)) {
3914 const float v1[2],
const float v2[2],
const float v3[2],
const float co[2],
float w[3])
3916 const float x = co[0],
y = co[1];
3917 const float x1 =
v1[0],
y1 =
v1[1];
3918 const float x2 =
v2[0], y2 =
v2[1];
3919 const float x3 = v3[0], y3 = v3[1];
3920 const float det = (y2 - y3) * (x1 - x3) + (x3 -
x2) * (
y1 - y3);
3926 w[0] = ((y2 - y3) * (
x - x3) + (x3 -
x2) * (
y - y3)) / det;
3927 w[1] = ((y3 -
y1) * (
x - x3) + (x1 - x3) * (
y - y3)) / det;
3928 w[2] = 1.0f -
w[0] -
w[1];
3944 const float v1[2],
const float v2[2],
const float v3[2],
const float co[2],
float w[3])
3951 wtot =
w[0] +
w[1] +
w[2];
3972 const float v1[2],
const float v2[2],
const float v3[2],
const float co[2],
float w[3])
3979 wtot =
w[0] +
w[1] +
w[2];
3999 const float v1[4],
const float v2[4],
const float v3[4],
const float co[2],
float w[3])
4006 wtot =
w[0] +
w[1] +
w[2];
4037 #define MEAN_VALUE_HALF_TAN_V2(_area, i1, i2) \
4038 ((_area = cross_v2v2(dirs[i1], dirs[i2])) != 0.0f ? \
4039 fabsf(((lens[i1] * lens[i2]) - dot_v2v2(dirs[i1], dirs[i2])) / _area) : \
4042 const float dirs[4][2] = {
4043 {
v1[0] - co[0],
v1[1] - co[1]},
4044 {
v2[0] - co[0],
v2[1] - co[1]},
4045 {v3[0] - co[0], v3[1] - co[1]},
4046 {v4[0] - co[0], v4[1] - co[1]},
4049 const float lens[4] = {
4057 if (
UNLIKELY(lens[0] < FLT_EPSILON)) {
4059 w[1] =
w[2] =
w[3] = 0.0f;
4061 else if (
UNLIKELY(lens[1] < FLT_EPSILON)) {
4063 w[0] =
w[2] =
w[3] = 0.0f;
4065 else if (
UNLIKELY(lens[2] < FLT_EPSILON)) {
4067 w[0] =
w[1] =
w[3] = 0.0f;
4069 else if (
UNLIKELY(lens[3] < FLT_EPSILON)) {
4071 w[0] =
w[1] =
w[2] = 0.0f;
4079 # pragma clang diagnostic push
4080 # pragma clang diagnostic ignored "-Wunsequenced"
4084 const float t[4] = {
4092 # pragma clang diagnostic pop
4095 #undef MEAN_VALUE_HALF_TAN_V2
4097 w[0] = (
t[3] +
t[0]) / lens[0];
4098 w[1] = (
t[0] +
t[1]) / lens[1];
4099 w[2] = (
t[1] +
t[2]) / lens[2];
4100 w[3] = (
t[2] +
t[3]) / lens[3];
4102 wtot =
w[0] +
w[1] +
w[2] +
w[3];
4122 float const pt_src[3],
4123 const float tri_tar_p1[3],
4124 const float tri_tar_p2[3],
4125 const float tri_tar_p3[3],
4126 const float tri_src_p1[3],
4127 const float tri_src_p2[3],
4128 const float tri_src_p3[3])
4136 float no_tar[3], no_src[3];
4137 float mat_src[3][3];
4139 float tri_xy_src[3][3];
4141 float area_tar, area_src;
4159 area_src =
sqrtf(
area_tri_v2(tri_xy_src[0], tri_xy_src[1], tri_xy_src[2]));
4161 z_ofs_src = pt_src_xy[2] - tri_xy_src[0][2];
4162 madd_v3_v3v3fl(pt_tar, pt_tar, no_tar, (z_ofs_src / area_src) * area_tar);
4170 const float p_src[3],
4171 const float l_dst_p1[3],
4172 const float l_dst_p2[3],
4173 const float l_src_p1[3],
4174 const float l_src_p2[3])
4184 int found_invalid = 0;
4185 int found_valid = 0;
4188 for (i = 0; i < list_size; i++) {
4189 if (
array[i] == skipval) {
4197 if (found_valid == 0) {
4200 if (found_invalid == 0) {
4205 float valid_last = skipval;
4208 float *array_up =
MEM_callocN(
sizeof(
float) * (
size_t)list_size,
"interp_sparse_array up");
4209 float *array_down =
MEM_callocN(
sizeof(
float) * (
size_t)list_size,
"interp_sparse_array up");
4211 int *ofs_tot_up =
MEM_callocN(
sizeof(
int) * (
size_t)list_size,
"interp_sparse_array tup");
4212 int *ofs_tot_down =
MEM_callocN(
sizeof(
int) * (
size_t)list_size,
"interp_sparse_array tdown");
4214 for (i = 0; i < list_size; i++) {
4215 if (
array[i] == skipval) {
4216 array_up[i] = valid_last;
4217 ofs_tot_up[i] = ++valid_ofs;
4220 valid_last =
array[i];
4225 valid_last = skipval;
4228 for (i = list_size - 1; i >= 0; i--) {
4229 if (
array[i] == skipval) {
4230 array_down[i] = valid_last;
4231 ofs_tot_down[i] = ++valid_ofs;
4234 valid_last =
array[i];
4240 for (i = 0; i < list_size; i++) {
4241 if (
array[i] == skipval) {
4242 if (array_up[i] != skipval && array_down[i] != skipval) {
4243 array[i] = ((array_up[i] * (
float)ofs_tot_down[i]) +
4244 (array_down[i] * (
float)ofs_tot_up[i])) /
4245 (
float)(ofs_tot_down[i] + ofs_tot_up[i]);
4247 else if (array_up[i] != skipval) {
4248 array[i] = array_up[i];
4250 else if (array_down[i] != skipval) {
4251 array[i] = array_down[i];
4269 #define IS_POINT_IX (1 << 0)
4270 #define IS_SEGMENT_IX (1 << 1)
4272 #define DIR_V3_SET(d_len, va, vb) \
4274 sub_v3_v3v3((d_len)->dir, va, vb); \
4275 (d_len)->len = len_v3((d_len)->dir); \
4279 #define DIR_V2_SET(d_len, va, vb) \
4281 sub_v2db_v2fl_v2fl((d_len)->dir, va, vb); \
4282 (d_len)->len = len_v2_db((d_len)->dir); \
4305 const float len = d_curr->
len * d_next->
len;
4331 const double len = d_curr->
len * d_next->
len;
4344 float max_value = 0;
4346 for (
int i = 0; i < n; i++) {
4354 const float eps = 16.0f * FLT_EPSILON * max_value;
4355 const float eps_sq =
eps *
eps;
4356 const float *v_curr, *v_next;
4358 float totweight = 0.0f;
4374 while (i_next < n) {
4392 w[i_curr] = (ht_prev + ht) / d_curr.
len;
4393 totweight +=
w[i_curr];
4404 memset(
w, 0,
sizeof(*
w) * (
size_t)n);
4411 CLAMP(fac, 0.0f, 1.0f);
4412 w[i_curr] = 1.0f - fac;
4417 if (totweight != 0.0f) {
4418 for (i_curr = 0; i_curr < n; i_curr++) {
4419 w[i_curr] /= totweight;
4429 float max_value = 0;
4431 for (
int i = 0; i < n; i++) {
4438 const float eps = 16.0f * FLT_EPSILON * max_value;
4439 const float eps_sq =
eps *
eps;
4441 const float *v_curr, *v_next;
4443 float totweight = 0.0f;
4459 while (i_next < n) {
4477 w[i_curr] = (d_curr.
len == 0.0) ? 0.0f : (
float)((ht_prev + ht) / d_curr.
len);
4478 totweight +=
w[i_curr];
4489 memset(
w, 0,
sizeof(*
w) * (
size_t)n);
4496 CLAMP(fac, 0.0f, 1.0f);
4497 w[i_curr] = 1.0f - fac;
4502 if (totweight != 0.0f) {
4503 for (i_curr = 0; i_curr < n; i_curr++) {
4504 w[i_curr] /= totweight;
4511 #undef IS_SEGMENT_IX
4528 const float t2 =
t *
t;
4529 const float t3 = t2 *
t;
4532 a[0] =
v1[0] +
v2[0] + 2 * (x1[0] -
x2[0]);
4533 a[1] =
v1[1] +
v2[1] + 2 * (x1[1] -
x2[1]);
4534 a[2] =
v1[2] +
v2[2] + 2 * (x1[2] -
x2[2]);
4536 b[0] = -2 *
v1[0] -
v2[0] - 3 * (x1[0] -
x2[0]);
4537 b[1] = -2 *
v1[1] -
v2[1] - 3 * (x1[1] -
x2[1]);
4538 b[2] = -2 *
v1[2] -
v2[2] - 3 * (x1[2] -
x2[2]);
4540 x[0] =
a[0] * t3 + b[0] * t2 +
v1[0] *
t + x1[0];
4541 x[1] =
a[1] * t3 + b[1] * t2 +
v1[1] *
t + x1[1];
4542 x[2] =
a[2] * t3 + b[2] * t2 +
v1[2] *
t + x1[2];
4544 v[0] = 3 *
a[0] * t2 + 2 * b[0] *
t +
v1[0];
4545 v[1] = 3 *
a[1] * t2 + 2 * b[1] *
t +
v1[1];
4546 v[2] = 3 *
a[2] * t2 + 2 * b[2] *
t +
v1[2];
4552 #define IS_ZERO(x) ((x > (-DBL_EPSILON) && x < DBL_EPSILON) ? 1 : 0)
4562 float r_uv[2],
const float st[2],
const float st0[2],
const float st1[2],
const float st2[2])
4567 const double a = st0[0] - st2[0], b = st1[0] - st2[0];
4568 const double c = st0[1] - st2[1], d = st1[1] - st2[1];
4569 const double det =
a * d -
c * b;
4573 const double x[2] = {st[0] - st2[0], st[1] - st2[1]};
4575 r_uv[0] = (
float)((d *
x[0] - b *
x[1]) / det);
4576 r_uv[1] = (
float)(((-
c) *
x[0] +
a *
x[1]) / det);
4589 float r_uv[2],
const float st[3],
const float st0[3],
const float st1[3],
const float st2[3])
4591 float v0[3],
v1[3],
v2[3];
4592 double d00, d01, d11, d20, d21, det;
4604 det = d00 * d11 - d01 * d01;
4610 w = (
float)((d00 * d21 - d01 * d20) / det);
4611 r_uv[1] = (
float)((d11 * d20 - d01 * d21) / det);
4612 r_uv[0] = 1.0f - r_uv[1] -
w;
4632 float r_deriv[2][2],
4639 const double signed_area = (st0[0] * st1[1] - st0[1] * st1[0]) +
4640 (st1[0] * st2[1] - st1[1] * st2[0]) +
4641 (st2[0] * st3[1] - st2[1] * st3[0]) +
4642 (st3[0] * st0[1] - st3[1] * st0[0]);
4646 const double a = (st0[0] - st[0]) * (st0[1] - st3[1]) - (st0[1] - st[1]) * (st0[0] - st3[0]);
4649 const double b = 0.5 * (
double)(((st0[0] - st[0]) * (st1[1] - st2[1]) -
4650 (st0[1] - st[1]) * (st1[0] - st2[0])) +
4651 ((st1[0] - st[0]) * (st0[1] - st3[1]) -
4652 (st1[1] - st[1]) * (st0[0] - st3[0])));
4655 const double fC = (st1[0] - st[0]) * (st1[1] - st2[1]) - (st1[1] - st[1]) * (st1[0] - st2[0]);
4656 double denom =
a - 2 * b + fC;
4662 const double fDen =
a - fC;
4664 r_uv[0] = (
float)(
a / fDen);
4668 const double desc_sq = b * b -
a * fC;
4669 const double desc =
sqrt(desc_sq < 0.0 ? 0.0 : desc_sq);
4670 const double s = signed_area > 0 ? (-1.0) : 1.0;
4672 r_uv[0] = (
float)(((
a - b) + s * desc) / denom);
4678 const double denom_s = (1 - r_uv[0]) * (st0[0] - st3[0]) + r_uv[0] * (st1[0] - st2[0]);
4679 const double denom_t = (1 - r_uv[0]) * (st0[1] - st3[1]) + r_uv[0] * (st1[1] - st2[1]);
4683 if (
fabs(denom_s) <
fabs(denom_t)) {
4689 r_uv[1] = (
float)((
double)((1.0f - r_uv[0]) * (st0[i] - st[i]) +
4690 r_uv[0] * (st1[i] - st[i])) /
4696 float tmp1[2], tmp2[2], s[2],
t[2];
4709 denom =
t[0] * s[1] -
t[1] * s[0];
4712 double inv_denom = 1.0 / denom;
4713 r_deriv[0][0] = (
float)((
double)-
t[1] * inv_denom);
4714 r_deriv[0][1] = (
float)((
double)
t[0] * inv_denom);
4715 r_deriv[1][0] = (
float)((
double)s[1] * inv_denom);
4716 r_deriv[1][1] = (
float)((
double)-s[0] * inv_denom);
4728 const double signed_area = (st0[0] * st1[1] - st0[1] * st1[0]) +
4729 (st1[0] * st2[1] - st1[1] * st2[0]) +
4730 (st2[0] * st3[1] - st2[1] * st3[0]) +
4731 (st3[0] * st0[1] - st3[1] * st0[0]);
4735 const double a = (st0[0] - st[0]) * (st0[1] - st3[1]) - (st0[1] - st[1]) * (st0[0] - st3[0]);
4738 const double b = 0.5 * (
double)(((st0[0] - st[0]) * (st1[1] - st2[1]) -
4739 (st0[1] - st[1]) * (st1[0] - st2[0])) +
4740 ((st1[0] - st[0]) * (st0[1] - st3[1]) -
4741 (st1[1] - st[1]) * (st0[0] - st3[0])));
4744 const double fC = (st1[0] - st[0]) * (st1[1] - st2[1]) - (st1[1] - st[1]) * (st1[0] - st2[0]);
4745 double denom =
a - 2 * b + fC;
4748 const double fDen =
a - fC;
4750 return (
float)(
a / fDen);
4756 const double desc_sq = b * b -
a * fC;
4757 const double desc =
sqrt(desc_sq < 0.0 ? 0.0 : desc_sq);
4758 const double s = signed_area > 0 ? (-1.0) : 1.0;
4760 return (
float)(((
a - b) + s * desc) / denom);
4807 const float nearClip,
4808 const float farClip)
4810 float Xdelta, Ydelta, Zdelta;
4814 Zdelta = farClip - nearClip;
4815 if (Xdelta == 0.0f || Ydelta == 0.0f || Zdelta == 0.0f) {
4819 matrix[0][0] = 2.0f / Xdelta;
4820 matrix[3][0] = -(
right +
left) / Xdelta;
4821 matrix[1][1] = 2.0f / Ydelta;
4822 matrix[3][1] = -(
top +
bottom) / Ydelta;
4823 matrix[2][2] = -2.0f / Zdelta;
4824 matrix[3][2] = -(farClip + nearClip) / Zdelta;
4835 const float nearClip,
4836 const float farClip)
4840 const float Zdelta = farClip - nearClip;
4842 if (Xdelta == 0.0f || Ydelta == 0.0f || Zdelta == 0.0f) {
4845 mat[0][0] = nearClip * 2.0f / Xdelta;
4846 mat[1][1] = nearClip * 2.0f / Ydelta;
4849 mat[2][2] = -(farClip + nearClip) / Zdelta;
4851 mat[3][2] = (-2.0f * nearClip * farClip) / Zdelta;
4852 mat[0][1] = mat[0][2] = mat[0][3] = mat[1][0] = mat[1][2] = mat[1][3] = mat[3][0] = mat[3][1] =
4857 const float angle_left,
4858 const float angle_right,
4859 const float angle_up,
4860 const float angle_down,
4861 const float nearClip,
4862 const float farClip)
4864 const float tan_angle_left =
tanf(angle_left);
4865 const float tan_angle_right =
tanf(angle_right);
4866 const float tan_angle_bottom =
tanf(angle_up);
4867 const float tan_angle_top =
tanf(angle_down);
4870 mat, tan_angle_left, tan_angle_right, tan_angle_top, tan_angle_bottom, nearClip, farClip);
4871 mat[0][0] /= nearClip;
4872 mat[1][1] /= nearClip;
4879 if (winmat[2][3] == -1.0f) {
4885 v1[0] = perspmat[0][0];
4886 v1[1] = perspmat[1][0];
4887 v1[2] = perspmat[2][0];
4889 v2[0] = perspmat[0][1];
4890 v2[1] = perspmat[1][1];
4891 v2[2] = perspmat[2][1];
4896 winmat[2][0] -= len1 * winmat[0][0] *
x;
4897 winmat[2][1] -= len2 * winmat[1][1] *
y;
4929 left[i] = mat[i][3] + mat[i][0];
4935 right[i] = mat[i][3] - mat[i][0];
4941 bottom[i] = mat[i][3] + mat[i][1];
4947 top[i] = mat[i][3] - mat[i][1];
4953 near[i] = mat[i][3] + mat[i][2];
4959 far[i] = mat[i][3] - mat[i][2];
4972 bool is_persp = projmat[3][3] == 0.0f;
4975 *r_left = (projmat[2][0] - 1.0f) / projmat[0][0];
4976 *r_right = (projmat[2][0] + 1.0f) / projmat[0][0];
4977 *r_bottom = (projmat[2][1] - 1.0f) / projmat[1][1];
4978 *r_top = (projmat[2][1] + 1.0f) / projmat[1][1];
4979 *r_near = projmat[3][2] / (projmat[2][2] - 1.0f);
4980 *r_far = projmat[3][2] / (projmat[2][2] + 1.0f);
4983 *r_left = (-projmat[3][0] - 1.0f) / projmat[0][0];
4984 *r_right = (-projmat[3][0] + 1.0f) / projmat[0][0];
4985 *r_bottom = (-projmat[3][1] - 1.0f) / projmat[1][1];
4986 *r_top = (-projmat[3][1] + 1.0f) / projmat[1][1];
4987 *r_near = (projmat[3][2] + 1.0f) / projmat[2][2];
4988 *r_far = (projmat[3][2] - 1.0f) / projmat[2][2];
5000 double projmat[4][4];
5003 bool is_persp = projmat[3][3] == 0.0f;
5006 *r_left = (projmat[2][0] - 1.0) / projmat[0][0];
5007 *r_right = (projmat[2][0] + 1.0) / projmat[0][0];
5008 *r_bottom = (projmat[2][1] - 1.0) / projmat[1][1];
5009 *r_top = (projmat[2][1] + 1.0) / projmat[1][1];
5010 *r_near = projmat[3][2] / (projmat[2][2] - 1.0);
5011 *r_far = projmat[3][2] / (projmat[2][2] + 1.0);
5014 *r_left = (-projmat[3][0] - 1.0) / projmat[0][0];
5015 *r_right = (-projmat[3][0] + 1.0) / projmat[0][0];
5016 *r_bottom = (-projmat[3][1] - 1.0) / projmat[1][1];
5017 *r_top = (-projmat[3][1] + 1.0) / projmat[1][1];
5018 *r_near = (projmat[3][2] + 1.0) / projmat[2][2];
5019 *r_far = (projmat[3][2] - 1.0) / projmat[2][2];
5032 const int win_size[2],
5037 float r_projmat[4][4])
5049 r_projmat[0][0] *= x_sca;
5050 r_projmat[1][1] *= y_sca;
5052 if (projmat[3][3] == 0.0f) {
5053 r_projmat[2][0] = r_projmat[2][0] * x_sca + x_fac;
5054 r_projmat[2][1] = r_projmat[2][1] * y_sca + y_fac;
5057 r_projmat[3][0] = r_projmat[3][0] * x_sca - x_fac;
5058 r_projmat[3][1] = r_projmat[3][1] * y_sca - y_fac;
5067 for (row = 0; row < 4; row++) {
5069 temp[row][
col] = (icand[row][0] * mat[0][
col] + icand[row][1] * mat[1][
col] +
5070 icand[row][2] * mat[2][
col] + icand[row][3] * mat[3][
col]);
5076 void polarview_m4(
float mat[4][4],
float dist,
float azimuth,
float incidence,
float twist)
5087 float mat[4][4],
float vx,
float vy,
float vz,
float px,
float py,
float pz,
float twist)
5089 float sine, cosine, hyp, hyp1, dx, dy, dz;
5099 hyp = dx * dx + dz * dz;
5100 hyp1 =
sqrtf(dy * dy + hyp);
5105 cosine = hyp / hyp1;
5111 mat1[1][1] = cosine;
5114 mat1[2][2] = cosine;
5118 mat1[1][1] = mat1[2][2] = 1.0f;
5119 mat1[1][2] = mat1[2][1] = 0.0f;
5130 mat1[0][0] = cosine;
5133 mat1[2][2] = cosine;
5141 float mat[4][4], vec[4];
5142 int a, fl, flag = -1;
5146 for (
a = 0;
a < 8;
a++) {
5147 vec[0] = (
a & 1) ? boundbox[0][0] : boundbox[1][0];
5148 vec[1] = (
a & 2) ? boundbox[0][1] : boundbox[1][1];
5149 vec[2] = (
a & 4) ? boundbox[0][2] : boundbox[1][2];
5155 if (vec[0] >
bounds[1] * vec[3]) {
5158 if (vec[0] <
bounds[0] * vec[3]) {
5161 if (vec[1] >
bounds[3] * vec[3]) {
5164 if (vec[1] <
bounds[2] * vec[3]) {
5169 if (vec[0] < -vec[3]) {
5172 if (vec[0] > vec[3]) {
5175 if (vec[1] < -vec[3]) {
5178 if (vec[1] > vec[3]) {
5182 if (vec[2] < -vec[3]) {
5185 if (vec[2] > vec[3]) {
5200 float mn[3], mx[3], vec[3];
5206 for (
a = 0;
a < 8;
a++) {
5207 vec[0] = (
a & 1) ? boundbox[0][0] : boundbox[1][0];
5208 vec[1] = (
a & 2) ? boundbox[0][1] : boundbox[1][1];
5209 vec[2] = (
a & 4) ? boundbox[0][2] : boundbox[1][2];
5221 void map_to_tube(
float *r_u,
float *r_v,
const float x,
const float y,
const float z)
5225 *r_v = (
z + 1.0f) / 2.0f;
5258 const float target[3] = {0.0f, 0.0f, 1.0f};
5269 const float axis[3],
5284 const float f_no[3],
5290 const int nverts = 3;
5303 float *
vn[] = {n1, n2, n3};
5304 const float *prev_edge = vdiffs[nverts - 1];
5307 for (i = 0; i < nverts; i++) {
5308 const float *cur_edge = vdiffs[i];
5313 prev_edge = cur_edge;
5322 const float f_no[3],
5329 const int nverts = (n4 !=
NULL && co4 !=
NULL) ? 4 : 3;
5350 float *
vn[] = {n1, n2, n3, n4};
5351 const float *prev_edge = vdiffs[nverts - 1];
5354 for (i = 0; i < nverts; i++) {
5355 const float *cur_edge = vdiffs[i];
5360 prev_edge = cur_edge;
5368 const float polyno[3],
5369 const float **vertcos,
5376 for (i = 0; i < nverts; i++) {
5377 sub_v3_v3v3(vdiffs[i], vertcos[(i + 1) % nverts], vertcos[i]);
5383 const float *prev_edge = vdiffs[nverts - 1];
5385 for (i = 0; i < nverts; i++) {
5386 const float *cur_edge = vdiffs[i];
5394 prev_edge = cur_edge;
5410 const float s1 = uv2[0] - uv1[0];
5411 const float s2 = uv3[0] - uv1[0];
5412 const float t1 = uv2[1] - uv1[1];
5413 const float t2 = uv3[1] - uv1[1];
5414 float det = (s1 * t2 - s2 * t1);
5418 float tangv[3], ct[3], e1[3], e2[3];
5425 r_tang[0] = (t2 * e1[0] - t1 * e2[0]) * det;
5426 r_tang[1] = (t2 * e1[1] - t1 * e2[1]) * det;
5427 r_tang[2] = (t2 * e1[2] - t1 * e2[2]) * det;
5428 tangv[0] = (s1 * e2[0] - s2 * e1[0]) * det;
5429 tangv[1] = (s1 * e2[1] - s2 * e1[1]) * det;
5430 tangv[2] = (s1 * e2[2] - s2 * e1[2]) * det;
5467 const float (*
pos)[3],
5468 const float *weight,
5469 const float (*rpos)[3],
5470 const float *rweight,
5476 float accu_com[3] = {0.0f, 0.0f, 0.0f}, accu_rcom[3] = {0.0f, 0.0f, 0.0f};
5477 float accu_weight = 0.0f, accu_rweight = 0.0f;
5478 const float eps = 1e-6f;
5495 if (
pos && rpos && (list_size > 0)) {
5497 for (
a = 0;
a < list_size;
a++) {
5503 accu_weight += weight[
a];
5514 accu_rweight += rweight[
a];
5520 if (!weight || !rweight) {
5521 accu_weight = accu_rweight = (
float)list_size;
5524 mul_v3_fl(accu_com, 1.0f / accu_weight);
5525 mul_v3_fl(accu_rcom, 1.0f / accu_rweight);
5532 if (lrot || lscale) {
5536 float m[3][3], mr[3][3], q[3][3], qi[3][3];
5537 float va[3], vb[3], stunt[3];
5539 int i = 0, imax = 15;
5544 for (
a = 0;
a < list_size;
a++) {
5549 m[0][0] += va[0] * vb[0];
5550 m[0][1] += va[0] * vb[1];
5551 m[0][2] += va[0] * vb[2];
5553 m[1][0] += va[1] * vb[0];
5554 m[1][1] += va[1] * vb[1];
5555 m[1][2] += va[1] * vb[2];
5557 m[2][0] += va[2] * vb[0];
5558 m[2][1] += va[2] * vb[1];
5559 m[2][2] += va[2] * vb[2];
5564 mr[0][0] += va[0] * va[0];
5565 mr[0][1] += va[0] * va[1];
5566 mr[0][2] += va[0] * va[2];
5568 mr[1][0] += va[1] * va[0];
5569 mr[1][1] += va[1] * va[1];
5570 mr[1][2] += va[1] * va[2];
5572 mr[2][0] += va[2] * va[0];
5573 mr[2][1] += va[2] * va[1];
5574 mr[2][2] += va[2] * va[2];
5587 while ((odet - ndet) * (odet - ndet) >
eps && i < imax) {
5619 r[0] =
v1[0] + fac * (
v2[0] -
v1[0]);
5620 r[1] =
v1[1] + fac * (
v2[1] -
v1[1]);
5621 r[2] =
v1[2] + fac * (
v2[2] -
v1[2]);
5634 static const float epsilon = 1e-6f;
5662 else if (sd[2] < 0.0f) {
5677 else if (sd[1] < 0.0f) {
5685 else if (sd[2] < 0.0f) {
5708 else if (sd[2] < 0.0f) {
5724 else if (sd[0] < 0.0f) {
5733 else if (sd[2] < 0.0f) {
5748 else if (sd[1] < 0.0f) {
5756 else if (sd[2] < 0.0f) {
5773 else if (sd[2] < 0.0f) {
5792 else if (sd[2] < 0.0f) {
5807 else if (sd[1] < 0.0f) {
5815 else if (sd[2] < 0.0f) {
5832 else if (sd[2] < 0.0f) {
5849 # include <Accelerate/Accelerate.h>
5856 static vFloat vec_splat_float(
float val)
5858 return (vFloat){val, val, val, val};
5861 static float ff_quad_form_factor(
float *p,
float *n,
float *q0,
float *
q1,
float *q2,
float *q3)
5863 vFloat vcos, rlen, vrx, vry, vrz, vsrx, vsry, vsrz, gx, gy, gz, vangle;
5864 vUInt8
rotate = (vUInt8){4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 3};
5865 vFloatResult vresult;
5869 vrx = (vFloat){q0[0],
q1[0], q2[0], q3[0]} - vec_splat_float(p[0]);
5870 vry = (vFloat){q0[1],
q1[1], q2[1], q3[1]} - vec_splat_float(p[1]);
5871 vrz = (vFloat){q0[2],
q1[2], q2[2], q3[2]} - vec_splat_float(p[2]);
5874 rlen = vec_rsqrte(vrx * vrx + vry * vry + vrz * vrz + vec_splat_float(1e-16f));
5880 vsrx = vec_perm(vrx, vrx,
rotate);
5881 vsry = vec_perm(vry, vry,
rotate);
5882 vsrz = vec_perm(vrz, vrz,
rotate);
5885 gx = vsry * vrz - vsrz * vry;
5886 gy = vsrz * vrx - vsrx * vrz;
5887 gz = vsrx * vry - vsry * vrx;
5890 rlen = vec_rsqrte(gx * gx + gy * gy + gz * gz + vec_splat_float(1e-16f));
5896 vcos = vrx * vsrx + vry * vsry + vrz * vsrz;
5897 vcos = vec_max(vec_min(vcos, vec_splat_float(1.0f)), vec_splat_float(-1.0f));
5898 vangle = vacosf(vcos);
5901 vresult.v = (vec_splat_float(n[0]) * gx + vec_splat_float(n[1]) * gy +
5902 vec_splat_float(n[2]) * gz) *
5905 result = (vresult.f[0] + vresult.f[1] + vresult.f[2] + vresult.f[3]) * (0.5f / (
float)
M_PI);
5919 static __m128 sse_approx_acos(__m128
x)
5925 return _mm_set_ps1(1.0f);
5928 static float ff_quad_form_factor(
float *p,
float *n,
float *q0,
float *
q1,
float *q2,
float *q3)
5930 float r0[3], r1[3], r2[3], r3[3], g0[3], g1[3], g2[3], g3[3];
5931 float a1, a2, a3, a4, dot1, dot2,
dot3, dot4,
result;
5932 float fresult[4] __attribute__((aligned(16)));
5933 __m128 qx, qy, qz, rx, ry, rz, rlen, srx, sry, srz, gx, gy, gz, glen, rcos,
angle, aresult;
5936 qx = _mm_set_ps(q3[0], q2[0],
q1[0], q0[0]);
5937 qy = _mm_set_ps(q3[1], q2[1],
q1[1], q0[1]);
5938 qz = _mm_set_ps(q3[2], q2[2],
q1[2], q0[2]);
5940 rx = qx - _mm_set_ps1(p[0]);
5941 ry = qy - _mm_set_ps1(p[1]);
5942 rz = qz - _mm_set_ps1(p[2]);
5945 rlen = _mm_rsqrt_ps(rx * rx + ry * ry + rz * rz + _mm_set_ps1(1e-16f));
5951 srx = _mm_shuffle_ps(rx, rx, _MM_SHUFFLE(0, 3, 2, 1));
5952 sry = _mm_shuffle_ps(ry, ry, _MM_SHUFFLE(0, 3, 2, 1));
5953 srz = _mm_shuffle_ps(rz, rz, _MM_SHUFFLE(0, 3, 2, 1));
5955 gx = sry * rz - srz * ry;
5956 gy = srz * rx - srx * rz;
5957 gz = srx * ry - sry * rx;
5960 glen = _mm_rsqrt_ps(gx * gx + gy * gy + gz * gz + _mm_set_ps1(1e-16f));
5966 rcos = rx * srx + ry * sry + rz * srz;
5967 rcos = _mm_max_ps(_mm_min_ps(rcos, _mm_set_ps1(1.0f)), _mm_set_ps1(-1.0f));
5969 angle = sse_approx_cos(rcos);
5970 aresult = (_mm_set_ps1(n[0]) * gx + _mm_set_ps1(n[1]) * gy + _mm_set_ps1(n[2]) * gz) *
angle;
5973 result = (fresult[0] + fresult[1] + fresult[2] + fresult[3]) * (0.5f / (
float)
M_PI);
5988 d = 1.0f /
sqrtf(d);
6003 float r0[3], r1[3], r2[3], r3[3], g0[3], g1[3], g2[3], g3[3];
6004 float a1, a2, a3, a4, dot1, dot2,
dot3, dot4,
result;
6035 result = (a1 * dot1 + a2 * dot2 + a3 *
dot3 + a4 * dot4) * 0.5f / (
float)
M_PI;
6042 float p[3],
float n[3],
float v1[3],
float v2[3],
float v3[3],
float v4[3])
6046 float q0[3],
q1[3], q2[3], q3[3], contrib = 0.0f;
6066 const float f1_no[3],
6067 const float f2_no[3])
6098 float v13[3], v24[3];
6110 const float *quad_coords[4] = {
v1,
v2, v3, v4};
6111 float quad_proj[4][3];
6113 for (
int i = 0; i < 4; i++) {
6117 float quad_dirs[4][3];
6118 for (
int i = 0, j = 3; i < 4; j = i++) {
6119 sub_v3_v3v3(quad_dirs[i], quad_proj[i], quad_proj[j]);
6124 #define CROSS_SIGN(dir_a, dir_b) \
6125 ((void)cross_v3_v3v3(test_dir, dir_a, dir_b), (dot_v3v3(plane, test_dir) > 0.0f))
6141 unsigned int sign_flag = 0;
6143 const float *co_curr, *co_prev;
6144 float dir_curr[2], dir_prev[2];
6146 co_prev =
verts[nr - 1];
6151 for (
a = 0;
a < nr;
a++) {
6161 else if (
cross > 0.0f) {
6165 if (sign_flag == (1 | 2)) {
6186 float d_12[3], d_23[3], d_34[3], d_41[3];
6187 float cross_a[3], cross_b[3];
6197 ret |= ((
dot_v3v3(cross_a, cross_b) < 0.0f) << 0);
6201 ret |= ((
dot_v3v3(cross_a, cross_b) < 0.0f) << 1);
6211 float d_12[3], d_13[3], d_14[3];
6212 float cross_a[3], cross_b[3];
6218 return dot_v3v3(cross_a, cross_b) > 0.0f;
6235 const float eps = 1e-5f;
6237 const float tan_dot =
dot_v3v3(tan_l, tan_r);
6238 if (tan_dot > 1.0f -
eps) {
6240 return (1.0f / 3.0f) * 0.75f;
6242 if (tan_dot < -1.0f +
eps) {
6244 return (1.0f / 2.0f);
6253 return ((1.0f - angle_cos) / (angle_sin * 2.0f)) / angle_sin;
6265 const float v0[3],
const float v1[3],
const float v2[3],
const float dist1,
const float dist2)
6268 float v10[3], v12[3];
6272 if (dist1 != 0.0f && dist2 != 0.0f) {
6274 float u[3],
v[3], n[3];
6277 if (d12 * d12 > 0.0f) {
6287 const float a = 0.5f * (1.0f + (dist1 * dist1 - dist2 * dist2) / (d12 * d12));
6288 const float hh = dist1 * dist1 -
a *
a * d12 * d12;
6291 const float h =
sqrtf(hh);
6292 const float S_[2] = {
a * d12, -h};
6296 const float x_intercept = S_[0] + h * (v0_[0] - S_[0]) / (v0_[1] + h);
6297 if (x_intercept >= 0.0f && x_intercept <= d12) {
typedef float(TangentPoint)[2]
MINLINE float saacos(float fac)
MINLINE float max_ff(float a, float b)
#define BLI_ASSERT_UNIT_EPSILON
MINLINE float min_ff(float a, float b)
MINLINE float saacosf(float f)
MINLINE float square_f(float a)
#define BLI_ASSERT_UNIT_V3(v)
MINLINE int float_as_int(float f)
MINLINE float xor_fl(float x, int y)
MINLINE float area_tri_v2(const float v1[2], const float v2[2], const float v3[2])
#define ISECT_AABB_PLANE_IN_FRONT_ALL
MINLINE int axis_dominant_v3_single(const float vec[3])
MINLINE float cross_tri_v2(const float v1[2], const float v2[2], const float v3[2])
#define ISECT_LINE_LINE_NONE
MINLINE float plane_point_side_v3(const float plane[4], const float co[3])
#define ISECT_AABB_PLANE_CROSS_ANY
#define ISECT_AABB_PLANE_BEHIND_ANY
#define ISECT_LINE_LINE_COLINEAR
bool isect_ray_tri_threshold_v3(const float ray_origin[3], const float ray_direction[3], const float v0[3], const float v1[3], const float v2[3], float *r_lambda, float r_uv[2], const float threshold)
#define ISECT_LINE_LINE_EXACT
MINLINE void axis_dominant_v3(int *r_axis_a, int *r_axis_b, const float axis[3])
#define ISECT_LINE_LINE_CROSS
bool is_negative_m3(const float mat[3][3])
void mul_m4_v4(const float M[4][4], float r[4])
void copy_m3_m3(float m1[3][3], const float m2[3][3])
void unit_m3(float m[3][3])
void transpose_m4_m4(float R[4][4], const float M[4][4])
void mul_m3_fl(float R[3][3], float f)
void unit_m4(float m[4][4])
void add_m3_m3m3(float R[3][3], const float A[3][3], const float B[3][3])
void translate_m4(float mat[4][4], float tx, float ty, float tz)
void zero_m3(float m[3][3])
void copy_m4d_m4(double m1[4][4], const float m2[4][4])
void mul_m4_v3(const float M[4][4], float r[3])
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])
float determinant_m3_array(const float m[3][3])
void mul_v3_m3v3(float r[3], const float M[3][3], const float a[3])
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)
void mul_m3_m3m3(float R[3][3], const float A[3][3], const float B[3][3])
void rotate_m4(float mat[4][4], const char axis, const float angle)
void axis_angle_to_mat4_single(float R[4][4], const char axis, const float angle)
MINLINE void sub_v3db_v3fl_v3fl(double r[3], const float a[3], const float b[3])
MINLINE void mul_v4_fl(float r[4], float f)
void interp_v2_v2v2(float r[2], const float a[2], const float b[2], const float t)
void interp_v3_v3v3(float r[3], const float a[3], const float b[3], const float t)
MINLINE float len_squared_v2(const float v[2]) ATTR_WARN_UNUSED_RESULT
MINLINE float len_squared_v3(const float v[3]) ATTR_WARN_UNUSED_RESULT
MINLINE float len_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
void minmax_v3v3_v3(float min[3], float max[3], const float vec[3])
MINLINE void madd_v3_v3fl(float r[3], const float a[3], float f)
MINLINE float len_squared_v2v2(const float a[2], const float b[2]) ATTR_WARN_UNUSED_RESULT
MINLINE double dot_v2v2_db(const double a[2], const double b[2]) ATTR_WARN_UNUSED_RESULT
MINLINE void madd_v2_v2fl(float r[2], const float a[2], float f)
MINLINE void madd_v2_v2v2fl(float r[2], const float a[2], const float b[2], float f)
MINLINE float normalize_v3(float r[3])
void interp_v3_v3v3v3(float p[3], const float v1[3], const float v2[3], const float v3[3], const float w[3])
MINLINE float len_squared_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
MINLINE double dot_v3db_v3fl(const double a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
MINLINE void add_newell_cross_v3_v3v3(float n[3], const float v_prev[3], const float v_curr[3])
MINLINE void sub_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE void copy_v2_v2(float r[2], const float a[2])
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])
void project_v3_v3v3_normalized(float out[3], const float p[3], const float v_proj[3])
MINLINE bool is_zero_v3(const float a[3]) ATTR_WARN_UNUSED_RESULT
void project_v3_v3v3(float out[3], const float p[3], const float v_proj[3])
void project_plane_v3_v3v3(float out[3], const float p[3], const float v_plane[3])
bool is_finite_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 add_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE void cross_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE bool equals_v2v2(const float v1[2], const float v2[2]) ATTR_WARN_UNUSED_RESULT
MINLINE void negate_v3(float r[3])
MINLINE float dot_m3_v3_row_z(const float M[3][3], const float a[3]) ATTR_WARN_UNUSED_RESULT
MINLINE float cross_v2v2(const float a[2], const float b[2]) ATTR_WARN_UNUSED_RESULT
MINLINE void zero_v4(float r[4])
MINLINE float normalize_v3_v3(float r[3], const float a[3])
MINLINE void sub_v2_v2v2(float r[2], const float a[2], const float b[2])
MINLINE float line_point_side_v2(const float l1[2], const float l2[2], const float pt[2]) ATTR_WARN_UNUSED_RESULT
MINLINE void zero_v2(float r[2])
bool is_finite_v4(const float a[4]) 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 void cross_v3_v3v3_db(double r[3], const double a[3], const double b[3])
MINLINE float dot_v2v2(const float a[2], const float b[2]) ATTR_WARN_UNUSED_RESULT
MINLINE bool equals_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
void ortho_basis_v3v3_v3(float r_n1[3], float r_n2[3], const float n[3])
MINLINE void copy_v3_fl(float r[3], float f)
MINLINE void madd_v3_v3v3fl(float r[3], const float a[3], const float b[3], float f)
MINLINE float len_v2v2(const float a[2], const float b[2]) ATTR_WARN_UNUSED_RESULT
MINLINE float len_v2(const float a[2]) ATTR_WARN_UNUSED_RESULT
MINLINE void zero_v3(float r[3])
MINLINE void mul_v3_v3fl(float r[3], const float a[3], float f)
MINLINE void mul_v2_v2fl(float r[2], const float a[2], float f)
float angle_normalized_v3v3(const float v1[3], const float v2[3]) ATTR_WARN_UNUSED_RESULT
MINLINE float dot_m4_v3_row_x(const float M[4][4], const float a[3]) ATTR_WARN_UNUSED_RESULT
MINLINE void add_v3_v3(float r[3], const float a[3])
MINLINE void copy_v4_fl(float r[4], float f)
MINLINE float dot_m4_v3_row_y(const float M[4][4], const float a[3]) ATTR_WARN_UNUSED_RESULT
void rotate_normalized_v3_v3v3fl(float out[3], const float p[3], const float axis[3], const float angle)
MINLINE double cross_v2v2_db(const double a[2], const double b[2]) ATTR_WARN_UNUSED_RESULT
MINLINE float len_v3(const float a[3]) ATTR_WARN_UNUSED_RESULT
MINLINE void sub_v2_v2v2_db(double r[2], const double a[2], const double b[2])
Strict compiler flags for areas of code we want to ensure don't do conversions without us knowing abo...
#define IN_RANGE(a, b, c)
#define IN_RANGE_INCL(a, b, c)
int rect_width(int rect[2][2])
int rect_height(int rect[2][2])
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 y1
_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 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 vn
_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 x2
_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 right
_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 top
_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
_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 bottom
Read Guarded memory(de)allocation.
Group RGB to Bright Vector Camera CLAMP
ATTR_WARN_UNUSED_RESULT const BMVert * v2
ATTR_WARN_UNUSED_RESULT const BMVert const BMEdge * e
ATTR_WARN_UNUSED_RESULT const BMVert * v
static btDbvtVolume bounds(btDbvtNode **leaves, int count)
btScalar determinant() const
Return the determinant of the matrix.
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
SIMD_FORCE_INLINE btScalar length(const btQuaternion &q)
Return the length of a quaternion.
SIMD_FORCE_INLINE btScalar angle(const btVector3 &v) const
Return the angle between this and another vector.
SIMD_FORCE_INLINE btVector3 rotate(const btVector3 &wAxis, const btScalar angle) const
Return a rotated version of this vector.
bool closest(btVector3 &v)
IconTextureDrawCall normal
void(* MEM_freeN)(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
void map_to_sphere(float *r_u, float *r_v, const float x, const float y, const float z)
bool isect_point_poly_v2_int(const int pt[2], const int verts[][2], const unsigned int nr, const bool UNUSED(use_holes))
int isect_seg_seg_v2(const float v1[2], const float v2[2], const float v3[2], const float v4[2])
static void ff_normalize(float n[3])
float dist_signed_squared_to_plane3_v3(const float pt[3], const float plane[3])
void plane_from_point_normal_v3(float r_plane[4], const float plane_co[3], const float plane_no[3])
bool isect_ray_ray_v3(const float ray_origin_a[3], const float ray_direction_a[3], const float ray_origin_b[3], const float ray_direction_b[3], float *r_lambda_a, float *r_lambda_b)
float closest_to_ray_v3(float r_close[3], const float p[3], const float ray_orig[3], const float ray_dir[3])
void isect_ray_tri_watertight_v3_precalc(struct IsectRayPrecalc *isect_precalc, const float ray_direction[3])
void window_translate_m4(float winmat[4][4], float perspmat[4][4], const float x, const float y)
float dist_squared_to_line_v3(const float p[3], const float l1[3], const float l2[3])
float dist_squared_to_line_segment_v3(const float p[3], const float l1[3], const float l2[3])
float area_squared_poly_v2(const float verts[][2], unsigned int nr)
float dist_squared_to_projected_aabb(struct DistProjectedAABBPrecalc *data, const float bbmin[3], const float bbmax[3], bool r_axis_closest[3])
float normal_quad_v3(float n[3], const float v1[3], const float v2[3], const float v3[3], const float v4[3])
int isect_line_line_v3(const float v1[3], const float v2[3], const float v3[3], const float v4[3], float r_i1[3], float r_i2[3])
float line_point_factor_v2_ex(const float p[2], const float l1[2], const float l2[2], const float epsilon, const float fallback)
void orthographic_m4(float matrix[4][4], const float left, const float right, const float bottom, const float top, const float nearClip, const float farClip)
static bool getLowestRoot(const float a, const float b, const float c, const float maxR, float *root)
bool isect_ray_line_v3(const float ray_origin[3], const float ray_direction[3], const float v0[3], const float v1[3], float *r_lambda)
int barycentric_inside_triangle_v2(const float w[3])
int is_quad_flip_v3(const float v1[3], const float v2[3], const float v3[3], const float v4[3])
static double mean_value_half_tan_v2_db(const struct Double2_Len *d_curr, const struct Double2_Len *d_next)
void transform_point_by_seg_v3(float p_dst[3], const float p_src[3], const float l_dst_p1[3], const float l_dst_p2[3], const float l_src_p1[3], const float l_src_p2[3])
bool isect_sweeping_sphere_tri_v3(const float p1[3], const float p2[3], const float radius, const float v0[3], const float v1[3], const float v2[3], float *r_lambda, float ipoint[3])
bool isect_ray_tri_v3(const float ray_origin[3], const float ray_direction[3], const float v0[3], const float v1[3], const float v2[3], float *r_lambda, float r_uv[2])
float area_poly_v3(const float verts[][3], unsigned int nr)
void barycentric_weights_v2(const float v1[2], const float v2[2], const float v3[2], const float co[2], float w[3])
void accumulate_vertex_normals_tri_v3(float n1[3], float n2[3], float n3[3], const float f_no[3], const float co1[3], const float co2[3], const float co3[3])
float ray_point_factor_v3(const float p[3], const float ray_origin[3], const float ray_direction[3])
float dist_to_plane_v3(const float pt[3], const float plane[4])
void barycentric_weights_v2_clamped(const float v1[2], const float v2[2], const float v3[2], const float co[2], float w[3])
void isect_seg_seg_v3(const float a0[3], const float a1[3], const float b0[3], const float b1[3], float r_a[3], float r_b[3])
float form_factor_quad(const float p[3], const float n[3], const float q0[3], const float q1[3], const float q2[3], const float q3[3])
double closest_to_line_v2_db(double r_close[2], const double p[2], const double l1[2], const double l2[2])
bool isect_line_segment_tri_epsilon_v3(const float p1[3], const float p2[3], const float v0[3], const float v1[3], const float v2[3], float *r_lambda, float r_uv[2], const float epsilon)
void cross_tri_v3(float n[3], const float v1[3], const float v2[3], const float v3[3])
bool point_in_slice_seg(float p[3], float l1[3], float l2[3])
bool isect_tri_tri_v2(const float t_a0[2], const float t_a1[2], const float t_a2[2], const float t_b0[2], const float t_b1[2], const float t_b2[2])
void transform_point_by_tri_v3(float pt_tar[3], float const pt_src[3], const float tri_tar_p1[3], const float tri_tar_p2[3], const float tri_tar_p3[3], const float tri_src_p1[3], const float tri_src_p2[3], const float tri_src_p3[3])
void projmat_dimensions_db(const float projmat_fl[4][4], double *r_left, double *r_right, double *r_bottom, double *r_top, double *r_near, double *r_far)
void polarview_m4(float mat[4][4], float dist, float azimuth, float incidence, float twist)
int isect_seg_seg_v2_lambda_mu_db(const double v1[2], const double v2[2], const double v3[2], const double v4[2], double *r_lambda, double *r_mu)
void interp_weights_quad_v3(float w[4], const float v1[3], const float v2[3], const float v3[3], const float v4[3], const float co[3])
float area_tri_signed_v3(const float v1[3], const float v2[3], const float v3[3], const float normal[3])
float volume_tri_tetrahedron_signed_v3_6x(const float v1[3], const float v2[3], const float v3[3])
void closest_to_plane3_normalized_v3(float r_close[3], const float plane[3], const float pt[3])
bool isect_seg_seg_v2_simple(const float v1[2], const float v2[2], const float v3[2], const float v4[2])
float dist_to_plane3_v3(const float pt[3], const float plane[3])
#define DIR_V3_SET(d_len, va, vb)
void closest_to_plane_normalized_v3(float r_close[3], const float plane[4], const float pt[3])
int isect_point_tri_v2_int(const int x1, const int y1, const int x2, const int y2, const int a, const int b)
bool isect_point_tri_v3(const float p[3], const float v1[3], const float v2[3], const float v3[3], float r_isect_co[3])
void interp_weights_tri_v3(float w[3], const float v1[3], const float v2[3], const float v3[3], const float co[3])
void resolve_tri_uv_v2(float r_uv[2], const float st[2], const float st0[2], const float st1[2], const float st2[2])
float line_point_factor_v3_ex(const float p[3], const float l1[3], const float l2[3], const float epsilon, const float fallback)
float dist_signed_to_plane_v3(const float pt[3], const float plane[4])
bool isect_ray_aabb_v3(const struct IsectRayAABB_Precalc *data, const float bb_min[3], const float bb_max[3], float *tmin_out)
bool isect_ray_aabb_v3_simple(const float orig[3], const float dir[3], const float bb_min[3], const float bb_max[3], float *tmin, float *tmax)
float dist_to_line_segment_v3(const float p[3], const float l1[3], const float l2[3])
static float mean_value_half_tan_v3(const struct Float3_Len *d_curr, const struct Float3_Len *d_next)
bool isect_aabb_aabb_v3(const float min1[3], const float max1[3], const float min2[3], const float max2[3])
float area_squared_poly_v3(const float verts[][3], unsigned int nr)
void vcloud_estimate_transform_v3(const int list_size, const float(*pos)[3], const float *weight, const float(*rpos)[3], const float *rweight, float lloc[3], float rloc[3], float lrot[3][3], float lscale[3][3])
static void i_multmatrix(const float icand[4][4], float mat[4][4])
void dist_squared_ray_to_aabb_v3_precalc(struct DistRayAABB_Precalc *neasrest_precalc, const float ray_origin[3], const float ray_direction[3])
void projmat_from_subregion(const float projmat[4][4], const int win_size[2], const int x_min, const int x_max, const int y_min, const int y_max, float r_projmat[4][4])
bool isect_point_poly_v2(const float pt[2], const float verts[][2], const unsigned int nr, const bool UNUSED(use_holes))
float volume_tri_tetrahedron_signed_v3(const float v1[3], const float v2[3], const float v3[3])
float dist_signed_to_plane3_v3(const float pt[3], const float plane[3])
void cross_poly_v3(float n[3], const float verts[][3], unsigned int nr)
bool isect_line_plane_v3(float r_isect_co[3], const float l1[3], const float l2[3], const float plane_co[3], const float plane_no[3])
bool isect_ray_seg_v2(const float ray_origin[2], const float ray_direction[2], const float v0[2], const float v1[2], float *r_lambda, float *r_u)
void closest_to_line_segment_v2(float r_close[2], const float p[2], const float l1[2], const float l2[2])
float dist_squared_to_projected_aabb_simple(const float projmat[4][4], const float winsize[2], const float mval[2], const float bbmin[3], const float bbmax[3])
void accumulate_vertex_normals_poly_v3(float **vertnos, const float polyno[3], const float **vertcos, float vdiffs[][3], const int nverts)
void tangent_from_uv_v3(const float uv1[2], const float uv2[2], const float uv3[3], const float co1[3], const float co2[3], const float co3[3], const float n[3], float r_tang[3])
int isect_point_quad_v2(const float pt[2], const float v1[2], const float v2[2], const float v3[2], const float v4[2])
float dist_squared_ray_to_aabb_v3_simple(const float ray_origin[3], const float ray_direction[3], const float bb_min[3], const float bb_max[3], float r_point[3], float *r_depth)
static bool point_in_slice(const float p[3], const float v1[3], const float l1[3], const float l2[3])
bool is_quad_flip_v3_first_third_fast(const float v1[3], const float v2[3], const float v3[3], const float v4[3])
#define DIR_V2_SET(d_len, va, vb)
#define MEAN_VALUE_HALF_TAN_V2(_area, i1, i2)
float form_factor_hemi_poly(float p[3], float n[3], float v1[3], float v2[3], float v3[3], float v4[3])
bool clip_segment_v3_plane(const float p1[3], const float p2[3], const float plane[4], float r_p1[3], float r_p2[3])
void closest_to_plane3_v3(float r_close[3], const float plane[3], const float pt[3])
bool isect_plane_plane_plane_v3(const float plane_a[4], const float plane_b[4], const float plane_c[4], float r_isect_co[3])
void interp_weights_poly_v2(float *w, float v[][2], const int n, const float co[2])
void resolve_quad_uv_v2(float r_uv[2], const float st[2], const float st0[2], const float st1[2], const float st2[2], const float st3[2])
void projmat_dimensions(const float projmat[4][4], float *r_left, float *r_right, float *r_bottom, float *r_top, float *r_near, float *r_far)
float line_point_factor_v2(const float p[2], const float l1[2], const float l2[2])
bool isect_ray_tri_watertight_v3_simple(const float ray_origin[3], const float ray_direction[3], const float v0[3], const float v1[3], const float v2[3], float *r_lambda, float r_uv[2])
void closest_on_tri_to_point_v3(float r[3], const float p[3], const float v1[3], const float v2[3], const float v3[3])
static void vec_add_dir(float r[3], const float v1[3], const float v2[3], const float fac)
void perspective_m4(float mat[4][4], const float left, const float right, const float bottom, const float top, const float nearClip, const float farClip)
static bool isect_tri_tri_v2_impl_vert(const float t_a0[2], const float t_a1[2], const float t_a2[2], const float t_b0[2], const float t_b1[2], const float t_b2[2])
void lookat_m4(float mat[4][4], float vx, float vy, float vz, float px, float py, float pz, float twist)
void axis_dominant_v3_to_m3_negate(float r_mat[3][3], const float normal[3])
static bool barycentric_weights(const float v1[3], const float v2[3], const float v3[3], const float co[3], const float n[3], float w[3])
void accumulate_vertex_normals_v3(float n1[3], float n2[3], float n3[3], float n4[3], const float f_no[3], const float co1[3], const float co2[3], const float co3[3], const float co4[3])
bool isect_tri_tri_v3(const float t_a0[3], const float t_a1[3], const float t_a2[3], const float t_b0[3], const float t_b1[3], const float t_b2[3], float r_i1[3], float r_i2[3])
float line_plane_factor_v3(const float plane_co[3], const float plane_no[3], const float l1[3], const float l2[3])
static int isect_tri_tri_impl_ccw_v2(const float t_a0[2], const float t_a1[2], const float t_a2[2], const float t_b0[2], const float t_b1[2], const float t_b2[2])
void dist_squared_to_projected_aabb_precalc(struct DistProjectedAABBPrecalc *precalc, const float projmat[4][4], const float winsize[2], const float mval[2])
void aabb_get_near_far_from_plane(const float plane_no[3], const float bbmin[3], const float bbmax[3], float bb_near[3], float bb_afar[3])
float dist_squared_to_plane_v3(const float pt[3], const float plane[4])
void resolve_tri_uv_v3(float r_uv[2], const float st[3], const float st0[3], const float st1[3], const float st2[3])
void isect_ray_aabb_v3_precalc(struct IsectRayAABB_Precalc *data, const float ray_origin[3], const float ray_direction[3])
bool isect_plane_plane_v3(const float plane_a[4], const float plane_b[4], float r_isect_co[3], float r_isect_no[3])
float area_tri_v3(const float v1[3], const float v2[3], const float v3[3])
bool isect_point_tri_v2_cw(const float pt[2], const float v1[2], const float v2[2], const float v3[2])
float area_poly_signed_v2(const float verts[][2], unsigned int nr)
bool isect_ray_tri_watertight_v3(const float ray_origin[3], const struct IsectRayPrecalc *isect_precalc, const float v0[3], const float v1[3], const float v2[3], float *r_lambda, float r_uv[2])
int isect_line_sphere_v3(const float l1[3], const float l2[3], const float sp[3], const float r, float r_p1[3], float r_p2[3])
bool is_quad_convex_v3(const float v1[3], const float v2[3], const float v3[3], const float v4[3])
bool is_edge_convex_v3(const float v1[3], const float v2[3], const float f1_no[3], const float f2_no[3])
float resolve_quad_u_v2(const float st[2], const float st0[2], const float st1[2], const float st2[2], const float st3[2])
float dist_signed_squared_to_plane_v3(const float pt[3], const float plane[4])
void axis_dominant_v3_to_m3(float r_mat[3][3], const float normal[3])
Normal to x,y matrix.
void interp_barycentric_tri_v3(float data[3][3], float u, float v, float res[3])
float volume_tetrahedron_signed_v3(const float v1[3], const float v2[3], const float v3[3], const float v4[3])
void perspective_m4_fov(float mat[4][4], const float angle_left, const float angle_right, const float angle_up, const float angle_down, const float nearClip, const float farClip)
static bool point_in_slice_as(const float p[3], const float origin[3], const float normal[3])
bool isect_line_line_strict_v3(const float v1[3], const float v2[3], const float v3[3], const float v4[3], float vi[3], float *r_lambda)
void interp_cubic_v3(float x[3], float v[3], const float x1[3], const float v1[3], const float x2[3], const float v2[3], const float t)
static bool isect_tri_tri_v2_impl_edge(const float t_a0[2], const float t_a1[2], const float t_a2[2], const float t_b0[2], const float t_b1[2], const float t_b2[2])
float area_squared_tri_v3(const float v1[3], const float v2[3], const float v3[3])
bool isect_tri_tri_v3_ex(const float tri_a[3][3], const float tri_b[3][3], float r_i1[3], float r_i2[3], int *r_tri_a_edge_isect_count)
float dist_squared_ray_to_seg_v3(const float ray_origin[3], const float ray_direction[3], const float v0[3], const float v1[3], float r_point[3], float *r_depth)
float dist_squared_ray_to_aabb_v3(const struct DistRayAABB_Precalc *data, const float bb_min[3], const float bb_max[3], float r_point[3], float *r_depth)
void barycentric_weights_v2_quad(const float v1[2], const float v2[2], const float v3[2], const float v4[2], const float co[2], float w[4])
int isect_line_sphere_v2(const float l1[2], const float l2[2], const float sp[2], const float r, float r_p1[2], float r_p2[2])
float geodesic_distance_propagate_across_triangle(const float v0[3], const float v1[3], const float v2[3], const float dist1, const float dist2)
int box_clip_bounds_m4(float boundbox[2][3], const float bounds[4], float winmat[4][4])
bool isect_planes_v3_fn(const float planes[][4], const int planes_len, const float eps_coplanar, const float eps_isect, void(*callback_fn)(const float co[3], int i, int j, int k, void *user_data), void *user_data)
float cubic_tangent_factor_circle_v3(const float tan_l[3], const float tan_r[3])
float line_point_factor_v3(const float p[3], const float l1[3], const float l2[3])
float dist_squared_to_ray_v3_normalized(const float ray_origin[3], const float ray_direction[3], const float co[3])
float area_squared_quad_v3(const float v1[3], const float v2[3], const float v3[3], const float v4[3])
void limit_dist_v3(float v1[3], float v2[3], const float dist)
bool barycentric_coords_v2(const float v1[2], const float v2[2], const float v3[2], const float co[2], float w[3])
int isect_line_line_v2_point(const float v0[2], const float v1[2], const float v2[2], const float v3[2], float r_vi[2])
void closest_to_plane_v3(float r_close[3], const float plane[4], const float pt[3])
void plane_to_point_vector_v3(const float plane[4], float r_plane_co[3], float r_plane_no[3])
int isect_seg_seg_v2_point_ex(const float v0[2], const float v1[2], const float v2[2], const float v3[2], const float endpoint_bias, float r_vi[2])
float cross_poly_v2(const float verts[][2], unsigned int nr)
float closest_to_line_v2(float r_close[2], const float p[2], const float l1[2], const float l2[2])
float dist_to_line_segment_v2(const float p[2], const float l1[2], const float l2[2])
#define CROSS_SIGN(dir_a, dir_b)
void map_to_tube(float *r_u, float *r_v, const float x, const float y, const float z)
float closest_to_line_v3(float r_close[3], const float p[3], const float l1[3], const float l2[3])
void map_to_plane_v2_v3v3(float r_co[2], const float co[3], const float no[3])
void planes_from_projmat(const float mat[4][4], float left[4], float right[4], float top[4], float bottom[4], float near[4], float far[4])
bool is_quad_convex_v2(const float v1[2], const float v2[2], const float v3[2], const float v4[2])
float cotangent_tri_weight_v3(const float v1[3], const float v2[3], const float v3[3])
void resolve_quad_uv_v2_deriv(float r_uv[2], float r_deriv[2][2], const float st[2], const float st0[2], const float st1[2], const float st2[2], const float st3[2])
bool isect_ray_ray_epsilon_v3(const float ray_origin_a[3], const float ray_direction_a[3], const float ray_origin_b[3], const float ray_direction_b[3], const float epsilon, float *r_lambda_a, float *r_lambda_b)
void barycentric_weights_v2_persp(const float v1[4], const float v2[4], const float v3[4], const float co[2], float w[3])
void closest_to_line_segment_v3(float r_close[3], const float p[3], const float l1[3], const float l2[3])
float dist_to_line_v3(const float p[3], const float l1[3], const float l2[3])
float ray_point_factor_v3_ex(const float p[3], const float ray_origin[3], const float ray_direction[3], const float epsilon, const float fallback)
static float tri_signed_area(const float v1[3], const float v2[3], const float v3[3], const int i, const int j)
int interp_sparse_array(float *array, const int list_size, const float skipval)
bool isect_ray_tri_epsilon_v3(const float ray_origin[3], const float ray_direction[3], const float v0[3], const float v1[3], const float v2[3], float *r_lambda, float r_uv[2], const float epsilon)
float dist_squared_to_line_v2(const float p[2], const float l1[2], const float l2[2])
int isect_line_line_epsilon_v3(const float v1[3], const float v2[3], const float v3[3], const float v4[3], float r_i1[3], float r_i2[3], const float epsilon)
bool form_factor_visible_quad(const float p[3], const float n[3], const float v0[3], const float v1[3], const float v2[3], float q0[3], float q1[3], float q2[3], float q3[3])
int isect_seg_seg_v2_int(const int v1[2], const int v2[2], const int v3[2], const int v4[2])
float normal_poly_v3(float n[3], const float verts[][3], unsigned int nr)
int isect_point_tri_v2(const float pt[2], const float v1[2], const float v2[2], const float v3[2])
bool is_poly_convex_v2(const float verts[][2], unsigned int nr)
int isect_seg_seg_v2_point(const float v0[2], const float v1[2], const float v2[2], const float v3[2], float r_vi[2])
float normal_tri_v3(float n[3], const float v1[3], const float v2[3], const float v3[3])
bool isect_axial_line_segment_tri_v3(const int axis, const float p1[3], const float p2[3], const float v0[3], const float v1[3], const float v2[3], float *r_lambda)
bool isect_line_segment_tri_v3(const float p1[3], const float p2[3], const float v0[3], const float v1[3], const float v2[3], float *r_lambda, float r_uv[2])
float area_quad_v3(const float v1[3], const float v2[3], const float v3[3], const float v4[3])
float area_poly_v2(const float verts[][2], unsigned int nr)
bool clip_segment_v3_plane_n(const float p1[3], const float p2[3], const float plane_array[][4], const int plane_tot, float r_p1[3], float r_p2[3])
void interp_weights_poly_v3(float *w, float v[][3], const int n, const float co[3])
float dist_to_line_v2(const float p[2], const float l1[2], const float l2[2])
void plane_to_point_vector_v3_normalized(const float plane[4], float r_plane_co[3], float r_plane_no[3])
int isect_aabb_planes_v3(const float(*planes)[4], const int totplane, const float bbmin[3], const float bbmax[3])
float dist_squared_to_plane3_v3(const float pt[3], const float plane[3])
void interp_bilinear_quad_v3(float data[4][3], float u, float v, float res[3])
bool isect_point_planes_v3_negated(const float(*planes)[4], const int totplane, const float p[3])
bool isect_point_tri_prism_v3(const float p[3], const float v1[3], const float v2[3], const float v3[3])
void map_to_plane_axis_angle_v2_v3v3fl(float r_co[2], const float co[3], const float axis[3], const float angle)
bool isect_ray_plane_v3(const float ray_origin[3], const float ray_direction[3], const float plane[4], float *r_lambda, const bool clip)
float volume_tetrahedron_v3(const float v1[3], const float v2[3], const float v3[3], const float v4[3])
float dist_squared_to_line_segment_v2(const float p[2], const float l1[2], const float l2[2])
void box_minmax_bounds_m4(float min[3], float max[3], float boundbox[2][3], float mat[4][4])
bool isect_point_planes_v3(float(*planes)[4], int totplane, const float p[3])
float dist_signed_squared_to_corner_v3v3v3(const float p[3], const float v1[3], const float v2[3], const float v3[3], const float axis_ref[3])
static void area(int d1, int d2, int e1, int e2, float weights[2])
__forceinline avxf cross(const avxf &a, const avxf &b)
ccl_device_inline float xor_signmask(float x, int y)
ccl_device_inline float dot(const float2 &a, const float2 &b)
ccl_device_inline float2 fabs(const float2 &a)