50#define PARTICLE_COLLISION_MAX_COLLISIONS 10
55#define LOOP_PARTICLES for (p = 0, pa = psys->particles; p < psys->totpart; p++, pa++)
56#define LOOP_EXISTING_PARTICLES \
57 for (p = 0, pa = psys->particles; p < psys->totpart; p++, pa++) \
58 if (!(pa->flag & PARS_UNEXIST))
59#define LOOP_SHOWN_PARTICLES \
60 for (p = 0, pa = psys->particles; p < psys->totpart; p++, pa++) \
61 if (!(pa->flag & (PARS_UNEXIST | PARS_NO_DISP)))
62#define LOOP_DYNAMIC_PARTICLES \
63 for (p = 0; p < psys->totpart; p++) \
64 if ((pa = psys->particles + p)->state.time > 0.0f)
67#define PARTICLE_PSMD \
68 ParticleSystemModifierData *psmd = sim->psmd ? sim->psmd : psys_get_modifier(sim->ob, sim->psys)
107 void (*
density_cb)(
void *rangedata_v,
int index,
const float co[3],
float squared_dist);
247#define PARTICLE_DRAW_DATA_UPDATED 1
249#define PSYS_FRAND_COUNT 1024
287 bool use_render_params);
371 const struct Scene *scene,
375 const struct Scene *scene,
402 bool use_render_params);
406 bool use_render_params);
407bool do_guides(
struct Depsgraph *depsgraph,
409 ListBaseT<EffectorCache> *effectors,
446 ListBaseT<ModifierData> *modifiers,
453 const float parent_orco[3]);
528 bool use_render_params);
566 float hairmat[4][4]);
571 float hairmat[4][4]);
576 float hairmat[4][4]);
592 const float (*vert_positions)[3],
593 const float (*vert_normals)[3],
594 const struct MFace *mface,
596 const float (*orcodata)[3],
608 struct ParticleKey *key,
float loc[3],
float vel[3],
float rot[4],
float *time);
640 struct Mesh *mesh_final,
641 struct Mesh *mesh_original,
656 struct Mesh *mesh_original,
694#define PSYS_RESET_ALL 1
695#define PSYS_RESET_DEPSGRAPH 2
697#define PSYS_RESET_CACHE_MISS 4
700#define DMCACHE_NOTFOUND -1
701#define DMCACHE_ISCHILD -2
706 struct ParticleSettings *particle_settings);
723 struct PartDeflect *pd);
725 ListBaseT<ParticleSystem> *particles);
727 ListBaseT<ParticleSystem> *particles);
731 ListBaseT<ParticleSystem> *particles);
#define PARTICLE_COLLISION_MAX_COLLISIONS
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
VecBase< float, D > step(VecOp< float, D >, VecOp< float, D >) RET
float3x3 scale(float3x3 mat, float2 scale)
void psys_free_path_cache(struct ParticleSystem *psys, struct PTCacheEdit *edit)
void BKE_particle_system_eval_init(struct Depsgraph *depsgraph, struct Object *object)
void(*) ParticleSystemIDFunc(struct ParticleSystem *psys, struct ID **idpoin, void *userdata, LibraryForeachIDCallbackFlag cb_flag)
struct ModifierData * object_add_particle_system(struct Main *bmain, const struct Scene *scene, struct Object *ob, const char *name)
void object_remove_particle_system(struct Main *bmain, struct Scene *scene, struct Object *ob, struct ParticleSystem *psys)
float psys_get_current_display_percentage(struct ParticleSystem *psys, bool use_render_params)
void BKE_particle_batch_cache_dirty_tag(struct ParticleSystem *psys, int mode)
struct ParticleSystem * psys_get_target_system(struct Object *ob, struct ParticleTarget *pt)
void psys_sph_finalize(struct SPHData *sphdata)
Vector< ParticleTask > psys_tasks_create(struct ParticleThreadContext *ctx, int startpart, int endpart)
struct ParticleSystem * psys_get_current(struct Object *ob)
void psys_sim_data_init(struct ParticleSimulationData *sim)
void psys_get_birth_coords(struct ParticleSimulationData *sim, struct ParticleData *pa, struct ParticleKey *state, float dtime, float cfra)
void BKE_particle_mcol_on_emitter(ParticleSystem *particlesystem, ReportList *reports, ParticleSystemModifierData *modifier, ParticleData *particle, int particle_no, int vcol_no, float r_mcol[3])
float * psys_cache_vgroup(struct Mesh *mesh, struct ParticleSystem *psys, int vgroup)
void void psys_cache_paths(struct ParticleSimulationData *sim, float cfra, bool use_render_params)
void psys_find_parents(struct ParticleSimulationData *sim, bool use_render_params)
void reset_particle(struct ParticleSimulationData *sim, struct ParticleData *pa, float dtime, float cfra)
void psys_thread_context_init(struct ParticleThreadContext *ctx, struct ParticleSimulationData *sim)
struct ModifierData * object_copy_particle_system(struct Main *bmain, const struct Scene *scene, struct Object *ob, const struct ParticleSystem *psys_orig)
void BKE_particlesystem_id_loop(struct ParticleSystem *psys, ParticleSystemIDFunc func, void *userdata)
void BKE_particle_partdeflect_blend_read_data(struct BlendDataReader *reader, struct PartDeflect *pd)
struct ParticleSystem * psys_orig_get(struct ParticleSystem *psys)
void psys_interpolate_face(struct Mesh *mesh, const float(*vert_positions)[3], const float(*vert_normals)[3], const 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])
void psys_get_dupli_path_transform(struct ParticleSimulationData *sim, struct ParticleData *pa, struct ChildParticle *cpa, struct ParticleCacheKey *cache, float mat[4][4], float *scale)
void psys_apply_child_modifiers(struct ParticleThreadContext *ctx, ListBaseT< ModifierData > *modifiers, struct ChildParticle *cpa, struct ParticleTexture *ptex, const float orco[3], float hairmat[4][4], struct ParticleCacheKey *keys, struct ParticleCacheKey *parent_keys, const float parent_orco[3])
struct ParticleSystemModifierData * psys_get_modifier(struct Object *ob, struct ParticleSystem *psys)
void psys_free_particles(struct ParticleSystem *psys)
struct ParticleSettings * BKE_particlesettings_add(struct Main *bmain, const char *name)
float psys_get_timestep(struct ParticleSimulationData *sim)
void init_particle(struct ParticleSimulationData *sim, struct ParticleData *pa)
void BKE_particlesettings_twist_curve_init(struct ParticleSettings *part)
void BKE_particle_system_blend_write(struct BlendWriter *writer, ListBaseT< ParticleSystem > *particles)
KDTree< VecBase< float, 3 > > KDTree3d
void psys_get_particle_on_path(struct ParticleSimulationData *sim, int pa_num, struct ParticleKey *state, bool vel)
void psys_count_keyed_targets(struct ParticleSimulationData *sim)
void BKE_particle_co_hair(const ParticleSystem *particlesystem, const Object *object, int particle_no, int step, float n_co[3])
bool psys_in_edit_mode(struct Depsgraph *depsgraph, const struct ParticleSystem *psys)
float PSYS_FRAND_BASE[PSYS_FRAND_COUNT]
void(*) BKE_particle_batch_cache_dirty_tag_cb(struct ParticleSystem *psys, int mode)
float psys_get_child_size(struct ParticleSystem *psys, struct ChildParticle *cpa, float cfra, float *pa_time)
void(*) BKE_particle_batch_cache_free_cb(struct ParticleSystem *psys)
unsigned int PSYS_FRAND_SEED_MULTIPLIER[PSYS_FRAND_COUNT]
bool psys_get_particle_state(struct ParticleSimulationData *sim, int p, struct ParticleKey *state, bool always)
void BKE_particle_settings_eval_reset(struct Depsgraph *depsgraph, struct ParticleSettings *particle_settings)
void precalc_guides(struct ParticleSimulationData *sim, ListBaseT< EffectorCache > *effectors)
BMesh const char void * data
void free_hair(struct Object *ob, struct ParticleSystem *psys, int dynamics)
void psys_emitter_customdata_mask(struct ParticleSystem *psys, struct CustomData_MeshMasks *r_cddata_masks)
void psys_make_temp_pointcache(struct Object *ob, struct ParticleSystem *psys)
void BKE_particle_system_blend_read_after_liblink(struct BlendLibReader *reader, struct Object *ob, struct ID *id, ListBaseT< ParticleSystem > *particles)
void psys_free(struct Object *ob, struct ParticleSystem *psys)
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])
bool psys_render_simplify_params(struct ParticleSystem *psys, struct ChildParticle *cpa, float *params)
void BKE_psys_collision_neartest_cb(void *userdata, int index, const struct BVHTreeRay *ray, struct BVHTreeRayHit *hit)
void free_keyed_keys(struct ParticleSystem *psys)
void psys_get_dupli_texture(struct ParticleSystem *psys, struct ParticleSettings *part, struct ParticleSystemModifierData *psmd, struct ParticleData *pa, struct ChildParticle *cpa, float uv[2], float orco[3])
float psys_get_dietime_from_cache(struct PointCache *cache, int index)
void psys_sph_density(struct BVHTree *tree, struct SPHData *data, float co[3], float vars[2])
void psys_mat_hair_to_object(struct Object *ob, struct Mesh *mesh, short from, struct ParticleData *pa, float hairmat[4][4])
void psys_find_group_weights(struct ParticleSettings *part)
void psys_get_texture(struct ParticleSimulationData *sim, struct ParticleData *pa, struct ParticleTexture *ptex, int event, float cfra)
void BKE_particlesystem_reset_all(struct Object *object)
void psys_interpolate_mcol(const struct MCol *mcol, int quad, const float w[4], struct MCol *mc)
void psys_interpolate_uvs(const struct MTFace *tface, int quad, const float w[4], float r_uv[2])
void psys_free_children(struct ParticleSystem *psys)
bool psys_check_enabled(struct Object *ob, struct ParticleSystem *psys, bool use_render_params)
void distribute_particles(struct ParticleSimulationData *sim, int from)
int count_particles_mod(struct ParticleSystem *psys, int totgr, int cur)
void psys_apply_hair_lattice(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, struct ParticleSystem *psys)
int count_particles(struct ParticleSystem *psys)
short psys_get_current_num(struct Object *ob)
void psys_calc_dmcache(struct Object *ob, struct Mesh *mesh_final, struct Mesh *mesh_original, struct ParticleSystem *psys)
void particle_system_update(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, struct ParticleSystem *psys, bool use_render_params)
void psys_set_current_num(struct Object *ob, int index)
void psys_disable_all(struct Object *ob)
void BKE_particlesettings_rough_curve_init(struct ParticleSettings *part)
void psys_free_pdd(struct ParticleSystem *psys)
float psys_get_child_time(struct ParticleSystem *psys, struct ChildParticle *cpa, float cfra, float *birthtime, float *dietime)
int psys_get_tot_child(struct Scene *scene, struct ParticleSystem *psys, bool use_render_params)
void psys_vec_rot_to_face(struct Mesh *mesh, struct ParticleData *pa, float vec[3])
void psys_mat_hair_to_global(struct Object *ob, struct Mesh *mesh, short from, struct ParticleData *pa, float hairmat[4][4])
int psys_particle_dm_face_lookup(struct Mesh *mesh_final, struct Mesh *mesh_original, int findex_orig, const float fw[4], struct LinkNode **poly_nodes)
void BKE_particlesettings_clump_curve_init(struct ParticleSettings *part)
void psys_update_particle_tree(struct ParticleSystem *psys, float cfra)
float psys_particle_value_from_verts(struct Mesh *mesh, short from, struct ParticleData *pa, float *values)
void psys_thread_context_free(struct ParticleThreadContext *ctx)
void psys_get_from_key(struct ParticleKey *key, float loc[3], float vel[3], float rot[4], float *time)
void BKE_particle_batch_cache_free(struct ParticleSystem *psys)
void psys_cache_edit_paths(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, struct PTCacheEdit *edit, float cfra, bool use_render_params)
void psys_particle_on_emitter(struct ParticleSystemModifierData *psmd, int from, int index, int index_dmcache, float fuv[4], float foffset, float vec[3], float nor[3], float utan[3], float vtan[3], float orco[3])
void psys_copy_particles(struct ParticleSystem *psys_dst, struct ParticleSystem *psys_src)
BLI_INLINE void psys_frand_vec(ParticleSystem *psys, unsigned int seed, float vec[3])
void psys_tasks_free(Vector< ParticleTask > &tasks)
void BKE_particle_system_blend_read_data(struct BlendDataReader *reader, ListBaseT< ParticleSystem > *particles)
void psys_reset(struct ParticleSystem *psys, int mode)
void psys_cache_child_paths(struct ParticleSimulationData *sim, float cfra, bool editupdate, bool use_render_params)
void psys_enable_all(struct Object *ob)
void psys_get_pointcache_start_end(struct Scene *scene, ParticleSystem *psys, int *sfra, int *efra)
unsigned int PSYS_FRAND_SEED_OFFSET[PSYS_FRAND_COUNT]
bool do_guides(struct Depsgraph *depsgraph, struct ParticleSettings *part, ListBaseT< EffectorCache > *effectors, ParticleKey *state, int index, float time)
void BKE_particle_init_rng()
LibraryForeachIDCallbackFlag
BLI_INLINE float psys_frand(ParticleSystem *psys, unsigned int seed)
bool psys_check_edited(struct ParticleSystem *psys)
void BKE_particle_uv_on_emitter(ParticleSystem *particlesystem, ReportList *reports, ParticleSystemModifierData *modifier, ParticleData *particle, int particle_no, int uv_no, float r_uv[2])
void psys_mat_hair_to_orco(struct Object *ob, struct Mesh *mesh, short from, struct ParticleData *pa, float hairmat[4][4])
int psys_uses_gravity(struct ParticleSimulationData *sim)
void psys_changed_type(struct Object *ob, struct ParticleSystem *psys)
void psys_check_group_weights(struct ParticleSettings *part)
void psys_interpolate_particle(short type, struct ParticleKey keys[4], float dt, struct ParticleKey *result, bool velocity)
struct ParticleSystem * psys_eval_get(struct Depsgraph *depsgraph, struct Object *object, struct ParticleSystem *psys)
void BKE_particlesettings_fluid_default_settings(struct ParticleSettings *part)
void psys_check_boid_data(struct ParticleSystem *psys)
void psys_sim_data_free(struct ParticleSimulationData *sim)
void copy_particle_key(struct ParticleKey *to, struct ParticleKey *from, int time)
int psys_get_child_number(struct Scene *scene, struct ParticleSystem *psys, bool use_render_params)
@ BKE_PARTICLE_BATCH_DIRTY_ALL
void psys_unique_name(struct Object *object, struct ParticleSystem *psys, const char *defname) ATTR_NONNULL(1
ParticleCollisionElement pce
struct Object * skip[PARTICLE_COLLISION_MAX_COLLISIONS+1]
struct CollisionModifierData * md
float original_ray_length
ListBaseT< ColliderCache > * colliders
struct Depsgraph * depsgraph
struct ParticleSystem * psys
struct ParticleSystemModifierData * psmd
ParticleThreadContext * ctx
struct ParticleData * tpars
struct CurveMapping * clumpcurve
struct CurveMapping * roughcurve
struct ParticleSeam * seams
struct CurveMapping * twistcurve
struct ParticleSimulationData sim
void(*) density_cb(void *rangedata_v, int index, const float co[3], float squared_dist)
Vector< ParticleSpring > new_springs
const Map< OrderedEdge, int > * eh
ParticleSystem * psys[10]
void(*) force_cb(void *sphdata_v, ParticleKey *state, float *force, float *impulse)