Blender  V3.3
Classes | Macros | Typedefs | Enumerations | Functions | Variables
BKE_particle.h File Reference
#include "BLI_buffer.h"
#include "BLI_utildefines.h"
#include "DNA_particle_types.h"

Go to the source code of this file.

Classes

struct  ParticleSimulationData
 
struct  SPHData
 
struct  ParticleTexture
 
struct  ParticleSeam
 
struct  ParticleCacheKey
 
struct  ParticleThreadContext
 
struct  ParticleTask
 
struct  ParticleCollisionElement
 
struct  ParticleCollision
 
struct  ParticleDrawData
 

Macros

#define PARTICLE_COLLISION_MAX_COLLISIONS   10
 
#define PARTICLE_P
 
#define LOOP_PARTICLES   for (p = 0, pa = psys->particles; p < psys->totpart; p++, pa++)
 
#define LOOP_EXISTING_PARTICLES
 
#define LOOP_SHOWN_PARTICLES
 
#define LOOP_DYNAMIC_PARTICLES
 
#define PARTICLE_PSMD    ParticleSystemModifierData *psmd = sim->psmd ? sim->psmd : psys_get_modifier(sim->ob, sim->psys)
 
#define PARTICLE_DRAW_DATA_UPDATED   1
 
#define PSYS_FRAND_COUNT   1024
 
#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 SPHData SPHData
 
typedef struct ParticleTexture ParticleTexture
 
typedef struct ParticleSeam ParticleSeam
 
typedef struct ParticleCacheKey ParticleCacheKey
 
typedef struct ParticleThreadContext ParticleThreadContext
 
typedef struct ParticleTask ParticleTask
 
typedef struct ParticleCollisionElement ParticleCollisionElement
 
typedef struct ParticleCollision ParticleCollision
 
typedef struct ParticleDrawData ParticleDrawData
 
typedef void(* ParticleSystemIDFunc) (struct ParticleSystem *psys, struct ID **idpoin, void *userdata, int cb_flag)
 

Enumerations

enum  { BKE_PARTICLE_BATCH_DIRTY_ALL = 0 }
 

Functions

void BKE_particle_init_rng (void)
 
BLI_INLINE float psys_frand (ParticleSystem *psys, unsigned int seed)
 
BLI_INLINE void psys_frand_vec (ParticleSystem *psys, unsigned int seed, float vec[3])
 
int count_particles (struct ParticleSystem *psys)
 
int count_particles_mod (struct ParticleSystem *psys, int totgr, int cur)
 
int psys_get_child_number (struct Scene *scene, struct ParticleSystem *psys, bool use_render_params)
 
int psys_get_tot_child (struct Scene *scene, struct ParticleSystem *psys, bool use_render_params)
 
struct ParticleSystempsys_get_current (struct Object *ob)
 
short psys_get_current_num (struct Object *ob)
 
void psys_set_current_num (struct Object *ob, int index)
 
void psys_sim_data_init (struct ParticleSimulationData *sim)
 
void psys_sim_data_free (struct ParticleSimulationData *sim)
 
struct ParticleSystempsys_orig_get (struct ParticleSystem *psys)
 
struct ParticleSystempsys_eval_get (struct Depsgraph *depsgraph, struct Object *object, struct ParticleSystem *psys)
 
bool psys_in_edit_mode (struct Depsgraph *depsgraph, const struct ParticleSystem *psys)
 
bool psys_check_enabled (struct Object *ob, struct ParticleSystem *psys, bool use_render_params)
 
bool psys_check_edited (struct ParticleSystem *psys)
 
void psys_find_group_weights (struct ParticleSettings *part)
 
void psys_check_group_weights (struct ParticleSettings *part)
 
int psys_uses_gravity (struct ParticleSimulationData *sim)
 
void BKE_particlesettings_fluid_default_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_copy_particles (struct ParticleSystem *psys_dst, struct ParticleSystem *psys_src)
 
bool 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_emitter_customdata_mask (struct ParticleSystem *psys, struct CustomData_MeshMasks *r_cddata_masks)
 
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])
 
struct ParticleSystemModifierDatapsys_get_modifier (struct Object *ob, struct ParticleSystem *psys)
 
struct ModifierDataobject_add_particle_system (struct Main *bmain, struct Scene *scene, struct Object *ob, const char *name)
 
struct ModifierDataobject_copy_particle_system (struct Main *bmain, struct Scene *scene, struct Object *ob, const struct ParticleSystem *psys_orig)
 
void object_remove_particle_system (struct Main *bmain, struct Scene *scene, struct Object *ob, struct ParticleSystem *psys)
 
struct ParticleSettingsBKE_particlesettings_add (struct Main *bmain, const char *name)
 
void psys_reset (struct ParticleSystem *psys, int mode)
 
void psys_find_parents (struct ParticleSimulationData *sim, bool use_render_params)
 
void psys_unique_name (struct Object *object, struct ParticleSystem *psys, const char *defname)
 
void psys_cache_paths (struct ParticleSimulationData *sim, float cfra, bool use_render_params)
 
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_cache_child_paths (struct ParticleSimulationData *sim, float cfra, bool editupdate, bool use_render_params)
 
bool do_guides (struct Depsgraph *depsgraph, struct ParticleSettings *part, struct ListBase *effectors, ParticleKey *state, int index, 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, bool vel)
 
bool psys_get_particle_state (struct ParticleSimulationData *sim, int p, struct ParticleKey *state, bool always)
 
void BKE_particlesettings_clump_curve_init (struct ParticleSettings *part)
 
void BKE_particlesettings_rough_curve_init (struct ParticleSettings *part)
 
void BKE_particlesettings_twist_curve_init (struct ParticleSettings *part)
 
void psys_apply_child_modifiers (struct ParticleThreadContext *ctx, struct ListBase *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])
 
