64 const bool use_render_params)
75 for (i = 0; i < child_num; i++) {
76 for (p = 0; p < psys->
totpart; p++, cpa++) {
99 float min[3],
max[3], delta[3], d;
110 for (i = 1; i < totvert; i++,
mv++) {
124 d = delta[axis] / (
float)res;
127 size[(axis + 1) % 3] = (
int)
ceil(delta[(axis + 1) % 3] / d);
128 size[(axis + 2) % 3] = (
int)
ceil(delta[(axis + 2) % 3] / d);
139 min[0] += d < delta[0] ? d / 2.0f : delta[0] / 2.0f;
140 min[1] += d < delta[1] ? d / 2.0f : delta[1] / 2.0f;
141 min[2] += d < delta[2] ? d / 2.0f : delta[2] / 2.0f;
143 for (i = 0, p = 0, pa = psys->
particles; i < res; i++) {
144 for (j = 0; j < res; j++) {
145 for (k = 0; k < res; k++, p++, pa++) {
165 for (i = 0,
mv = mvert; i < totvert; i++,
mv++) {
170 pa[((int)(vec[0] * (
size[0] - 1)) * res + (
int)(vec[1] * (
size[1] - 1))) * res +
171 (
int)(vec[2] * (
size[2] - 1))]
176 float co1[3], co2[3];
179 float v1[3],
v2[3], v3[3], v4[4], lambda;
180 int a, a1, a2, a0mul, a1mul, a2mul, totface;
186 for (
a = 0;
a < amax;
a++) {
203 for (a1 = 0; a1 <
size[(
a + 1) % 3]; a1++) {
204 for (a2 = 0; a2 <
size[(
a + 2) % 3]; a2++) {
207 pa = psys->
particles + a1 * a1mul + a2 * a2mul;
209 co1[
a] -= d < delta[
a] ? d / 2.0f : delta[
a] / 2.0f;
211 co2[
a] += delta[
a] + 0.001f * d;
212 co1[
a] -= 0.001f * d;
215 float ray_direction[3];
220 for (i = 0; i < totface; i++, mface++) {
228 co1, &isect_precalc,
v1,
v2, v3, &lambda,
NULL);
229 if (intersects_tri) {
230 pa1 = (pa + (int)(lambda *
size[
a]) * a0mul);
237 pa2 = (pa + (int)(lambda *
size[
a]) * a0mul);
250 if (pa2 && pa2 != pa1) {
265 for (i = 0; i <
size[0]; i++) {
266 if (in || (pa + i * a0mul)->hair_index % 2) {
271 in = (in + (pa + i * a0mul)->hair_index) % 2;
280 for (i = 0, p = 0, pa = psys->
particles; i < res; i++) {
281 for (j = 0; j < res; j++) {
282 for (k = 0; k < res; k++, p++, pa++) {
284 pa->
fuv[0] += d / 2.0f;
288 pa->
fuv[0] += d / 2.0f;
289 pa->
fuv[1] += d / 2.0f;
297 for (i = 0; i <
size[0]; i++) {
298 for (j = 0; j <
size[1]; j++) {
299 pa = psys->
particles + res * (i * res + j);
300 for (k = 0; k <
size[2]; k++, pa++) {
309 for (p = 0, pa = psys->
particles; p < psys->totpart; p++, pa++) {
333 for (
int k = 0; k < n; k++) {
336 out[2 * k + 0] = fmod((
double)k / (
double)n + ofs[0], 1.0);
337 out[2 * k + 1] = fmod(
t + ofs[1], 1.0);
345 float *jit2,
x, rad1, rad2, rad3;
353 rad2 = (
float)(1.0f / ((
float)num));
354 rad3 = (
float)
sqrtf((
float)num) / ((
float)num);
359 for (i = 0; i < num2; i += 2) {
371 jit2 =
MEM_mallocN(12 +
sizeof(
float[2]) * num,
"initjit");
373 for (i = 0; i < 4; i++) {
384 float vert[4][3], co[3];
424 int mid,
low = 0,
high = n - 1;
441 if ((
sum[mid] >= value) && (
sum[mid - 1] < value)) {
445 if (
sum[mid] > value) {
458 #define PSYS_RND_DIST_SKIP 3
461 #define ONLY_WORKING_WITH_PA_VERTS 0
481 for (
int i = 0; i < ctx->
mesh->
totface; i++, mface++) {
483 unsigned int *vert = &mface->
v1;
485 for (
int j = 0; j < 4; j++, vert++) {
486 if (*vert == pa->
num) {
497 #if ONLY_WORKING_WITH_PA_VERTS
499 KDTreeNearest_3d ptn[3];
503 ctx->
mesh,
from, pa->
num, pa->
num_dmcache, pa->
fuv, pa->
foffset, co1, 0, 0, 0, orco1, 0);
505 maxw = BLI_kdtree_3d_find_nearest_n(ctx->
tree, orco1, ptn, 3);
507 for (
w = 0;
w < maxw;
w++) {
508 pa->verts[
w] = ptn->
num;
514 if (rng_skip_tot > 0) {
524 int distr = ctx->
distr;
562 if (rng_skip_tot > 0) {
571 float *
v1, *
v2, *v3, *v4,
nor[3], co[3];
572 float cur_d, min_d, randu, randv;
573 int distr = ctx->
distr;
615 mesh, mvert,
BKE_mesh_vertex_normals_ensure(
mesh), mface, 0, 0, pa->
fuv, co,
nor, 0, 0, 0);
623 for (i = 0, mface =
mesh->
mface; i < tot; i++, mface++) {
630 v3 = mvert[mface->
v3].
co;
640 v4 = mvert[mface->
v4].
co;
667 if (rng_skip_tot > 0) {
677 float orco1[3], co1[3], nor1[3];
679 int cfrom = ctx->
cfrom;
685 if (ctx->
index[p] < 0) {
687 cpa->
fuv[0] = cpa->
fuv[1] = cpa->
fuv[2] = cpa->
fuv[3] = 0.0f;
688 cpa->
pa[0] = cpa->
pa[1] = cpa->
pa[2] = cpa->
pa[3] = 0;
703 KDTreeNearest_3d ptn[10];
705 float maxd , totw = 0.0f;
721 maxw = BLI_kdtree_3d_find_nearest_n(ctx->
tree, orco1, ptn, 3);
723 maxd = ptn[maxw - 1].dist;
727 for (
w = 0;
w < maxw;
w++) {
728 parent[
w] = ptn[
w].index;
729 pweight[
w] = (
float)
pow(2.0, (
double)(-6.0f * ptn[
w].dist / maxd));
731 for (;
w < 10;
w++) {
736 for (
w = 0, i = 0;
w < maxw && i < 4;
w++) {
737 if (parent[
w] >= 0) {
738 cpa->
pa[i] = parent[
w];
739 cpa->
w[i] = pweight[
w];
750 for (
w = 0;
w < 4;
w++) {
758 if (rng_skip_tot > 0) {
775 for (p =
task->begin; p < task->end; p++, pa++) {
780 for (p =
task->begin; p < task->end; p++, pa++) {
785 for (p =
task->begin; p < task->end; p++, pa++) {
801 for (p = 0; p <
task->begin; p++, cpa++) {
805 for (; p <
task->end; p++, cpa++) {
812 const int *orig_index = (
const int *)
user_data;
813 int index1 = orig_index[*(
const int *)p1];
814 int index2 = orig_index[*(
const int *)p2];
816 if (index1 < index2) {
819 if (index1 == index2) {
845 if (psys->
child && totchild) {
846 for (p = 0, cpa = psys->
child; p < totchild; p++, cpa++) {
847 cpa->
fuv[0] = cpa->
fuv[1] = cpa->
fuv[2] = cpa->
fuv[3] = 0.0;
850 cpa->
pa[0] = cpa->
pa[1] = cpa->
pa[2] = cpa->
pa[3] = 0;
859 pa->fuv[0] = pa->fuv[1] = pa->fuv[2] = pa->fuv[3] = 0.0;
883 int totelem = 0, totpart, *particle_element = 0, children = 0, totseam = 0;
884 int jitlevel = 1, distr;
885 float *element_weight =
NULL, *jitter_offset =
NULL, *vweight =
NULL;
886 float cur, maxweight = 0.0, tweight, totweight, inv_totweight, co[3],
nor[3], orco[3];
902 "Can't create particles with the current modifier stack, disable destructive modifiers\n");
938 if (
mesh != final_mesh) {
960 tree = BLI_kdtree_3d_new(totpart);
962 for (p = 0, pa = psys->
particles; p < totpart; p++, pa++) {
964 mesh, part->
from, pa->
num, pa->
num_dmcache, pa->
fuv, pa->
foffset, co,
nor, 0, 0, orco);
966 BLI_kdtree_3d_insert(
tree, p, orco);
969 BLI_kdtree_3d_balance(
tree);
996 tree = BLI_kdtree_3d_new(totvert);
998 for (p = 0; p < totvert; p++) {
1006 BLI_kdtree_3d_insert(
tree, p, co);
1009 BLI_kdtree_3d_balance(
tree);
1020 fprintf(stderr,
"Particle distribution error: Nothing to emit from!\n");
1023 if (
mesh != final_mesh) {
1027 BLI_kdtree_3d_free(
tree);
1033 element_weight =
MEM_callocN(
sizeof(
float) * totelem,
"particle_distribution_weights");
1034 particle_element =
MEM_callocN(
sizeof(
int) * totpart,
"particle_distribution_indexes");
1035 jitter_offset =
MEM_callocN(
sizeof(
float) * totelem,
"particle_distribution_jitoff");
1040 float totarea = 0.0f, co1[3], co2[3], co3[3], co4[3];
1041 const float(*orcodata)[3];
1045 for (i = 0; i < totelem; i++) {
1076 if (cur > maxweight) {
1080 element_weight[i] = cur;
1084 for (i = 0; i < totelem; i++) {
1085 element_weight[i] /= totarea;
1088 maxweight /= totarea;
1092 for (i = 0; i < totelem; i++) {
1093 element_weight[i] =
min;
1103 for (i = 0; i < totelem; i++) {
1104 element_weight[i] *= vweight[i];
1108 for (i = 0; i < totelem; i++) {
1110 tweight = vweight[mf->
v1] + vweight[mf->
v2] + vweight[mf->
v3];
1113 tweight += vweight[mf->
v4];
1120 element_weight[i] *= tweight;
1129 for (i = 0; i < totelem; i++) {
1130 if (element_weight[i] > 0.0f) {
1132 totweight += element_weight[i];
1136 if (totmapped == 0) {
1138 if (
mesh != final_mesh) {
1141 BLI_kdtree_3d_free(
tree);
1149 inv_totweight = 1.0f / totweight;
1157 float *element_sum =
MEM_mallocN(
sizeof(*element_sum) * totmapped, __func__);
1158 int *element_map =
MEM_mallocN(
sizeof(*element_map) * totmapped, __func__);
1161 for (i = 0; i < totelem && element_weight[i] == 0.0f; i++) {
1164 element_sum[i_mapped] = element_weight[i] * inv_totweight;
1165 element_map[i_mapped] = i;
1167 for (i++; i < totelem; i++) {
1168 if (element_weight[i] > 0.0f) {
1169 element_sum[i_mapped] = element_sum[i_mapped - 1] + element_weight[i] * inv_totweight;
1171 if (element_sum[i_mapped] > element_sum[i_mapped - 1]) {
1172 element_map[i_mapped] = i;
1177 totmapped = i_mapped;
1181 for (p = 0; p < totpart; p++) {
1186 particle_element[p] = element_map[eidx];
1189 jitter_offset[particle_element[p]] =
pos;
1195 step = (totpart < 2) ? 0.5 : 1.0 / (
double)totpart;
1203 pos = (totpart < totmapped) ? 0.5 / (
double)totmapped :
1206 for (i = 0, p = 0; p < totpart; p++,
pos += step) {
1207 for (; (i < totmapped - 1) && (
pos > (
double)element_sum[i]); i++) {
1211 particle_element[p] = element_map[i];
1213 jitter_offset[particle_element[p]] =
pos;
1223 const int *orig_index =
NULL;
1241 (
void *)orig_index);
1249 if (jitlevel == 0) {
1250 jitlevel = totpart / totelem;
1264 if (jitlevel < 25) {
1271 jit,
sizeof(
float[2]), jitlevel, psys->
seed);
1279 ctx->
index = particle_element;
1282 ctx->
jitoff = jitter_offset;
1283 ctx->
weight = element_weight;
1313 int i, totpart, numtasks;
1324 for (i = 0; i < numtasks; i++) {
1341 if (ctx.
mesh != final_mesh) {
1355 fprintf(stderr,
"Shape emission not yet possible!\n");
1361 int distr_error = 0;
1364 if (psmd->mesh_final) {
1378 fprintf(stderr,
"Particle distribution error!\n");
typedef float(TangentPoint)[2]
CustomData interface, see also DNA_customdata_types.h.
void * CustomData_get_layer(const struct CustomData *data, int type)
struct ID * BKE_id_copy_ex(struct Main *bmain, const struct ID *id, struct ID **r_newid, int flag)
void BKE_id_free(struct Main *bmain, void *idv)
void BKE_mesh_orco_ensure(struct Object *ob, struct Mesh *mesh)
const float(* BKE_mesh_vertex_normals_ensure(const struct Mesh *mesh))[3]
void BKE_mesh_orco_verts_transform(struct Mesh *me, float(*orco)[3], int totvert, int invert)
void BKE_mesh_texspace_ensure(struct Mesh *me)
void BKE_mesh_tessface_ensure(struct Mesh *mesh)
General operations, lookup, etc. for blender objects.
int psys_get_child_number(struct Scene *scene, struct ParticleSystem *psys, bool use_render_params)
void psys_thread_context_init(struct ParticleThreadContext *ctx, struct ParticleSimulationData *sim)
void psys_calc_dmcache(struct Object *ob, struct Mesh *mesh_final, struct Mesh *mesh_original, struct ParticleSystem *psys)
float * psys_cache_vgroup(struct Mesh *mesh, struct ParticleSystem *psys, int vgroup)
void psys_tasks_free(struct ParticleTask *tasks, int numtasks)
void psys_tasks_create(struct ParticleThreadContext *ctx, int startpart, int endpart, struct ParticleTask **r_tasks, int *r_numtasks)
void psys_thread_context_free(struct ParticleThreadContext *ctx)
int psys_get_tot_child(struct Scene *scene, struct ParticleSystem *psys, bool use_render_params)
void psys_particle_on_dm(struct Mesh *mesh_final, int from, int index, int index_dmcache, const float fw[4], float foffset, float vec[3], float nor[3], float utan[3], float vtan[3], float orco[3])
void psys_interpolate_face(struct Mesh *mesh, struct MVert *mvert, const float(*vert_normals)[3], struct MFace *mface, struct MTFace *tface, const float(*orcodata)[3], float w[4], float vec[3], float nor[3], float utan[3], float vtan[3], float orco[3])
BLI_INLINE float psys_frand(ParticleSystem *psys, unsigned int seed)
void BLI_jitterate1(float(*jit1)[2], float(*jit2)[2], int num, float radius1)
void BLI_jitterate2(float(*jit1)[2], float(*jit2)[2], int num, float radius2)
A KD-tree for nearest neighbor search.
void isect_ray_tri_watertight_v3_precalc(struct IsectRayPrecalc *isect_precalc, const float ray_direction[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])
MINLINE int axis_dominant_v3_single(const float vec[3])
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_dist, float r_uv[2])
float area_tri_v3(const float v1[3], const float v2[3], const float v3[3])
float area_quad_v3(const float v1[3], const float v2[3], const float v3[3], const float v4[3])
void interp_weights_poly_v3(float w[], float v[][3], int n, const float co[3])
void minmax_v3v3_v3(float min[3], float max[3], const float vec[3])
MINLINE float normalize_v3(float r[3])
MINLINE void sub_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE void copy_v3_v3(float r[3], const float a[3])
MINLINE void negate_v3(float r[3])
MINLINE void zero_v4(float r[4])
MINLINE void zero_v3(float r[3])
MINLINE float len_v3(const float a[3]) ATTR_WARN_UNUSED_RESULT
void BLI_rng_free(struct RNG *rng) ATTR_NONNULL(1)
void BLI_hammersley_1d(unsigned int n, double *r)
struct RNG * BLI_rng_new(unsigned int seed)
double BLI_rng_get_double(struct RNG *rng) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void void void BLI_rng_skip(struct RNG *rng, int n) ATTR_NONNULL(1)
struct RNG * BLI_rng_new_srandom(unsigned int seed)
float BLI_rng_get_float(struct RNG *rng) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void BLI_array_randomize(void *data, unsigned int elem_size, unsigned int elem_num, unsigned int seed)
void BLI_qsort_r(void *a, size_t n, size_t es, BLI_sort_cmp_t cmp, void *thunk)
void BLI_task_pool_work_and_wait(TaskPool *pool)
TaskPool * BLI_task_pool_create(void *userdata, eTaskPriority priority)
void BLI_task_pool_free(TaskPool *pool)
void BLI_task_pool_push(TaskPool *pool, TaskRunFunction run, void *taskdata, bool free_taskdata, TaskFreeFunction freedata)
typedef double(DMatrix)[4][4]
eEvaluationMode DEG_get_mode(const Depsgraph *graph)
#define PART_GRID_HEXAGONAL
_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
Read Guarded memory(de)allocation.
__forceinline ssef low(const avxf &a)
__forceinline ssef high(const avxf &a)
ATTR_WARN_UNUSED_RESULT const BMVert * v2
ATTR_WARN_UNUSED_RESULT const BMVert * v
__forceinline BoundBox intersect(const BoundBox &a, const BoundBox &b)
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
static T sum(const btAlignedObjectArray< T > &items)
static unsigned long seed
ccl_gpu_kernel_postfix ccl_global float int int int int float bool int offset
void(* MEM_freeN)(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
void *(* MEM_mallocN)(size_t len, const char *str)
ccl_device_inline float3 ceil(const float3 &a)
ccl_device_inline float3 pow(float3 v, float e)
struct blender::compositor::@179::@181 task
T length(const vec_base< T, Size > &a)
static const pxr::TfToken out("out", pxr::TfToken::Immortal)
static void init_mv_jit(float *jit, int num, int seed2, float amount)
static void distribute_children_exec(ParticleTask *thread, ChildParticle *cpa, int p)
#define PSYS_RND_DIST_SKIP
static void psys_task_init_distribute(ParticleTask *task, ParticleSimulationData *sim)
static void distribute_simple_children(Scene *scene, Object *ob, Mesh *final_mesh, Mesh *deform_mesh, ParticleSystem *psys, const bool use_render_params)
static void distribute_from_verts_exec(ParticleTask *thread, ParticleData *pa, int p)
static void distribute_invalid(ParticleSimulationData *sim, int from)
static void exec_distribute_parent(TaskPool *__restrict UNUSED(pool), void *taskdata)
static void distribute_from_volume_exec(ParticleTask *thread, ParticleData *pa, int p)
static void distribute_particles_on_dm(ParticleSimulationData *sim, int from)
static void distribute_from_faces_exec(ParticleTask *thread, ParticleData *pa, int p)
static void distribute_grid(Mesh *mesh, ParticleSystem *psys)
static void exec_distribute_child(TaskPool *__restrict UNUSED(pool), void *taskdata)
static void distribute_particles_on_shape(ParticleSimulationData *sim, int UNUSED(from))
void distribute_particles(ParticleSimulationData *sim, int from)
static int distribute_binary_search(const float *sum, int n, float value)
static void psys_uv_to_w(float u, float v, int quad, float *w)
static int psys_thread_context_init_distribute(ParticleThreadContext *ctx, ParticleSimulationData *sim, int from)
static void hammersley_create(float *out, int n, int seed, float amount)
static void alloc_child_particles(ParticleSystem *psys, int tot)
static int distribute_compare_orig_index(const void *p1, const void *p2, void *user_data)
struct Depsgraph * depsgraph
struct ParticleSystemModifierData * psmd
struct ParticleSystem * psys
struct Mesh * mesh_original
struct ParticleData * tpars
struct ParticleSeam * seams
struct ParticleSimulationData sim