38 static float I[3][3] = {{1, 0, 0}, {0, 1, 0}, {0, 0, 1}};
42 return value > 0.0f ? (int)value : ((
int)value) - 1;
47 return value -
floorf(value);
52 return res[0] * res[1] * res[2];
70 #define HAIR_GRID_INDEX_AXIS(vec, res, gmin, scale, axis) \
71 (min_ii(max_ii((int)((vec[axis] - gmin[axis]) * scale), 0), res[axis] - 2))
82 return i + (j + k * res[1]) * res[0];
86 const int res[3],
const float gmin[3],
float scale,
const float vec[3],
float uvw[3])
93 offset = i + (j + k * res[1]) * res[0];
95 uvw[0] = (vec[0] - gmin[0]) * scale - (
float)i;
96 uvw[1] = (vec[1] - gmin[1]) * scale - (
float)j;
97 uvw[2] = (vec[2] - gmin[2]) * scale - (
float)k;
100 BLI_assert(0.0f <= uvw[0] && uvw[0] <= 1.0001f);
101 BLI_assert(0.0f <= uvw[1] && uvw[1] <= 1.0001f);
102 BLI_assert(0.0f <= uvw[2] && uvw[2] <= 1.0001f);
116 float density_gradient[3],
117 float velocity_gradient[3][3])
120 float uvw[3], muvw[3];
121 int res2 = res[1] * res[0];
125 muvw[0] = 1.0f - uvw[0];
126 muvw[1] = 1.0f - uvw[1];
127 muvw[2] = 1.0f - uvw[2];
139 *
density = muvw[2] * (muvw[1] * (muvw[0] *
data[0].density + uvw[0] *
data[1].density) +
142 uvw[1] * (muvw[0] *
data[6].density + uvw[0] *
data[7].density));
147 for (k = 0; k < 3; k++) {
148 velocity[k] = muvw[2] *
149 (muvw[1] * (muvw[0] *
data[0].velocity[k] + uvw[0] *
data[1].velocity[k]) +
150 uvw[1] * (muvw[0] *
data[2].velocity[k] + uvw[0] *
data[3].velocity[k])) +
152 (muvw[1] * (muvw[0] *
data[4].velocity[k] + uvw[0] *
data[5].velocity[k]) +
153 uvw[1] * (muvw[0] *
data[6].velocity[k] + uvw[0] *
data[7].velocity[k]));
159 for (k = 0; k < 3; k++) {
160 vel_smooth[k] = muvw[2] * (muvw[1] * (muvw[0] *
data[0].velocity_smooth[k] +
161 uvw[0] *
data[1].velocity_smooth[k]) +
162 uvw[1] * (muvw[0] *
data[2].velocity_smooth[k] +
163 uvw[0] *
data[3].velocity_smooth[k])) +
164 uvw[2] * (muvw[1] * (muvw[0] *
data[4].velocity_smooth[k] +
165 uvw[0] *
data[5].velocity_smooth[k]) +
166 uvw[1] * (muvw[0] *
data[6].velocity_smooth[k] +
167 uvw[0] *
data[7].velocity_smooth[k]));
171 if (density_gradient) {
172 density_gradient[0] = muvw[1] * muvw[2] * (
data[0].density -
data[1].density) +
174 muvw[1] * uvw[2] * (
data[4].density -
data[5].density) +
177 density_gradient[1] = muvw[2] * muvw[0] * (
data[0].density -
data[2].density) +
179 muvw[2] * uvw[0] * (
data[1].density -
data[3].density) +
182 density_gradient[2] = muvw[2] * muvw[0] * (
data[0].density -
data[4].density) +
184 muvw[2] * uvw[0] * (
data[2].density -
data[6].density) +
188 if (velocity_gradient) {
204 float gdensity, gvelocity[3], ggrad[3], gvelgrad[3][3], gradlen;
222 if (gradlen > 0.0f) {
237 float velocity_smooth[3],
238 float density_gradient[3],
239 float velocity_gradient[3][3])
254 HairGrid *grid,
const float x[3],
const float v[3],
float fluid_factor,
float r_v[3])
256 float gdensity, gvelocity[3], gvel_smooth[3], ggrad[3], gvelgrad[3][3];
257 float v_pic[3], v_flip[3];
284 for (i = 0; i <
size; i++) {
294 return !(vec[0] < gmin[0] || vec[1] < gmin[1] || vec[2] < gmin[2] || vec[0] > gmax[0] ||
295 vec[1] > gmax[1] || vec[2] > gmax[2]);
306 float totweight = 0.0f;
308 for (i = 0; i < 8; i++) {
309 totweight += weights[i];
316 const int res[3],
const float gmin[3],
float scale,
const float vec[3],
float weights[8])
324 offset = i + (j + k * res[1]) * res[0];
326 uvw[0] = (vec[0] - gmin[0]) * scale;
327 uvw[1] = (vec[1] - gmin[1]) * scale;
328 uvw[2] = (vec[2] - gmin[2]) * scale;
331 weights[1] =
dist_tent_v3f3(uvw, (
float)(i + 1), (
float)j, (
float)k);
332 weights[2] =
dist_tent_v3f3(uvw, (
float)i, (
float)(j + 1), (
float)k);
333 weights[3] =
dist_tent_v3f3(uvw, (
float)(i + 1), (
float)(j + 1), (
float)k);
334 weights[4] =
dist_tent_v3f3(uvw, (
float)i, (
float)j, (
float)(k + 1));
335 weights[5] =
dist_tent_v3f3(uvw, (
float)(i + 1), (
float)j, (
float)(k + 1));
336 weights[6] =
dist_tent_v3f3(uvw, (
float)i, (
float)(j + 1), (
float)(k + 1));
337 weights[7] =
dist_tent_v3f3(uvw, (
float)(i + 1), (
float)(j + 1), (
float)(k + 1));
353 const int res[3] = {grid->
res[0], grid->
res[1], grid->
res[2]};
364 for (di = 0; di < 2; di++) {
365 for (dj = 0; dj < 2; dj++) {
366 for (dk = 0; dk < 2; dk++) {
367 int voffset =
offset + di + (dj + dk * res[1]) * res[0];
368 int iw = di + dj * 2 + dk * 4;
387 float closest[3], lambda, dist, weight;
392 weight = (radius - dist) * dist_scale;
409 return a >
b ? (
a >
c ? 0 : 2) : (
b >
c ? 1 : 2);
413 const float UNUSED(x1[3]),
419 const float UNUSED(x4[3]),
420 const float UNUSED(v4[3]),
421 const float UNUSED(dir1[3]),
423 const float UNUSED(dir3[3]),
438 const float radius = 1.5f;
450 float loc_j[3] = {loc[0], loc[1], loc[2]};
451 loc_j[axis_j] += (
float)jmin;
452 for (j = jmin; j <= jmax; j++, vert_j += stride_j, loc_j[axis_j] += 1.0f) {
455 float loc_k[3] = {loc_j[0], loc_j[1], loc_j[2]};
456 loc_k[axis_k] += (
float)kmin;
457 for (k = kmin; k <= kmax; k++, vert_k += stride_k, loc_k[axis_k] += 1.0f) {
459 hair_volume_eval_grid_vertex(vert_k, loc_k, radius, dist_scale,
x2,
v2, x3, v3);
463 float wloc[3], x2w[3], x3w[3];
468 if (vert_k->samples > 0) {
472 if (grid->debug_value) {
479 x2w,
len_v3v3(wloc, x2w), 0.2, 0.7, 0.2,
"grid", 255, i, j, k);
506 const int res[3] = {grid->
res[0], grid->
res[1], grid->
res[2]};
509 const int axis0 = major_axis_v3(dir2);
510 const int axis1 = (axis0 + 1) % 3;
511 const int axis2 = (axis0 + 2) % 3;
514 const int strides[3] = {1, res[0], res[0] * res[1]};
515 const int stride0 = strides[axis0];
516 const int stride1 = strides[axis1];
517 const int stride2 = strides[axis2];
522 const float inc1 = dir2[axis1] / dir2[axis0];
523 const float inc2 = dir2[axis2] / dir2[axis0];
526 const float *start =
x2[axis0] < x3[axis0] ?
x2 : x3;
527 const float *end =
x2[axis0] < x3[axis0] ? x3 :
x2;
528 const float start0 = start[axis0], start1 = start[axis1], start2 = start[axis2];
529 const float end0 = end[axis0];
538 int j0, k0, j0_prev, k0_prev;
541 for (i = imin; i <= imax; i++) {
542 float shift1, shift2;
543 int jmin, jmax, kmin, kmax;
545 h =
CLAMPIS((
float)i, start0, end0);
547 shift1 = start1 + (h - start0) * inc1;
548 shift2 = start2 + (h - start0) * inc2;
557 jmin =
min_ii(j0, j0_prev);
558 jmax =
max_ii(j0, j0_prev);
559 kmin =
min_ii(k0, k0_prev);
560 kmax =
max_ii(k0, k0_prev);
567 vert0 = grid->
verts + i * stride0;
568 loc0[axis0] = (
float)i;
572 hair_volume_add_segment_2D(grid,
611 weight = (radius - dist) * dist_scale;
621 const float UNUSED(x1[3]),
627 const float UNUSED(x4[3]),
628 const float UNUSED(v4[3]),
629 const float UNUSED(dir1[3]),
630 const float UNUSED(dir2[3]),
631 const float UNUSED(dir3[3]))
636 const float radius = 1.5f;
639 const int res[3] = {grid->
res[0], grid->
res[1], grid->
res[2]};
640 const int stride[3] = {1, res[0], res[0] * res[1]};
660 for (k = kmin; k <= kmax; k++) {
661 for (j = jmin; j <= jmax; j++) {
662 for (i = imin; i <= imax; i++) {
663 float loc[3] = {(
float)i, (
float)j, (
float)k};
678 for (i = 0; i <
size; i++) {
694 float target_density,
706 float target_density,
707 float target_strength)
709 const float flowfac = grid->
cellsize;
710 const float inv_flowfac = 1.0f / grid->
cellsize;
713 const int res[3] = {grid->
res[0], grid->
res[1], grid->
res[2]};
714 const int resA[3] = {grid->
res[0] + 2, grid->
res[1] + 2, grid->
res[2] + 2};
716 const int stride0 = 1;
717 const int stride1 = grid->
res[0];
718 const int stride2 = grid->
res[1] * grid->
res[0];
719 const int strideA0 = 1;
720 const int strideA1 = grid->
res[0] + 2;
721 const int strideA2 = (grid->
res[1] + 2) * (grid->
res[0] + 2);
723 const int num_cells = res[0] * res[1] * res[2];
724 const int num_cellsA = (res[0] + 2) * (res[1] + 2) * (res[2] + 2);
730 #define MARGIN_i0 (i < 1)
731 #define MARGIN_j0 (j < 1)
732 #define MARGIN_k0 (k < 1)
733 #define MARGIN_i1 (i >= resA[0] - 1)
734 #define MARGIN_j1 (j >= resA[1] - 1)
735 #define MARGIN_k1 (k >= resA[2] - 1)
737 #define NEIGHBOR_MARGIN_i0 (i < 2)
738 #define NEIGHBOR_MARGIN_j0 (j < 2)
739 #define NEIGHBOR_MARGIN_k0 (k < 2)
740 #define NEIGHBOR_MARGIN_i1 (i >= resA[0] - 2)
741 #define NEIGHBOR_MARGIN_j1 (j >= resA[1] - 2)
742 #define NEIGHBOR_MARGIN_k1 (k >= resA[2] - 2)
748 for (k = 0; k < resA[2]; k++) {
749 for (j = 0; j < resA[1]; j++) {
750 for (i = 0; i < resA[0]; i++) {
751 int u = i * strideA0 + j * strideA1 + k * strideA2;
760 vert = vert_start + i * stride0 + j * stride1 + k * stride2;
763 float dx = 0.0f, dy = 0.0f, dz = 0.0f;
765 dx += v0[0] - (vert - stride0)->velocity[0];
768 dx += (vert + stride0)->velocity[0] - v0[0];
771 dy += v0[1] - (vert - stride1)->velocity[1];
774 dy += (vert + stride1)->velocity[1] - v0[1];
777 dz += v0[2] - (vert - stride2)->velocity[2];
780 dz += (vert + stride2)->velocity[2] - v0[2];
783 float divergence = -0.5f * flowfac * (dx + dy + dz);
787 vert->
density, target_density, target_strength);
794 B[u] = divergence - target;
798 float wloc[3], loc[3];
799 float col0[3] = {0.0, 0.0, 0.0};
800 float colp[3] = {0.0, 1.0, 1.0};
801 float coln[3] = {1.0, 0.0, 1.0};
805 loc[0] = (
float)(i - 1);
806 loc[1] = (
float)(j - 1);
807 loc[2] = (
float)(k - 1);
810 if (divergence > 0.0f) {
811 fac =
CLAMPIS(divergence * target_strength, 0.0, 1.0);
815 fac =
CLAMPIS(-divergence * target_strength, 0.0, 1.0);
820 grid->debug_data, wloc, 0.01f,
col[0],
col[1],
col[2],
"grid", 5522, i, j, k);
840 A.reserve(Eigen::VectorXi::Constant(num_cellsA, 7));
842 for (k = 0; k < resA[2]; k++) {
843 for (j = 0; j < resA[1]; j++) {
844 for (i = 0; i < resA[0]; i++) {
845 int u = i * strideA0 + j * strideA1 + k * strideA2;
849 vert = vert_start + i * stride0 + j * stride1 + k * stride2;
851 int neighbors_lo = 0;
852 int neighbors_hi = 0;
853 int non_solid_neighbors = 0;
854 int neighbor_lo_index[3];
855 int neighbor_hi_index[3];
863 neighbor_lo_index[neighbors_lo++] = u - strideA2;
866 neighbor_lo_index[neighbors_lo++] = u - strideA1;
869 neighbor_lo_index[neighbors_lo++] = u - strideA0;
872 neighbor_hi_index[neighbors_hi++] = u + strideA0;
875 neighbor_hi_index[neighbors_hi++] = u + strideA1;
878 neighbor_hi_index[neighbors_hi++] = u + strideA2;
882 non_solid_neighbors = 6;
884 for (n = 0; n < neighbors_lo; n++) {
885 A.insert(neighbor_lo_index[n], u) = -1.0f;
887 A.insert(u, u) = (
float)non_solid_neighbors;
888 for (n = 0; n < neighbors_hi; n++) {
889 A.insert(neighbor_hi_index[n], u) = -1.0f;
893 A.insert(u, u) = 1.0f;
900 cg.setMaxIterations(100);
901 cg.setTolerance(0.01f);
907 if (cg.info() == Eigen::Success) {
909 for (k = 0; k < resA[2]; k++) {
910 for (j = 0; j < resA[1]; j++) {
911 for (i = 0; i < resA[0]; i++) {
912 int u = i * strideA0 + j * strideA1 + k * strideA2;
919 vert = vert_start + i * stride0 + j * stride1 + k * stride2;
921 float p_left = p[u - strideA0];
922 float p_right = p[u + strideA0];
923 float p_down = p[u - strideA1];
924 float p_up = p[u + strideA1];
925 float p_bottom = p[u - strideA2];
926 float p_top = p[u + strideA2];
930 dvel[0] = p_right - p_left;
931 dvel[1] = p_up - p_down;
932 dvel[2] = p_top - p_bottom;
952 for (k = 0; k < resA[2]; k++) {
953 for (j = 0; j < resA[1]; j++) {
954 for (i = 0; i < resA[0]; i++) {
955 int u = i * strideA0 + j * strideA1 + k * strideA2;
962 vert = vert_start + i * stride0 + j * stride1 + k * stride2;
964 float wloc[3], loc[3];
965 float col0[3] = {0.0, 0.0, 0.0};
966 float colp[3] = {0.0, 1.0, 1.0};
967 float coln[3] = {1.0, 0.0, 1.0};
971 loc[0] = (
float)(i - 1);
972 loc[1] = (
float)(j - 1);
973 loc[2] = (
float)(k - 1);
976 float pressure = p[u];
977 if (pressure > 0.0f) {
978 fac =
CLAMPIS(pressure * grid->debug1, 0.0, 1.0);
982 fac =
CLAMPIS(-pressure * grid->debug1, 0.0, 1.0);
987 grid->debug_data, wloc, 0.01f,
col[0],
col[1],
col[2],
"grid", 5533, i, j, k);
995 grid->debug_data, wloc, dvel, 1, 1, 1,
"grid", 5566, i, j, k);
1001 float col0[3] = {0.3, 0.3, 0.3};
1002 float colp[3] = {0.0, 0.0, 1.0};
1009 grid->debug_data, wloc,
col[0],
col[1],
col[2],
"grid", 5544, i, j, k);
1023 for (i = 0, vert = grid->
verts; i < num_cells; i++, vert++) {
1035 BLI_INLINE void hair_volume_filter_box_convolute(
1036 HairVertexGrid *grid,
float invD,
const int kernel_size[3],
int i,
int j,
int k)
1038 int res = grid->res;
1040 int minp =
max_ii(i - kernel_size[0], 0), maxp =
min_ii(i + kernel_size[0], res - 1);
1041 int minq =
max_ii(j - kernel_size[1], 0), maxq =
min_ii(j + kernel_size[1], res - 1);
1042 int minr =
max_ii(k - kernel_size[2], 0), maxr =
min_ii(k + kernel_size[2], res - 1);
1043 int offset, kernel_offset, kernel_dq, kernel_dr;
1047 offset = i + (j + k * res) * res;
1048 verts = grid->verts;
1051 kernel_offset = minp + (minq + minr * res) * res;
1053 kernel_dr = res * res;
1054 for (
r = minr;
r <= maxr;
r++) {
1055 for (q = minq; q <= maxq; q++) {
1056 for (p = minp; p <= maxp; p++) {
1062 kernel_offset += kernel_dq;
1064 kernel_offset += kernel_dr;
1068 void SIM_hair_volume_vertex_grid_filter_box(HairVertexGrid *grid,
int kernel_size)
1071 int kernel_sizev[3] = {kernel_size, kernel_size, kernel_size};
1076 if (kernel_size <= 0) {
1080 tot = kernel_size * 2 + 1;
1081 invD = 1.0f / (
float)(tot * tot * tot);
1084 for (i = 0; i <
size; i++) {
1085 zero_v3(grid->verts[i].velocity_smooth);
1088 for (i = 0; i < grid->res; i++) {
1089 for (j = 0; j < grid->res; j++) {
1090 for (k = 0; k < grid->res; k++) {
1091 hair_volume_filter_box_convolute(grid, invD, kernel_sizev, i, j, k);
1097 for (i = 0; i <
size; i++) {
1098 copy_v3_v3(grid->verts[i].velocity, grid->verts[i].velocity_smooth);
1104 const float gmin[3],
1105 const float gmax[3])
1109 int resmin[3], resmax[3], res[3];
1110 float gmin_margin[3], gmax_margin[3];
1116 if (cellsize <= 0.0f) {
1119 scale = 1.0f / cellsize;
1122 for (i = 0; i < 3; i++) {
1124 resmax[i] =
floor_int(gmax[i] * scale) + 1;
1130 res[i] = resmax[i] - resmin[i] + 1;
1134 resmax[i] = resmin[i] + 4;
1142 gmin_margin[i] = (
float)resmin[i] * cellsize;
1143 gmax_margin[i] = (
float)resmax[i] * cellsize;
1147 grid = MEM_cnew<HairGrid>(
"hair grid");
1148 grid->
res[0] = res[0];
1149 grid->
res[1] = res[1];
1150 grid->
res[2] = res[2];
1171 HairGrid *grid,
float *cellsize,
int res[3],
float gmin[3],
float gmax[3])
1190 unsigned int numverts)
1192 int res = hair_grid_res;
1197 float gmin[3], gmax[3], scale[3];
1203 hair_volume_get_boundbox(lX, numverts, gmin, gmax);
1204 hair_grid_get_scale(res, gmin, gmax, scale);
1209 for (i = 0; i <
size; i++) {
1210 zero_v3(collgrid[i].velocity);
1216 if (colliders && collfac > 0.0f) {
1224 for (
v = 0;
v <
col->collmd->numverts;
v++, loc0++, loc1++) {
1235 for (di = 0; di < 2; di++) {
1236 for (dj = 0; dj < 2; dj++) {
1237 for (dk = 0; dk < 2; dk++) {
1238 int voffset =
offset + di + (dj + dk * res) * res;
1239 int iw = di + dj * 2 + dk * 4;
1241 collgrid[voffset].
density += weights[iw];
1242 madd_v3_v3fl(collgrid[voffset].velocity, vel, weights[iw]);
1252 for (i = 0; i <
size; i++) {
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_vector(p, d, 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])
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])
void interp_v3_v3v3(float r[3], const float a[3], const float b[3], float t)
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 y
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble GLdouble 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 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
ccl_gpu_kernel_postfix ccl_global float int int int int float bool int offset
ccl_gpu_kernel_postfix ccl_global float int int int int ccl_global const float int int int int int int int int int int int int num_samples
void(* MEM_freeN)(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
void *(* MEM_mallocN)(size_t len, const char *str)
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
static const pxr::TfToken density("density", pxr::TfToken::Immortal)
struct ClothSimSettings * sim_parms