void psys_sph_init (struct ParticleSimulationData *sim, struct SPHData *sphdata)
 
void psys_sph_finalize (struct SPHData *sphdata)
 
void psys_sph_density (struct BVHTree *tree, struct SPHData *data, float co[3], float vars[2])
 
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])
 
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_thread_context_init (struct ParticleThreadContext *ctx, struct ParticleSimulationData *sim)
 
void psys_thread_context_free (struct ParticleThreadContext *ctx)
 
void psys_tasks_create (struct ParticleThreadContext *ctx, int startpart, int endpart, struct ParticleTask **r_tasks, int *r_numtasks)
 
void psys_tasks_free (struct ParticleTask *tasks, int numtasks)
 
void psys_apply_hair_lattice (struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, struct ParticleSystem *psys)
 
struct ParticleSystempsys_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_changed_type (struct Object *ob, struct ParticleSystem *psys)
 
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_coords (struct ParticleSimulationData *sim, struct ParticleData *pa, struct ParticleKey *state, float dtime, float cfra)
 
void particle_system_update (struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, struct ParticleSystem *psys, bool use_render_params)
 
void BKE_particlesystem_id_loop (struct ParticleSystem *psys, ParticleSystemIDFunc func, void *userdata)
 
void BKE_particlesystem_reset_all (struct Object *object)
 
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, bool velocity)
 
void psys_vec_rot_to_face (struct Mesh *mesh, struct ParticleData *pa, float vec[3])
 
void psys_mat_hair_to_object (struct Object *ob, struct Mesh *mesh, short from, struct ParticleData *pa, float hairmat[4][4])
 
void psys_mat_hair_to_global (struct Object *ob, struct Mesh *mesh, short from, struct ParticleData *pa, float hairmat[4][4])
 
void psys_mat_hair_to_orco (struct Object *ob, struct Mesh *mesh, short from, struct ParticleData *pa, float hairmat[4][4])
 
float psys_get_dietime_from_cache (struct PointCache *cache, int index)
 
void psys_free_pdd (struct ParticleSystem *psys)
 
floatpsys_cache_vgroup (struct Mesh *mesh, 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 Mesh *mesh, struct MVert *mvert, const float(*vert_normals)[3], struct MFace *mface, struct MTFace *tface, const float(*orcodata)[3], float w[4], float vec[3], float nor[3], float utan[3], float vtan[3], float orco[3])
 
float psys_particle_value_from_verts (struct Mesh *mesh, short from, struct ParticleData *pa, float *values)
 
