|
Blender V5.3
|
#include <optional>#include "BLI_compiler_attrs.hh"#include "BLI_map.hh"#include "BLI_ordered_edge.hh"#include "BLI_vector.hh"#include "BKE_lib_query.hh"#include "DNA_particle_types.h"Go to the source code of this file.
Classes | |
| struct | blender::ParticleSimulationData |
| struct | blender::SPHData |
| struct | blender::ParticleTexture |
| struct | blender::ParticleSeam |
| struct | blender::ParticleCacheKey |
| struct | blender::ParticleThreadContext |
| struct | blender::ParticleTask |
| struct | blender::ParticleCollisionElement |
| struct | blender::ParticleCollision |
| struct | blender::ParticleDrawData |
Namespaces | |
| namespace | blender |
| BMesh Iterators. | |
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 void(*) | blender::ParticleSystemIDFunc(struct ParticleSystem *psys, struct ID **idpoin, void *userdata, LibraryForeachIDCallbackFlag cb_flag) |
Enumerations | |
| enum | { blender::BKE_PARTICLE_BATCH_DIRTY_ALL = 0 } |
Functions | |
| void | blender::BKE_particle_init_rng () |
| BLI_INLINE float | blender::psys_frand (ParticleSystem *psys, unsigned int seed) |
| BLI_INLINE void | blender::psys_frand_vec (ParticleSystem *psys, unsigned int seed, float vec[3]) |
| int | blender::count_particles (struct ParticleSystem *psys) |
| int | blender::count_particles_mod (struct ParticleSystem *psys, int totgr, int cur) |
| bool | blender::psys_in_edit_mode (struct Depsgraph *depsgraph, const struct ParticleSystem *psys) |
| bool | blender::psys_render_simplify_params (struct ParticleSystem *psys, struct ChildParticle *cpa, float *params) |
| void | blender::psys_interpolate_uvs (const struct MTFace *tface, int quad, const float w[4], float r_uv[2]) |
| void | blender::psys_interpolate_mcol (const struct MCol *mcol, int quad, const float w[4], struct MCol *mc) |
| struct ModifierData * | blender::object_add_particle_system (struct Main *bmain, const struct Scene *scene, struct Object *ob, const char *name) |
| struct ModifierData * | blender::object_copy_particle_system (struct Main *bmain, const struct Scene *scene, struct Object *ob, const struct ParticleSystem *psys_orig) |
| void | blender::psys_apply_child_modifiers (struct ParticleThreadContext *ctx, ListBaseT< ModifierData > *modifiers, struct ChildParticle *cpa, struct ParticleTexture *ptex, const float orco[3], float hairmat[4][4], struct ParticleCacheKey *keys, struct ParticleCacheKey *parent_keys, const float parent_orco[3]) |
| void | blender::psys_interpolate_face (struct Mesh *mesh, const float(*vert_positions)[3], const float(*vert_normals)[3], const struct MFace *mface, struct MTFace *tface, const float(*orcodata)[3], float w[4], float vec[3], float nor[3], float utan[3], float vtan[3], float orco[3]) |
| void | blender::BKE_psys_collision_neartest_cb (void *userdata, int index, const struct BVHTreeRay *ray, struct BVHTreeRayHit *hit) |
| void | blender::distribute_particles (struct ParticleSimulationData *sim, int from) |
| void | blender::BKE_particle_partdeflect_blend_read_data (struct BlendDataReader *reader, struct PartDeflect *pd) |
Reacting to System Events | |
| int | blender::psys_get_child_number (struct Scene *scene, struct ParticleSystem *psys, bool use_render_params) |
| int | blender::psys_get_tot_child (struct Scene *scene, struct ParticleSystem *psys, bool use_render_params) |
| void | blender::psys_reset (struct ParticleSystem *psys, int mode) |
| void | blender::psys_unique_name (struct Object *object, struct ParticleSystem *psys, const char *defname) ATTR_NONNULL(1 |
| float | blender::psys_get_current_display_percentage (struct ParticleSystem *psys, bool use_render_params) |
Getting Stuff | |
| struct ParticleSystem * | blender::psys_get_current (struct Object *ob) |
| short | blender::psys_get_current_num (struct Object *ob) |
| void | blender::psys_set_current_num (struct Object *ob, int index) |
| void | blender::psys_sim_data_init (struct ParticleSimulationData *sim) |
| void | blender::psys_sim_data_free (struct ParticleSimulationData *sim) |
| struct ParticleSystem * | blender::psys_orig_get (struct ParticleSystem *psys) |
| struct ParticleSystem * | blender::psys_eval_get (struct Depsgraph *depsgraph, struct Object *object, struct ParticleSystem *psys) |
| bool | blender::psys_check_enabled (struct Object *ob, struct ParticleSystem *psys, bool use_render_params) |
| bool | blender::psys_check_edited (struct ParticleSystem *psys) |
| void | blender::psys_find_group_weights (struct ParticleSettings *part) |
| void | blender::psys_check_group_weights (struct ParticleSettings *part) |
| int | blender::psys_uses_gravity (struct ParticleSimulationData *sim) |
| void | blender::psys_disable_all (struct Object *ob) |
| void | blender::psys_enable_all (struct Object *ob) |
System Core | |
| void | blender::BKE_particlesettings_fluid_default_settings (struct ParticleSettings *part) |
| void | blender::psys_changed_type (struct Object *ob, struct ParticleSystem *psys) |
| void | blender::psys_check_boid_data (struct ParticleSystem *psys) |
| void | blender::particle_system_update (struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, struct ParticleSystem *psys, bool use_render_params) |
| void | blender::BKE_particlesystem_id_loop (struct ParticleSystem *psys, ParticleSystemIDFunc func, void *userdata) |
| void | blender::BKE_particlesystem_reset_all (struct Object *object) |
Freeing Stuff | |
| void | blender::psys_free_path_cache (struct ParticleSystem *psys, struct PTCacheEdit *edit) |
| void | blender::psys_free (struct Object *ob, struct ParticleSystem *psys) |
| void | blender::psys_copy_particles (struct ParticleSystem *psys_dst, struct ParticleSystem *psys_src) |
| void | blender::free_hair (struct Object *ob, struct ParticleSystem *psys, int dynamics) |
| void | blender::free_keyed_keys (struct ParticleSystem *psys) |
| void | blender::psys_free_particles (struct ParticleSystem *psys) |
| void | blender::psys_free_children (struct ParticleSystem *psys) |
| void | blender::psys_free_pdd (struct ParticleSystem *psys) |
Particle Key Handling | |
| void | blender::copy_particle_key (struct ParticleKey *to, struct ParticleKey *from, int time) |
| void | blender::psys_vec_rot_to_face (struct Mesh *mesh, struct ParticleData *pa, float vec[3]) |
| void | blender::psys_mat_hair_to_object (struct Object *ob, struct Mesh *mesh, short from, struct ParticleData *pa, float hairmat[4][4]) |
| void | blender::psys_mat_hair_to_global (struct Object *ob, struct Mesh *mesh, short from, struct ParticleData *pa, float hairmat[4][4]) |
| void | blender::psys_mat_hair_to_orco (struct Object *ob, struct Mesh *mesh, short from, struct ParticleData *pa, float hairmat[4][4]) |
| void | blender::psys_get_from_key (struct ParticleKey *key, float loc[3], float vel[3], float rot[4], float *time) |
Particles on Emitter | |
| void | blender::psys_emitter_customdata_mask (struct ParticleSystem *psys, struct CustomData_MeshMasks *r_cddata_masks) |
| void | blender::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]) |
Particles on a DM | |
| struct ParticleSystemModifierData * | blender::psys_get_modifier (struct Object *ob, struct ParticleSystem *psys) |
| float | blender::psys_particle_value_from_verts (struct Mesh *mesh, short from, struct ParticleData *pa, float *values) |
| void | blender::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]) |
| int | blender::psys_particle_dm_face_lookup (struct Mesh *mesh_final, struct Mesh *mesh_original, int findex_orig, const float fw[4], struct LinkNode **poly_nodes) |
ParticleSettings Handling | |
| void | blender::object_remove_particle_system (struct Main *bmain, struct Scene *scene, struct Object *ob, struct ParticleSystem *psys) |
| struct ParticleSettings * | blender::BKE_particlesettings_add (struct Main *bmain, const char *name) |
| void | blender::BKE_particlesettings_clump_curve_init (struct ParticleSettings *part) |
| void | blender::BKE_particlesettings_rough_curve_init (struct ParticleSettings *part) |
| void | blender::BKE_particlesettings_twist_curve_init (struct ParticleSettings *part) |
Path Cache | |
| void | blender::psys_find_parents (struct ParticleSimulationData *sim, bool use_render_params) |
| void void | blender::psys_cache_paths (struct ParticleSimulationData *sim, float cfra, bool use_render_params) |
| void | blender::psys_cache_edit_paths (struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, struct PTCacheEdit *edit, float cfra, bool use_render_params) |
| void | blender::psys_cache_child_paths (struct ParticleSimulationData *sim, float cfra, bool editupdate, bool use_render_params) |
| bool | blender::do_guides (struct Depsgraph *depsgraph, struct ParticleSettings *part, ListBaseT< EffectorCache > *effectors, ParticleKey *state, int index, float time) |
| void | blender::precalc_guides (struct ParticleSimulationData *sim, ListBaseT< EffectorCache > *effectors) |
| float * | blender::psys_cache_vgroup (struct Mesh *mesh, struct ParticleSystem *psys, int vgroup) |
SPH Fluid Physics | |
In theory, there could be unlimited implementation of SPH simulators This code uses in some parts adapted algorithms from the pseudo code as outlined in the Research paper: Titled: Particle-based Viscoelastic Fluid Simulation. Authors: Simon Clavet, Philippe Beaudoin and Pierre Poulin Website: http://www.iro.umontreal.ca/labs/infographie/papers/Clavet-2005-PVFS/ Presented at SIGGRAPH, (2005) | |
| void | blender::psys_sph_finalize (struct SPHData *sphdata) |
| void | blender::psys_sph_density (struct BVHTree *tree, struct SPHData *data, float co[3], float vars[2]) |
Distribution | |
| void | blender::psys_thread_context_init (struct ParticleThreadContext *ctx, struct ParticleSimulationData *sim) |
| void | blender::psys_thread_context_free (struct ParticleThreadContext *ctx) |
| Vector< ParticleTask > | blender::psys_tasks_create (struct ParticleThreadContext *ctx, int startpart, int endpart) |
| void | blender::psys_tasks_free (Vector< ParticleTask > &tasks) |
| void | blender::psys_get_birth_coords (struct ParticleSimulationData *sim, struct ParticleData *pa, struct ParticleKey *state, float dtime, float cfra) |
| void | blender::init_particle (struct ParticleSimulationData *sim, struct ParticleData *pa) |
| void | blender::psys_calc_dmcache (struct Object *ob, struct Mesh *mesh_final, struct Mesh *mesh_original, struct ParticleSystem *psys) |
| void | blender::reset_particle (struct ParticleSimulationData *sim, struct ParticleData *pa, float dtime, float cfra) |
Particle Targets | |
| struct ParticleSystem * | blender::psys_get_target_system (struct Object *ob, struct ParticleTarget *pt) |
Keyed Particles | |
| void | blender::psys_count_keyed_targets (struct ParticleSimulationData *sim) |
Effectors | |
| void | blender::psys_update_particle_tree (struct ParticleSystem *psys, float cfra) |
Point Cache | |
| void | blender::psys_make_temp_pointcache (struct Object *ob, struct ParticleSystem *psys) |
| void | blender::psys_get_pointcache_start_end (struct Scene *scene, ParticleSystem *psys, int *sfra, int *efra) |
Interpolation | |
| void | blender::psys_interpolate_particle (short type, struct ParticleKey keys[4], float dt, struct ParticleKey *result, bool velocity) |
| float | blender::psys_get_dietime_from_cache (struct PointCache *cache, int index) |
Textures | |
| void | blender::psys_get_texture (struct ParticleSimulationData *sim, struct ParticleData *pa, struct ParticleTexture *ptex, int event, float cfra) |
Depsgraph evaluation | |
| void | blender::BKE_particle_settings_eval_reset (struct Depsgraph *depsgraph, struct ParticleSettings *particle_settings) |
| void | blender::BKE_particle_system_eval_init (struct Depsgraph *depsgraph, struct Object *object) |
Variables | |
| unsigned int | blender::PSYS_FRAND_SEED_OFFSET [PSYS_FRAND_COUNT] |
| unsigned int | blender::PSYS_FRAND_SEED_MULTIPLIER [PSYS_FRAND_COUNT] |
| float | blender::PSYS_FRAND_BASE [PSYS_FRAND_COUNT] |
| #define DMCACHE_ISCHILD -2 |
Definition at line 701 of file BKE_particle.h.
Referenced by blender::brush_add_count_iter(), blender::io::hydra::build_hair_data(), blender::distribute_children_exec(), blender::get_particle_uv(), blender::draw::particle_calculate_parent_mcol(), blender::draw::particle_calculate_parent_uvs(), blender::draw::particle_mface_index(), blender::PE_mirror_x(), blender::psys_calc_dmcache(), blender::psys_face_mat(), blender::psys_find_parents(), blender::psys_get_dupli_texture(), blender::psys_get_particle_on_path(), blender::psys_map_index_on_dm(), blender::psys_thread_create_path(), blender::remap_hair_emitter(), and blender::tessfaceidx_on_emitter().
| #define DMCACHE_NOTFOUND -1 |
Definition at line 700 of file BKE_particle.h.
Referenced by blender::brush_add(), blender::brush_add_count_iter(), blender::io::hydra::build_hair_data(), blender::distribute_from_verts_exec(), blender::get_particle_uv(), blender::draw::interpolate(), blender::draw::interpolate(), blender::draw::particle_calculate_parent_mcol(), blender::draw::particle_calculate_parent_uvs(), blender::draw::particle_interpolate_children_mcol(), blender::draw::particle_interpolate_children_uvs(), blender::draw::particle_mface_index(), blender::psys_calc_dmcache(), blender::psys_face_mat(), blender::psys_get_dupli_texture(), blender::psys_map_index_on_dm(), blender::psys_particle_dm_face_lookup(), blender::psys_thread_create_path(), blender::tessfaceidx_on_emitter(), and blender::ed::curves::convert_to_particle_system::try_convert_single_object().
| #define LOOP_DYNAMIC_PARTICLES |
Definition at line 62 of file BKE_particle.h.
Referenced by blender::dynamics_step().
| #define LOOP_EXISTING_PARTICLES |
Definition at line 56 of file BKE_particle.h.
Referenced by blender::dynamics_step(), and blender::particle_system_update().
| #define LOOP_PARTICLES for (p = 0, pa = psys->particles; p < psys->totpart; p++, pa++) |
Definition at line 55 of file BKE_particle.h.
Referenced by blender::cached_step(), blender::distribute_invalid(), blender::do_hair_dynamics(), blender::free_hair(), blender::free_keyed_keys(), blender::free_unexisting_particles(), blender::hair_create_input_mesh(), blender::hair_step(), blender::initialize_all_particles(), blender::PE_update_mirror_cache(), blender::precalc_guides(), blender::psys_cache_paths(), blender::psys_calc_dmcache(), blender::psys_check_boid_data(), blender::psys_free_particles(), blender::psys_reset(), blender::realloc_particles(), blender::save_hair(), blender::set_keyed_keys(), and blender::system_step().
| #define LOOP_SHOWN_PARTICLES |
Definition at line 59 of file BKE_particle.h.
Referenced by blender::count_particles(), blender::count_particles_mod(), blender::dynamics_step(), blender::psys_update_particle_bvhtree(), and blender::psys_update_particle_tree().
| #define PARTICLE_COLLISION_MAX_COLLISIONS 10 |
Definition at line 50 of file BKE_particle.h.
Referenced by blender::collision_check().
| #define PARTICLE_DRAW_DATA_UPDATED 1 |
Definition at line 247 of file BKE_particle.h.
Referenced by blender::particle_system_update().
| #define PARTICLE_P |
Definition at line 52 of file BKE_particle.h.
Referenced by blender::cached_step(), blender::count_particles(), blender::count_particles_mod(), blender::distribute_invalid(), blender::do_hair_dynamics(), blender::dynamics_step(), blender::free_hair(), blender::free_keyed_keys(), blender::free_unexisting_particles(), blender::hair_create_input_mesh(), blender::hair_step(), blender::initialize_all_particles(), blender::particle_system_update(), blender::PE_update_mirror_cache(), blender::precalc_guides(), blender::psys_cache_paths(), blender::psys_calc_dmcache(), blender::psys_check_boid_data(), blender::psys_free_particles(), blender::psys_reset(), blender::psys_update_particle_bvhtree(), blender::psys_update_particle_tree(), blender::realloc_particles(), blender::save_hair(), blender::set_keyed_keys(), and blender::system_step().
| #define PARTICLE_PSMD ParticleSystemModifierData *psmd = sim->psmd ? sim->psmd : psys_get_modifier(sim->ob, sim->psys) |
Definition at line 67 of file BKE_particle.h.
Referenced by blender::distribute_particles(), blender::psys_cache_paths(), and blender::psys_get_particle_on_path().
| #define PSYS_FRAND_COUNT 1024 |
Definition at line 249 of file BKE_particle.h.
Referenced by blender::BKE_particle_init_rng(), blender::psys_frand(), and blender::psys_frand_vec().
| #define PSYS_RESET_ALL 1 |
Definition at line 694 of file BKE_particle.h.
Referenced by blender::BKE_ptcache_object_reset(), blender::particle_system_update(), blender::psys_changed_type(), and blender::psys_reset().
| #define PSYS_RESET_CACHE_MISS 4 |
Definition at line 697 of file BKE_particle.h.
Referenced by blender::psys_reset(), and blender::system_step().
| #define PSYS_RESET_DEPSGRAPH 2 |
Definition at line 695 of file BKE_particle.h.
Referenced by blender::BKE_ptcache_id_reset(), blender::clear_edited_exec(), and blender::psys_reset().