79 const bool use_render_params)
90 for (i = 0; i < child_nbr; i++) {
91 for (p = 0; p < psys->
totpart; p++, cpa++) {
114 float min[3],
max[3], delta[3], d;
125 for (i = 1; i < totvert; i++,
mv++) {
139 d = delta[axis] / (
float)res;
142 size[(axis + 1) % 3] = (
int)
ceil(delta[(axis + 1) % 3] / d);
143 size[(axis + 2) % 3] = (
int)
ceil(delta[(axis + 2) % 3] / d);
154 min[0] += d < delta[0] ? d / 2.0f : delta[0] / 2.0f;
155 min[1] += d < delta[1] ? d / 2.0f : delta[1] / 2.0f;
156 min[2] += d < delta[2] ? d / 2.0f : delta[2] / 2.0f;
158 for (i = 0, p = 0, pa = psys->
particles; i < res; i++) {
159 for (j = 0; j < res; j++) {
160 for (k = 0; k < res; k++, p++, pa++) {
180 for (i = 0,
mv = mvert; i < totvert; i++,
mv++) {
185 pa[((int)(vec[0] * (
size[0] - 1)) * res + (
int)(vec[1] * (
size[1] - 1))) * res +
186 (
int)(vec[2] * (
size[2] - 1))]
191 float co1[3], co2[3];
194 float v1[3],
v2[3], v3[3], v4[4], lambda;
195 int a, a1, a2, a0mul, a1mul, a2mul, totface;
201 for (
a = 0;
a < amax;
a++) {
218 for (a1 = 0; a1 <
size[(
a + 1) % 3]; a1++) {
219 for (a2 = 0; a2 <
size[(
a + 2) % 3]; a2++) {
222 pa = psys->
particles + a1 * a1mul + a2 * a2mul;
224 co1[
a] -= d < delta[
a] ? d / 2.0f : delta[
a] / 2.0f;
226 co2[
a] += delta[
a] + 0.001f * d;
227 co1[
a] -= 0.001f * d;
230 float ray_direction[3];
235 for (i = 0; i < totface; i++, mface++) {
243 co1, &isect_precalc,
v1,
v2, v3, &lambda,
NULL);
244 if (intersects_tri) {
245 pa1 = (pa + (int)(lambda *
size[
a]) * a0mul);
252 pa2 = (pa + (int)(lambda *
size[
a]) * a0mul);
265 if (pa2 && pa2 != pa1) {
280 for (i = 0; i <
size[0]; i++) {
281 if (in || (pa + i * a0mul)->hair_index % 2) {
286 in = (in + (pa + i * a0mul)->hair_index) % 2;
295 for (i = 0, p = 0, pa = psys->
particles; i < res; i++) {
296 for (j = 0; j < res; j++) {
297 for (k = 0; k < res; k++, p++, pa++) {
299 pa->
fuv[0] += d / 2.0f;
303 pa->
fuv[0] += d / 2.0f;
304 pa->
fuv[1] += d / 2.0f;
312 for (i = 0; i <
size[0]; i++) {
313 for (j = 0; j <
size[1]; j++) {
314 pa = psys->
particles + res * (i * res + j);
315 for (k = 0; k <
size[2]; k++, pa++) {
324 for (p = 0, pa = psys->
particles; p < psys->totpart; p++, pa++) {
348 for (
int k = 0; k < n; k++) {
351 out[2 * k + 0] = fmod((
double)k / (
double)n + ofs[0], 1.0);
352 out[2 * k + 1] = fmod(
t + ofs[1], 1.0);
360 float *jit2,
x, rad1, rad2, rad3;
368 rad2 = (
float)(1.0f / ((
float)num));
369 rad3 = (
float)
sqrtf((
float)num) / ((
float)num);
374 for (i = 0; i < num2; i += 2) {
386 jit2 =
MEM_mallocN(12 +
sizeof(
float[2]) * num,
"initjit");
388 for (i = 0; i < 4; i++) {
399 float vert[4][3], co[3];
439 int mid,
low = 0,
high = n - 1;
456 if ((
sum[mid] >= value) && (
sum[mid - 1] < value)) {
460 if (
sum[mid] > value) {
473 #define PSYS_RND_DIST_SKIP 3
476 #define ONLY_WORKING_WITH_PA_VERTS 0
496 for (
int i = 0; i < ctx->
mesh->
totface; i++, mface++) {
498 unsigned int *vert = &mface->
v1;
500 for (
int j = 0; j < 4; j++, vert++) {
501 if (*vert == pa->
num) {
512 #if ONLY_WORKING_WITH_PA_VERTS
514 KDTreeNearest_3d ptn[3];
518 ctx->
mesh,
from, pa->
num, pa->
num_dmcache, pa->
fuv, pa->
foffset, co1, 0, 0, 0, orco1, 0);
520 maxw = BLI_kdtree_3d_find_nearest_n(ctx->
tree, orco1, ptn, 3);
522 for (
w = 0;
w < maxw;
w++) {
523 pa->verts[
w] = ptn->
num;
529 if (rng_skip_tot > 0) {
539 int distr = ctx->
distr;
559 float offset = fmod(ctx->
jitoff[i] + (
float)p, (
float)ctx->
jitlevel);
560 if (!
isnan(offset)) {
562 ctx->
jit[2 * (
int)offset], ctx->
jit[2 * (
int)offset + 1], mface->
v4, pa->
fuv);
577 if (rng_skip_tot > 0) {
586 float *
v1, *
v2, *v3, *v4,
nor[3], co[3];
587 float cur_d, min_d, randu, randv;
588 int distr = ctx->
distr;
609 float offset = fmod(ctx->
jitoff[i] + (
float)p, (
float)ctx->
jitlevel);
610 if (!
isnan(offset)) {
612 ctx->
jit[2 * (
int)offset], ctx->
jit[2 * (
int)offset + 1], mface->
v4, pa->
fuv);
637 for (i = 0, mface =
mesh->
mface; i < tot; i++, mface++) {
644 v3 = mvert[mface->
v3].
co;
654 v4 = mvert[mface->
v4].
co;
681 if (rng_skip_tot > 0) {
691 float orco1[3], co1[3], nor1[3];
693 int cfrom = ctx->
cfrom;
699 if (ctx->
index[p] < 0) {
701 cpa->
fuv[0] = cpa->
fuv[1] = cpa->
fuv[2] = cpa->
fuv[3] = 0.0f;
702 cpa->
pa[0] = cpa->
pa[1] = cpa->
pa[2] = cpa->
pa[3] = 0;
717 KDTreeNearest_3d ptn[10];
719 float maxd , totw = 0.0f;
735 maxw = BLI_kdtree_3d_find_nearest_n(ctx->
tree, orco1, ptn, 3);
737 maxd = ptn[maxw - 1].dist;
741 for (
w = 0;
w < maxw;
w++) {
742 parent[
w] = ptn[
w].index;
743 pweight[
w] = (
float)
pow(2.0, (
double)(-6.0f * ptn[
w].dist / maxd));
745 for (;
w < 10;
w++) {
750 for (
w = 0, i = 0;
w < maxw && i < 4;
w++) {
751 if (parent[
w] >= 0) {
752 cpa->
pa[i] = parent[
w];
753 cpa->
w[i] = pweight[
w];
764 for (
w = 0;
w < 4;
w++) {
772 if (rng_skip_tot > 0) {
789 for (p =
task->begin; p < task->end; p++, pa++) {
794 for (p =
task->begin; p < task->end; p++, pa++) {
799 for (p =
task->begin; p < task->end; p++, pa++) {
815 for (p = 0; p <
task->begin; p++, cpa++) {
819 for (; p <
task->end; p++, cpa++) {
827 int index1 = orig_index[*(
const int *)p1];
828 int index2 = orig_index[*(
const int *)p2];
830 if (index1 < index2) {
833 if (index1 == index2) {
859 if (psys->
child && totchild) {
860 for (p = 0, cpa = psys->
child; p < totchild; p++, cpa++) {
861 cpa->
fuv[0] = cpa->
fuv[1] = cpa->
fuv[2] = cpa->
fuv[3] = 0.0;
864 cpa->
pa[0] = cpa->
pa[1] = cpa->
pa[2] = cpa->
pa[3] = 0;
873 pa->fuv[0] = pa->fuv[1] = pa->fuv[2] = pa->fuv[3] = 0.0;
897 int totelem = 0, totpart, *particle_element = 0, children = 0, totseam = 0;
898 int jitlevel = 1, distr;
899 float *element_weight =
NULL, *jitter_offset =
NULL, *vweight =
NULL;
900 float cur, maxweight = 0.0, tweight, totweight, inv_totweight, co[3],
nor[3], orco[3];
916 "Can't create particles with the current modifier stack, disable destructive modifiers\n");
952 if (
mesh != final_mesh) {
971 tree = BLI_kdtree_3d_new(totpart);
973 for (p = 0, pa = psys->
particles; p < totpart; p++, pa++) {
975 mesh, part->
from, pa->
num, pa->
num_dmcache, pa->
fuv, pa->
foffset, co,
nor, 0, 0, orco);
977 BLI_kdtree_3d_insert(
tree, p, orco);
980 BLI_kdtree_3d_balance(
tree);
1012 tree = BLI_kdtree_3d_new(totvert);
1014 for (p = 0; p < totvert; p++) {
1022 BLI_kdtree_3d_insert(
tree, p, co);
1025 BLI_kdtree_3d_balance(
tree);
1036 fprintf(stderr,
"Particle distribution error: Nothing to emit from!\n");
1039 if (
mesh != final_mesh) {
1043 BLI_kdtree_3d_free(
tree);
1049 element_weight =
MEM_callocN(
sizeof(
float) * totelem,
"particle_distribution_weights");
1050 particle_element =
MEM_callocN(
sizeof(
int) * totpart,
"particle_distribution_indexes");
1051 jitter_offset =
MEM_callocN(
sizeof(
float) * totelem,
"particle_distribution_jitoff");
1056 float totarea = 0.0f, co1[3], co2[3], co3[3], co4[3];
1057 float(*orcodata)[3];
1061 for (i = 0; i < totelem; i++) {
1092 if (cur > maxweight) {
1096 element_weight[i] = cur;
1100 for (i = 0; i < totelem; i++) {
1101 element_weight[i] /= totarea;
1104 maxweight /= totarea;
1108 for (i = 0; i < totelem; i++) {
1109 element_weight[i] =
min;
1119 for (i = 0; i < totelem; i++) {
1120 element_weight[i] *= vweight[i];
1124 for (i = 0; i < totelem; i++) {
1126 tweight = vweight[mf->
v1] + vweight[mf->
v2] + vweight[mf->
v3];
1129 tweight += vweight[mf->
v4];
1136 element_weight[i] *= tweight;
1145 for (i = 0; i < totelem; i++) {
1146 if (element_weight[i] > 0.0f) {
1148 totweight += element_weight[i];
1152 if (totmapped == 0) {
1154 if (
mesh != final_mesh) {
1157 BLI_kdtree_3d_free(
tree);
1165 inv_totweight = 1.0f / totweight;
1173 float *element_sum =
MEM_mallocN(
sizeof(*element_sum) * totmapped, __func__);
1174 int *element_map =
MEM_mallocN(
sizeof(*element_map) * totmapped, __func__);
1177 for (i = 0; i < totelem && element_weight[i] == 0.0f; i++) {
1180 element_sum[i_mapped] = element_weight[i] * inv_totweight;
1181 element_map[i_mapped] = i;
1183 for (i++; i < totelem; i++) {
1184 if (element_weight[i] > 0.0f) {
1185 element_sum[i_mapped] = element_sum[i_mapped - 1] + element_weight[i] * inv_totweight;
1187 if (element_sum[i_mapped] > element_sum[i_mapped - 1]) {
1188 element_map[i_mapped] = i;
1193 totmapped = i_mapped;
1197 for (p = 0; p < totpart; p++) {
1202 particle_element[p] = element_map[eidx];
1205 jitter_offset[particle_element[p]] =
pos;
1211 step = (totpart < 2) ? 0.5 : 1.0 / (
double)totpart;
1219 pos = (totpart < totmapped) ? 0.5 / (
double)totmapped :
1222 for (i = 0, p = 0; p < totpart; p++,
pos += step) {
1223 for (; (i < totmapped - 1) && (
pos > (
double)element_sum[i]); i++) {
1227 particle_element[p] = element_map[i];
1229 jitter_offset[particle_element[p]] =
pos;
1239 int *orig_index =
NULL;
1262 if (jitlevel == 0) {
1263 jitlevel = totpart / totelem;
1277 if (jitlevel < 25) {
1284 jit,
sizeof(
float[2]), jitlevel, psys->
seed);
1292 ctx->
index = particle_element;
1295 ctx->
jitoff = jitter_offset;
1296 ctx->
weight = element_weight;
1326 int i, totpart, numtasks;
1337 for (i = 0; i < numtasks; i++) {
1354 if (ctx.
mesh != final_mesh) {
1368 fprintf(stderr,
"Shape emission not yet possible!\n");
1374 int distr_error = 0;
1377 if (psmd->mesh_final) {
1391 fprintf(stderr,
"Particle distribution error!\n");
typedef float(TangentPoint)[2]
CustomData interface, see also DNA_customdata_types.h.
bool CustomData_has_layer(const struct CustomData *data, int type)
void * CustomData_get_layer(const struct CustomData *data, int type)
void * CustomData_add_layer(struct CustomData *data, int type, eCDAllocType alloctype, void *layer, int totelem)
struct ID * BKE_id_copy_ex(struct Main *bmain, const struct ID *id, struct ID **r_newid, const int flag)
void BKE_id_free(struct Main *bmain, void *idv)
float(* BKE_mesh_orco_verts_get(struct Object *ob))[3]
void BKE_mesh_tessface_ensure(struct Mesh *mesh)
void BKE_mesh_orco_verts_transform(struct Mesh *me, float(*orco)[3], int totvert, int invert)
General operations, lookup, etc. for blender objects.
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)
int psys_get_tot_child(struct Scene *scene, struct ParticleSystem *psys, const bool use_render_params)
void psys_tasks_create(struct ParticleThreadContext *ctx, int startpart, int endpart, struct ParticleTask **r_tasks, int *r_numtasks)
int psys_get_child_number(struct Scene *scene, struct ParticleSystem *psys, const bool use_render_params)
void psys_thread_context_free(struct ParticleThreadContext *ctx)
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 MVert *mvert, struct MFace *mface, struct MTFace *tface, 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])
void interp_weights_poly_v3(float w[], float v[][3], const int n, const float co[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 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 void BLI_rng_skip(struct RNG *rng, int n) ATTR_NONNULL(1)
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)
void BLI_array_randomize(void *data, unsigned int elem_size, unsigned int elem_tot, unsigned int seed)
double BLI_rng_get_double(struct RNG *rng) ATTR_WARN_UNUSED_RESULT 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_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, TaskPriority 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.
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.
SIMD_FORCE_INLINE btScalar length(const btQuaternion &q)
Return the length of a quaternion.
static T sum(const btAlignedObjectArray< T > &items)
static unsigned long seed
void(* MEM_freeN)(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
void *(* MEM_mallocN)(size_t len, const char *str)
INLINE Rall1d< T, V, S > pow(const Rall1d< T, V, S > &arg, double m)
struct blender::compositor::@172::@174 task
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 CustomData vdata edata fdata
struct Depsgraph * depsgraph
struct ParticleSystemModifierData * psmd
struct ParticleSystem * psys
struct Mesh * mesh_original
struct ParticleData * tpars
struct ParticleSeam * seams
struct ParticleSimulationData sim
__forceinline ssef low(const avxf &a)
__forceinline ssef high(const avxf &a)
__forceinline BoundBox intersect(const BoundBox &a, const BoundBox &b)
ccl_device_inline float2 floor(const float2 &a)
ccl_device_inline float3 ceil(const float3 &a)