void psys_get_from_key (struct ParticleKey *key, float loc[3], float vel[3], float rot[4], 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 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 distribute_particles (struct ParticleSimulationData *sim, int from)
 
void init_particle (struct ParticleSimulationData *sim, struct ParticleData *pa)
 
void psys_calc_dmcache (struct Object *ob, struct Mesh *mesh_final, struct Mesh *mesh_original, struct ParticleSystem *psys)
 
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 reset_particle (struct ParticleSimulationData *sim, struct ParticleData *pa, float dtime, float cfra)
 
float psys_get_current_display_percentage (struct ParticleSystem *psys, bool use_render_params)
 
void BKE_particle_settings_eval_reset (struct Depsgraph *depsgraph, struct ParticleSettings *particle_settings)
 
void BKE_particle_system_eval_init (struct Depsgraph *depsgraph, struct Object *object)
 
void BKE_particle_batch_cache_dirty_tag (struct ParticleSystem *psys, int mode)
 
void BKE_particle_batch_cache_free (struct ParticleSystem *psys)
 
void BKE_particle_partdeflect_blend_read_data (struct BlendDataReader *reader, struct PartDeflect *pd)
 
void BKE_particle_partdeflect_blend_read_lib (struct BlendLibReader *reader, struct ID *id, struct PartDeflect *pd)
 
void BKE_particle_system_blend_write (struct BlendWriter *writer, struct ListBase *particles)
 
void BKE_particle_system_blend_read_data (struct BlendDataReader *reader, struct ListBase *particles)
 
void BKE_particle_system_blend_read_lib (struct BlendLibReader *reader, struct Object *ob, struct ID *id, struct ListBase *particles)
 

Variables

unsigned int PSYS_FRAND_SEED_OFFSET [PSYS_FRAND_COUNT]
 
unsigned int PSYS_FRAND_SEED_MULTIPLIER [PSYS_FRAND_COUNT]
 
float PSYS_FRAND_BASE [PSYS_FRAND_COUNT]
 
void(* BKE_particle_batch_cache_dirty_tag_cb )(struct ParticleSystem *psys, int mode)
 
void(* BKE_particle_batch_cache_free_cb )(struct ParticleSystem *psys)
 

Macro Definition Documentation

◆ DMCACHE_ISCHILD

#define DMCACHE_ISCHILD   -2

Definition at line 673 of file BKE_particle.h.

◆ DMCACHE_NOTFOUND

#define DMCACHE_NOTFOUND   -1

Definition at line 672 of file BKE_particle.h.

◆ LOOP_DYNAMIC_PARTICLES

#define LOOP_DYNAMIC_PARTICLES
Value:
for (p = 0; p < psys->totpart; p++) \
if ((pa = psys->particles + p)->state.time > 0.0f)

Definition at line 59 of file BKE_particle.h.

◆ LOOP_EXISTING_PARTICLES

#define LOOP_EXISTING_PARTICLES
Value:
for (p = 0, pa = psys->particles; p < psys->totpart; p++, pa++) \
if (!(pa->flag & PARS_UNEXIST))
#define PARS_UNEXIST

Definition at line 52 of file BKE_particle.h.

◆ LOOP_PARTICLES

#define LOOP_PARTICLES   for (p = 0, pa = psys->particles; p < psys->totpart; p++, pa++)

Definition at line 51 of file BKE_particle.h.

◆ LOOP_SHOWN_PARTICLES

#define LOOP_SHOWN_PARTICLES
Value:
for (p = 0, pa = psys->particles; p < psys->totpart; p++, pa++) \
if (!(pa->flag & (PARS_UNEXIST | PARS_NO_DISP)))
#define PARS_NO_DISP

Definition at line 55 of file BKE_particle.h.

◆ PARTICLE_COLLISION_MAX_COLLISIONS

#define PARTICLE_COLLISION_MAX_COLLISIONS   10

Definition at line 46 of file BKE_particle.h.

◆ PARTICLE_DRAW_DATA_UPDATED

#define PARTICLE_DRAW_DATA_UPDATED   1

Definition at line 239 of file BKE_particle.h.

◆ PARTICLE_P

#define PARTICLE_P
Value:

Definition at line 48 of file BKE_particle.h.

◆ PARTICLE_PSMD

#define PARTICLE_PSMD    ParticleSystemModifierData *psmd = sim->psmd ? sim->psmd : psys_get_modifier(sim->ob, sim->psys)

Definition at line 64 of file BKE_particle.h.

◆ PSYS_FRAND_COUNT

#define PSYS_FRAND_COUNT   1024

Definition at line 241 of file BKE_particle.h.

◆ PSYS_RESET_ALL

#define PSYS_RESET_ALL   1

Definition at line 666 of file BKE_particle.h.

◆ PSYS_RESET_CACHE_MISS

#define PSYS_RESET_CACHE_MISS   4

Definition at line 669 of file BKE_particle.h.

◆ PSYS_RESET_DEPSGRAPH

#define PSYS_RESET_DEPSGRAPH   2

Definition at line 667 of file BKE_particle.h.

Typedef Documentation

◆ ParticleCacheKey

◆ ParticleCollision

Container for moving data between deflet_particle and particle_intersect_face.

◆ ParticleCollisionElement

◆ ParticleDrawData

◆ ParticleSeam

typedef struct ParticleSeam ParticleSeam

◆ ParticleSimulationData

◆ ParticleSystemIDFunc

typedef void(* ParticleSystemIDFunc) (struct ParticleSystem *psys, struct ID **idpoin, void *userdata, int cb_flag)

Callback format for performing operations on ID-pointers for particle systems.

Definition at line 527 of file BKE_particle.h.

◆ ParticleTask

typedef struct ParticleTask ParticleTask

◆ ParticleTexture

◆ ParticleThreadContext

◆ SPHData

typedef struct SPHData SPHData

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
BKE_PARTICLE_BATCH_DIRTY_ALL 

Definition at line 685 of file BKE_particle.h.

Function Documentation

◆ BKE_particle_batch_cache_dirty_tag()

void BKE_particle_batch_cache_dirty_tag ( struct ParticleSystem psys,
int  mode 
)

◆ BKE_particle_batch_cache_free()

void BKE_particle_batch_cache_free ( struct ParticleSystem psys)

Definition at line 5280 of file particle.c.

References ParticleSystem::batch_cache, and BKE_particle_batch_cache_free_cb.

Referenced by psys_free().

◆ BKE_particle_init_rng()

void BKE_particle_init_rng ( void  )

◆ BKE_particle_partdeflect_blend_read_data()

void BKE_particle_partdeflect_blend_read_data ( struct BlendDataReader reader,
struct PartDeflect pd 
)

Referenced by object_blend_read_data().

◆ BKE_particle_partdeflect_blend_read_lib()

void BKE_particle_partdeflect_blend_read_lib ( struct BlendLibReader reader,
struct ID id,
struct PartDeflect pd 
)

◆ BKE_particle_settings_eval_reset()

void BKE_particle_settings_eval_reset ( struct Depsgraph depsgraph,
struct ParticleSettings particle_settings 
)

◆ BKE_particle_system_blend_read_data()

void BKE_particle_system_blend_read_data ( struct BlendDataReader reader,
struct ListBase particles 
)

◆ BKE_particle_system_blend_read_lib()

void BKE_particle_system_blend_read_lib ( struct BlendLibReader reader,
struct Object ob,
struct ID id,
struct ListBase particles 
)

◆ BKE_particle_system_blend_write()

void BKE_particle_system_blend_write ( struct BlendWriter writer,
struct ListBase particles 
)

◆ BKE_particle_system_eval_init()

void BKE_particle_system_eval_init ( struct Depsgraph depsgraph,
struct Object object 
)

◆ BKE_particlesettings_add()

struct ParticleSettings* BKE_particlesettings_add ( struct Main bmain,
const char *  name 
)

◆ BKE_particlesettings_clump_curve_init()

void BKE_particlesettings_clump_curve_init ( struct ParticleSettings part)

◆ BKE_particlesettings_fluid_default_settings()

void BKE_particlesettings_fluid_default_settings ( struct ParticleSettings part)

◆ BKE_particlesettings_rough_curve_init()

void BKE_particlesettings_rough_curve_init ( struct ParticleSettings part)

◆ BKE_particlesettings_twist_curve_init()

void BKE_particlesettings_twist_curve_init ( struct ParticleSettings part)

◆ BKE_particlesystem_id_loop()

void BKE_particlesystem_id_loop ( struct ParticleSystem psys,
ParticleSystemIDFunc  func,
void userdata 
)

◆ BKE_particlesystem_reset_all()

void BKE_particlesystem_reset_all ( struct Object object)

◆ BKE_psys_collision_neartest_cb()

void BKE_psys_collision_neartest_cb ( void userdata,
int  index,
const struct BVHTreeRay ray,
struct BVHTreeRayHit hit 
)

Callback for BVHTree near test.

Referenced by boid_find_ground(), and rule_avoid_collision().

◆ copy_particle_key()

void copy_particle_key ( struct ParticleKey to,
struct ParticleKey from,
int  time 
)

◆ count_particles()

int count_particles ( struct ParticleSystem psys)

◆ count_particles_mod()

int count_particles_mod ( struct ParticleSystem psys,
int  totgr,
int  cur 
)

◆ distribute_particles()

void distribute_particles ( struct ParticleSimulationData sim,
int  from 
)

◆ do_guides()

bool do_guides ( struct Depsgraph depsgraph,
struct ParticleSettings part,
struct ListBase effectors,
ParticleKey state,
int  index,
float  time 
)

◆ free_hair()

void free_hair ( struct Object ob,
struct ParticleSystem psys,
int  dynamics 
)

◆ free_keyed_keys()

void free_keyed_keys ( struct ParticleSystem psys)

◆ init_particle()

void init_particle ( struct ParticleSimulationData sim,
struct ParticleData pa 
)

◆ object_add_particle_system()

struct ModifierData* object_add_particle_system ( struct Main bmain,
struct Scene scene,
struct Object ob,
const char *  name 
)

◆ object_copy_particle_system()

struct ModifierData* object_copy_particle_system ( struct Main bmain,
struct Scene scene,
struct Object ob,
const struct ParticleSystem psys_orig 
)

◆ object_remove_particle_system()

void object_remove_particle_system ( struct Main bmain,
struct Scene scene,
struct Object ob,
struct ParticleSystem psys 
)

◆ particle_system_update()

void particle_system_update ( struct Depsgraph depsgraph,
struct Scene scene,
struct Object ob,
struct ParticleSystem psys,
bool  use_render_params 
)

Main particle update call, checks that things are ok on the large scale and then advances in to actual particle calculations depending on particle type.

Definition at line 4749 of file particle_system.c.

References ParticleSettings::adt, ADT_RECALC_ANIM, BKE_animsys_eval_context_construct(), BKE_animsys_evaluate_animdata(), BKE_mesh_tessface_ensure(), BKE_particle_batch_cache_dirty_tag(), BKE_PARTICLE_BATCH_DIRTY_ALL, ParticleSystem::cfra, DEG_get_ctime(), DEG_is_active(), ParticleSimulationData::depsgraph, depsgraph, distribute_particles(), ParticleSystem::edit, emit_particles(), eParticleSystemFlag_Pars, eParticleSystemFlag_psys_updated, evaluate_emitter_anim(), ParticleDrawData::flag, ParticleSystemModifierData::flag, ParticleData::flag, ParticleSettings::flag, ParticleSystem::flag, PTCacheEdit::flags, float(), ParticleSystem::free_edit, free_hair(), free_keyed_keys(), free_unexisting_particles(), ParticleSettings::from, hair_needs_recalc(), hair_step(), ParticleSettings::hair_step, ParticleSettings::id, ID_RECALC_PSYS_RESET, ParticleSystem::imat, initialize_all_particles(), invert_m4_m4(), LOOP_EXISTING_PARTICLES, ParticleSystemModifierData::mesh_final, NULL, ParticleSimulationData::ob, Object::obmat, PAMAP_SIZE, PARS_NO_DISP, ParticleSystem::part, PART_FROM_VERT, PART_HAIR, PART_HAIR_REGROW, PART_PHYS_KEYED, PART_PHYS_NO, PARTICLE_DRAW_DATA_UPDATED, PARTICLE_P, particle_settings_free_local(), particle_settings_localize(), particles_fluid_step(), particles_has_bubble(), particles_has_flip(), particles_has_foam(), particles_has_spray(), particles_has_tracer(), ParticleSystem::pdd, ParticleSettings::phystype, ParticleSimulationData::psmd, PTCacheEdit::psmd_eval, ParticleSimulationData::psys, PTCacheEdit::psys, psys_check_enabled(), psys_count_keyed_targets(), PSYS_EDITED, PTCacheEdit::psys_eval, psys_frand(), psys_free_path_cache(), psys_get_current_display_percentage(), psys_get_modifier(), psys_get_texture(), PSYS_HAIR_DONE, PSYS_OB_ANIM_RESTORE, psys_orig_get(), psys_prepare_physics(), psys_reset(), PSYS_RESET_ALL, PSYS_SHARED_CACHES, psys_update_path_cache(), PT_CACHE_EDIT_UPDATE_PARTICLE_FROM_EVAL, ParticleSettings::randsize, ParticleSystem::recalc, reset_particle(), save_hair(), ParticleSimulationData::scene, scene, set_keyed_keys(), ParticleTexture::size, ParticleData::size, ParticleSettings::size, system_step(), ParticleSettings::totpart, ParticleSystem::totpart, ParticleSystem::totunexist, and ParticleSettings::type.

Referenced by BKE_object_handle_data_update(), and deformVerts().

◆ precalc_guides()

void precalc_guides ( struct ParticleSimulationData sim,
struct ListBase effectors 
)

◆ psys_apply_child_modifiers()

void psys_apply_child_modifiers ( struct ParticleThreadContext ctx,
struct ListBase 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] 
)

