Blender V2.61 - r43446
|
#include "DNA_particle_types.h"
#include "DNA_object_types.h"
Go to the source code of this file.
Classes | |
struct | ParticleSimulationData |
struct | ParticleTexture |
struct | ParticleSeam |
struct | ParticleCacheKey |
struct | ParticleThreadContext |
struct | ParticleThread |
struct | ParticleBillboardData |
struct | ParticleCollisionElement |
struct | ParticleCollision |
struct | ParticleDrawData |
Defines | |
#define | PARTICLE_P ParticleData *pa; int p |
#define | LOOP_PARTICLES for(p=0, pa=psys->particles; p<psys->totpart; p++, pa++) |
#define | LOOP_EXISTING_PARTICLES for(p=0, pa=psys->particles; p<psys->totpart; p++, pa++) if(!(pa->flag & PARS_UNEXIST)) |
#define | LOOP_SHOWN_PARTICLES for(p=0, pa=psys->particles; p<psys->totpart; p++, pa++) if(!(pa->flag & (PARS_UNEXIST|PARS_NO_DISP))) |
#define | LOOP_DYNAMIC_PARTICLES for(p=0; p<psys->totpart; p++ ) if((pa=psys->particles+p)->state.time > 0.f) |
#define | PSYS_FRAND_COUNT 1024 |
#define | PSYS_FRAND(seed) psys->frand[(seed) % PSYS_FRAND_COUNT] |
#define | PARTICLE_PSMD ParticleSystemModifierData *psmd = sim->psmd ? sim->psmd : psys_get_modifier(sim->ob, sim->psys) |
#define | PARTICLE_DRAW_DATA_UPDATED 1 |
#define | PSYS_RESET_ALL 1 |
#define | PSYS_RESET_DEPSGRAPH 2 |
#define | PSYS_RESET_CACHE_MISS 4 |
#define | DMCACHE_NOTFOUND -1 |
#define | DMCACHE_ISCHILD -2 |
Typedefs | |
typedef struct ParticleSimulationData | ParticleSimulationData |
typedef struct ParticleTexture | ParticleTexture |
typedef struct ParticleSeam | ParticleSeam |
typedef struct ParticleCacheKey | ParticleCacheKey |
typedef struct ParticleThreadContext | ParticleThreadContext |
typedef struct ParticleThread | ParticleThread |
typedef struct ParticleBillboardData | ParticleBillboardData |
typedef struct ParticleCollisionElement | ParticleCollisionElement |
typedef struct ParticleCollision | ParticleCollision |
typedef struct ParticleDrawData | ParticleDrawData |
Functions | |
int | count_particles (struct ParticleSystem *psys) |
int | count_particles_mod (struct ParticleSystem *psys, int totgr, int cur) |
struct ParticleSystem * | psys_get_current (struct Object *ob) |
short | psys_get_current_num (struct Object *ob) |
void | psys_set_current_num (Object *ob, int index) |
struct Object * | psys_find_object (struct Scene *scene, struct ParticleSystem *psys) |
struct Object * | psys_get_lattice (struct ParticleSimulationData *sim) |
int | psys_in_edit_mode (struct Scene *scene, struct ParticleSystem *psys) |
int | psys_check_enabled (struct Object *ob, struct ParticleSystem *psys) |
int | psys_check_edited (struct ParticleSystem *psys) |
void | psys_check_group_weights (struct ParticleSettings *part) |
int | psys_uses_gravity (struct ParticleSimulationData *sim) |
void | psys_free_settings (struct ParticleSettings *part) |
void | psys_free_path_cache (struct ParticleSystem *psys, struct PTCacheEdit *edit) |
void | psys_free (struct Object *ob, struct ParticleSystem *psys) |
void | psys_render_set (struct Object *ob, struct ParticleSystem *psys, float viewmat[][4], float winmat[][4], int winx, int winy, int timeoffset) |
void | psys_render_restore (struct Object *ob, struct ParticleSystem *psys) |
int | psys_render_simplify_distribution (struct ParticleThreadContext *ctx, int tot) |
int | psys_render_simplify_params (struct ParticleSystem *psys, struct ChildParticle *cpa, float *params) |
void | psys_interpolate_uvs (const struct MTFace *tface, int quad, const float w[4], float uvco[2]) |
void | psys_interpolate_mcol (const struct MCol *mcol, int quad, const float w[4], struct MCol *mc) |
void | copy_particle_key (struct ParticleKey *to, struct ParticleKey *from, int time) |
void | psys_particle_on_emitter (struct ParticleSystemModifierData *psmd, int distr, int index, int index_dmcache, float *fuv, float foffset, float *vec, float *nor, float *utan, float *vtan, float *orco, float *ornor) |
struct ParticleSystemModifierData * | psys_get_modifier (struct Object *ob, struct ParticleSystem *psys) |
struct ModifierData * | object_add_particle_system (struct Scene *scene, struct Object *ob, const char *name) |
void | object_remove_particle_system (struct Scene *scene, struct Object *ob) |
struct ParticleSettings * | psys_new_settings (const char *name, struct Main *main) |
struct ParticleSettings * | psys_copy_settings (struct ParticleSettings *part) |
void | make_local_particlesettings (struct ParticleSettings *part) |
void | psys_reset (struct ParticleSystem *psys, int mode) |
void | psys_find_parents (struct ParticleSimulationData *sim) |
void | psys_cache_paths (struct ParticleSimulationData *sim, float cfra) |
void | psys_cache_edit_paths (struct Scene *scene, struct Object *ob, struct PTCacheEdit *edit, float cfra) |
void | psys_cache_child_paths (struct ParticleSimulationData *sim, float cfra, int editupdate) |
int | do_guides (struct ListBase *effectors, ParticleKey *state, int pa_num, float time) |
void | precalc_guides (struct ParticleSimulationData *sim, struct ListBase *effectors) |
float | psys_get_timestep (struct ParticleSimulationData *sim) |
float | psys_get_child_time (struct ParticleSystem *psys, struct ChildParticle *cpa, float cfra, float *birthtime, float *dietime) |
float | psys_get_child_size (struct ParticleSystem *psys, struct ChildParticle *cpa, float cfra, float *pa_time) |
void | psys_get_particle_on_path (struct ParticleSimulationData *sim, int pa_num, struct ParticleKey *state, int vel) |
int | psys_get_particle_state (struct ParticleSimulationData *sim, int p, struct ParticleKey *state, int always) |
void | psys_get_dupli_texture (struct ParticleSystem *psys, struct ParticleSettings *part, struct ParticleSystemModifierData *psmd, struct ParticleData *pa, struct ChildParticle *cpa, float *uv, float *orco) |
void | psys_get_dupli_path_transform (struct ParticleSimulationData *sim, struct ParticleData *pa, struct ChildParticle *cpa, struct ParticleCacheKey *cache, float mat[][4], float *scale) |
ParticleThread * | psys_threads_create (struct ParticleSimulationData *sim) |
void | psys_threads_free (ParticleThread *threads) |
void | psys_make_billboard (ParticleBillboardData *bb, float xvec[3], float yvec[3], float zvec[3], float center[3]) |
void | psys_apply_hair_lattice (struct Scene *scene, struct Object *ob, struct ParticleSystem *psys) |
struct ParticleSystem * | psys_get_target_system (struct Object *ob, struct ParticleTarget *pt) |
void | psys_count_keyed_targets (struct ParticleSimulationData *sim) |
void | psys_update_particle_tree (struct ParticleSystem *psys, float cfra) |
void | psys_make_temp_pointcache (struct Object *ob, struct ParticleSystem *psys) |
void | psys_get_pointcache_start_end (struct Scene *scene, ParticleSystem *psys, int *sfra, int *efra) |
void | psys_check_boid_data (struct ParticleSystem *psys) |
void | psys_get_birth_coordinates (struct ParticleSimulationData *sim, struct ParticleData *pa, struct ParticleKey *state, float dtime, float cfra) |
void | particle_system_update (struct Scene *scene, struct Object *ob, struct ParticleSystem *psys) |
void | psys_disable_all (struct Object *ob) |
void | psys_enable_all (struct Object *ob) |
void | free_hair (struct Object *ob, struct ParticleSystem *psys, int dynamics) |
void | free_keyed_keys (struct ParticleSystem *psys) |
void | psys_free_particles (struct ParticleSystem *psys) |
void | psys_free_children (struct ParticleSystem *psys) |
void | psys_interpolate_particle (short type, struct ParticleKey keys[4], float dt, struct ParticleKey *result, int velocity) |
void | psys_vec_rot_to_face (struct DerivedMesh *dm, struct ParticleData *pa, float *vec) |
void | psys_mat_hair_to_object (struct Object *ob, struct DerivedMesh *dm, short from, struct ParticleData *pa, float hairmat[][4]) |
void | psys_mat_hair_to_global (struct Object *ob, struct DerivedMesh *dm, short from, struct ParticleData *pa, float hairmat[][4]) |
void | psys_mat_hair_to_orco (struct Object *ob, struct DerivedMesh *dm, short from, struct ParticleData *pa, float hairmat[][4]) |
float | psys_get_dietime_from_cache (struct PointCache *cache, int index) |
void | psys_free_pdd (struct ParticleSystem *psys) |
float * | psys_cache_vgroup (struct DerivedMesh *dm, struct ParticleSystem *psys, int vgroup) |
void | psys_get_texture (struct ParticleSimulationData *sim, struct ParticleData *pa, struct ParticleTexture *ptex, int event, float cfra) |
void | psys_interpolate_face (struct MVert *mvert, struct MFace *mface, struct MTFace *tface, float(*orcodata)[3], float *uv, float *vec, float *nor, float *utan, float *vtan, float *orco, float *ornor) |
float | psys_particle_value_from_verts (struct DerivedMesh *dm, short from, struct ParticleData *pa, float *values) |
void | psys_get_from_key (struct ParticleKey *key, float *loc, float *vel, float *rot, float *time) |
void | BKE_psys_collision_neartest_cb (void *userdata, int index, const struct BVHTreeRay *ray, struct BVHTreeRayHit *hit) |
void | psys_particle_on_dm (struct DerivedMesh *dm, 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], float ornor[3]) |
void | initialize_particle (struct ParticleSimulationData *sim, struct ParticleData *pa, int p) |
void | psys_calc_dmcache (struct Object *ob, struct DerivedMesh *dm, struct ParticleSystem *psys) |
int | psys_particle_dm_face_lookup (struct Object *ob, struct DerivedMesh *dm, int index, const float fw[4], struct LinkNode *node) |
void | reset_particle (struct ParticleSimulationData *sim, struct ParticleData *pa, float dtime, float cfra) |
Definition in file BKE_particle.h.
#define DMCACHE_ISCHILD -2 |
Definition at line 356 of file BKE_particle.h.
Referenced by distribute_threads_exec(), psys_find_parents(), psys_get_dupli_path_transform(), psys_get_dupli_texture(), psys_get_particle_on_path(), psys_map_index_on_dm(), psys_thread_create_path(), and render_new_particle_system().
#define DMCACHE_NOTFOUND -1 |
Definition at line 355 of file BKE_particle.h.
Referenced by get_particle_uv(), get_particle_uvco_mcol(), psys_face_mat(), psys_get_dupli_texture(), psys_map_index_on_dm(), psys_particle_dm_face_lookup(), and render_new_particle_system().
#define LOOP_DYNAMIC_PARTICLES for(p=0; p<psys->totpart; p++ ) if((pa=psys->particles+p)->state.time > 0.f) |
Definition at line 67 of file BKE_particle.h.
Referenced by dynamics_step().
#define LOOP_EXISTING_PARTICLES for(p=0, pa=psys->particles; p<psys->totpart; p++, pa++) if(!(pa->flag & PARS_UNEXIST)) |
Definition at line 64 of file BKE_particle.h.
Referenced by dynamics_step(), and particle_system_update().
Definition at line 63 of file BKE_particle.h.
Referenced by cached_step(), distribute_invalid(), do_hair_dynamics(), free_hair(), free_keyed_keys(), hair_step(), initialize_all_particles(), PE_update_mirror_cache(), precalc_guides(), psys_calc_dmcache(), psys_check_boid_data(), psys_free_particles(), psys_reset(), realloc_particles(), save_hair(), set_keyed_keys(), and system_step().
#define LOOP_SHOWN_PARTICLES for(p=0, pa=psys->particles; p<psys->totpart; p++, pa++) if(!(pa->flag & (PARS_UNEXIST|PARS_NO_DISP))) |
Definition at line 65 of file BKE_particle.h.
Referenced by count_particles(), count_particles_mod(), dynamics_step(), psys_update_particle_bvhtree(), and psys_update_particle_tree().
#define PARTICLE_DRAW_DATA_UPDATED 1 |
Definition at line 226 of file BKE_particle.h.
Referenced by draw_new_particle_system(), and particle_system_update().
#define PARTICLE_P ParticleData *pa; int p |
Definition at line 62 of file BKE_particle.h.
Referenced by cached_step(), count_particles(), count_particles_mod(), distribute_invalid(), do_hair_dynamics(), dynamics_step(), free_hair(), free_keyed_keys(), hair_step(), initialize_all_particles(), particle_system_update(), PE_update_mirror_cache(), precalc_guides(), psys_cache_paths(), psys_calc_dmcache(), psys_check_boid_data(), psys_free_particles(), psys_reset(), psys_update_particle_bvhtree(), psys_update_particle_tree(), realloc_particles(), save_hair(), set_keyed_keys(), and system_step().
#define PARTICLE_PSMD ParticleSystemModifierData *psmd = sim->psmd ? sim->psmd : psys_get_modifier(sim->ob, sim->psys) |
Definition at line 73 of file BKE_particle.h.
Referenced by distribute_particles(), psys_cache_paths(), and psys_get_particle_on_path().
#define PSYS_FRAND | ( | seed | ) | psys->frand[(seed) % PSYS_FRAND_COUNT] |
Definition at line 70 of file BKE_particle.h.
Referenced by boid_brain(), cached_step(), distribute_grid(), draw_new_particle_system(), dynamics_step(), get_child_modifier_parameters(), get_cpa_texture(), hair_step(), initialize_particle(), particle_system_update(), psys_get_birth_coordinates(), psys_get_child_size(), psys_get_child_time(), psys_get_dupli_path_transform(), psys_get_particle_state(), psys_thread_create_path(), render_new_particle_system(), reset_particle(), and system_step().
#define PSYS_FRAND_COUNT 1024 |
Definition at line 69 of file BKE_particle.h.
Referenced by do_child_modifiers(), and psys_create_frand().
#define PSYS_RESET_ALL 1 |
Definition at line 349 of file BKE_particle.h.
Referenced by BKE_ptcache_object_reset(), particle_system_update(), psys_changed_type(), and psys_reset().
#define PSYS_RESET_CACHE_MISS 4 |
Definition at line 352 of file BKE_particle.h.
Referenced by psys_reset(), and system_step().
#define PSYS_RESET_DEPSGRAPH 2 |
Definition at line 350 of file BKE_particle.h.
Referenced by BKE_ptcache_id_reset(), clear_edited_exec(), and psys_reset().
typedef struct ParticleBillboardData ParticleBillboardData |
typedef struct ParticleCacheKey ParticleCacheKey |
typedef struct ParticleCollision ParticleCollision |
typedef struct ParticleCollisionElement ParticleCollisionElement |
typedef struct ParticleDrawData ParticleDrawData |
typedef struct ParticleSeam ParticleSeam |
typedef struct ParticleSimulationData ParticleSimulationData |
typedef struct ParticleTexture ParticleTexture |
typedef struct ParticleThread ParticleThread |
typedef struct ParticleThreadContext ParticleThreadContext |
void BKE_psys_collision_neartest_cb | ( | void * | userdata, |
int | index, | ||
const struct BVHTreeRay * | ray, | ||
struct BVHTreeRayHit * | hit | ||
) |
Referenced by boid_find_ground(), collision_detect(), and rule_avoid_collision().
void copy_particle_key | ( | struct ParticleKey * | to, |
struct ParticleKey * | from, | ||
int | time | ||
) |
Definition at line 3240 of file particle.c.
References ParticleKey::time.
Referenced by boid_body(), do_particle_interpolation(), dynamics_step(), get_pointcache_keys_for_time(), integrate_particle(), psys_get_particle_on_path(), psys_get_particle_state(), set_keyed_keys(), and sph_integrate().
int count_particles | ( | struct ParticleSystem * | psys | ) |
Definition at line 93 of file particle.c.
References ParticleSettings::flag, LOOP_SHOWN_PARTICLES, PARS_DEAD, PARS_UNBORN, ParticleSystem::part, PART_DIED, PART_UNBORN, and PARTICLE_P.
Referenced by stats_dupli_object().
int count_particles_mod | ( | struct ParticleSystem * | psys, |
int | totgr, | ||
int | cur | ||
) |
Definition at line 106 of file particle.c.
References ParticleSettings::flag, LOOP_SHOWN_PARTICLES, p, PARS_DEAD, PARS_UNBORN, ParticleSystem::part, PART_DIED, PART_UNBORN, and PARTICLE_P.
Referenced by stats_dupli_object().
int do_guides | ( | struct ListBase * | effectors, |
ParticleKey * | state, | ||
int | pa_num, | ||
float | time | ||
) |
Definition at line 2094 of file particle.c.
References add_v3_v3(), angle(), axis_angle_to_quat(), calc_taper(), CLAMP(), PartDeflect::clump_fac, PartDeflect::clump_pow, ParticleKey::co, copy_v3_v3(), cross_v3_v3v3(), CU_PATH_RADIUS, Object::data, data, do_clump(), do_kink(), dot_v3v3(), ListBase::first, Curve::flag, PartDeflect::flag, PartDeflect::forcefield, PartDeflect::free_end, EffectorCache::guide_data, EffectorCache::guide_dir, EffectorCache::guide_loc, interp_v3_v3v3(), PartDeflect::kink, PartDeflect::kink_amp, PartDeflect::kink_axis, PartDeflect::kink_freq, PartDeflect::kink_shape, len_v3(), madd_v3_v3fl(), mul_m4_v3(), mul_mat3_m4_v3(), mul_qt_v3(), mul_v3_fl(), EffectorCache::next, normalize_v3(), NULL, EffectorCache::ob, Object::obmat, EffectorCache::pd, PFIELD_GUIDE, PFIELD_GUIDE_PATH_ADD, PFIELD_GUIDE_PATH_WEIGHT, saacos(), EffectorCache::scene, GuideEffectorData::strength, Curve::taperobj, GuideEffectorData::vec_to_point, ParticleKey::vel, and where_on_path().
Referenced by basic_integrate(), do_child_modifiers(), and psys_get_particle_on_path().
void free_hair | ( | struct Object * | ob, |
struct ParticleSystem * | psys, | ||
int | dynamics | ||
) |
Referenced by particle_system_update(), psys_changed_type(), and psys_free().
void free_keyed_keys | ( | struct ParticleSystem * | psys | ) |
Definition at line 428 of file particle.c.
References ParticleData::keys, LOOP_PARTICLES, MEM_freeN(), NULL, ParticleSystem::part, PART_HAIR, PARTICLE_P, ParticleSystem::particles, and ParticleSettings::type.
Referenced by particle_system_update(), psys_prepare_physics(), and set_keyed_keys().
void initialize_particle | ( | struct ParticleSimulationData * | sim, |
struct ParticleData * | pa, | ||
int | p | ||
) |
Definition at line 1486 of file particle_system.c.
References ParticleSettings::end, ParticleTexture::exist, ParticleData::flag, ParticleData::hair_index, PAMAP_INIT, PARS_UNEXIST, ParticleSystem::part, PART_FLUID, PART_HAIR, ParticleSimulationData::psys, PSYS_FRAND, psys_get_texture(), ParticleSettings::sta, ParticleTexture::time, ParticleData::time, and ParticleSettings::type.
Referenced by brush_add(), and initialize_all_particles().
void make_local_particlesettings | ( | struct ParticleSettings * | part | ) |
Definition at line 3608 of file particle.c.
References BKE_id_lib_local_paths(), ELEM, expand_local_particlesettings(), FALSE, ListBase::first, G, Object::id, ParticleSettings::id, id_clear_lib_data(), ID::lib, ParticleSystem::next, ID::next, Main::object, ParticleSystem::part, Object::particlesystem, psys_copy_settings(), TRUE, and ID::us.
Referenced by id_make_local().
struct ModifierData* object_add_particle_system | ( | struct Scene * | scene, |
struct Object * | ob, | ||
const char * | name | ||
) | [read] |
Definition at line 3392 of file particle.c.
References BKE_frame_to_ctime(), BKE_ptcache_add(), BLI_addtail(), BLI_countlist(), BLI_snprintf(), BLI_strncpy(), CFRA, ParticleSystem::cfra, DAG_id_tag_update(), DAG_scene_sort(), eModifierType_ParticleSystem, ListBase::first, ParticleSystem::flag, G, Object::id, MEM_callocN(), modifier_new(), modifier_unique_name(), Object::modifiers, ModifierData::name, ParticleSystem::name, ParticleSystem::next, NULL, OB_MESH, OB_RECALC_DATA, ParticleSystem::part, Object::particlesystem, ParticleSystem::pointcache, ParticleSystemModifierData::psys, PSYS_CURRENT, PSYS_ENABLED, psys_new_settings(), ParticleSystem::ptcaches, ParticleSystem::totpart, and Object::type.
Referenced by ED_object_modifier_add(), and particle_system_add_exec().
Definition at line 3435 of file particle.c.
References BLI_remlink(), DynamicPaintModifierData::brush, DAG_id_tag_update(), DAG_scene_sort(), eModifierType_DynamicPaint, eModifierType_Smoke, ListBase::first, SmokeModifierData::flow, G, Object::id, MOD_SMOKE_TYPE_FLOW, Object::mode, modifier_free(), Object::modifiers, modifiers_findByType(), NULL, OB_MODE_PARTICLE_EDIT, OB_RECALC_DATA, Object::particlesystem, DynamicPaintBrushSettings::psys, SmokeFlowSettings::psys, PSYS_CURRENT, psys_free(), psys_get_current(), psys_get_modifier(), and SmokeModifierData::type.
Referenced by particle_system_remove_exec().
void particle_system_update | ( | struct Scene * | scene, |
struct Object * | ob, | ||
struct ParticleSystem * | psys | ||
) |
Definition at line 4356 of file particle_system.c.
References Object::adt, ParticleSettings::adt, ADT_RECALC_ANIM, ADT_RECALC_DRIVERS, BKE_animsys_evaluate_animdata(), BKE_curframe(), ParticleSystem::cfra, distribute_particles(), ParticleSystemModifierData::dm, ParticleSystem::edit, emit_particles(), eParticleSystemFlag_Pars, eParticleSystemFlag_psys_updated, ParticleData::flag, ParticleSystem::flag, ParticleSettings::flag, ParticleSystemModifierData::flag, ParticleDrawData::flag, ParticleSystem::free_edit, free_hair(), free_keyed_keys(), ParticleSettings::from, hair_needs_recalc(), hair_step(), ParticleSettings::hair_step, i, Object::id, ParticleSettings::id, ParticleSystem::imat, initialize_all_particles(), invert_m4_m4(), LOOP_EXISTING_PARTICLES, NULL, ParticleSimulationData::ob, Object::obmat, Object::parent, PARS_NO_DISP, ParticleSystem::part, PART_FLUID, PART_HAIR, PART_HAIR_REGROW, PART_PHYS_KEYED, PART_PHYS_NO, PARTICLE_DRAW_DATA_UPDATED, PARTICLE_P, particles_fluid_step(), ParticleSystem::pdd, ParticleSettings::phystype, ParticleSimulationData::psmd, ParticleSimulationData::psys, psys_changed_type(), psys_check_enabled(), psys_count_keyed_targets(), PSYS_EDITED, PSYS_FRAND, psys_free_path_cache(), psys_get_current_display_percentage(), psys_get_modifier(), PSYS_HAIR_DONE, psys_prepare_physics(), PSYS_RECALC_RESET, PSYS_RECALC_TYPE, psys_reset(), PSYS_RESET_ALL, psys_update_path_cache(), ParticleSettings::randsize, ParticleSystem::recalc, ParticleSystem::renderdata, reset_particle(), save_hair(), ParticleSimulationData::scene, set_keyed_keys(), ParticleSettings::size, ParticleData::size, system_step(), ParticleSettings::totpart, ParticleSystem::totpart, ParticleSystem::totunexist, ParticleSettings::type, and where_is_object_time().
Referenced by deformVerts(), and object_handle_update().
void precalc_guides | ( | struct ParticleSimulationData * | sim, |
struct ListBase * | effectors | ||
) |
Definition at line 2054 of file particle.c.
References ParticleKey::co, copy_v3_v3(), data, EffectorData::distance, effector_falloff(), ParticleSettings::effector_weights, ListBase::first, PartDeflect::forcefield, ParticleSettings::from, EffectorCache::guide_data, EffectorCache::guide_dir, EffectorCache::guide_loc, len_v3(), LOOP_PARTICLES, MEM_callocN(), mul_m4_v3(), mul_mat3_m4_v3(), EffectorCache::next, EffectorData::nor, ParticleSimulationData::ob, Object::obmat, p, ParticleSystem::part, PARTICLE_P, EffectorCache::pd, pd_point_from_particle(), PFIELD_GUIDE, ParticleSimulationData::psmd, ParticleSimulationData::psys, psys_particle_on_emitter(), state, GuideEffectorData::strength, sub_v3_v3v3(), ParticleSystem::totpart, GuideEffectorData::vec_to_point, EffectorData::vec_to_point, and ParticleKey::vel.
Referenced by psys_update_effectors().
void psys_apply_hair_lattice | ( | struct Scene * | scene, |
struct Object * | ob, | ||
struct ParticleSystem * | psys | ||
) |
Definition at line 4528 of file particle.c.
References calc_latt_deform(), HairKey::co, ParticleSystemModifierData::dm, end_latt_deform(), ParticleSystem::flag, ParticleSettings::from, ParticleData::hair, invert_m4_m4(), ParticleSystem::lattice, mul_m4_v3(), NULL, ParticleSimulationData::ob, p, ParticleSystem::part, ParticleSystem::particles, ParticleSimulationData::psmd, ParticleSimulationData::psys, PSYS_EDITED, psys_get_lattice(), psys_get_modifier(), psys_mat_hair_to_global(), ParticleSimulationData::scene, ParticleData::totkey, and ParticleSystem::totpart.
Referenced by modifier_apply_obdata().
void psys_cache_child_paths | ( | struct ParticleSimulationData * | sim, |
float | cfra, | ||
int | editupdate | ||
) |
Definition at line 2745 of file particle.c.
References BLI_end_threads(), BLI_init_threads(), BLI_insert_thread(), ParticleSystem::childcache, ParticleSystem::childcachebufs, ParticleThread::ctx, exec_child_path_cache(), ParticleSystem::flag, free_child_path_cache(), i, ParticleThreadContext::parent_pass, ParticleSimulationData::psys, psys_alloc_path_cache_buffers(), PSYS_GLOBAL_HAIR, psys_threads_create(), psys_threads_free(), psys_threads_init_path(), ParticleSimulationData::scene, ParticleThreadContext::steps, threads, ParticleThread::tot, ParticleThreadContext::totchild, ParticleSystem::totchildcache, and ParticleThreadContext::totparent.
Referenced by psys_cache_edit_paths(), and psys_update_path_cache().
void psys_cache_edit_paths | ( | struct Scene * | scene, |
struct Object * | ob, | ||
struct PTCacheEdit * | edit, | ||
float | cfra | ||
) |
Definition at line 3036 of file particle.c.
References ParticleInterpolationData::birthtime, ParticleEditSettings::brushtype, ParticleInterpolationData::bspline, ParticleInterpolationData::cache, cache_key_incremental_rotation(), ParticleKey::co, ParticleCacheKey::co, ParticleCacheKey::col, copy_qt_qt(), copy_v3_v3(), ParticleInterpolationData::dietime, ParticleSystemModifierData::dm, ParticleInterpolationData::dm, do_particle_interpolation(), ParticleEditSettings::draw_step, ParticleInterpolationData::ekey, ParticleInterpolationData::epoint, ParticleSystem::flag, ParticleSettings::flag, PTCacheEditPoint::flag, ParticleSettings::from, ParticleData::hair, ParticleInterpolationData::hkey, i, init_particle_interpolation(), interp_v3_v3v3(), ParticleInterpolationData::keyed, PTCacheEditPoint::keys, mat3_to_quat_is_ok(), MAX2, mul_m4_v3(), PTCacheEdit::nosel_col, NULL, ParticleSimulationData::ob, ParticleSystem::part, PART_HAIR_BSPLINE, ToolSettings::particle, ParticleSystem::particles, PTCacheEdit::pathcache, PTCacheEdit::pathcachebufs, PE_BRUSH_WEIGHT, PEK_SELECT, PEP_EDIT_RECALC, PTCacheEdit::points, pow(), ParticleSimulationData::psmd, ParticleSimulationData::psys, PTCacheEdit::psys, psys_alloc_path_cache_buffers(), psys_cache_child_paths(), psys_free_path_cache(), psys_get_modifier(), PSYS_GLOBAL_HAIR, psys_mat_hair_to_global(), rot, ParticleCacheKey::rot, ParticleSimulationData::scene, PTCacheEdit::sel_col, ParticleCacheKey::steps, sub_v3_v3v3(), ParticleCacheKey::time, HairKey::time, PTCacheEditKey::time, ParticleKey::time, Scene::toolsettings, PTCacheEdit::totcached, PTCacheEdit::totpoint, ParticleCacheKey::vel, HairKey::weight, and weight_to_rgb().
Referenced by draw_update_ptcache_edit(), PE_update_object(), and PE_update_selection().
void psys_cache_paths | ( | struct ParticleSimulationData * | sim, |
float | cfra | ||
) |
Definition at line 2848 of file particle.c.
References ParticleSystem::flag, ParticleSystem::hair_out_dm, NULL, ParticleSystem::part, PART_HAIR, ToolSettings::particle, PARTICLE_P, PARTICLE_PSMD, ParticleSimulationData::psys, PSYS_HAIR_DYNAMICS, ParticleSimulationData::scene, Scene::toolsettings, and ParticleSettings::type.
Referenced by psys_update_path_cache().
float* psys_cache_vgroup | ( | struct DerivedMesh * | dm, |
struct ParticleSystem * | psys, | ||
int | vgroup | ||
) |
Definition at line 2289 of file particle.c.
References CD_MDEFORMVERT, defvert_find_weight(), DerivedMesh::getNumVerts, DerivedMesh::getVertDataArray, i, MEM_callocN(), ParticleSystem::vg_neg, and ParticleSystem::vgroup.
Referenced by distribute_threads_init_data(), and psys_threads_init_path().
void psys_calc_dmcache | ( | struct Object * | ob, |
struct DerivedMesh * | dm, | ||
struct ParticleSystem * | psys | ||
) |
Definition at line 332 of file particle_system.c.
References CD_ORIGINDEX, Object::data, DerivedMesh::deformedOnly, ParticleSettings::from, GET_INT_FROM_POINTER, DerivedMesh::getFaceDataArray, DerivedMesh::getNumFaces, DerivedMesh::getNumVerts, DerivedMesh::getVertDataArray, i, LinkNode::link, LOOP_PARTICLES, MEM_callocN(), MEM_freeN(), LinkNode::next, NULL, ParticleSystem::part, PART_FROM_VERT, PARTICLE_P, psys_particle_dm_face_lookup(), SET_INT_IN_POINTER, totelem, Mesh::totface, and Mesh::totvert.
Referenced by distribute_particles_on_dm(), distribute_simple_children(), hair_step(), and psys_render_restore().
void psys_check_boid_data | ( | struct ParticleSystem * | psys | ) |
Definition at line 4265 of file particle_system.c.
References ParticleData::boid, LOOP_PARTICLES, MEM_callocN(), MEM_freeN(), NULL, ParticleSystem::part, PART_PHYS_BOIDS, PARTICLE_P, ParticleSystem::particles, ParticleSettings::phystype, and ParticleSystem::totpart.
Referenced by new_particle_settings_exec(), and psys_prepare_physics().
int psys_check_edited | ( | struct ParticleSystem * | psys | ) |
Definition at line 293 of file particle.c.
References PointCache::edit, ParticleSystem::edit, PTCacheEdit::edited, ParticleSystem::flag, ParticleSystem::part, PART_HAIR, ParticleSystem::pointcache, PSYS_EDITED, and ParticleSettings::type.
int psys_check_enabled | ( | struct Object * | ob, |
struct ParticleSystem * | psys | ||
) |
Definition at line 267 of file particle.c.
References eModifierMode_Realtime, eModifierMode_Render, ParticleSystem::flag, ParticleSystem::frand, G, MEM_freeN(), ModifierData::mode, ParticleSystemModifierData::modifier, ParticleSystem::part, psys_create_frand(), PSYS_DELETE, PSYS_DISABLED, psys_get_modifier(), PSYS_RECALC_RESET, ParticleSystem::recalc, and ParticleSystem::renderdata.
Referenced by add_particles_to_effectors(), build_dag_object(), dag_object_time_update_flags(), deformVerts(), draw_new_particle_system(), dynamicPaint_doStep(), new_particle_duplilist(), object_handle_update(), particle_system_update(), pointdensity_cache_psys(), and render_new_particle_system().
void psys_check_group_weights | ( | struct ParticleSettings * | part | ) |
Definition at line 301 of file particle.c.
References BLI_addtail(), BLI_freelinkN(), BLI_freelistN(), ParticleDupliWeight::count, ParticleSettings::dup_group, ParticleSettings::dupliweights, ListBase::first, ParticleDupliWeight::flag, Group::gobject, MEM_callocN(), GroupObject::next, ParticleDupliWeight::next, GroupObject::ob, ParticleDupliWeight::ob, object_in_group(), PART_DRAW_GR, PART_DUPLIW_CURRENT, and ParticleSettings::ren_as.
Referenced by new_particle_duplilist().
struct ParticleSettings* psys_copy_settings | ( | struct ParticleSettings * | part | ) | [read] |
Definition at line 3572 of file particle.c.
References BLI_duplicatelist(), boid_copy_settings(), ParticleSettings::boids, copy_libblock(), ParticleSettings::dupliweights, ParticleSettings::effector_weights, ParticleSettings::fluid, ParticleSettings::id, id_us_plus(), MAX_MTEX, MEM_dupallocN(), MEM_mallocN(), ParticleSettings::mtex, ParticleSettings::pd, ParticleSettings::pd2, and MTex::tex.
Referenced by id_copy(), make_local_particlesettings(), new_particle_settings_exec(), and object_add_duplicate_internal().
void psys_count_keyed_targets | ( | struct ParticleSimulationData * | sim | ) |
Definition at line 1887 of file particle_system.c.
References ParticleTarget::duration, ListBase::first, ParticleSystem::flag, ParticleSettings::keyed_loops, ParticleTarget::next, ParticleSimulationData::ob, ParticleSystem::part, ParticleSimulationData::psys, psys_get_target_system(), PSYS_KEYED_TIMING, ParticleSystem::targets, and ParticleSystem::totkeyed.
Referenced by draw_new_particle_system(), particle_system_update(), and render_new_particle_system().
void psys_disable_all | ( | struct Object * | ob | ) |
Definition at line 239 of file particle.c.
References ListBase::first, ParticleSystem::flag, ParticleSystem::next, Object::particlesystem, and PSYS_DISABLED.
Referenced by particle_intersect_dm().
void psys_enable_all | ( | struct Object * | ob | ) |
Definition at line 246 of file particle.c.
References ListBase::first, ParticleSystem::flag, ParticleSystem::next, Object::particlesystem, and PSYS_DISABLED.
Referenced by particle_intersect_dm().
struct Object* psys_find_object | ( | struct Scene * | scene, |
struct ParticleSystem * | psys | ||
) | [read] |
Definition at line 204 of file particle.c.
References Scene::base, ListBase::first, ParticleSystem::next, Base::next, NULL, Base::object, and Object::particlesystem.
void psys_find_parents | ( | struct ParticleSimulationData * | sim | ) |
Definition at line 2314 of file particle.c.
References BLI_kdtree_balance(), BLI_kdtree_find_nearest(), BLI_kdtree_free(), BLI_kdtree_insert(), BLI_kdtree_new(), ParticleSystem::child, ParticleSettings::child_nbr, co, DMCACHE_ISCHILD, ChildParticle::foffset, ChildParticle::fuv, G, NULL, ChildParticle::num, p, ChildParticle::parent, ParticleSettings::parents, ParticleSystem::part, PART_FROM_FACE, ParticleSimulationData::psmd, ParticleSimulationData::psys, psys_particle_on_emitter(), ParticleSettings::ren_child_nbr, and ParticleSystem::totchild.
Referenced by psys_update_path_cache().
void psys_free | ( | struct Object * | ob, |
struct ParticleSystem * | psys | ||
) |
Definition at line 524 of file particle.c.
References BKE_ptcache_free_list(), BLI_bvhtree_free(), BLI_freelistN(), BLI_kdtree_free(), ParticleSystem::bvhtree, ParticleSystem::child, ParticleSystem::edit, ParticleSystem::effectors, ELEM, ListBase::first, ParticleSystem::fluid_springs, ParticleSystem::frand, ParticleSystem::free_edit, free_hair(), ParticleSettings::id, MEM_freeN(), ParticleSystem::next, NULL, OB_DUPLIPARTS, ParticleSystem::part, PART_DRAW_GR, PART_DRAW_OB, Object::particlesystem, ParticleSystem::pdd, pdEndEffectors(), ParticleSystem::pointcache, psys_free_particles(), psys_free_path_cache(), psys_free_pdd(), ParticleSystem::ptcaches, ParticleSettings::ren_as, ParticleSystem::targets, ParticleSystem::totchild, Object::transflag, ParticleSystem::tree, and ID::us.
Referenced by object_free_particlesystems(), object_handle_update(), object_modifier_remove(), and object_remove_particle_system().
void psys_free_children | ( | struct ParticleSystem * | psys | ) |
Definition at line 467 of file particle.c.
References ParticleSystem::child, free_child_path_cache(), MEM_freeN(), NULL, and ParticleSystem::totchild.
Referenced by psys_update_path_cache(), and update_children().
void psys_free_particles | ( | struct ParticleSystem * | psys | ) |
Definition at line 477 of file particle.c.
References ParticleData::boid, ParticleData::keys, LOOP_PARTICLES, MEM_freeN(), NULL, ParticleSystem::part, PART_HAIR, PARTICLE_P, ParticleSystem::particles, ParticleSystem::totpart, and ParticleSettings::type.
Referenced by psys_free(), and psys_reset().
void psys_free_path_cache | ( | struct ParticleSystem * | psys, |
struct PTCacheEdit * | edit | ||
) |
Definition at line 452 of file particle.c.
References free_child_path_cache(), NULL, ParticleSystem::pathcache, PTCacheEdit::pathcache, ParticleSystem::pathcachebufs, PTCacheEdit::pathcachebufs, psys_free_path_cache_buffers(), ParticleSystem::totcached, and PTCacheEdit::totcached.
Referenced by brush_edit_apply(), connect_hair(), disconnect_hair(), particle_system_update(), PE_free_ptcache_edit(), psys_cache_edit_paths(), psys_free(), psys_render_restore(), psys_reset(), and psys_update_path_cache().
void psys_free_pdd | ( | struct ParticleSystem * | psys | ) |
Definition at line 500 of file particle.c.
References ParticleDrawData::cdata, MEM_freeN(), ParticleDrawData::ndata, NULL, ParticleSystem::pdd, ParticleDrawData::tot_vec_size, ParticleDrawData::totpoint, ParticleDrawData::vdata, and ParticleDrawData::vedata.
Referenced by draw_new_particle_system(), psys_free(), and realloc_particles().
void psys_free_settings | ( | struct ParticleSettings * | part | ) |
Definition at line 368 of file particle.c.
References BKE_free_animdata(), BLI_freelistN(), boid_free_settings(), ParticleSettings::boids, ParticleSettings::dupliweights, ParticleSettings::effector_weights, ParticleSettings::fluid, fluid_free_settings(), free_partdeflect(), Tex::id, ParticleSettings::id, MAX_MTEX, MEM_freeN(), ParticleSettings::mtex, ParticleSettings::pd, ParticleSettings::pd2, MTex::tex, and ID::us.
Referenced by free_libblock().
void psys_get_birth_coordinates | ( | struct ParticleSimulationData * | sim, |
struct ParticleData * | pa, | ||
struct ParticleKey * | state, | ||
float | dtime, | ||
float | cfra | ||
) |
Definition at line 1561 of file particle_system.c.
References ParticleKey::ave, ParticleSettings::avefac, ParticleSettings::avemode, axis_angle_to_quat(), ParticleData::boid, ParticleKey::co, copy_qt_qt(), copy_v3_v3(), cosf, cross_v3_v3v3(), dot_v3v3(), fabsf, ParticleData::foffset, ParticleSettings::from, ParticleData::fuv, interp_qt_qtqt(), ParticleTexture::ivel, M_PI, madd_v3_v3fl(), mat3_to_quat_is_ok(), mat4_to_quat(), mul_m4_v3(), mul_mat3_m4_v3(), mul_qt_qtqt(), mul_v3_fl(), mul_v3_v3fl(), negate_v3(), negate_v3_v3(), normalize_qt(), normalize_v3(), normalize_v3_v3(), ParticleSettings::normfac, ParticleData::num, ParticleData::num_dmcache, ParticleSimulationData::ob, OB_POSX, OB_POSZ, ParticleSettings::ob_vel, ParticleSettings::obfac, Object::obmat, p, PAMAP_IVEL, ParticleSystem::part, PART_AVE_RAND, PART_AVE_SPIN, PART_PHYS_BOIDS, PART_ROT_GLOB_X, PART_ROT_GLOB_Y, PART_ROT_GLOB_Z, PART_ROT_NOR, PART_ROT_OB_X, PART_ROT_OB_Y, PART_ROT_OB_Z, PART_ROT_VEL, ParticleSettings::partfac, ParticleSystem::particles, ParticleSettings::phasefac, ParticleSettings::phystype, ParticleData::prev_state, project_v3_v3v3(), ParticleSimulationData::psmd, ParticleSimulationData::psys, PSYS_FRAND, psys_get_texture(), psys_particle_on_emitter(), ParticleSettings::randfac, ParticleSettings::randphasefac, ParticleSettings::randrotfac, ParticleKey::rot, rot, ParticleSettings::rotmode, sinf, ParticleData::state, sub_v3_v3(), sub_v3_v3v3(), ParticleSettings::tanfac, ParticleSettings::tanphase, unit_qt(), vec_to_quat(), ParticleKey::vel, and zero_v3().
Referenced by explodeMesh(), and reset_particle().
float psys_get_child_size | ( | struct ParticleSystem * | psys, |
struct ChildParticle * | cpa, | ||
float | cfra, | ||
float * | pa_time | ||
) |
Referenced by applyModifier(), draw_new_particle_system(), new_particle_duplilist(), and render_new_particle_system().
float psys_get_child_time | ( | struct ParticleSystem * | psys, |
struct ChildParticle * | cpa, | ||
float | cfra, | ||
float * | birthtime, | ||
float * | dietime | ||
) |
Definition at line 3868 of file particle.c.
References ParticleSystem::child, ParticleSettings::childtype, ParticleData::lifetime, ParticleSettings::lifetime, ChildParticle::pa, ChildParticle::parent, ParticleSystem::part, PART_CHILD_FACES, ParticleSystem::particles, PSYS_FRAND, ParticleSettings::randlife, ParticleData::time, ChildParticle::w, and simple_enum_gen::w.
Referenced by draw_new_particle_system(), pointdensity_cache_psys(), psys_get_particle_on_path(), psys_get_particle_state(), and render_new_particle_system().
struct ParticleSystem* psys_get_current | ( | struct Object * | ob | ) | [read] |
Definition at line 165 of file particle.c.
References ListBase::first, ParticleSystem::flag, ParticleSystem::next, NULL, Object::particlesystem, and PSYS_CURRENT.
Referenced by buttons_context_path_particle(), buttons_texture_users_from_context(), clear_edited_exec(), draw_new_particle_system(), object_remove_particle_system(), and psys_in_edit_mode().
short psys_get_current_num | ( | struct Object * | ob | ) |
Definition at line 177 of file particle.c.
References ListBase::first, ParticleSystem::flag, i, ParticleSystem::next, NULL, Object::particlesystem, and PSYS_CURRENT.
float psys_get_dietime_from_cache | ( | struct PointCache * | cache, |
int | index | ||
) |
Definition at line 1128 of file particle.c.
References BKE_ptcache_mem_index_find(), PTCacheMem::frame, ListBase::last, PointCache::mem_cache, and PTCacheMem::prev.
Referenced by reset_particle().
void psys_get_dupli_path_transform | ( | struct ParticleSimulationData * | sim, |
struct ParticleData * | pa, | ||
struct ChildParticle * | cpa, | ||
struct ParticleCacheKey * | cache, | ||
float | mat[][4], | ||
float * | scale | ||
) |
Definition at line 4377 of file particle.c.
References axis_angle_to_quat(), ParticleSettings::childflat, ParticleCacheKey::co, copy_m3_m4(), copy_v3_v3(), cross_v3_v3v3(), DMCACHE_ISCHILD, dot_v3v3(), fabs(), ChildParticle::foffset, ParticleData::foffset, ParticleSettings::from, ChildParticle::fuv, ParticleData::fuv, Object::imat, len(), M_PI, mul_m3_v3(), mul_qt_v3(), normalize_v3(), NULL, ChildParticle::num, ParticleData::num, ParticleData::num_dmcache, ParticleSimulationData::ob, ChildParticle::pa, ParticleSystem::part, PART_CHILD_FACES, PART_FROM_FACE, PART_ROT_VEL, ParticleSystem::particles, ParticleSettings::phasefac, ParticleSimulationData::psmd, ParticleSimulationData::psys, PSYS_FRAND, psys_particle_on_emitter(), quat_to_mat4(), ParticleSettings::randphasefac, ParticleKey::rot, ParticleSettings::rotmode, ParticleData::state, ParticleCacheKey::steps, sub_v3_v3v3(), transpose_m3(), and unit_m4().
Referenced by new_particle_duplilist().
void psys_get_dupli_texture | ( | struct ParticleSystem * | psys, |
struct ParticleSettings * | part, | ||
struct ParticleSystemModifierData * | psmd, | ||
struct ParticleData * | pa, | ||
struct ChildParticle * | cpa, | ||
float * | uv, | ||
float * | orco | ||
) |
Definition at line 4328 of file particle.c.
References CD_MFACE, CD_MTFACE, ParticleSettings::childtype, CustomData_get_layer(), ParticleSystemModifierData::dm, DMCACHE_ISCHILD, DMCACHE_NOTFOUND, DerivedMesh::faceData, ParticleData::foffset, ChildParticle::foffset, ParticleSettings::from, ParticleData::fuv, ChildParticle::fuv, DerivedMesh::getFaceData, DerivedMesh::getNumFaces, ParticleData::num, ChildParticle::num, ParticleData::num_dmcache, ChildParticle::pa, PART_CHILD_FACES, PART_FROM_FACE, ParticleSystem::particles, psys_interpolate_uvs(), psys_particle_on_emitter(), and MFace::v4.
Referenced by new_particle_duplilist().
void psys_get_from_key | ( | struct ParticleKey * | key, |
float * | loc, | ||
float * | vel, | ||
float * | rot, | ||
float * | time | ||
) |
Definition at line 3251 of file particle.c.
References ParticleKey::co, copy_qt_qt(), copy_v3_v3(), ParticleKey::rot, ParticleKey::time, and ParticleKey::vel.
struct Object* psys_get_lattice | ( | struct ParticleSimulationData * | sim | ) | [read] |
Definition at line 218 of file particle.c.
References eModifierType_Lattice, init_latt_deform(), ModifierData::next, NULL, ParticleSimulationData::ob, LatticeModifierData::object, ParticleSimulationData::psys, psys_get_modifier(), psys_in_edit_mode(), ParticleSimulationData::scene, and ModifierData::type.
Referenced by applyModifier(), cached_step(), draw_new_particle_system(), explodeMesh(), new_particle_duplilist(), pointdensity_cache_psys(), psys_apply_hair_lattice(), psys_threads_init_path(), render_new_particle_system(), and save_hair().
struct ParticleSystemModifierData* psys_get_modifier | ( | struct Object * | ob, |
struct ParticleSystem * | psys | ||
) | [read] |
Definition at line 1791 of file particle.c.
References eModifierType_ParticleSystem, ListBase::first, Object::modifiers, ModifierData::next, NULL, ParticleSystemModifierData::psys, and ModifierData::type.
Referenced by applyModifier(), brush_add(), brush_edit_apply(), connect_hair(), createTransParticleVerts(), disconnect_hair(), draw_new_particle_system(), dupli_render_particle_set(), flushTransParticles(), foreach_mouse_hit_key(), lib_link_particlesystems(), new_particle_duplilist(), object_handle_update(), object_remove_particle_system(), particle_system_update(), PE_apply_mirror(), PE_create_particle_edit(), pe_deflect_emitter(), PE_lasso_select(), PE_minmax(), PE_mirror_x(), PE_update_mirror_cache(), psys_apply_hair_lattice(), psys_cache_edit_paths(), psys_check_enabled(), psys_get_lattice(), psys_render_restore(), psys_render_set(), recalc_emitter_field(), remove_doubles_exec(), remove_tagged_keys(), remove_tagged_particles(), render_new_particle_system(), and update_world_cos().
void psys_get_particle_on_path | ( | struct ParticleSimulationData * | sim, |
int | pa_num, | ||
struct ParticleKey * | state, | ||
int | vel | ||
) |
Definition at line 3984 of file particle.c.
References ParticleInterpolationData::bspline, ParticleInterpolationData::cache, calc_latt_deform(), ParticleSystem::child, ParticleSettings::childflat, ParticleSettings::childrad, ParticleSettings::childtype, CLAMP(), ParticleKey::co, co, copy_particle_key(), copy_v3_v3(), ParticleThreadContext::dm, ParticleSystemModifierData::dm, ParticleInterpolationData::dm, DMCACHE_ISCHILD, do_child_modifiers(), do_guides(), do_particle_interpolation(), ParticleSystem::effectors, ParticleInterpolationData::epoint, ParticleData::flag, ParticleSettings::flag, ParticleSystem::flag, ParticleData::foffset, ChildParticle::foffset, ParticleSettings::from, ParticleData::fuv, ChildParticle::fuv, get_child_modifier_parameters(), give_current_material(), ParticleSystem::hair_out_dm, init_particle_interpolation(), ParticleInterpolationData::keyed, ParticleSystem::lattice, len_v3(), ParticleThreadContext::ma, mul_m4_v3(), mul_mat3_m4_v3(), mul_v3_fl(), normalize_v3(), NULL, ParticleData::num, ChildParticle::num, ParticleSimulationData::ob, Object::obmat, offset_child(), ParticleSettings::omat, p, ChildParticle::pa, ChildParticle::parent, PARS_REKEY, ParticleSystem::part, PART_CHILD_FACES, PART_CHILD_GUIDE, PART_FROM_FACE, PART_HAIR, PART_HAIR_BSPLINE, PART_PHYS_KEYED, PARTICLE_PSMD, ParticleSystem::particles, ParticleSettings::phystype, ParticleSystem::pointcache, ParticleSimulationData::psmd, ParticleSimulationData::psys, psys_get_child_time(), psys_get_particle_on_path(), PSYS_GLOBAL_HAIR, psys_in_edit_mode(), PSYS_KEYED, psys_mat_hair_to_global(), psys_particle_on_emitter(), ParticleKey::rot, ParticleSimulationData::scene, ParticleThreadContext::sim, sub_v3_v3v3(), ParticleData::time, ParticleKey::time, ParticleSystem::totchild, ParticleSystem::totpart, ParticleSettings::type, unit_m4(), ParticleKey::vel, ChildParticle::w, and simple_enum_gen::w.
Referenced by applyModifier(), brush_add(), draw_new_particle_system(), psys_get_particle_on_path(), psys_get_particle_state(), rekey_particle(), rekey_particle_to_time(), render_new_particle_system(), and subdivide_particle().
int psys_get_particle_state | ( | struct ParticleSimulationData * | sim, |
int | p, | ||
struct ParticleKey * | state, | ||
int | always | ||
) |
Definition at line 4189 of file particle.c.
References ParticleKey::ave, BKE_curframe(), calc_latt_deform(), ParticleSystem::child, ParticleSettings::childflat, ParticleSettings::childrad, ParticleSettings::childtype, CLAMP(), ParticleKey::co, copy_particle_key(), ParticleData::dietime, do_child_modifiers(), ELEM, ParticleSettings::end, ParticleSettings::flag, ParticleSystem::flag, RenderData::frs_sec, ChildParticle::fuv, interp_qt_qtqt(), interp_v3_v3v3(), ParticleSystem::lattice, ParticleData::lifetime, ParticleSettings::lifetime, madd_v3_v3v3fl(), MIN2, mul_v3_fl(), NULL, offset_child(), p, ChildParticle::parent, ParticleSystem::part, PART_CHILD_FACES, PART_DIED, PART_PHYS_KEYED, PART_PHYS_NO, PART_UNBORN, ParticleSystem::particles, ParticleSettings::phystype, ParticleData::prev_state, ParticleSimulationData::psys, PSYS_FRAND, psys_get_child_time(), psys_get_particle_on_path(), psys_get_timestep(), psys_interpolate_particle(), PSYS_KEYED, Scene::r, ParticleKey::rot, ParticleSimulationData::scene, ParticleSettings::sta, ParticleData::state, ParticleData::time, ParticleKey::time, ParticleSystem::totchild, ParticleSystem::totpart, unit_m4(), and ParticleKey::vel.
Referenced by applyModifier(), draw_new_particle_system(), explodeMesh(), get_effector_data(), new_particle_duplilist(), pointdensity_cache_psys(), render_new_particle_system(), and set_keyed_keys().
void psys_get_pointcache_start_end | ( | struct Scene * | scene, |
ParticleSystem * | psys, | ||
int * | sfra, | ||
int * | efra | ||
) |
Definition at line 2001 of file particle_system.c.
References RenderData::efra, ParticleSettings::end, ParticleSettings::lifetime, MAX2, MIN2, ParticleSystem::part, Scene::r, and ParticleSettings::sta.
Referenced by BKE_ptcache_bake(), and system_step().
struct ParticleSystem* psys_get_target_system | ( | struct Object * | ob, |
struct ParticleTarget * | pt | ||
) | [read] |
Definition at line 1867 of file particle_system.c.
References BLI_findlink(), ParticleTarget::flag, NULL, ParticleTarget::ob, Object::particlesystem, ParticleTarget::psys, and PTARGET_VALID.
Referenced by psys_count_keyed_targets(), rule_avoid_collision(), rule_fight(), rule_separate(), and sph_solver_init().
void psys_get_texture | ( | struct ParticleSimulationData * | sim, |
struct ParticleData * | pa, | ||
struct ParticleTexture * | ptex, | ||
int | event, | ||
float | cfra | ||
) |
Definition at line 3776 of file particle.c.
References blend(), MTex::blendtype, CLAMP_PARTICLE_TEXTURE_POS, CLAMP_PARTICLE_TEXTURE_POSNEG, ParticleTexture::clump, ParticleKey::co, co, copy_v3_v3(), ParticleTexture::damp, MTex::dampfac, MTex::def_var, ParticleData::dietime, ParticleSettings::distr, ParticleSystemModifierData::dm, ParticleTexture::effector, ELEM, ParticleTexture::exist, externtex(), fabsf, ParticleTexture::field, MTex::fieldfac, ParticleData::foffset, ParticleSettings::from, ParticleData::fuv, get_particle_uv(), ParticleTexture::gravity, MTex::gravityfac, Object::imat, ParticleTexture::ivel, MTex::ivelfac, ParticleTexture::kink, ParticleTexture::length, MTex::lengthfac, ParticleTexture::life, MTex::lifefac, MAP_PA_TIME, MTex::mapto, MAX_MTEX, ParticleSettings::mtex, mul_m4_v3(), ParticleData::num, ParticleData::num_dmcache, MTex::object, MTex::padensfac, PAMAP_DAMP, PAMAP_DENS, PAMAP_FIELD, PAMAP_GRAVITY, PAMAP_IVEL, PAMAP_LENGTH, PAMAP_LIFE, PAMAP_SIZE, PAMAP_TIME, ParticleSystem::part, PART_DISTR_GRID, PART_FROM_FACE, PART_FROM_VOLUME, ParticleSystem::particles, ParticleSimulationData::psmd, ParticleSimulationData::psys, psys_particle_on_emitter(), ParticleTexture::rough1, ParticleTexture::rough2, ParticleTexture::roughe, SET_PARTICLE_TEXTURE, ParticleTexture::size, MTex::sizefac, ParticleData::state, MTex::texco, TEXCO_GLOB, TEXCO_OBJECT, TEXCO_ORCO, TEXCO_PARTICLE, TEXCO_UV, texture_value_blend(), ParticleData::time, ParticleTexture::time, MTex::timefac, ParticleSystem::totpart, and MTex::uvname.
Referenced by basic_integrate(), cached_step(), dynamics_step(), initialize_particle(), psys_get_birth_coordinates(), and reset_particle().
float psys_get_timestep | ( | struct ParticleSimulationData * | sim | ) |
Definition at line 3864 of file particle.c.
References ParticleSystem::part, ParticleSimulationData::psys, and ParticleSettings::timetweak.
Referenced by basic_integrate(), brush_add(), collision_check(), draw_new_particle_system(), dynamics_step(), pd_point_from_particle(), psys_get_particle_state(), and sph_integrate().
int psys_in_edit_mode | ( | struct Scene * | scene, |
struct ParticleSystem * | psys | ||
) |
Definition at line 253 of file particle.c.
References Scene::basact, PointCache::edit, ParticleSystem::edit, Object::mode, OB_MODE_PARTICLE_EDIT, Base::object, ParticleSystem::pointcache, psys_get_current(), and ParticleSystem::renderdata.
Referenced by draw_new_particle_system(), psys_get_lattice(), psys_get_particle_on_path(), psys_thread_create_path(), psys_threads_init_path(), and psys_update_path_cache().
void psys_interpolate_face | ( | struct MVert * | mvert, |
struct MFace * | mface, | ||
struct MTFace * | tface, | ||
float(*) | orcodata[3], | ||
float * | uv, | ||
float * | vec, | ||
float * | nor, | ||
float * | utan, | ||
float * | vtan, | ||
float * | orco, | ||
float * | ornor | ||
) |
Definition at line 1372 of file particle.c.
References MVert::co, copy_v3_v3(), MFace::flag, interp_v3_v3v3v3(), interp_v3_v3v3v3v3(), map_to_sphere(), ME_SMOOTH, MVert::no, normal_quad_v3(), normal_short_to_float_v3(), normal_tri_v3(), sub_v3_v3v3(), MTFace::uv, MFace::v1, MFace::v2, MFace::v3, and MFace::v4.
Referenced by distribute_threads_exec(), and psys_particle_on_dm().
void psys_interpolate_mcol | ( | const struct MCol * | mcol, |
int | quad, | ||
const float | w[4], | ||
struct MCol * | mc | ||
) |
Referenced by get_particle_uvco_mcol().
void psys_interpolate_particle | ( | short | type, |
struct ParticleKey | keys[4], | ||
float | dt, | ||
struct ParticleKey * | result, | ||
int | velocity | ||
) |
Definition at line 1018 of file particle.c.
References co, ParticleKey::co, interp_cubic_v3(), interp_v3_v3v3v3v3(), key_curve_position_weights(), sub_v3_v3v3(), and ParticleKey::vel.
Referenced by do_particle_interpolation(), psys_get_particle_state(), ptcache_cloth_interpolate(), ptcache_particle_interpolate(), and ptcache_softbody_interpolate().
void psys_interpolate_uvs | ( | const struct MTFace * | tface, |
int | quad, | ||
const float | w[4], | ||
float | uvco[2] | ||
) |
Referenced by get_particle_uv(), get_particle_uvco_mcol(), and psys_get_dupli_texture().
void psys_make_billboard | ( | ParticleBillboardData * | bb, |
float | xvec[3], | ||
float | yvec[3], | ||
float | zvec[3], | ||
float | center[3] | ||
) |
Definition at line 4443 of file particle.c.
References add_v3_v3(), ParticleBillboardData::align, copy_v3_v3(), cos(), cross_v3_v3v3(), dot_v3v3(), ParticleBillboardData::lock, M_PI, madd_v3_v3fl(), madd_v3_v3v3fl(), mul_v3_fl(), normalize_v3(), normalize_v3_v3(), ParticleBillboardData::ob, Object::obmat, ParticleBillboardData::offset, PART_BB_VEL, PART_BB_VIEW, sin(), ParticleBillboardData::size, sub_v3_v3v3(), ParticleBillboardData::tilt, ParticleBillboardData::vec, ParticleBillboardData::vel, and zero_v3().
Referenced by draw_particle(), and particle_billboard().
void psys_make_temp_pointcache | ( | struct Object * | ob, |
struct ParticleSystem * | psys | ||
) |
Definition at line 1984 of file particle_system.c.
References BKE_ptcache_disk_to_mem(), BKE_ptcache_id_from_particles(), ListBase::first, PointCache::flag, PointCache::mem_cache, NULL, ParticleSystem::pointcache, and PTCACHE_DISK_CACHE.
Referenced by draw_new_particle_system(), and render_new_particle_system().
void psys_mat_hair_to_global | ( | struct Object * | ob, |
struct DerivedMesh * | dm, | ||
short | from, | ||
struct ParticleData * | pa, | ||
float | hairmat[][4] | ||
) |
Definition at line 3380 of file particle.c.
References mult_m4_m4m4(), Object::obmat, and psys_mat_hair_to_object().
Referenced by brush_add(), brush_puff(), connect_hair(), createTransParticleVerts(), disconnect_hair(), flushTransParticles(), foreach_mouse_hit_key(), PE_lasso_select(), PE_minmax(), psys_apply_hair_lattice(), psys_cache_edit_paths(), psys_get_particle_on_path(), psys_thread_create_path(), and update_world_cos().
void psys_mat_hair_to_object | ( | struct Object * | ob, |
struct DerivedMesh * | dm, | ||
short | from, | ||
struct ParticleData * | pa, | ||
float | hairmat[][4] | ||
) |
Referenced by do_hair_dynamics(), pe_deflect_emitter(), psys_mat_hair_to_global(), and remove_doubles_exec().
void psys_mat_hair_to_orco | ( | struct Object * | ob, |
struct DerivedMesh * | dm, | ||
short | from, | ||
struct ParticleData * | pa, | ||
float | hairmat[][4] | ||
) |
Definition at line 3358 of file particle.c.
References CD_ORIGINDEX, copy_v3_v3(), Object::data, DM_get_vert_data_layer(), ParticleData::foffset, ParticleData::fuv, ParticleData::num, ParticleData::num_dmcache, psys_face_mat(), psys_particle_on_dm(), and transform_mesh_orco_verts().
Referenced by PE_mirror_particle(), and PE_update_mirror_cache().
struct ParticleSettings* psys_new_settings | ( | const char * | name, |
struct Main * | main | ||
) | [read] |
Definition at line 3558 of file particle.c.
References alloc_libblock(), default_particle_settings(), G, ID_PA, NULL, and Main::particle.
Referenced by do_versions(), new_particle_settings_exec(), and object_add_particle_system().
int psys_particle_dm_face_lookup | ( | struct Object * | ob, |
struct DerivedMesh * | dm, | ||
int | index, | ||
const float | fw[4], | ||
struct LinkNode * | node | ||
) |
Definition at line 1587 of file particle.c.
References CD_MFACE, CD_ORIGINDEX, CD_ORIGSPACE, Object::data, DMCACHE_NOTFOUND, GET_INT_FROM_POINTER, DerivedMesh::getFaceDataArray, DerivedMesh::getNumFaces, isect_point_quad_v2(), isect_point_tri_v2(), LinkNode::link, LinkNode::next, NULL, psys_w_to_origspace(), Mesh::totface, and MFace::v4.
Referenced by brush_add(), connect_hair(), PE_mirror_x(), and psys_calc_dmcache().
void psys_particle_on_dm | ( | struct DerivedMesh * | dm, |
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], | ||
float | ornor[3] | ||
) |
Definition at line 1714 of file particle.c.
References add_v3_v3(), CD_MFACE, CD_MTFACE, CD_MVERT, CD_ORCO, copy_v3_v3(), CustomData_get_layer(), DerivedMesh::faceData, DerivedMesh::getFaceData, DerivedMesh::getVertCo, DerivedMesh::getVertDataArray, DerivedMesh::getVertNo, mul_v3_fl(), normalize_v3(), PART_FROM_VERT, PART_FROM_VOLUME, psys_interpolate_face(), and psys_map_index_on_dm().
Referenced by brush_add(), distribute_threads_exec(), distribute_threads_init_data(), psys_mat_hair_to_object(), psys_mat_hair_to_orco(), and psys_particle_on_emitter().
void psys_particle_on_emitter | ( | struct ParticleSystemModifierData * | psmd, |
int | distr, | ||
int | index, | ||
int | index_dmcache, | ||
float * | fuv, | ||
float | foffset, | ||
float * | vec, | ||
float * | nor, | ||
float * | utan, | ||
float * | vtan, | ||
float * | orco, | ||
float * | ornor | ||
) |
Definition at line 1836 of file particle.c.
References copy_v3_v3(), ParticleSettings::distr, ParticleSystemModifierData::dm, ParticleSettings::from, ParticleSystem::part, PART_DISTR_GRID, PART_FROM_VERT, ParticleSystemModifierData::psys, psys_particle_on_dm(), and psys_particle_on_shape().
Referenced by createFacepa(), precalc_guides(), psys_find_parents(), psys_get_birth_coordinates(), psys_get_dupli_path_transform(), psys_get_dupli_texture(), psys_get_particle_on_path(), psys_get_texture(), psys_thread_create_path(), and render_new_particle_system().
float psys_particle_value_from_verts | ( | struct DerivedMesh * | dm, |
short | from, | ||
struct ParticleData * | pa, | ||
float * | values | ||
) |
Definition at line 1780 of file particle.c.
References ParticleData::foffset, ParticleData::fuv, ParticleData::num, ParticleData::num_dmcache, psys_interpolate_value_from_verts(), and psys_map_index_on_dm().
void psys_render_restore | ( | struct Object * | ob, |
struct ParticleSystem * | psys | ||
) |
Definition at line 728 of file particle.c.
References ParticleRenderData::child, ParticleSystem::child, ParticleRenderData::childcache, ParticleSystem::childcache, ParticleRenderData::childcachebufs, ParticleSystem::childcachebufs, data, ParticleRenderData::dm, ParticleSystemModifierData::dm, ParticleRenderData::elems, eParticleSystemFlag_psys_updated, ListBase::first, ParticleSystemModifierData::flag, ListBase::last, MEM_freeN(), DerivedMesh::needsFree, NULL, ParticleRenderData::pathcache, ParticleSystem::pathcache, ParticleRenderData::pathcachebufs, ParticleSystem::pathcachebufs, psys_calc_dmcache(), psys_free_path_cache(), psys_get_modifier(), DerivedMesh::release, ParticleSystem::renderdata, ParticleRenderData::totcached, ParticleSystem::totcached, ParticleRenderData::totchild, ParticleSystem::totchild, ParticleRenderData::totchildcache, ParticleSystem::totchildcache, ParticleRenderData::totdmedge, ParticleSystemModifierData::totdmedge, ParticleRenderData::totdmface, ParticleSystemModifierData::totdmface, ParticleRenderData::totdmvert, and ParticleSystemModifierData::totdmvert.
Referenced by add_render_object(), dupli_render_particle_set(), and pointdensity_cache_psys().
void psys_render_set | ( | struct Object * | ob, |
struct ParticleSystem * | psys, | ||
float | viewmat[][4], | ||
float | winmat[][4], | ||
int | winx, | ||
int | winy, | ||
int | timeoffset | ||
) |
Definition at line 677 of file particle.c.
References CDDM_copy(), ParticleSystem::child, ParticleRenderData::child, ParticleSystem::childcache, ParticleRenderData::childcache, ParticleSystem::childcachebufs, ParticleRenderData::childcachebufs, copy_m4_m4(), data, ParticleSettings::disp, ParticleRenderData::dm, ParticleSystemModifierData::dm, ListBase::first, G, ListBase::last, ParticleRenderData::mat, MEM_callocN(), mult_m4_m4m4(), NULL, Object::obmat, ParticleSystem::part, PART_HAIR, ParticleSystem::pathcache, ParticleRenderData::pathcache, ParticleSystem::pathcachebufs, ParticleRenderData::pathcachebufs, psys_get_modifier(), PSYS_RECALC_RESET, ParticleSystem::recalc, ParticleSystem::renderdata, ParticleRenderData::timeoffset, ParticleSystem::totcached, ParticleRenderData::totcached, ParticleSystem::totchild, ParticleRenderData::totchild, ParticleSystem::totchildcache, ParticleRenderData::totchildcache, ParticleSystemModifierData::totdmedge, ParticleRenderData::totdmedge, ParticleSystemModifierData::totdmface, ParticleRenderData::totdmface, ParticleSystemModifierData::totdmvert, ParticleRenderData::totdmvert, ParticleSettings::type, ParticleRenderData::viewmat, ParticleRenderData::winmat, ParticleRenderData::winx, and ParticleRenderData::winy.
Referenced by add_render_object(), dupli_render_particle_set(), and pointdensity_cache_psys().
int psys_render_simplify_distribution | ( | struct ParticleThreadContext * | ctx, |
int | tot | ||
) |
Definition at line 777 of file particle.c.
References add_v3_v3(), area_quad_v3(), area_tri_v3(), CD_ORIGINDEX, MVert::co, copy_v3_v3(), ParticleRenderElem::curchild, data, Object::data, ParticleThreadContext::dm, ParticleRenderData::dosimplify, ParticleSettings::draw, ParticleRenderData::elems, DerivedMesh::getFaceArray, DerivedMesh::getFaceDataArray, DerivedMesh::getNumFaces, DerivedMesh::getVertArray, ParticleThreadContext::index, ParticleRenderElem::lambda, log(), MAX2, MEM_callocN(), MEM_freeN(), mesh_get_texspace(), MIN2, mul_v3_fl(), ParticleSimulationData::ob, ParticleRenderData::origindex, ParticleSystem::part, PART_DRAW_PATH, PART_DRAW_REN_STRAND, PART_SIMPLIFY_ENABLE, PART_SIMPLIFY_VIEWPORT, pow(), powf, ParticleSimulationData::psys, psys_render_projected_area(), ParticleRenderElem::reduce, ParticleSettings::ren_as, ParticleSystem::renderdata, ParticleRenderElem::scalemax, ParticleRenderElem::scalemin, ParticleThreadContext::sim, ParticleSettings::simplify_flag, ParticleSettings::simplify_rate, ParticleSettings::simplify_refsize, ParticleSettings::simplify_transition, ParticleSettings::simplify_viewport, size(), ParticleThreadContext::skip, sqrt(), ParticleRenderElem::t, ParticleRenderData::timeoffset, ParticleRenderElem::totchild, Mesh::totface, MFace::v1, MFace::v2, MFace::v3, and MFace::v4.
Referenced by distribute_threads_init_data().
int psys_render_simplify_params | ( | struct ParticleSystem * | psys, |
struct ChildParticle * | cpa, | ||
float * | params | ||
) |
Definition at line 948 of file particle.c.
References ParticleRenderElem::curchild, data, ParticleRenderData::dosimplify, ParticleRenderData::elems, ParticleRenderElem::lambda, ChildParticle::num, ParticleRenderData::origindex, ParticleSystem::part, PART_SIMPLIFY_ENABLE, ParticleRenderElem::reduce, ParticleSystem::renderdata, ParticleRenderElem::scalemax, ParticleRenderElem::scalemin, ParticleSettings::simplify_flag, ParticleRenderElem::t, ParticleRenderElem::totchild, and simple_enum_gen::w.
Referenced by render_new_particle_system().
void psys_reset | ( | struct ParticleSystem * | psys, |
int | mode | ||
) |
Definition at line 147 of file particle_system.c.
References ParticleSystem::alloc_fluidsprings, BKE_ptcache_invalidate(), ParticleSystem::child, ParticleSystem::edit, ELEM, ParticleSystem::flag, ParticleSystem::fluid_springs, ParticleSystem::free_edit, LOOP_PARTICLES, MEM_freeN(), NULL, PARS_NO_DISP, PARTICLE_P, ParticleSystem::pointcache, PSYS_EDITED, psys_free_particles(), psys_free_path_cache(), PSYS_HAIR_DONE, PSYS_KEYED, PSYS_RESET_ALL, PSYS_RESET_CACHE_MISS, PSYS_RESET_DEPSGRAPH, ParticleSystem::tot_fluidsprings, tot_particles(), ParticleSystem::totchild, ParticleSystem::totkeyed, and ParticleSystem::totpart.
Referenced by BKE_ptcache_id_reset(), clear_edited_exec(), particle_system_update(), psys_changed_type(), and system_step().
void psys_set_current_num | ( | Object * | ob, |
int | index | ||
) |
Definition at line 190 of file particle.c.
References ListBase::first, ParticleSystem::flag, i, ParticleSystem::next, NULL, Object::particlesystem, and PSYS_CURRENT.
ParticleThread* psys_threads_create | ( | struct ParticleSimulationData * | sim | ) |
Definition at line 1410 of file particle_system.c.
References BLI_system_thread_count(), ParticleThread::ctx, ParticleSystemModifierData::dm, ParticleThreadContext::dm, give_current_material(), i, ParticleThreadContext::ma, MEM_callocN(), RenderData::mode, ParticleThread::num, ParticleSimulationData::ob, ParticleSettings::omat, ParticleSystem::part, ParticleSimulationData::psmd, ParticleSimulationData::psys, Scene::r, R_FIXED_THREADS, ParticleSimulationData::scene, ParticleThreadContext::sim, RenderData::threads, threads, and ParticleThread::tot.
Referenced by distribute_particles_on_dm(), and psys_cache_child_paths().
void psys_threads_free | ( | ParticleThread * | threads | ) |
Definition at line 1439 of file particle_system.c.
References BLI_kdtree_free(), ParticleThread::ctx, end_latt_deform(), i, ParticleThreadContext::index, ParticleThreadContext::jit, ParticleThreadContext::jitoff, ParticleSystem::lattice, MEM_freeN(), NULL, ParticleSimulationData::psys, rng_free(), ParticleThreadContext::seams, ParticleThreadContext::sim, ParticleThreadContext::skip, ParticleThread::tot, ParticleThreadContext::tree, ParticleThreadContext::vg_clump, ParticleThreadContext::vg_kink, ParticleThreadContext::vg_length, ParticleThreadContext::vg_rough1, ParticleThreadContext::vg_rough2, ParticleThreadContext::vg_roughe, and ParticleThreadContext::weight.
Referenced by distribute_particles_on_dm(), and psys_cache_child_paths().
void psys_update_particle_tree | ( | struct ParticleSystem * | psys, |
float | cfra | ||
) |
Definition at line 2040 of file particle_system.c.
References BLI_kdtree_balance(), BLI_kdtree_free(), BLI_kdtree_insert(), BLI_kdtree_new(), LOOP_SHOWN_PARTICLES, NULL, p, PARS_ALIVE, PARTICLE_P, ParticleSystem::totpart, ParticleSystem::tree, and ParticleSystem::tree_frame.
Referenced by dynamics_step(), and precalculate_effector().
int psys_uses_gravity | ( | struct ParticleSimulationData * | sim | ) |
Definition at line 355 of file particle.c.
References ParticleSettings::effector_weights, PhysicsSettings::flag, EffectorWeights::global_gravity, ParticleSystem::part, PHYS_GLOBAL_GRAVITY, Scene::physics_settings, ParticleSimulationData::psys, and ParticleSimulationData::scene.
Referenced by basic_integrate(), boid_body(), rule_average_speed(), and sph_solver_init().
void psys_vec_rot_to_face | ( | struct DerivedMesh * | dm, |
struct ParticleData * | pa, | ||
float * | vec | ||
) |
Definition at line 3371 of file particle.c.
References mul_mat3_m4_v3(), psys_face_mat(), and transpose_m4().
Referenced by save_hair().
void reset_particle | ( | struct ParticleSimulationData * | sim, |
struct ParticleData * | pa, | ||
float | dtime, | ||
float | cfra | ||
) |
Definition at line 1787 of file particle_system.c.
References BoidData::acc, Object::adt, ADT_RECALC_ANIM, ParticleData::alive, BKE_animsys_evaluate_animdata(), ParticleData::boid, ParticleSettings::boids, ParticleSystem::cfra, BoidParticle::data, ParticleData::dietime, eBoidMode_InAir, ListBase::first, PointCache::flag, PhysicsSettings::flag, PhysicsSettings::gravity, BoidParticle::gravity, BoidSettings::health, BoidData::health, Object::id, ParticleTexture::life, ParticleSettings::lifetime, ParticleData::lifetime, PointCache::mem_cache, MIN2, BoidData::mode, ParticleSimulationData::ob, p, PAMAP_LIFE, Object::parent, PARS_ALIVE, PARS_DEAD, PARS_UNBORN, ParticleSystem::part, PART_HAIR, PART_PHYS_BOIDS, ParticleSystem::particles, PHYS_GLOBAL_GRAVITY, Scene::physics_settings, ParticleSettings::phystype, ParticleSystem::pointcache, ParticleSimulationData::psys, PSYS_FRAND, psys_get_birth_coordinates(), psys_get_dietime_from_cache(), psys_get_texture(), PTCACHE_BAKED, ParticleSettings::randlife, ParticleSimulationData::scene, ParticleData::state, BoidData::state_id, BoidSettings::states, ParticleKey::time, ParticleData::time, ParticleSettings::type, and where_is_object_time().
Referenced by brush_add(), cached_step(), dynamics_step(), particle_system_update(), and reset_all_particles().