54 static float I[3][3] = {{1, 0, 0}, {0, 1, 0}, {0, 0, 1}};
58 return value > 0.0f ? (int)value : ((
int)value) - 1;
63 return value -
floorf(value);
68 return res[0] * res[1] * res[2];
86 #define HAIR_GRID_INDEX_AXIS(vec, res, gmin, scale, axis) \
87 (min_ii(max_ii((int)((vec[axis] - gmin[axis]) * scale), 0), res[axis] - 2))
98 return i + (j + k * res[1]) * res[0];
102 const int res[3],
const float gmin[3],
float scale,
const float vec[3],
float uvw[3])
109 offset = i + (j + k * res[1]) * res[0];
111 uvw[0] = (vec[0] - gmin[0]) * scale - (
float)i;
112 uvw[1] = (vec[1] - gmin[1]) * scale - (
float)j;
113 uvw[2] = (vec[2] - gmin[2]) * scale - (
float)k;
130 float density_gradient[3],
131 float velocity_gradient[3][3])
134 float uvw[3], muvw[3];
135 int res2 = res[1] * res[0];
139 muvw[0] = 1.0f - uvw[0];
140 muvw[1] = 1.0f - uvw[1];
141 muvw[2] = 1.0f - uvw[2];
143 data[0] = grid[offset];
144 data[1] = grid[offset + 1];
145 data[2] = grid[offset + res[0]];
146 data[3] = grid[offset + res[0] + 1];
147 data[4] = grid[offset + res2];
148 data[5] = grid[offset + res2 + 1];
149 data[6] = grid[offset + res2 + res[0]];
150 data[7] = grid[offset + res2 + res[0] + 1];
153 *density = muvw[2] * (muvw[1] * (muvw[0] *
data[0].density + uvw[0] *
data[1].density) +
154 uvw[1] * (muvw[0] *
data[2].density + uvw[0] *
data[3].density)) +
155 uvw[2] * (muvw[1] * (muvw[0] *
data[4].density + uvw[0] *
data[5].density) +
156 uvw[1] * (muvw[0] *
data[6].density + uvw[0] *
data[7].density));
161 for (k = 0; k < 3; k++) {
162 velocity[k] = muvw[2] *
163 (muvw[1] * (muvw[0] *
data[0].velocity[k] + uvw[0] *
data[1].velocity[k]) +
164 uvw[1] * (muvw[0] *
data[2].velocity[k] + uvw[0] *
data[3].velocity[k])) +
166 (muvw[1] * (muvw[0] *
data[4].velocity[k] + uvw[0] *
data[5].velocity[k]) +
167 uvw[1] * (muvw[0] *
data[6].velocity[k] + uvw[0] *
data[7].velocity[k]));
173 for (k = 0; k < 3; k++) {
174 vel_smooth[k] = muvw[2] * (muvw[1] * (muvw[0] *
data[0].velocity_smooth[k] +
175 uvw[0] *
data[1].velocity_smooth[k]) +
176 uvw[1] * (muvw[0] *
data[2].velocity_smooth[k] +
177 uvw[0] *
data[3].velocity_smooth[k])) +
178 uvw[2] * (muvw[1] * (muvw[0] *
data[4].velocity_smooth[k] +
179 uvw[0] *
data[5].velocity_smooth[k]) +
180 uvw[1] * (muvw[0] *
data[6].velocity_smooth[k] +
181 uvw[0] *
data[7].velocity_smooth[k]));
185 if (density_gradient) {
186 density_gradient[0] = muvw[1] * muvw[2] * (
data[0].density -
data[1].density) +
187 uvw[1] * muvw[2] * (
data[2].density -
data[3].density) +
188 muvw[1] * uvw[2] * (
data[4].density -
data[5].density) +
189 uvw[1] * uvw[2] * (
data[6].density -
data[7].density);
191 density_gradient[1] = muvw[2] * muvw[0] * (
data[0].density -
data[2].density) +
192 uvw[2] * muvw[0] * (
data[4].density -
data[6].density) +
193 muvw[2] * uvw[0] * (
data[1].density -
data[3].density) +
194 uvw[2] * uvw[0] * (
data[5].density -
data[7].density);
196 density_gradient[2] = muvw[2] * muvw[0] * (
data[0].density -
data[4].density) +
197 uvw[2] * muvw[0] * (
data[1].density -
data[5].density) +
198 muvw[2] * uvw[0] * (
data[2].density -
data[6].density) +
199 uvw[2] * uvw[0] * (
data[3].density -
data[7].density);
202 if (velocity_gradient) {
218 float gdensity, gvelocity[3], ggrad[3], gvelgrad[3][3], gradlen;
236 if (gradlen > 0.0f) {
251 float velocity_smooth[3],
252 float density_gradient[3],
253 float velocity_gradient[3][3])
268 HairGrid *grid,
const float x[3],
const float v[3],
float fluid_factor,
float r_v[3])
270 float gdensity, gvelocity[3], gvel_smooth[3], ggrad[3], gvelgrad[3][3];
271 float v_pic[3], v_flip[3];
298 for (i = 0; i <
size; i++) {
308 return !(vec[0] < gmin[0] || vec[1] < gmin[1] || vec[2] < gmin[2] || vec[0] > gmax[0] ||
309 vec[1] > gmax[1] || vec[2] > gmax[2]);
320 float totweight = 0.0f;
322 for (i = 0; i < 8; i++) {
323 totweight += weights[i];
330 const int res[3],
const float gmin[3],
float scale,
const float vec[3],
float weights[8])
338 offset = i + (j + k * res[1]) * res[0];
340 uvw[0] = (vec[0] - gmin[0]) * scale;
341 uvw[1] = (vec[1] - gmin[1]) * scale;
342 uvw[2] = (vec[2] - gmin[2]) * scale;
345 weights[1] =
dist_tent_v3f3(uvw, (
float)(i + 1), (
float)j, (
float)k);
346 weights[2] =
dist_tent_v3f3(uvw, (
float)i, (
float)(j + 1), (
float)k);
347 weights[3] =
dist_tent_v3f3(uvw, (
float)(i + 1), (
float)(j + 1), (
float)k);
348 weights[4] =
dist_tent_v3f3(uvw, (
float)i, (
float)j, (
float)(k + 1));
349 weights[5] =
dist_tent_v3f3(uvw, (
float)(i + 1), (
float)j, (
float)(k + 1));
350 weights[6] =
dist_tent_v3f3(uvw, (
float)i, (
float)(j + 1), (
float)(k + 1));
351 weights[7] =
dist_tent_v3f3(uvw, (
float)(i + 1), (
float)(j + 1), (
float)(k + 1));
367 const int res[3] = {grid->
res[0], grid->
res[1], grid->
res[2]};
378 for (di = 0; di < 2; di++) {
379 for (dj = 0; dj < 2; dj++) {
380 for (dk = 0; dk < 2; dk++) {
381 int voffset = offset + di + (dj + dk * res[1]) * res[0];
382 int iw = di + dj * 2 + dk * 4;
401 float closest[3], lambda, dist, weight;
406 weight = (radius - dist) * dist_scale;
421 const float b =
fabsf(
v[1]);
423 return a > b ? (
a >
c ? 0 : 2) : (b >
c ? 1 : 2);
427 const float UNUSED(x1[3]),
433 const float UNUSED(x4[3]),
434 const float UNUSED(v4[3]),
435 const float UNUSED(dir1[3]),
437 const float UNUSED(dir3[3]),
452 const float radius = 1.5f;
464 float loc_j[3] = {loc[0], loc[1], loc[2]};
465 loc_j[axis_j] += (
float)jmin;
466 for (j = jmin; j <= jmax; j++, vert_j += stride_j, loc_j[axis_j] += 1.0f) {
469 float loc_k[3] = {loc_j[0], loc_j[1], loc_j[2]};
470 loc_k[axis_k] += (
float)kmin;
471 for (k = kmin; k <= kmax; k++, vert_k += stride_k, loc_k[axis_k] += 1.0f) {
473 hair_volume_eval_grid_vertex(vert_k, loc_k, radius, dist_scale,
x2,
v2, x3, v3);
477 float wloc[3], x2w[3], x3w[3];
482 if (vert_k->samples > 0) {
486 if (grid->debug_value) {
519 const int res[3] = {grid->
res[0], grid->
res[1], grid->
res[2]};
522 const int axis0 = major_axis_v3(dir2);
523 const int axis1 = (axis0 + 1) % 3;
524 const int axis2 = (axis0 + 2) % 3;
527 const int strides[3] = {1, res[0], res[0] * res[1]};
528 const int stride0 = strides[axis0];
529 const int stride1 = strides[axis1];
530 const int stride2 = strides[axis2];
535 const float inc1 = dir2[axis1] / dir2[axis0];
536 const float inc2 = dir2[axis2] / dir2[axis0];
539 const float *start =
x2[axis0] < x3[axis0] ?
x2 : x3;
540 const float *end =
x2[axis0] < x3[axis0] ? x3 :
x2;
541 const float start0 = start[axis0], start1 = start[axis1], start2 = start[axis2];
542 const float end0 = end[axis0];
551 int j0, k0, j0_prev, k0_prev;
554 for (i = imin; i <= imax; i++) {
555 float shift1, shift2;
556 int jmin, jmax, kmin, kmax;
558 h =
CLAMPIS((
float)i, start0, end0);
560 shift1 = start1 + (h - start0) * inc1;
561 shift2 = start2 + (h - start0) * inc2;
570 jmin =
min_ii(j0, j0_prev);
571 jmax =
max_ii(j0, j0_prev);
572 kmin =
min_ii(k0, k0_prev);
573 kmax =
max_ii(k0, k0_prev);
580 vert0 = grid->
verts + i * stride0;
581 loc0[axis0] = (
float)i;
585 hair_volume_add_segment_2D(grid,
624 weight = (radius - dist) * dist_scale;
637 const float UNUSED(x1[3]),
643 const float UNUSED(x4[3]),
644 const float UNUSED(v4[3]),
645 const float UNUSED(dir1[3]),
646 const float UNUSED(dir2[3]),
647 const float UNUSED(dir3[3]))
649 const float radius = 1.5f;
652 const int res[3] = {grid->
res[0], grid->
res[1], grid->
res[2]};
653 const int stride[3] = {1, res[0], res[0] * res[1]};
654 const int num_samples = 10;
658 for (s = 0; s < num_samples; s++) {
662 float f = (
float)s / (
float)(num_samples - 1);
673 for (k = kmin; k <= kmax; k++) {
674 for (j = jmin; j <= jmax; j++) {
675 for (i = imin; i <= imax; i++) {
676 float loc[3] = {(
float)i, (
float)j, (
float)k};
691 for (i = 0; i <
size; i++) {
693 if (density > 0.0f) {
707 float target_density,
711 return strength *
logf(target_density / density);
719 float target_density,
720 float target_strength)
722 const float flowfac = grid->
cellsize;
723 const float inv_flowfac = 1.0f / grid->
cellsize;
726 const int res[3] = {grid->
res[0], grid->
res[1], grid->
res[2]};
727 const int resA[3] = {grid->
res[0] + 2, grid->
res[1] + 2, grid->
res[2] + 2};
729 const int stride0 = 1;
730 const int stride1 = grid->
res[0];
731 const int stride2 = grid->
res[1] * grid->
res[0];
732 const int strideA0 = 1;
733 const int strideA1 = grid->
res[0] + 2;
734 const int strideA2 = (grid->
res[1] + 2) * (grid->
res[0] + 2);
736 const int num_cells = res[0] * res[1] * res[2];
737 const int num_cellsA = (res[0] + 2) * (res[1] + 2) * (res[2] + 2);
743 #define MARGIN_i0 (i < 1)
744 #define MARGIN_j0 (j < 1)
745 #define MARGIN_k0 (k < 1)
746 #define MARGIN_i1 (i >= resA[0] - 1)
747 #define MARGIN_j1 (j >= resA[1] - 1)
748 #define MARGIN_k1 (k >= resA[2] - 1)
750 #define NEIGHBOR_MARGIN_i0 (i < 2)
751 #define NEIGHBOR_MARGIN_j0 (j < 2)
752 #define NEIGHBOR_MARGIN_k0 (k < 2)
753 #define NEIGHBOR_MARGIN_i1 (i >= resA[0] - 2)
754 #define NEIGHBOR_MARGIN_j1 (j >= resA[1] - 2)
755 #define NEIGHBOR_MARGIN_k1 (k >= resA[2] - 2)
761 for (k = 0; k < resA[2]; k++) {
762 for (j = 0; j < resA[1]; j++) {
763 for (i = 0; i < resA[0]; i++) {
764 int u = i * strideA0 + j * strideA1 + k * strideA2;
773 vert = vert_start + i * stride0 + j * stride1 + k * stride2;
776 float dx = 0.0f, dy = 0.0f, dz = 0.0f;
778 dx += v0[0] - (vert - stride0)->velocity[0];
781 dx += (vert + stride0)->velocity[0] - v0[0];
784 dy += v0[1] - (vert - stride1)->velocity[1];
787 dy += (vert + stride1)->velocity[1] - v0[1];
790 dz += v0[2] - (vert - stride2)->velocity[2];
793 dz += (vert + stride2)->velocity[2] - v0[2];
796 float divergence = -0.5f * flowfac * (dx + dy + dz);
800 vert->
density, target_density, target_strength);
807 B[u] = divergence - target;
811 float wloc[3], loc[3];
812 float col0[3] = {0.0, 0.0, 0.0};
813 float colp[3] = {0.0, 1.0, 1.0};
814 float coln[3] = {1.0, 0.0, 1.0};
818 loc[0] = (
float)(i - 1);
819 loc[1] = (
float)(j - 1);
820 loc[2] = (
float)(k - 1);
823 if (divergence > 0.0f) {
824 fac =
CLAMPIS(divergence * target_strength, 0.0, 1.0);
828 fac =
CLAMPIS(-divergence * target_strength, 0.0, 1.0);
833 grid->debug_data, wloc, 0.01f,
col[0],
col[1],
col[2],
"grid", 5522, i, j, k);
853 A.reserve(Eigen::VectorXi::Constant(num_cellsA, 7));
855 for (k = 0; k < resA[2]; k++) {
856 for (j = 0; j < resA[1]; j++) {
857 for (i = 0; i < resA[0]; i++) {
858 int u = i * strideA0 + j * strideA1 + k * strideA2;
862 vert = vert_start + i * stride0 + j * stride1 + k * stride2;
864 int neighbors_lo = 0;
865 int neighbors_hi = 0;
866 int non_solid_neighbors = 0;
867 int neighbor_lo_index[3];
868 int neighbor_hi_index[3];
876 neighbor_lo_index[neighbors_lo++] = u - strideA2;
879 neighbor_lo_index[neighbors_lo++] = u - strideA1;
882 neighbor_lo_index[neighbors_lo++] = u - strideA0;
885 neighbor_hi_index[neighbors_hi++] = u + strideA0;
888 neighbor_hi_index[neighbors_hi++] = u + strideA1;
891 neighbor_hi_index[neighbors_hi++] = u + strideA2;
895 non_solid_neighbors = 6;
897 for (n = 0; n < neighbors_lo; n++) {
898 A.insert(neighbor_lo_index[n], u) = -1.0f;
900 A.insert(u, u) = (
float)non_solid_neighbors;
901 for (n = 0; n < neighbors_hi; n++) {
902 A.insert(neighbor_hi_index[n], u) = -1.0f;
906 A.insert(u, u) = 1.0f;
913 cg.setMaxIterations(100);
914 cg.setTolerance(0.01f);
920 if (cg.info() == Eigen::Success) {
922 for (k = 0; k < resA[2]; k++) {
923 for (j = 0; j < resA[1]; j++) {
924 for (i = 0; i < resA[0]; i++) {
925 int u = i * strideA0 + j * strideA1 + k * strideA2;
932 vert = vert_start + i * stride0 + j * stride1 + k * stride2;
934 float p_left = p[u - strideA0];
935 float p_right = p[u + strideA0];
936 float p_down = p[u - strideA1];
937 float p_up = p[u + strideA1];
938 float p_bottom = p[u - strideA2];
939 float p_top = p[u + strideA2];
943 dvel[0] = p_right - p_left;
944 dvel[1] = p_up - p_down;
945 dvel[2] = p_top - p_bottom;
963 int slice = (offset - grid->
gmin[axis]) / grid->
cellsize;
965 for (k = 0; k < resA[2]; k++) {
966 for (j = 0; j < resA[1]; j++) {
967 for (i = 0; i < resA[0]; i++) {
968 int u = i * strideA0 + j * strideA1 + k * strideA2;
975 vert = vert_start + i * stride0 + j * stride1 + k * stride2;
977 float wloc[3], loc[3];
978 float col0[3] = {0.0, 0.0, 0.0};
979 float colp[3] = {0.0, 1.0, 1.0};
980 float coln[3] = {1.0, 0.0, 1.0};
984 loc[0] = (
float)(i - 1);
985 loc[1] = (
float)(j - 1);
986 loc[2] = (
float)(k - 1);
989 float pressure = p[u];
990 if (pressure > 0.0f) {
991 fac =
CLAMPIS(pressure * grid->debug1, 0.0, 1.0);
995 fac =
CLAMPIS(-pressure * grid->debug1, 0.0, 1.0);
1000 grid->debug_data, wloc, 0.01f,
col[0],
col[1],
col[2],
"grid", 5533, i, j, k);
1013 float col0[3] = {0.3, 0.3, 0.3};
1014 float colp[3] = {0.0, 0.0, 1.0};
1034 for (i = 0, vert = grid->
verts; i < num_cells; i++, vert++) {
1046 BLI_INLINE void hair_volume_filter_box_convolute(
1047 HairVertexGrid *grid,
float invD,
const int kernel_size[3],
int i,
int j,
int k)
1049 int res = grid->res;
1051 int minp =
max_ii(i - kernel_size[0], 0), maxp =
min_ii(i + kernel_size[0], res - 1);
1052 int minq =
max_ii(j - kernel_size[1], 0), maxq =
min_ii(j + kernel_size[1], res - 1);
1053 int minr =
max_ii(k - kernel_size[2], 0), maxr =
min_ii(k + kernel_size[2], res - 1);
1054 int offset, kernel_offset, kernel_dq, kernel_dr;
1058 offset = i + (j + k * res) * res;
1059 verts = grid->verts;
1060 vel_smooth =
verts[offset].velocity_smooth;
1062 kernel_offset = minp + (minq + minr * res) * res;
1064 kernel_dr = res * res;
1065 for (
r = minr;
r <= maxr;
r++) {
1066 for (q = minq; q <= maxq; q++) {
1067 for (p = minp; p <= maxp; p++) {
1073 kernel_offset += kernel_dq;
1075 kernel_offset += kernel_dr;
1079 void SIM_hair_volume_vertex_grid_filter_box(HairVertexGrid *grid,
int kernel_size)
1082 int kernel_sizev[3] = {kernel_size, kernel_size, kernel_size};
1087 if (kernel_size <= 0) {
1091 tot = kernel_size * 2 + 1;
1092 invD = 1.0f / (
float)(tot * tot * tot);
1095 for (i = 0; i <
size; i++) {
1096 zero_v3(grid->verts[i].velocity_smooth);
1099 for (i = 0; i < grid->res; i++) {
1100 for (j = 0; j < grid->res; j++) {
1101 for (k = 0; k < grid->res; k++) {
1102 hair_volume_filter_box_convolute(grid, invD, kernel_sizev, i, j, k);
1108 for (i = 0; i <
size; i++) {
1109 copy_v3_v3(grid->verts[i].velocity, grid->verts[i].velocity_smooth);
1115 const float gmin[3],
1116 const float gmax[3])
1120 int resmin[3], resmax[3], res[3];
1121 float gmin_margin[3], gmax_margin[3];
1127 if (cellsize <= 0.0f) {
1130 scale = 1.0f / cellsize;
1133 for (i = 0; i < 3; i++) {
1135 resmax[i] =
floor_int(gmax[i] * scale) + 1;
1141 res[i] = resmax[i] - resmin[i] + 1;
1145 resmax[i] = resmin[i] + 4;
1153 gmin_margin[i] = (
float)resmin[i] * cellsize;
1154 gmax_margin[i] = (
float)resmax[i] * cellsize;
1159 grid->
res[0] = res[0];
1160 grid->
res[1] = res[1];
1161 grid->
res[2] = res[2];
1182 HairGrid *grid,
float *cellsize,
int res[3],
float gmin[3],
float gmax[3])
1201 unsigned int numverts)
1203 int res = hair_grid_res;
1208 float gmin[3], gmax[3], scale[3];
1214 hair_volume_get_boundbox(lX, numverts, gmin, gmax);
1215 hair_grid_get_scale(res, gmin, gmax, scale);
1220 for (i = 0; i <
size; i++) {
1221 zero_v3(collgrid[i].velocity);
1227 if (colliders && collfac > 0.0f) {
1235 for (
v = 0;
v <
col->collmd->numverts;
v++, loc0++, loc1++) {
1246 for (di = 0; di < 2; di++) {
1247 for (dj = 0; dj < 2; dj++) {
1248 for (dk = 0; dk < 2; dk++) {
1249 int voffset = offset + di + (dj + dk * res) * res;
1250 int iw = di + dj * 2 + dk * 4;
1252 collgrid[voffset].
density += weights[iw];
1253 madd_v3_v3fl(collgrid[voffset].velocity, vel, weights[iw]);
1263 for (i = 0; i <
size; i++) {
1264 float density = collgrid[i].
density;
1265 if (density > 0.0f) {
1266 mul_v3_fl(collgrid[i].velocity, 1.0f / density);
typedef float(TangentPoint)[2]
void BKE_collider_cache_free(struct ListBase **colliders)
struct ListBase * BKE_collider_cache_create(struct Depsgraph *depsgraph, struct Object *self, struct Collection *collection)
#define BKE_sim_debug_data_add_dot(p, r, g, b, category,...)
#define BKE_sim_debug_data_add_line(p1, p2, r, g, b, category,...)
#define BKE_sim_debug_data_add_circle(p, radius, r, g, b, category,...)
MINLINE int min_ii(int a, int b)
MINLINE int max_ii(int a, int b)
float closest_to_line_v3(float r_close[3], const float p[3], const float l1[3], const float l2[3])
void sub_m3_m3m3(float R[3][3], const float A[3][3], const float B[3][3])
void mul_m3_fl(float R[3][3], float f)
void zero_m3(float m[3][3])
void interp_v3_v3v3(float r[3], const float a[3], const float b[3], const float t)
MINLINE float len_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
MINLINE void madd_v3_v3fl(float r[3], const float a[3], float f)
MINLINE float normalize_v3(float r[3])
MINLINE void sub_v3_v3(float r[3], const float a[3])
MINLINE void sub_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE void mul_v3_fl(float r[3], float f)
MINLINE void copy_v3_v3(float r[3], const float a[3])
MINLINE void copy_v3_v3_int(int r[3], const int a[3])
MINLINE void add_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE void zero_v3(float r[3])
MINLINE void mul_v3_v3fl(float r[3], const float a[3], float f)
MINLINE void add_v3_v3(float r[3], const float a[3])
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble z
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble y2 _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat y2 _GL_VOID_RET _GL_VOID GLint GLint GLint y2 _GL_VOID_RET _GL_VOID GLshort GLshort GLshort y2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLuint *buffer _GL_VOID_RET _GL_VOID GLdouble t _GL_VOID_RET _GL_VOID GLfloat t _GL_VOID_RET _GL_VOID GLint t _GL_VOID_RET _GL_VOID GLshort t _GL_VOID_RET _GL_VOID GLdouble GLdouble r _GL_VOID_RET _GL_VOID GLfloat GLfloat r _GL_VOID_RET _GL_VOID GLint GLint r _GL_VOID_RET _GL_VOID GLshort GLshort r _GL_VOID_RET _GL_VOID GLdouble GLdouble r
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint 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 y
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei stride
_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
Read Guarded memory(de)allocation.
ATTR_WARN_UNUSED_RESULT const BMVert * v2
ATTR_WARN_UNUSED_RESULT const BMVert * v
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
bool closest(btVector3 &v)
const Depsgraph * depsgraph
Eigen::ConjugateGradient< lMatrix, Eigen::Lower, Eigen::DiagonalPreconditioner< Scalar > > ConjugateGradient
Eigen::SparseMatrix< Scalar > lMatrix
BLI_INLINE int hair_grid_interp_weights(const int res[3], const float gmin[3], float scale, const float vec[3], float uvw[3])
#define NEIGHBOR_MARGIN_j0
#define HAIR_GRID_INDEX_AXIS(vec, res, gmin, scale, axis)
#define NEIGHBOR_MARGIN_k0
void SIM_hair_volume_grid_velocity(HairGrid *grid, const float x[3], const float v[3], float fluid_factor, float r_v[3])
void SIM_hair_volume_grid_interpolate(HairGrid *grid, const float x[3], float *density, float velocity[3], float velocity_smooth[3], float density_gradient[3], float velocity_gradient[3][3])
BLI_INLINE int floor_int(float value)
#define NEIGHBOR_MARGIN_i1
#define NEIGHBOR_MARGIN_i0
BLI_INLINE int hair_grid_size(const int res[3])
static const float density_threshold
BLI_INLINE float dist_tent_v3f3(const float a[3], float x, float y, float z)
#define NEIGHBOR_MARGIN_j1
void SIM_hair_volume_grid_clear(HairGrid *grid)
#define NEIGHBOR_MARGIN_k1
BLI_INLINE void grid_to_world(HairGrid *grid, float vecw[3], const float vec[3])
BLI_INLINE int hair_grid_weights(const int res[3], const float gmin[3], float scale, const float vec[3], float weights[8])
BLI_INLINE void hair_volume_eval_grid_vertex_sample(HairGridVert *vert, const float loc[3], float radius, float dist_scale, const float x[3], const float v[3])
BLI_INLINE float weights_sum(const float weights[8])
BLI_INLINE float floor_mod(float value)
BLI_INLINE bool hair_grid_point_valid(const float vec[3], const float gmin[3], const float gmax[3])
void SIM_hair_volume_grid_geometry(HairGrid *grid, float *cellsize, int res[3], float gmin[3], float gmax[3])
void SIM_hair_volume_free_vertex_grid(HairGrid *grid)
BLI_INLINE float hair_volume_density_divergence(float density, float target_density, float strength)
bool SIM_hair_volume_solve_divergence(HairGrid *grid, float, float target_density, float target_strength)
BLI_INLINE int hair_grid_offset(const float vec[3], const int res[3], const float gmin[3], float scale)
void SIM_hair_volume_add_vertex(HairGrid *grid, const float x[3], const float v[3])
BLI_INLINE void hair_grid_interpolate(const HairGridVert *grid, const int res[3], const float gmin[3], float scale, const float vec[3], float *density, float velocity[3], float vel_smooth[3], float density_gradient[3], float velocity_gradient[3][3])
void SIM_hair_volume_normalize_vertex_grid(HairGrid *grid)
void SIM_hair_volume_add_segment(HairGrid *grid, const float UNUSED(x1[3]), const float UNUSED(v1[3]), const float x2[3], const float v2[3], const float x3[3], const float v3[3], const float UNUSED(x4[3]), const float UNUSED(v4[3]), const float UNUSED(dir1[3]), const float UNUSED(dir2[3]), const float UNUSED(dir3[3]))
HairGrid * SIM_hair_volume_create_vertex_grid(float cellsize, const float gmin[3], const float gmax[3])
void SIM_hair_volume_vertex_grid_forces(HairGrid *grid, const float x[3], const float v[3], float smoothfac, float pressurefac, float minpressure, float f[3], float dfdx[3][3], float dfdv[3][3])
#define MAX_HAIR_GRID_RES
void(* MEM_freeN)(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
void *(* MEM_mallocN)(size_t len, const char *str)
struct ClothSimSettings * sim_parms