◆ psys_apply_hair_lattice()

void psys_apply_hair_lattice ( struct Depsgraph depsgraph,
struct Scene scene,
struct Object ob,
struct ParticleSystem psys 
)

◆ psys_cache_child_paths()

void psys_cache_child_paths ( struct ParticleSimulationData sim,
float  cfra,
bool  editupdate,
bool  use_render_params 
)

◆ psys_cache_edit_paths()

void psys_cache_edit_paths ( struct Depsgraph depsgraph,
struct Scene scene,
struct Object ob,
struct PTCacheEdit edit,
float  cfra,
bool  use_render_params 
)

◆ psys_cache_paths()

void psys_cache_paths ( struct ParticleSimulationData sim,
float  cfra,
bool  use_render_params 
)

Calculates paths ready for drawing/rendering

  • Useful for making use of opengl vertex arrays for super fast strand drawing.
  • Makes child strands possible and creates them too into the cache.
  • Cached path data is also used to determine cut position for the edit-mode tool.

Definition at line 3306 of file particle.c.

References col, ParticleSystem::flag, ParticleSystem::hair_out_mesh, NULL, ParticleSystem::part, PART_HAIR, ToolSettings::particle, PARTICLE_P, PARTICLE_PSMD, ParticleSimulationData::psys, PSYS_HAIR_DYNAMICS, result, ParticleSimulationData::scene, t, time, Scene::toolsettings, and ParticleSettings::type.

Referenced by psys_update_path_cache().

◆ psys_cache_vgroup()

float* psys_cache_vgroup ( struct Mesh mesh,
struct ParticleSystem psys,
int  vgroup 
)

◆ psys_calc_dmcache()

void psys_calc_dmcache ( struct Object ob,
struct Mesh mesh_final,
struct Mesh mesh_original,
struct ParticleSystem psys 
)

◆ psys_changed_type()

void psys_changed_type ( struct Object ob,
struct ParticleSystem psys 
)

◆ psys_check_boid_data()

void psys_check_boid_data ( struct ParticleSystem psys)

◆ psys_check_edited()

bool psys_check_edited ( struct ParticleSystem psys)

◆ psys_check_enabled()

bool psys_check_enabled ( struct Object ob,
struct ParticleSystem psys,
bool  use_render_params 
)

◆ psys_check_group_weights()

void psys_check_group_weights ( struct ParticleSettings part)

◆ psys_copy_particles()

void psys_copy_particles ( struct ParticleSystem psys_dst,
struct ParticleSystem psys_src 
)

◆ psys_count_keyed_targets()

void psys_count_keyed_targets ( struct ParticleSimulationData sim)

◆ psys_disable_all()

void psys_disable_all ( struct Object ob)

◆ psys_emitter_customdata_mask()

void psys_emitter_customdata_mask ( struct ParticleSystem psys,
struct CustomData_MeshMasks r_cddata_masks 
)

◆ psys_enable_all()

void psys_enable_all ( struct Object ob)

◆ psys_eval_get()

struct ParticleSystem* psys_eval_get ( struct Depsgraph depsgraph,
struct Object object,
struct ParticleSystem psys 
)

For a given original object and its particle system, get evaluated particle system within a given dependency graph.

Definition at line 761 of file particle.c.

References DEG_get_evaluated_object(), depsgraph, ListBase::first, ParticleSystem::next, NULL, ParticleSystem::orig_psys, and Object::particlesystem.

Referenced by BKE_ptcache_bake(), disconnect_hair(), ED_object_modifier_convert_psys_to_mesh(), PE_create_particle_edit(), and remap_hair_emitter().

◆ psys_find_group_weights()

void psys_find_group_weights ( struct ParticleSettings part)

◆ psys_find_parents()

void psys_find_parents ( struct ParticleSimulationData sim,
bool  use_render_params 
)

◆ psys_frand()

BLI_INLINE float psys_frand ( ParticleSystem psys,
unsigned int  seed 
)

◆ psys_frand_vec()

BLI_INLINE void psys_frand_vec ( ParticleSystem psys,
unsigned int  seed,
float  vec[3] 
)

◆ psys_free()

void psys_free ( struct Object ob,
struct ParticleSystem psys 
)

◆ psys_free_children()

void psys_free_children ( struct ParticleSystem psys)

◆ psys_free_particles()

void psys_free_particles ( struct ParticleSystem psys)

◆ psys_free_path_cache()

void psys_free_path_cache ( struct ParticleSystem psys,
struct PTCacheEdit edit 
)

◆ psys_free_pdd()

void psys_free_pdd ( struct ParticleSystem psys)

◆ psys_get_birth_coords()

void psys_get_birth_coords ( struct ParticleSimulationData sim,
struct ParticleData pa,
struct ParticleKey state,
float  dtime,
float  cfra 
)

Definition at line 705 of file particle_system.c.

References ParticleSettings::avefac, ParticleSettings::avemode, axis_angle_to_quat(), BLI_assert, ParticleData::boid, copy_qt_qt(), copy_v3_v3(), cosf, cross_v3_v3v3(), dot_v3v3(), fabsf, ParticleData::foffset, ParticleSettings::from, ParticleData::fuv, get_angular_velocity_vector(), interp_qt_qtqt(), invert_qt_qt_normalized(), ParticleTexture::ivel, M_PI, madd_v3_v3fl(), mat3_to_quat(), mat3_to_quat_is_ok(), mat4_to_quat(), mul_m4_v3(), mul_mat3_m4_v3(), mul_qt_qtqt(), mul_qt_v3(), mul_v3_fl(), mul_v3_v3fl(), negate_v3(), negate_v3_v3(), nor, normalize_qt(), normalize_v3(), normalize_v3_v3(), ParticleSettings::normfac, NULL, ParticleData::num, ParticleData::num_dmcache, ParticleSimulationData::ob, OB_POSX, OB_POSZ, ParticleSettings::ob_vel, ParticleSettings::obfac, Object::obmat, PAMAP_IVEL, ParticleSystem::part, PART_AVE_RAND, PART_PHYS_BOIDS, PART_ROT_GLOB_X, PART_ROT_GLOB_Y, PART_ROT_GLOB_Z, PART_ROT_NOR, PART_ROT_NOR_TAN, 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(), psys_particle_value_from_verts(), ParticleSettings::randfac, ParticleSettings::randphasefac, ParticleSettings::randrotfac, rot, ParticleSettings::rotmode, sinf, state, 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().

◆ psys_get_child_number()

int psys_get_child_number ( struct Scene scene,
struct ParticleSystem psys,
bool  use_render_params 
)

◆ psys_get_child_size()

float psys_get_child_size ( struct ParticleSystem psys,
struct ChildParticle cpa,
float  cfra,
float pa_time 
)

◆ psys_get_child_time()

float psys_get_child_time ( struct ParticleSystem psys,
struct ChildParticle cpa,
float  cfra,
float birthtime,
float dietime 
)

◆ psys_get_current()

struct ParticleSystem* psys_get_current ( struct Object ob)

◆ psys_get_current_display_percentage()

float psys_get_current_display_percentage ( struct ParticleSystem psys,
bool  use_render_params 
)

◆ psys_get_current_num()

short psys_get_current_num ( struct Object ob)

◆ psys_get_dietime_from_cache()

float psys_get_dietime_from_cache ( struct PointCache cache,
int  index 
)

◆ psys_get_dupli_path_transform()

void psys_get_dupli_path_transform ( struct ParticleSimulationData sim,
struct ParticleData pa,
struct ChildParticle cpa,
struct ParticleCacheKey cache,
float  mat[4][4],
float scale 
)

◆ psys_get_dupli_texture()

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] 
)

◆ psys_get_from_key()

void psys_get_from_key ( struct ParticleKey key,
float  loc[3],
float  vel[3],
float  rot[4],
float time 
)

◆ psys_get_modifier()

struct ParticleSystemModifierData* psys_get_modifier ( struct Object ob,
struct ParticleSystem psys 
)

◆ psys_get_particle_on_path()

void psys_get_particle_on_path ( struct ParticleSimulationData sim,
int  pa_num,
struct ParticleKey state,
bool  vel 
)

Gets hair (or keyed) particles state at the "path time" specified in state->time.

Definition at line 4615 of file particle.c.

References BKE_lattice_deform_data_eval_co(), BKE_object_material_get(), ParticleInterpolationData::bspline, ParticleInterpolationData::cache, ParticleSystem::child, ParticleSystem::childcache, ParticleSettings::childflat, ParticleSettings::childrad, ParticleSettings::childtype, CLAMP, ParticleKey::co, copy_particle_key(), copy_qt_qt(), copy_v3_v3(), ParticleChildModifierContext::cpa, ParticleSimulationData::depsgraph, DMCACHE_ISCHILD, do_child_modifiers(), do_guides(), do_particle_interpolation(), ParticleSystem::effectors, ParticleInterpolationData::epoint, ParticleData::flag, ParticleSettings::flag, ParticleSystem::flag, ChildParticle::foffset, ParticleData::foffset, ParticleSettings::from, ChildParticle::fuv, ParticleData::fuv, get_child_modifier_parameters(), ParticleSystem::hair_out_mesh, init_particle_interpolation(), interpolate_pathcache(), ParticleInterpolationData::keyed, ParticleSystem::lattice_deform_data, ParticleSystem::lattice_strength, len_v3(), blender::math::length(), ParticleThreadContext::ma, ParticleThreadContext::mesh, ParticleInterpolationData::mesh, ParticleSystemModifierData::mesh_final, mul_m4_v3(), mul_mat3_m4_v3(), mul_v3_fl(), normalize_v3(), NULL, ChildParticle::num, ParticleData::num, ParticleData::num_dmcache, ParticleSimulationData::ob, Object::obmat, offset_child(), ParticleSettings::omat, ParticleChildModifierContext::orco, ChildParticle::pa, ParticleChildModifierContext::par_co, ParticleChildModifierContext::par_orco, ParticleChildModifierContext::par_rot, ParticleChildModifierContext::par_vel, ChildParticle::parent, ParticleChildModifierContext::parent_keys, 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, ParticleSystem::pathcache, 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(), ParticleChildModifierContext::ptex, result, ParticleKey::rot, ParticleThreadContext::sim, ParticleChildModifierContext::sim, state, sub_v3_v3v3(), t, ParticleChildModifierContext::thread_ctx, ParticleKey::time, ParticleData::time, ParticleSystem::totchild, ParticleSystem::totpart, ParticleSettings::type, unit_m4(), ParticleKey::vel, w(), and ChildParticle::w.

Referenced by brush_add(), modifyMesh(), psys_get_particle_on_path(), psys_get_particle_state(), rekey_particle(), rekey_particle_to_time(), and subdivide_particle().

◆ psys_get_particle_state()

bool psys_get_particle_state ( struct ParticleSimulationData sim,
int  p,
struct ParticleKey state,
bool  always 
)

Gets particle's state at a time. Must call psys_sim_data_init before this.

Returns
true if particle exists and can be seen and false if not.

Definition at line 4884 of file particle.c.

References BKE_lattice_deform_data_eval_co(), ParticleSystem::child, ParticleSystem::childcache, ParticleSettings::childflat, ParticleSettings::childrad, ParticleSettings::childtype, CLAMP, ParticleChildModifierContext::cpa, DEG_get_ctime(), ParticleSimulationData::depsgraph, ParticleData::dietime, do_child_modifiers(), ParticleSettings::end, ParticleSettings::flag, ParticleSystem::flag, ChildParticle::fuv, ParticleSystem::lattice_deform_data, ParticleSystem::lattice_strength, ParticleData::lifetime, ParticleSettings::lifetime, MIN2, NULL, offset_child(), ParticleChildModifierContext::orco, ParticleChildModifierContext::par_co, ParticleChildModifierContext::par_orco, ParticleChildModifierContext::par_rot, ParticleChildModifierContext::par_vel, ChildParticle::parent, ParticleChildModifierContext::parent_keys, ParticleSystem::part, PART_CHILD_FACES, PART_DIED, PART_UNBORN, ParticleSystem::particles, ParticleSimulationData::psys, psys_frand(), psys_get_child_time(), psys_get_particle_on_path(), psys_get_timestep(), PSYS_KEYED, ParticleChildModifierContext::ptex, ParticleChildModifierContext::sim, ParticleSettings::sta, state, ParticleData::state, t, ParticleChildModifierContext::thread_ctx, time, ParticleData::time, ParticleSystem::totchild, ParticleSystem::totpart, and unit_m4().

Referenced by blender::io::alembic::ABCPointsWriter::do_write(), explodeMesh(), get_effector_data(), make_duplis_particle_system(), modifyMesh(), particle_batch_cache_ensure_pos(), particle_system_minmax(), pointdensity_cache_psys(), and set_keyed_keys().

◆ psys_get_pointcache_start_end()

void psys_get_pointcache_start_end ( struct Scene scene,
ParticleSystem psys,
int *  sfra,
int *  efra 
)

◆ psys_get_target_system()

struct ParticleSystem* psys_get_target_system ( struct Object ob,
struct ParticleTarget pt 
)

◆ psys_get_texture()

void psys_get_texture ( struct ParticleSimulationData sim,
struct ParticleData pa,
struct ParticleTexture ptex,
int  event,
float  cfra 
)

Definition at line 4355 of file particle.c.

References ATTR_FALLTHROUGH, BKE_mesh_texspace_ensure(), blend(), CLAMP_PARTICLE_TEXTURE_POS, CLAMP_PARTICLE_TEXTURE_POSNEG, CLAMP_WARP_PARTICLE_TEXTURE_POS, ParticleTexture::clump, ParticleKey::co, copy_v3_v3(), ParticleTexture::damp, Object::data, ParticleData::dietime, ParticleTexture::effector, ELEM, ParticleTexture::exist, fabsf, ParticleTexture::field, float(), ParticleData::foffset, ParticleSettings::from, ParticleData::fuv, get_particle_uv(), ParticleTexture::gravity, ParticleTexture::ivel, ParticleTexture::kink_amp, ParticleTexture::kink_freq, ParticleTexture::length, ParticleTexture::life, Mesh::loc, MAX_MTEX, ParticleSystemModifierData::mesh_final, mul_m4_v3(), NULL, ParticleData::num, ParticleData::num_dmcache, ParticleSimulationData::ob, PAMAP_DAMP, PAMAP_DENS, PAMAP_FIELD, PAMAP_GRAVITY, PAMAP_IVEL, PAMAP_LENGTH, PAMAP_LIFE, PAMAP_SIZE, PAMAP_TIME, PAMAP_TWIST, ParticleSystem::part, PART_DISTR_GRID, PART_FROM_FACE, PART_FROM_VERT, PART_FROM_VOLUME, ParticleSystem::particles, ParticleSimulationData::psmd, ParticleSimulationData::psys, psys_particle_on_emitter(), RE_texture_evaluate(), usdtokens::rgba(), ParticleTexture::rough1, ParticleTexture::rough2, ParticleTexture::roughe, SET_PARTICLE_TEXTURE, ParticleTexture::size, Mesh::size, ParticleData::state, sub_v3_v3(), TEXCO_GLOB, TEXCO_OBJECT, TEXCO_ORCO, TEXCO_PARTICLE, TEXCO_UV, texture_value_blend(), ParticleTexture::time, ParticleData::time, ParticleSystem::totpart, and ParticleTexture::twist.

Referenced by basic_integrate(), cached_step(), dynamics_step(), init_particle_texture(), particle_system_update(), psys_get_birth_coords(), and reset_particle().

◆ psys_get_timestep()

float psys_get_timestep ( struct ParticleSimulationData sim)

◆ psys_get_tot_child()

int psys_get_tot_child ( struct Scene scene,
struct ParticleSystem psys,
bool  use_render_params 
)

◆ psys_in_edit_mode()

bool psys_in_edit_mode ( struct Depsgraph depsgraph,
const struct ParticleSystem psys 
)

◆ psys_interpolate_face()

void psys_interpolate_face ( struct Mesh mesh,
struct MVert mvert,
const float(*)  vert_normals[3],
struct MFace mface,
struct MTFace tface,
const float(*)  orcodata[3],
float  w[4],
float  vec[3],
float  nor[3],
float  utan[3],
float  vtan[3],
float  orco[3] 
)

◆ psys_interpolate_mcol()

void psys_interpolate_mcol ( const struct MCol mcol,
int  quad,
const float  w[4],
struct MCol mc 
)

◆ psys_interpolate_particle()

void psys_interpolate_particle ( short  type,
struct ParticleKey  keys[4],
float  dt,
struct ParticleKey result,
bool  velocity 
)

◆ psys_interpolate_uvs()

void psys_interpolate_uvs ( const struct MTFace tface,
int  quad,
const float  w[4],
float  uvco[2] 
)

◆ psys_make_temp_pointcache()

void psys_make_temp_pointcache ( struct Object ob,
struct ParticleSystem psys 
)

◆ psys_mat_hair_to_global()

void psys_mat_hair_to_global ( struct Object ob,
struct Mesh mesh,
short  from,
struct ParticleData pa,
float  hairmat[4][4] 
)

◆ psys_mat_hair_to_object()

void psys_mat_hair_to_object ( struct Object ob,
struct Mesh mesh,
short  from,
struct ParticleData pa,
float  hairmat[4][4] 
)

◆ psys_mat_hair_to_orco()

void psys_mat_hair_to_orco ( struct Object ob,
struct Mesh mesh,
short  from,
struct ParticleData pa,
float  hairmat[4][4] 
)

◆ psys_orig_get()

struct ParticleSystem* psys_orig_get ( struct ParticleSystem psys)

For a given evaluated particle system get its original.

If this input is an original particle system already, the return value is the same as the input.

Definition at line 753 of file particle.c.

References NULL, and ParticleSystem::orig_psys.

Referenced by drw_particle_get_hair_source(), particle_system_update(), and psys_in_edit_mode().

◆ psys_particle_dm_face_lookup()

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 
)

Find the final derived mesh tessface for a particle, from its original tessface index. This is slow and can be optimized but only for many lookups.

Parameters
mesh_finalFinal mesh, it may not have the same topology as original mesh.
mesh_originalOriginal mesh, use for accessing MPoly to MFace mapping.
findex_origThe input tessface index.
fwFace weights (position of the particle inside the findex_orig tessface).
poly_nodesMay be NULL, otherwise an array of linked list, one for each final mesh_final polygon, containing all its tessfaces indices.
Returns
The mesh_final tessface index.

Definition at line 1923 of file particle.c.

References BKE_mesh_origindex_mface_mpoly(), BLI_assert, CD_ORIGINDEX, CD_ORIGSPACE, CustomData_get_layer(), Mesh_Runtime::deformed_only, DMCACHE_NOTFOUND, ELEM, Mesh::fdata, float(), isect_point_quad_v2(), isect_point_tri_v2(), LinkNode::link, Mesh::mface, LinkNode::next, NULL, Mesh::pdata, POINTER_AS_INT, psys_w_to_origspace(), Mesh::runtime, Mesh::totface, and OrigSpaceFace::uv.

Referenced by brush_add_count_iter(), PE_mirror_x(), psys_calc_dmcache(), and remap_hair_emitter().

◆ psys_particle_on_dm()

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] 
)

◆ psys_particle_on_emitter()

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] 
)

◆ psys_particle_value_from_verts()

float psys_particle_value_from_verts ( struct Mesh mesh,
short  from,
struct ParticleData pa,
float values 
)

◆ psys_render_simplify_params()

bool psys_render_simplify_params ( struct ParticleSystem psys,
struct ChildParticle cpa,
float params 
)

◆ psys_reset()

void psys_reset ( struct ParticleSystem psys,
int  mode 
)

◆ psys_set_current_num()

void psys_set_current_num ( struct Object ob,
int  index 
)

◆ psys_sim_data_free()

void psys_sim_data_free ( struct ParticleSimulationData sim)

◆ psys_sim_data_init()

void psys_sim_data_init ( struct ParticleSimulationData sim)

◆ psys_sph_density()

void psys_sph_density ( struct BVHTree tree,
struct SPHData data,
float  co[3],
float  vars[2] 
)

◆ psys_sph_finalize()

void psys_sph_finalize ( struct SPHData sphdata)

Definition at line 2157 of file particle_system.c.

References BLI_edgehash_free(), SPHData::eh, NULL, and psys_sph_flush_springs().

Referenced by dynamics_step().

◆ psys_sph_init()

void psys_sph_init ( struct ParticleSimulationData sim,
struct SPHData sphdata 
)

◆ psys_tasks_create()

void psys_tasks_create ( struct ParticleThreadContext ctx,
int  startpart,
int  endpart,
struct ParticleTask **  r_tasks,
int *  r_numtasks 
)

◆ psys_tasks_free()

void psys_tasks_free ( struct ParticleTask tasks,
int  numtasks 
)

Definition at line 476 of file particle_system.c.

References BLI_rng_free(), and MEM_freeN.

Referenced by distribute_particles_on_dm(), and psys_cache_child_paths().

◆ psys_thread_context_free()

void psys_thread_context_free ( struct ParticleThreadContext ctx)

◆ psys_thread_context_init()

void psys_thread_context_init ( struct ParticleThreadContext ctx,
struct ParticleSimulationData sim 
)

◆ psys_unique_name()

void psys_unique_name ( struct Object object,
struct ParticleSystem psys,
const char *  defname 
)

◆ psys_update_particle_tree()

void psys_update_particle_tree ( struct ParticleSystem psys,
float  cfra 
)

◆ psys_uses_gravity()

int psys_uses_gravity ( struct ParticleSimulationData sim)

◆ psys_vec_rot_to_face()

void psys_vec_rot_to_face ( struct Mesh mesh,
struct ParticleData pa,
float  vec[3] 
)

Definition at line 3926 of file particle.c.

References mesh, mul_mat3_m4_v3(), psys_face_mat(), and transpose_m4().

Referenced by save_hair().

◆ reset_particle()

void reset_particle ( struct ParticleSimulationData sim,
struct ParticleData pa,
float  dtime,
float  cfra 
)

Variable Documentation

◆ BKE_particle_batch_cache_dirty_tag_cb

void(* BKE_particle_batch_cache_dirty_tag_cb) (struct ParticleSystem *psys, int mode) ( struct ParticleSystem psys,
int  mode 
)
extern

Definition at line 5271 of file particle.c.

Referenced by BKE_particle_batch_cache_dirty_tag(), and DRW_engines_register().

◆ BKE_particle_batch_cache_free_cb

void(* BKE_particle_batch_cache_free_cb) (struct ParticleSystem *psys) ( struct ParticleSystem psys)
extern

Definition at line 5272 of file particle.c.

Referenced by BKE_particle_batch_cache_free(), and DRW_engines_register().

◆ PSYS_FRAND_BASE

float PSYS_FRAND_BASE[PSYS_FRAND_COUNT]
extern

Definition at line 511 of file particle.c.

Referenced by BKE_particle_init_rng(), psys_frand(), and psys_frand_vec().

◆ PSYS_FRAND_SEED_MULTIPLIER

unsigned int PSYS_FRAND_SEED_MULTIPLIER[PSYS_FRAND_COUNT]
extern

Definition at line 510 of file particle.c.

Referenced by BKE_particle_init_rng(), psys_frand(), and psys_frand_vec().

◆ PSYS_FRAND_SEED_OFFSET

unsigned int PSYS_FRAND_SEED_OFFSET[PSYS_FRAND_COUNT]
extern

Definition at line 509 of file particle.c.

Referenced by BKE_particle_init_rng(), psys_frand(), and psys_frand_vec().