|
Blender
V2.93
|
#include <stddef.h>#include <math.h>#include <stdlib.h>#include <string.h>#include "MEM_guardedalloc.h"#include "DNA_anim_types.h"#include "DNA_boid_types.h"#include "DNA_cloth_types.h"#include "DNA_curve_types.h"#include "DNA_listBase.h"#include "DNA_mesh_types.h"#include "DNA_meshdata_types.h"#include "DNA_modifier_types.h"#include "DNA_object_force_types.h"#include "DNA_object_types.h"#include "DNA_particle_types.h"#include "DNA_scene_types.h"#include "DNA_texture_types.h"#include "BLI_blenlib.h"#include "BLI_edgehash.h"#include "BLI_kdopbvh.h"#include "BLI_kdtree.h"#include "BLI_linklist.h"#include "BLI_math.h"#include "BLI_rand.h"#include "BLI_string_utils.h"#include "BLI_task.h"#include "BLI_threads.h"#include "BLI_utildefines.h"#include "BKE_animsys.h"#include "BKE_boids.h"#include "BKE_collision.h"#include "BKE_colortools.h"#include "BKE_effect.h"#include "BKE_lib_id.h"#include "BKE_lib_query.h"#include "BKE_particle.h"#include "BKE_bvhutils.h"#include "BKE_cloth.h"#include "BKE_collection.h"#include "BKE_lattice.h"#include "BKE_material.h"#include "BKE_mesh.h"#include "BKE_modifier.h"#include "BKE_object.h"#include "BKE_pointcache.h"#include "BKE_scene.h"#include "DEG_depsgraph.h"#include "DEG_depsgraph_physics.h"#include "DEG_depsgraph_query.h"#include "PIL_time.h"#include "RE_texture.h"Go to the source code of this file.
Classes | |
| struct | SPHNeighbor |
| struct | SPHRangeData |
| struct | EfData |
| struct | DynamicStepSolverTaskData |
| struct | ParticleSystemIDLoopForModifier |
Macros | |
| #define | ZERO_F43 |
| #define | COLLISION_MIN_RADIUS 0.001f |
| #define | COLLISION_MIN_DISTANCE 0.0001f |
| #define | COLLISION_ZERO 0.00001f |
| #define | COLLISION_INIT_STEP 0.00008f |
Typedefs | |
| typedef struct EfData | EfData |
| typedef float(* | NRDistanceFunc) (float *p, float radius, ParticleCollisionElement *pce, float *nor) |
| typedef struct DynamicStepSolverTaskData | DynamicStepSolverTaskData |
| typedef struct ParticleSystemIDLoopForModifier | ParticleSystemIDLoopForModifier |
Variables | |
| static ThreadRWMutex | psys_bvhtree_rwlock = BLI_RWLOCK_INITIALIZER |
| static const float | MIN_TIMESTEP = 1.0f / 101.0f |
| static const float | TIMESTEP_EXPANSION_FACTOR = 0.1f |
| static const float | TIMESTEP_EXPANSION_TOLERANCE = 1.5f |
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) | |
| #define | PSYS_FLUID_SPRINGS_INITIAL_SIZE 256 |
| #define | SPH_NEIGHBORS 512 |
| typedef struct SPHNeighbor | SPHNeighbor |
| typedef struct SPHRangeData | SPHRangeData |
| static ParticleSpring * | sph_spring_add (ParticleSystem *psys, ParticleSpring *spring) |
| static void | sph_spring_delete (ParticleSystem *psys, int j) |
| static void | sph_springs_modify (ParticleSystem *psys, float dtime) |
| static EdgeHash * | sph_springhash_build (ParticleSystem *psys) |
| static void | sph_evaluate_func (BVHTree *tree, ParticleSystem **psys, const float co[3], SPHRangeData *pfr, float interaction_radius, BVHTree_RangeQuery callback) |
| static void | sph_density_accum_cb (void *userdata, int index, const float co[3], float squared_dist) |
| static void | sph_particle_courant (SPHData *sphdata, SPHRangeData *pfr) |
| static void | sph_force_cb (void *sphdata_v, ParticleKey *state, float *force, float *UNUSED(impulse)) |
| static void | sphclassical_density_accum_cb (void *userdata, int index, const float co[3], float UNUSED(squared_dist)) |
| static void | sphclassical_neighbor_accum_cb (void *userdata, int index, const float co[3], float UNUSED(squared_dist)) |
| static void | sphclassical_force_cb (void *sphdata_v, ParticleKey *state, float *force, float *UNUSED(impulse)) |
| static void | sphclassical_calc_dens (ParticleData *pa, float UNUSED(dfra), SPHData *sphdata) |
| void | psys_sph_init (ParticleSimulationData *sim, SPHData *sphdata) |
| static void | psys_sph_flush_springs (SPHData *sphdata) |
| void | psys_sph_finalize (SPHData *sphdata) |
| void | psys_sph_density (BVHTree *tree, SPHData *sphdata, float co[3], float vars[2]) |
| static void | sph_integrate (ParticleSimulationData *sim, ParticleData *pa, float dfra, SPHData *sphdata) |
| #define COLLISION_INIT_STEP 0.00008f |
Definition at line 2398 of file particle_system.c.
| #define COLLISION_MIN_DISTANCE 0.0001f |
Definition at line 2396 of file particle_system.c.
| #define COLLISION_MIN_RADIUS 0.001f |
Definition at line 2395 of file particle_system.c.
| #define COLLISION_ZERO 0.00001f |
Definition at line 2397 of file particle_system.c.
| #define PSYS_FLUID_SPRINGS_INITIAL_SIZE 256 |
Definition at line 1572 of file particle_system.c.
| #define SPH_NEIGHBORS 512 |
Definition at line 1675 of file particle_system.c.
| #define ZERO_F43 |
| typedef struct DynamicStepSolverTaskData DynamicStepSolverTaskData |
Definition at line 2399 of file particle_system.c.
| typedef struct ParticleSystemIDLoopForModifier ParticleSystemIDLoopForModifier |
| typedef struct SPHNeighbor SPHNeighbor |
| typedef struct SPHRangeData SPHRangeData |
|
static |
Definition at line 2239 of file particle_system.c.
References EffectedPoint::ave, ParticleKey::ave, BKE_effectors_apply(), BLI_rng_get_float(), ParticleSettings::brownfac, ParticleSimulationData::colliders, copy_v3_v3(), ParticleSettings::dragfac, EFF_WEIGHT_DO_HAIR, ParticleSettings::effector_weights, ParticleSystem::effectors, ParticleTexture::field, EffectorWeights::flag, ParticleSettings::flag, len_v3(), madd_v3_v3fl(), mul_v3_fl(), NULL, EfData::pa, ParticleSystem::part, PART_HAIR, PART_ROT_DYN, pd_point_from_particle(), ParticleSimulationData::psys, EfData::ptex, ParticleSimulationData::rng, EfData::sim, ParticleData::size, ParticleData::state, state, and ParticleSettings::type.
Referenced by basic_integrate().
|
static |
Definition at line 2280 of file particle_system.c.
References ParticleKey::ave, basic_force_cb(), CLAMP, ParticleKey::co, copy_v3_v3(), ParticleTexture::damp, ParticleSettings::dampfac, ParticleSimulationData::depsgraph, do_guides(), EFF_WEIGHT_DO_HAIR, ParticleSettings::effector_weights, ParticleSystem::effectors, EffectorWeights::flag, EffectorWeights::global_gravity, ParticleTexture::gravity, PhysicsSettings::gravity, integrate_particle(), ParticleData::lifetime, madd_v3_v3fl(), mul_v3_fl(), NULL, EfData::pa, PAMAP_PHYSICS, ParticleSystem::part, PART_HAIR, ParticleSystem::particles, Scene::physics_settings, ParticleData::prev_state, ParticleSimulationData::psys, psys_get_texture(), psys_get_timestep(), psys_uses_gravity(), EfData::ptex, ParticleSimulationData::scene, EfData::sim, ParticleData::state, sub_v3_v3v3(), time, ParticleKey::time, ParticleData::time, ParticleSettings::type, ParticleKey::vel, and zero_v3().
Referenced by dynamics_step(), dynamics_step_sph_classical_basic_integrate_task_cb_ex(), and dynamics_step_sph_ddr_task_cb_ex().
|
static |
Definition at line 2335 of file particle_system.c.
References angle(), ParticleKey::ave, ParticleSettings::avefac, ParticleSettings::avemode, axis_angle_to_quat(), cross_v3_v3v3(), dot_v3v3(), ELEM, ParticleSettings::flag, get_angular_velocity_vector(), len_v3(), mul_qt_qtqt(), mul_v3_fl(), normalize_qt(), normalize_v3(), PART_AVE_HORIZONTAL, PART_AVE_VELOCITY, PART_AVE_VERTICAL, PART_ROT_DYN, PART_ROTATIONS, ParticleData::prev_state, ParticleKey::rot, saacos(), ParticleData::state, unit_qt(), ParticleKey::vel, and zero_v3().
Referenced by dynamics_step(), dynamics_step_sph_classical_integrate_task_cb_ex(), and dynamics_step_sph_ddr_task_cb_ex().
| void BKE_particle_settings_eval_reset | ( | struct Depsgraph * | depsgraph, |
| ParticleSettings * | particle_settings | ||
| ) |
Definition at line 5054 of file particle_system.c.
References DEG_debug_print_eval(), depsgraph, ParticleSettings::id, ID_RECALC_PSYS_RESET, ID::name, and ID::recalc.
Definition at line 5061 of file particle_system.c.
References DEG_debug_print_eval(), depsgraph, ListBase::first, Object::id, ID_RECALC_PSYS_ALL, ID::name, NULL, and Object::particlesystem.
Referenced by blender::deg::DepsgraphNodeBuilder::build_particle_systems().
| void BKE_particlesettings_fluid_default_settings | ( | ParticleSettings * | part | ) |
Definition at line 4702 of file particle_system.c.
References SPHFluidSettings::buoyancy, SPHFluidSettings::flag, ParticleSettings::fluid, SPHFluidSettings::plasticity_constant, SPHFluidSettings::radius, SPHFluidSettings::rest_density, SPHFluidSettings::rest_length, SPH_FAC_DENSITY, SPH_FAC_RADIUS, SPH_FAC_REPULSION, SPH_FAC_REST_LENGTH, SPH_FAC_VISCOSITY, SPHFluidSettings::spring_k, SPHFluidSettings::stiffness_k, SPHFluidSettings::stiffness_knear, SPHFluidSettings::viscosity_beta, SPHFluidSettings::viscosity_omega, and SPHFluidSettings::yield_ratio.
| void BKE_particlesystem_id_loop | ( | ParticleSystem * | psys, |
| ParticleSystemIDFunc | func, | ||
| void * | userdata | ||
| ) |
Definition at line 5006 of file particle_system.c.
References BKE_modifier_get_info(), ParticleData::boid, ParticleSystem::clmd, data, ListBase::first, ModifierTypeInfo::foreachIDLink, BoidParticle::ground, IDWALK_CB_NEVER_NULL, IDWALK_CB_NOP, IDWALK_CB_USER, ClothModifierData::modifier, ParticleTarget::next, NULL, ParticleTarget::ob, ParticleSystem::parent, ParticleSystem::part, PART_PHYS_BOIDS, ParticleSystem::particles, particlesystem_modifiersForeachIDLink(), ParticleSettings::phystype, ParticleSystem::target_ob, ParticleSystem::targets, and ModifierData::type.
Referenced by object_foreach_id().
| void BKE_particlesystem_reset_all | ( | struct Object * | object | ) |
Definition at line 5040 of file particle_system.c.
References eModifierType_ParticleSystem, ListBase::first, ID_RECALC_PSYS_RESET, Object::modifiers, NULL, ParticleSystemModifierData::psys, and ParticleSystem::recalc.
Referenced by ED_object_editmode_exit_ex(), and SCULPT_dynamic_topology_disable_ex().
| void BKE_psys_collision_neartest_cb | ( | void * | userdata, |
| int | index, | ||
| const BVHTreeRay * | ray, | ||
| BVHTreeRayHit * | hit | ||
| ) |
Definition at line 2788 of file particle_system.c.
References BMVert::co, col, collision_point_velocity(), collision_sphere_to_edges(), collision_sphere_to_tri(), collision_sphere_to_verts(), BVHTreeRayHit::dist, ParticleCollisionElement::index, BVHTreeRayHit::index, ParticleCollisionElement::inside, BVHTreeRay::radius, t, ParticleCollisionElement::tot, MVertTri::tri, ParticleCollisionElement::v, v, ParticleCollisionElement::x, and x.
Referenced by collision_detect().
|
static |
Definition at line 4102 of file particle_system.c.
References ParticleData::alive, BKE_lattice_deform_data_destroy(), ParticleData::dietime, ParticleData::flag, ParticleSettings::flag, PointCache::flag, ParticleSystem::lattice_deform_data, LOOP_PARTICLES, NULL, PAMAP_SIZE, PARS_ALIVE, PARS_DEAD, PARS_NO_DISP, PARS_UNBORN, ParticleSystem::part, PART_UNBORN, PARTICLE_P, ParticleSystem::pointcache, ParticleSimulationData::psys, psys_create_lattice_deform_data(), psys_frand(), psys_get_current_display_percentage(), psys_get_texture(), psys_update_effectors(), PTCACHE_EXTERNAL, ParticleSettings::randsize, reset_particle(), ParticleTexture::size, ParticleData::size, ParticleSettings::size, and ParticleData::time.
Referenced by system_step().
|
static |
Definition at line 3118 of file particle_system.c.
References ParticleData::boid, BOID_ALLOW_LAND, ParticleSettings::boids, ParticleSystem::cfra, ParticleKey::co, col, ParticleSimulationData::colliders, collision_detect(), collision_fail(), COLLISION_MIN_RADIUS, collision_response(), copy_v3_v3(), ParticleSettings::flag, BoidParticle::ground, if(), mul_v3_fl(), BoidSettings::options, ParticleSystem::part, PART_DIE_ON_COL, PART_PHYS_BOIDS, PART_ROT_DYN, PART_SIZE_DEFL, PARTICLE_COLLISION_MAX_COLLISIONS, ParticleSystem::particles, ParticleSettings::phystype, ParticleData::prev_state, ParticleSimulationData::psys, psys_get_timestep(), ParticleData::size, ParticleData::state, sub_v3_v3v3(), and ParticleKey::vel.
Referenced by dynamics_step(), dynamics_step_sph_classical_integrate_task_cb_ex(), and dynamics_step_sph_ddr_task_cb_ex().
|
static |
Definition at line 2828 of file particle_system.c.
References BKE_psys_collision_neartest_cb(), BLI_bvhtree_ray_cast_ex(), BLI_listbase_is_empty(), BVH_RAYCAST_DEFAULT, BVH_RAYCAST_WATERTIGHT, col, ColliderCache::collmd, BVHTreeRayHit::dist, ListBase::first, BVHTreeRayHit::index, ColliderCache::next, normalize_v3(), ColliderCache::ob, sub_v3_v3v3(), ParticleData::time, CollisionModifierData::time_x, and CollisionModifierData::time_xnew.
Referenced by collision_check().
|
static |
Definition at line 3098 of file particle_system.c.
References ParticleKey::co, col, collision_point_on_surface(), copy_v3_v3(), mul_v3_fl(), ParticleData::state, and ParticleKey::vel.
Referenced by collision_check().
|
static |
Definition at line 2454 of file particle_system.c.
References col, madd_v3_v3v3fl(), mul(), t, ParticleCollisionElement::tot, ParticleCollisionElement::v, ParticleCollisionElement::x, ParticleCollisionElement::x0, ParticleCollisionElement::x1, and ParticleCollisionElement::x2.
Referenced by collision_newton_rhapson(), collision_point_distance_with_normal(), and collision_point_on_surface().
|
static |
Definition at line 2566 of file particle_system.c.
References CLAMP, col, COLLISION_INIT_STEP, collision_interpolate_element(), COLLISION_ZERO, copy_v3_v3(), ParticleCollisionElement::inside, interp_v3_v3v3(), ParticleCollisionElement::inv_nor, ParticleCollisionElement::nor, nr_signed_distance_to_plane(), and ParticleCollisionElement::p.
Referenced by collision_sphere_to_edges(), collision_sphere_to_tri(), and collision_sphere_to_verts().
|
static |
Definition at line 2493 of file particle_system.c.
References col, collision_interpolate_element(), dot_v3v3(), e, madd_v3_v3v3fl(), nor, normalize_v3(), nr_signed_distance_to_plane(), sub_v3_v3v3(), ParticleCollisionElement::tot, ParticleCollisionElement::x0, and ParticleCollisionElement::x1.
Referenced by collision_response().
|
static |
Definition at line 2519 of file particle_system.c.
References col, collision_interpolate_element(), cross_v3_v3v3(), dot_v3v3(), e, ParticleCollisionElement::inv_nor, madd_v3_v3fl(), madd_v3_v3v3fl(), negate_v3(), nor, normalize_v3(), sub_v3_v3v3(), ParticleCollisionElement::tot, ParticleCollisionElement::uv, ParticleCollisionElement::x0, ParticleCollisionElement::x1, and ParticleCollisionElement::x2.
Referenced by collision_fail().
|
static |
Definition at line 2477 of file particle_system.c.
References copy_v3_v3(), madd_v3_v3fl(), sub_v3_v3v3(), ParticleCollisionElement::tot, ParticleCollisionElement::uv, ParticleCollisionElement::v, v, and ParticleCollisionElement::vel.
Referenced by BKE_psys_collision_neartest_cb().
|
static |
Definition at line 2893 of file particle_system.c.
References add_v3_v3(), add_v3_v3v3(), ParticleData::alive, ParticleKey::ave, BLI_rng_get_float(), ParticleData::boid, CLAMP, ParticleKey::co, col, COLLISION_MIN_DISTANCE, collision_point_distance_with_normal(), copy_v3_v3(), cross_v3_v3v3(), BoidParticle::data, ParticleData::dietime, BVHTreeRayHit::dist, distance(), dot(), dot_v3v3(), eBoidMode_OnLand, PartDeflect::flag, interp_qt_qtqt(), interp_v3_v3v3(), madd_v3_v3fl(), madd_v3_v3v3fl(), MAX2, BoidData::mode, mul_v3_fl(), mul_v3_v3fl(), negate_v3_v3(), ParticleCollisionElement::nor, nor, PARS_DYING, PartDeflect::pdef_damp, PartDeflect::pdef_frict, PartDeflect::pdef_perm, PartDeflect::pdef_rdamp, PartDeflect::pdef_rfrict, PartDeflect::pdef_stickness, PDEFLE_KILL_PART, ParticleData::prev_state, ParticleSimulationData::rng, ParticleKey::rot, ParticleData::size, ParticleData::state, sub_v3_v3v3(), ParticleCollisionElement::vel, ParticleKey::vel, and x.
Referenced by collision_check().
|
static |
Definition at line 2707 of file particle_system.c.
References col, collision_newton_rhapson(), dot_v3v3(), e, ParticleCollisionElement::inside, madd_v3_v3v3fl(), normalize_v3(), nr_distance_to_edge(), NULL, ParticleCollisionElement::p, result, sub_v3_v3v3(), t, ParticleCollisionElement::tot, ParticleCollisionElement::v, ParticleCollisionElement::x, ParticleCollisionElement::x0, and ParticleCollisionElement::x1.
Referenced by BKE_psys_collision_neartest_cb().
|
static |
Definition at line 2661 of file particle_system.c.
References col, collision_newton_rhapson(), dot_v3v3(), ParticleCollisionElement::inside, ParticleCollisionElement::inv_nor, nr_signed_distance_to_plane(), ParticleCollisionElement::p, result, sub_v3_v3v3(), t, v, ParticleCollisionElement::x0, ParticleCollisionElement::x1, and ParticleCollisionElement::x2.
Referenced by BKE_psys_collision_neartest_cb().
|
static |
Definition at line 2754 of file particle_system.c.
References col, collision_newton_rhapson(), ParticleCollisionElement::inside, normalize_v3(), nr_distance_to_vert(), NULL, ParticleCollisionElement::p, result, sub_v3_v3v3(), t, ParticleCollisionElement::tot, ParticleCollisionElement::v, ParticleCollisionElement::x, and ParticleCollisionElement::x0.
Referenced by BKE_psys_collision_neartest_cb().
|
static |
Definition at line 3449 of file particle_system.c.
References BKE_id_copy_ex(), BKE_id_free(), BKE_mesh_vert_coords_alloc(), BKE_mesh_vert_coords_apply(), BKE_modifier_new(), ParticleSystem::clmd, CLOTH_COLLSETTINGS_FLAG_SELF, CLOTH_SIMSETTINGS_FLAG_RESIST_SPRING_COMPRESS, clothModifier_do(), ClothModifierData::coll_parms, ParticleSimulationData::depsgraph, ClothSimSettings::effector_weights, ParticleSettings::effector_weights, eModifierType_Cloth, ParticleData::flag, ClothSimSettings::flags, ClothCollSettings::flags, float(), ClothSimSettings::goalspring, hair_create_input_mesh(), ParticleSystem::hair_in_mesh, ParticleSystem::hair_out_mesh, ClothModifierData::hairdata, Mesh::id, LIB_ID_COPY_LOCALIZE, LOOP_PARTICLES, MEM_freeN, mesh, NULL, ParticleSimulationData::ob, PARS_UNEXIST, ParticleSystem::part, PARTICLE_P, ClothModifierData::point_cache, ParticleSystem::pointcache, ParticleSimulationData::psys, ParticleSimulationData::scene, ClothModifierData::sim_parms, Mesh::totedge, ParticleData::totkey, and Mesh::totvert.
Referenced by hair_step().
|
static |
Definition at line 3823 of file particle_system.c.
References ParticleData::alive, basic_integrate(), basic_rotate(), BKE_collider_cache_create(), BKE_collider_cache_free(), BLI_findlink(), BLI_parallel_range_settings_defaults(), BLI_rng_free(), BLI_rng_new_srandom(), BLI_spin_end(), BLI_spin_init(), BLI_task_parallel_range(), boid_body(), boid_brain(), boids_precalc_rules(), BoidBrainData::cfra, ParticleSystem::cfra, ParticleSimulationData::colliders, collision_check(), ParticleSettings::collision_group, copy_particle_key(), ParticleSimulationData::depsgraph, BoidBrainData::dfra, ParticleData::dietime, dynamics_step_sph_classical_basic_integrate_task_cb_ex(), dynamics_step_sph_classical_calc_density_task_cb_ex(), dynamics_step_sph_classical_integrate_task_cb_ex(), dynamics_step_sph_ddr_task_cb_ex(), dynamics_step_sphdata_reduce(), ELEM, ListBase::first, ParticleData::flag, ParticleSettings::flag, ParticleSettings::fluid, TaskParallelSettings::func_reduce, BoidBrainData::goal_ob, LOOP_DYNAMIC_PARTICLES, LOOP_EXISTING_PARTICLES, LOOP_SHOWN_PARTICLES, ParticleTarget::next, NULL, ParticleSimulationData::ob, ParticleTarget::ob, PAMAP_SIZE, PARS_ALIVE, PARS_DEAD, PARS_DYING, PARS_NO_DISP, PARS_UNBORN, PARS_UNEXIST, BoidBrainData::part, ParticleSystem::part, PART_HAIR, PART_PHYS_BOIDS, PART_PHYS_FLUID, PART_PHYS_NEWTON, PART_PHYS_NO, PART_UNBORN, PARTICLE_P, Object::particlesystem, ParticleSettings::phystype, ParticleSystem::pointcache, ParticleData::prev_state, ParticleSimulationData::psys, ParticleTarget::psys, psys_frand(), psys_get_target_system(), psys_get_texture(), psys_get_timestep(), psys_sph_finalize(), psys_sph_init(), psys_update_effectors(), psys_update_particle_bvhtree(), psys_update_particle_tree(), ParticleSettings::randsize, reset_particle(), BoidBrainData::rng, ParticleSimulationData::rng, ParticleSystem::seed, BoidBrainData::sim, DynamicStepSolverTaskData::sim, ParticleTexture::size, ParticleData::size, ParticleSettings::size, SPHFluidSettings::solver, SPH_SOLVER_DDR, sph_springs_modify(), DynamicStepSolverTaskData::spin, ParticleData::state, PointCache::step, ParticleSystem::targets, ParticleKey::time, ParticleData::time, BoidBrainData::timestep, ParticleSystem::totpart, ParticleSettings::type, TaskParallelSettings::use_threading, TaskParallelSettings::userdata_chunk, and TaskParallelSettings::userdata_chunk_size.
Referenced by system_step().
|
static |
Definition at line 3755 of file particle_system.c.
References basic_integrate(), data, ParticleSystem::particles, ParticleSimulationData::psys, ParticleData::state, and ParticleKey::time.
Referenced by dynamics_step().
|
static |
Definition at line 3771 of file particle_system.c.
References data, ParticleSystem::particles, ParticleSimulationData::psys, sphclassical_calc_dens(), ParticleData::state, and ParticleKey::time.
Referenced by dynamics_step().
|
static |
Definition at line 3789 of file particle_system.c.
References basic_rotate(), ParticleSimulationData::colliders, collision_check(), data, ParticleSystem::part, PART_TIME_AUTOSF, ParticleSystem::particles, ParticleSimulationData::psys, sph_integrate(), ParticleData::state, ParticleKey::time, ParticleSettings::time_flag, and update_courant_num().
Referenced by dynamics_step().
|
static |
Definition at line 3719 of file particle_system.c.
References basic_integrate(), basic_rotate(), ParticleSimulationData::colliders, collision_check(), data, ParticleSystem::part, PART_TIME_AUTOSF, ParticleSystem::particles, ParticleSimulationData::psys, sph_integrate(), ParticleData::state, ParticleKey::time, ParticleSettings::time_flag, and update_courant_num().
Referenced by dynamics_step().
|
static |
Definition at line 3702 of file particle_system.c.
References BLI_buffer_append_array, BLI_buffer_at, BLI_buffer_field_free, BLI_Buffer::count, and SPHData::new_springs.
Referenced by dynamics_step().
|
static |
Definition at line 4447 of file particle_system.c.
References ParticleSimulationData::psys, realloc_particles(), tot_particles(), and ParticleSystem::totpart.
Referenced by particle_system_update(), and system_step().
|
static |
Definition at line 1063 of file particle_system.c.
References BKE_object_where_is_calc_time(), depsgraph, Object::parent, and scene.
Referenced by particle_system_update(), and reset_particle().
|
static |
Definition at line 640 of file particle_system.c.
References ParticleData::boid, LOOP_PARTICLES, MEM_callocN, MEM_freeN, NULL, PARS_UNEXIST, PARTICLE_P, ParticleSystem::particles, ParticleSimulationData::psys, ParticleSystem::totpart, and ParticleSystem::totunexist.
Referenced by particle_system_update(), and system_step().
|
static |
Definition at line 696 of file particle_system.c.
References copy_v3_v3(), cross_v3_v3v3(), PART_AVE_GLOBAL_X, PART_AVE_GLOBAL_Y, PART_AVE_GLOBAL_Z, PART_AVE_HORIZONTAL, PART_AVE_VELOCITY, PART_AVE_VERTICAL, and state.
Referenced by basic_rotate(), and psys_get_birth_coords().
|
static |
Definition at line 3642 of file particle_system.c.
References float(), and ParticleSettings::subframes.
Referenced by system_step(), and update_timestep().
|
static |
Definition at line 3312 of file particle_system.c.
References add_v3_v3v3(), ParticleSettings::bending_random, ClothHairData::bending_stiffness, BKE_mesh_new_nomain(), BKE_mesh_update_customdata_pointers(), CD_CALLOC, CD_MDEFORMVERT, CLAMPIS, ParticleSystem::clmd, MVert::co, HairKey::co, copy_m3_m4(), copy_v3_v3(), CustomData_add_layer(), Mesh::dvert, ParticleData::flag, ParticleSettings::from, ParticleData::hair, ParticleData::hair_index, hair_set_pinning(), ClothModifierData::hairdata, len_v3v3(), length(), ClothHairData::loc, LOOP_PARTICLES, Mesh::medge, MEM_mallocN, mesh, ParticleSystemModifierData::mesh_final, mul_m4_m4m4(), mul_m4_v3(), Mesh::mvert, normalize_m4(), NULL, ParticleSimulationData::ob, Object::obmat, PARS_UNEXIST, ParticleSystem::part, PARTICLE_P, ParticleSimulationData::psmd, ParticleSimulationData::psys, psys_frand(), psys_hair_use_simulation(), psys_mat_hair_to_object(), ClothHairData::radius, ClothHairData::rot, ClothModifierData::sim_parms, ParticleSettings::size, sub_v3_v3(), ParticleData::totkey, Mesh::totvert, MEdge::v1, MEdge::v2, ClothSimSettings::vgroup_mass, and HairKey::weight.
Referenced by do_hair_dynamics().
|
static |
Definition at line 4745 of file particle_system.c.
References ParticleSystem::edit, PTCacheEdit::edited, ParticleSettings::flag, ParticleSystem::flag, ID_RECALC_PSYS_RESET, ParticleSystem::part, PART_HAIR_REGROW, PSYS_EDITED, PSYS_HAIR_DONE, and ParticleSystem::recalc.
Referenced by particle_system_update().
|
static |
Definition at line 3298 of file particle_system.c.
References MDeformVert::dw, MEM_callocN, MDeformVert::totweight, and MDeformWeight::weight.
Referenced by hair_create_input_mesh().
|
static |
Definition at line 3520 of file particle_system.c.
References ParticleSystem::clmd, cloth_free_modifier(), do_hair_dynamics(), ParticleData::flag, ParticleSystem::flag, ID_RECALC_PSYS_RESET, LOOP_PARTICLES, ParticleSystemModifierData::mesh_final, ParticleSystemModifierData::mesh_original, ParticleSimulationData::ob, PARS_NO_DISP, ParticleSystem::part, PART_HAIR, PARTICLE_P, ParticleSystem::particles, ParticleSimulationData::psmd, ParticleSimulationData::psys, psys_calc_dmcache(), psys_frand(), psys_get_current_display_percentage(), PSYS_HAIR_DYNAMICS, PSYS_HAIR_UPDATED, psys_update_effectors(), psys_update_path_cache(), ParticleSettings::randsize, ParticleSystem::recalc, ParticleData::size, ParticleSettings::size, and ParticleSettings::type.
Referenced by motion_blur_deform_data_get(), and particle_system_update().
| void init_particle | ( | ParticleSimulationData * | sim, |
| ParticleData * | pa | ||
| ) |
Definition at line 601 of file particle_system.c.
References ParticleSettings::end, ParticleData::flag, float(), ParticleData::hair_index, PARS_UNEXIST, ParticleSystem::part, ParticleSystem::particles, ParticleSimulationData::psys, ParticleSettings::sta, ParticleData::time, and ParticleSystem::totpart.
Referenced by brush_add(), and initialize_all_particles().
|
static |
Definition at line 576 of file particle_system.c.
References ParticleSettings::end, ParticleTexture::exist, ParticleData::flag, if(), PAMAP_INIT, PARS_UNEXIST, ParticleSystem::part, PART_EMITTER, PART_HAIR, ParticleSimulationData::psys, psys_frand(), psys_get_texture(), ParticleSettings::sta, ParticleTexture::time, ParticleData::time, and ParticleSettings::type.
Referenced by reset_particle().
|
static |
Definition at line 615 of file particle_system.c.
References ParticleSettings::distr, ELEM, ParticleSettings::from, init_particle(), LOOP_PARTICLES, PARS_UNEXIST, ParticleSystem::part, PART_DISTR_GRID, PART_FROM_CHILD, PART_FROM_VERT, PARTICLE_P, and ParticleSimulationData::psys.
Referenced by particle_system_update(), and system_step().
|
static |
Definition at line 1409 of file particle_system.c.
References add_v3_v3(), add_v3_v3v3(), ParticleKey::co, copy_particle_key(), copy_v3_v3(), ParticleSettings::flag, ParticleSettings::integrator, madd_v3_v3fl(), madd_v3_v3v3fl(), ParticleSettings::mass, mul_v3_fl(), mul_v3_v3fl(), PART_INT_EULER, PART_INT_MIDPOINT, PART_INT_RK4, PART_INT_VERLET, PART_SIZEMASS, ParticleData::prev_state, ParticleData::size, ParticleData::state, steps, sub_v3_v3v3(), ParticleKey::time, ParticleKey::vel, ZERO_F43, and zero_v3().
Referenced by basic_integrate(), and sph_integrate().
|
static |
Definition at line 2432 of file particle_system.c.
References Freestyle::c, cross_v3_v3v3(), fabsf, len_v3(), sub_v3_v3v3(), v1, v2, ParticleCollisionElement::x0, and ParticleCollisionElement::x1.
Referenced by collision_sphere_to_edges().
|
static |
Definition at line 2447 of file particle_system.c.
References len_v3v3(), and ParticleCollisionElement::x0.
Referenced by collision_sphere_to_verts().
|
static |
Definition at line 2400 of file particle_system.c.
References cross_v3_v3v3(), dot_v3v3(), ParticleCollisionElement::inv_nor, negate_v3(), nor, normalize_v3(), sub_v3_v3v3(), ParticleCollisionElement::x0, ParticleCollisionElement::x1, and ParticleCollisionElement::x2.
Referenced by collision_newton_rhapson(), collision_point_distance_with_normal(), and collision_sphere_to_tri().
|
static |
Definition at line 4763 of file particle_system.c.
References BKE_libblock_free_data(), BKE_libblock_free_datablock(), BLI_assert, ParticleSettings::id, MEM_freeN, and ID::py_instance.
Referenced by particle_system_update().
|
static |
Definition at line 4756 of file particle_system.c.
References BKE_id_copy_ex(), ParticleSettings::id, LIB_ID_COPY_LOCALIZE, and NULL.
Referenced by particle_system_update().
| void particle_system_update | ( | struct Depsgraph * | depsgraph, |
| Scene * | scene, | ||
| Object * | ob, | ||
| ParticleSystem * | psys, | ||
| const bool | use_render_params | ||
| ) |
Definition at line 4773 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, 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_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(), ParticleData::size, ParticleSettings::size, system_step(), ParticleSettings::totpart, ParticleSystem::totpart, ParticleSystem::totunexist, and ParticleSettings::type.
Referenced by BKE_object_handle_data_update(), and deformVerts().
|
static |
Definition at line 101 of file particle_system.c.
References ELEM, ParticleSystem::flag, PointCache::flag, ParticleSystem::part, PART_HAIR, PART_PHYS_BOIDS, PART_PHYS_FLUID, PART_PHYS_NEWTON, ParticleSettings::phystype, ParticleSystem::pointcache, PSYS_HAIR_DYNAMICS, PTCACHE_BAKED, and ParticleSettings::type.
Referenced by psys_get_current_display_percentage().
|
static |
Definition at line 4179 of file particle_system.c.
References add_v3_v3(), add_v3_v3v3(), ParticleData::alive, ParticleKey::ave, BKE_modifiers_findby_type(), BLI_rng_free(), BLI_rng_get_double(), BLI_rng_new_srandom(), BLI_snprintf(), FluidDomainSettings::cell_size, ParticleKey::co, copy_v3_v3(), ParticleData::dietime, ParticleSettings::disp, FluidModifierData::domain, double(), FluidDomainSettings::dx, RenderData::efra, eModifierType_Fluid, ParticleSettings::end, fabsf, float(), FluidDomainSettings::fluid, FLUID_DOMAIN_PARTICLE_BUBBLE, FLUID_DOMAIN_PARTICLE_FLIP, FLUID_DOMAIN_PARTICLE_FOAM, FLUID_DOMAIN_PARTICLE_SPRAY, FLUID_DOMAIN_PARTICLE_TRACER, ParticleData::lifetime, ParticleSettings::lifetime, madd_v3fl_v3fl_v3fl_v3i(), manta_get_res_x(), manta_get_res_y(), manta_get_res_z(), manta_liquid_get_flip_particle_flag_at(), manta_liquid_get_flip_particle_position_x_at(), manta_liquid_get_flip_particle_position_y_at(), manta_liquid_get_flip_particle_position_z_at(), manta_liquid_get_flip_particle_velocity_x_at(), manta_liquid_get_flip_particle_velocity_y_at(), manta_liquid_get_flip_particle_velocity_z_at(), manta_liquid_get_num_flip_particles(), manta_liquid_get_num_snd_particles(), manta_liquid_get_particle_res_x(), manta_liquid_get_particle_res_y(), manta_liquid_get_particle_res_z(), manta_liquid_get_particle_upres(), manta_liquid_get_snd_particle_flag_at(), manta_liquid_get_snd_particle_position_x_at(), manta_liquid_get_snd_particle_position_y_at(), manta_liquid_get_snd_particle_position_z_at(), manta_liquid_get_snd_particle_velocity_x_at(), manta_liquid_get_snd_particle_velocity_y_at(), manta_liquid_get_snd_particle_velocity_z_at(), max, MAX3, MEM_freeN, min, mul_m4_v3(), mul_v3_fl(), mul_v3_v3(), NULL, ParticleSimulationData::ob, Object::obmat, FluidDomainSettings::p0, FluidDomainSettings::p1, PARS_ALIVE, ParticleSystem::part, PART_FLUID_FLIP, FluidDomainSettings::particle_type, PARTICLE_TYPE_BUBBLE, PARTICLE_TYPE_DELETE, PARTICLE_TYPE_FOAM, PARTICLE_TYPE_SPRAY, PARTICLE_TYPE_TRACER, ParticleSystem::particles, particles_has_bubble(), particles_has_flip(), particles_has_foam(), particles_has_spray(), particles_has_tracer(), ParticleSimulationData::psys, psys_frand(), r, Scene::r, ParticleSettings::randsize, realloc_particles(), FluidDomainSettings::res_max, FluidDomainSettings::res_min, ParticleSimulationData::rng, ParticleKey::rot, Object::scale, ParticleSimulationData::scene, ParticleSystem::seed, size(), ParticleData::size, ParticleSettings::size, ParticleSettings::sta, ParticleData::state, sub_v3_v3(), sub_v3_v3v3(), ParticleData::time, ParticleSettings::totpart, ParticleSystem::totpart, ParticleSettings::type, unit_qt(), UNUSED_VARS, ParticleKey::vel, and zero_v3().
Referenced by particle_system_update().
|
static |
Definition at line 4169 of file particle_system.c.
References ELEM, PART_FLUID_BUBBLE, PART_FLUID_FOAMBUBBLE, and PART_FLUID_SPRAYFOAMBUBBLE.
Referenced by particle_system_update(), and particles_fluid_step().
|
static |
Definition at line 4154 of file particle_system.c.
References PART_FLUID_FLIP.
Referenced by particle_system_update(), and particles_fluid_step().
|
static |
Definition at line 4174 of file particle_system.c.
References ELEM, PART_FLUID_FOAM, PART_FLUID_SPRAYFOAM, and PART_FLUID_SPRAYFOAMBUBBLE.
Referenced by particle_system_update(), and particles_fluid_step().
|
static |
Definition at line 4164 of file particle_system.c.
References ELEM, PART_FLUID_SPRAY, PART_FLUID_SPRAYFOAM, and PART_FLUID_SPRAYFOAMBUBBLE.
Referenced by particle_system_update(), and particles_fluid_step().
|
static |
Definition at line 4159 of file particle_system.c.
References PART_FLUID_TRACER.
Referenced by particle_system_update(), and particles_fluid_step().
|
static |
Definition at line 4997 of file particle_system.c.
References data, and user_data.
Referenced by BKE_particlesystem_id_loop().
| void psys_calc_dmcache | ( | Object * | ob, |
| Mesh * | mesh_final, | ||
| Mesh * | mesh_original, | ||
| ParticleSystem * | psys | ||
| ) |
Definition at line 332 of file particle_system.c.
References CD_ORIGINDEX, CustomData_get_layer(), Object::data, Mesh_Runtime::deformed_only, DMCACHE_ISCHILD, DMCACHE_NOTFOUND, Mesh::fdata, ParticleSettings::from, if(), LinkNode::link, LOOP_PARTICLES, MEM_callocN, MEM_freeN, node, NULL, ORIGINDEX_NONE, ParticleSystem::part, PART_FROM_VERT, PARTICLE_P, POINTER_AS_INT, POINTER_FROM_INT, psys_particle_dm_face_lookup(), Mesh::runtime, Mesh::totface, Mesh::totvert, and ParticleSettings::use_modifier_stack.
Referenced by distribute_particles_on_dm(), distribute_simple_children(), and hair_step().
| void psys_changed_type | ( | Object * | ob, |
| ParticleSystem * | psys | ||
| ) |
Definition at line 4634 of file particle_system.c.
References BKE_ptcache_id_clear(), BKE_ptcache_id_from_particles(), CLAMP, ParticleSettings::distr, ParticleSettings::draw_as, ELEM, ParticleSettings::end, ParticleSystem::flag, free_hair(), ParticleSettings::lifetime, MAX2, ParticleSystem::part, PART_DISTR_GRID, PART_DISTR_JIT, PART_DRAW_GR, PART_DRAW_NOT, PART_DRAW_OB, PART_DRAW_PATH, PART_DRAW_REND, PART_HAIR, PART_PHYS_KEYED, ParticleSettings::path_end, ParticleSettings::path_start, ParticleSettings::phystype, PSYS_KEYED, psys_reset(), PSYS_RESET_ALL, PTCACHE_CLEAR_ALL, ParticleSettings::ren_as, and ParticleSettings::type.
| void psys_check_boid_data | ( | ParticleSystem * | psys | ) |
Definition at line 4672 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().
|
static |
Definition at line 1309 of file particle_system.c.
References BKE_ptcache_free_mem(), PointCache::flag, PointCache::mem_cache, ParticleSystem::pointcache, and PTCACHE_DISK_CACHE.
Referenced by system_step().
| void psys_count_keyed_targets | ( | ParticleSimulationData * | sim | ) |
Definition at line 1193 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 particle_system_update().
| void psys_get_birth_coords | ( | ParticleSimulationData * | sim, |
| ParticleData * | pa, | ||
| ParticleKey * | state, | ||
| float | dtime, | ||
| float | cfra | ||
| ) |
Definition at line 732 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, ParticleData::state, 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().
| int psys_get_child_number | ( | Scene * | scene, |
| ParticleSystem * | psys, | ||
| const bool | use_render_params | ||
| ) |
Definition at line 305 of file particle_system.c.
References ParticleSettings::child_nbr, ParticleSettings::childtype, get_render_child_particle_number(), ParticleSystem::part, Scene::r, ParticleSettings::ren_child_nbr, and scene.
Referenced by distribute_simple_children(), and psys_get_tot_child().
| float psys_get_current_display_percentage | ( | ParticleSystem * | psys, |
| const bool | use_render_params | ||
| ) |
Definition at line 114 of file particle_system.c.
References ParticleSettings::child_nbr, ParticleSettings::childtype, ParticleSettings::disp, PointCache::flag, ParticleSystem::part, particles_are_dynamic(), ParticleSystem::pointcache, and PTCACHE_BAKING.
Referenced by cached_step(), hair_step(), particle_system_update(), and system_step().
| void psys_get_pointcache_start_end | ( | Scene * | scene, |
| ParticleSystem * | psys, | ||
| int * | sfra, | ||
| int * | efra | ||
| ) |
Definition at line 1315 of file particle_system.c.
References RenderData::efra, ParticleSettings::end, ParticleSettings::lifetime, max_ii(), min_ii(), ParticleSystem::part, RenderData::pefra, Scene::r, scene, and ParticleSettings::sta.
Referenced by BKE_ptcache_bake(), and system_step().
| ParticleSystem* psys_get_target_system | ( | Object * | ob, |
| ParticleTarget * | pt | ||
| ) |
Definition at line 1169 of file particle_system.c.
References BLI_findlink(), ELEM, ParticleTarget::flag, NULL, ParticleTarget::ob, Object::particlesystem, ParticleTarget::psys, and PTARGET_VALID.
Referenced by dynamics_step(), psys_count_keyed_targets(), psys_sph_init(), rule_avoid_collision(), rule_fight(), and rule_separate().
| int psys_get_tot_child | ( | Scene * | scene, |
| ParticleSystem * | psys, | ||
| const bool | use_render_params | ||
| ) |
Definition at line 323 of file particle_system.c.
References psys_get_child_number(), scene, and ParticleSystem::totpart.
Referenced by distribute_invalid(), distribute_simple_children(), psys_thread_context_init_distribute(), psys_update_path_cache(), and update_children().
|
static |
Definition at line 3271 of file particle_system.c.
References HairKey::co, ParticleData::hair, len_v3v3(), length(), and ParticleData::totkey.
Referenced by hair_create_input_mesh().
| void psys_make_temp_pointcache | ( | Object * | ob, |
| ParticleSystem * | psys | ||
| ) |
Definition at line 1297 of file particle_system.c.
References BKE_ptcache_disk_to_mem(), BKE_ptcache_id_from_particles(), BLI_listbase_is_empty(), PointCache::flag, PointCache::mem_cache, ParticleSystem::pointcache, and PTCACHE_DISK_CACHE.
|
static |
Definition at line 4721 of file particle_system.c.
References BKE_ptcache_id_clear(), BKE_ptcache_id_from_particles(), BLI_assert, ParticleSettings::boids, ELEM, ParticleSystem::flag, ParticleSettings::fluid, free_keyed_keys(), NULL, ParticleSimulationData::ob, ParticleSystem::part, PART_PHYS_BOIDS, PART_PHYS_FLUID, PART_PHYS_KEYED, PART_PHYS_NO, ParticleSettings::phystype, ParticleSimulationData::psys, psys_check_boid_data(), PSYS_KEYED, and PTCACHE_CLEAR_ALL.
Referenced by particle_system_update().
| void psys_reset | ( | ParticleSystem * | psys, |
| int | mode | ||
| ) |
Definition at line 141 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().
Definition at line 2182 of file particle_system.c.
References SPHRangeData::data, SPHData::density_cb, SPHFluidSettings::flag, ParticleSettings::fluid, SPHRangeData::h, SPHData::hfac, SPHData::mass, SPHRangeData::mass, ParticleSystem::part, SPHData::psys, SPHFluidSettings::radius, ParticleSettings::size, sph_evaluate_func(), SPH_FAC_RADIUS, and tree.
| void psys_sph_finalize | ( | SPHData * | sphdata | ) |
Definition at line 2171 of file particle_system.c.
References BLI_edgehash_free(), SPHData::eh, NULL, and psys_sph_flush_springs().
Referenced by dynamics_step().
|
static |
Definition at line 2161 of file particle_system.c.
References BLI_buffer_at, BLI_buffer_field_free, BLI_Buffer::count, SPHData::new_springs, SPHData::psys, and sph_spring_add().
Referenced by psys_sph_finalize().
| void psys_sph_init | ( | ParticleSimulationData * | sim, |
| SPHData * | sphdata | ||
| ) |
Definition at line 2122 of file particle_system.c.
References BLI_buffer_field_init, SPHData::density_cb, SPHData::eh, ListBase::first, ParticleSettings::fluid, SPHData::force_cb, SPHData::gravity, PhysicsSettings::gravity, SPHData::hfac, SPHData::mass, SPHData::new_springs, ParticleTarget::next, NULL, ParticleSimulationData::ob, SPHData::pa, ParticleSystem::part, Scene::physics_settings, ParticleSimulationData::psys, SPHData::psys, psys_get_target_system(), psys_uses_gravity(), ParticleSimulationData::scene, SPHFluidSettings::solver, sph_density_accum_cb(), sph_force_cb(), SPH_SOLVER_DDR, sph_springhash_build(), sphclassical_density_accum_cb(), sphclassical_force_cb(), and ParticleSystem::targets.
Referenced by dynamics_step().
| void psys_tasks_create | ( | ParticleThreadContext * | ctx, |
| int | startpart, | ||
| int | endpart, | ||
| ParticleTask ** | r_tasks, | ||
| int * | r_numtasks | ||
| ) |
Definition at line 470 of file particle_system.c.
References ParticleTask::begin, BLI_assert, BLI_system_thread_count(), ParticleTask::ctx, ParticleTask::end, MEM_callocN, and min_ii().
Referenced by distribute_particles_on_dm(), and psys_cache_child_paths().
| void psys_tasks_free | ( | ParticleTask * | tasks, |
| int | numtasks | ||
| ) |
Definition at line 499 of file particle_system.c.
References BLI_rng_free(), and MEM_freeN.
Referenced by distribute_particles_on_dm(), and psys_cache_child_paths().
| void psys_thread_context_free | ( | ParticleThreadContext * | ctx | ) |
Definition at line 516 of file particle_system.c.
References BKE_curvemapping_free(), BKE_lattice_deform_data_destroy(), ParticleThreadContext::clumpcurve, ParticleThreadContext::index, ParticleThreadContext::jit, ParticleThreadContext::jitoff, ParticleSystem::lattice_deform_data, MEM_freeN, NULL, ParticleSimulationData::psys, ParticleThreadContext::roughcurve, ParticleThreadContext::seams, ParticleThreadContext::sim, ParticleThreadContext::tree, ParticleThreadContext::twistcurve, ParticleThreadContext::vg_clump, ParticleThreadContext::vg_kink, ParticleThreadContext::vg_length, ParticleThreadContext::vg_rough1, ParticleThreadContext::vg_rough2, ParticleThreadContext::vg_roughe, ParticleThreadContext::vg_twist, and ParticleThreadContext::weight.
Referenced by distribute_particles_on_dm(), and psys_cache_child_paths().
| void psys_thread_context_init | ( | ParticleThreadContext * | ctx, |
| ParticleSimulationData * | sim | ||
| ) |
Definition at line 462 of file particle_system.c.
References BKE_object_material_get(), ParticleThreadContext::ma, ParticleThreadContext::mesh, ParticleSystemModifierData::mesh_final, ParticleSimulationData::ob, ParticleSettings::omat, ParticleSystem::part, ParticleSimulationData::psmd, ParticleSimulationData::psys, and ParticleThreadContext::sim.
Referenced by psys_thread_context_init_distribute(), and psys_thread_context_init_path().
| void psys_unique_name | ( | Object * | object, |
| ParticleSystem * | psys, | ||
| const char * | defname | ||
| ) |
Definition at line 193 of file particle_system.c.
References BLI_uniquename(), ParticleSystem::name, and Object::particlesystem.
Referenced by copy_particle_systems_to_object(), and object_add_or_copy_particle_system().
|
static |
Definition at line 1400 of file particle_system.c.
References BKE_effectors_create(), BKE_effectors_free(), ParticleSimulationData::depsgraph, ParticleSettings::effector_weights, ParticleSystem::effectors, ParticleSettings::flag, ParticleSimulationData::ob, ParticleSystem::part, PART_ROT_DYN, precalc_guides(), and ParticleSimulationData::psys.
Referenced by cached_step(), dynamics_step(), and hair_step().
|
static |
Definition at line 1326 of file particle_system.c.
References BLI_bvhtree_balance(), BLI_bvhtree_free(), BLI_bvhtree_insert(), BLI_bvhtree_new(), BLI_rw_mutex_lock(), BLI_rw_mutex_unlock(), ParticleSystem::bvhtree, ParticleSystem::bvhtree_frame, LOOP_SHOWN_PARTICLES, PARS_ALIVE, PARTICLE_P, psys_bvhtree_rwlock, THREAD_LOCK_READ, and THREAD_LOCK_WRITE.
Referenced by dynamics_step().
| void psys_update_particle_tree | ( | ParticleSystem * | psys, |
| float | cfra | ||
| ) |
Definition at line 1367 of file particle_system.c.
References LOOP_SHOWN_PARTICLES, PARS_ALIVE, PARTICLE_P, ParticleSystem::totpart, ParticleSystem::tree, and ParticleSystem::tree_frame.
Referenced by dynamics_step(), and precalculate_effector().
|
static |
Definition at line 3183 of file particle_system.c.
References ParticleSettings::childtype, DAG_EVAL_RENDER, DEG_get_mode(), ParticleSimulationData::depsgraph, distribute_particles(), ParticleSettings::draw_as, ELEM, ParticleSystem::flag, PointCache::flag, ParticleEditSettings::flag, ID_RECALC_PSYS_CHILD, ID_RECALC_PSYS_RESET, Object::mode, NULL, ParticleSimulationData::ob, OB_MODE_WEIGHT_PAINT, ParticleSettings::parents, ParticleSystem::part, PART_CHILD_FACES, PART_DRAW_GR, PART_DRAW_OB, PART_DRAW_PATH, PART_DRAW_REND, PART_FROM_CHILD, PART_HAIR, ToolSettings::particle, ParticleSystem::pathcache, PE_DRAW_PART, ParticleSystem::pointcache, ParticleSimulationData::psys, psys_cache_child_paths(), psys_cache_paths(), psys_find_parents(), psys_free_children(), psys_free_path_cache(), psys_get_tot_child(), PSYS_HAIR_DONE, PSYS_HAIR_DYNAMICS, psys_in_edit_mode(), PSYS_KEYED, PSYS_VG_DENSITY, PTCACHE_BAKED, PTCACHE_BAKING, realloc_particles(), ParticleSystem::recalc, ParticleSettings::ren_as, ParticleSimulationData::scene, Scene::toolsettings, ParticleSystem::totchild, ParticleSystem::totpart, ParticleSettings::type, and ParticleSystem::vgroup.
Referenced by hair_step(), particle_system_update(), and system_step().
|
static |
Definition at line 203 of file particle_system.c.
References ParticleData::boid, ParticleSystem::child, ParticleSettings::distr, ParticleSystem::edit, ParticleSystem::free_edit, ParticleSettings::from, ParticleSettings::grid_res, ParticleData::keys, LOOP_PARTICLES, MEM_callocN, MEM_freeN, MIN2, NULL, ParticleSystem::part, PART_DISTR_GRID, PART_FROM_VERT, PART_PHYS_BOIDS, PARTICLE_P, ParticleSystem::particles, ParticleSettings::phystype, ParticleSimulationData::psys, psys_free_pdd(), ParticleSystem::totchild, ParticleSettings::totpart, and ParticleSystem::totpart.
Referenced by emit_particles(), particles_fluid_step(), and psys_update_path_cache().
|
static |
Definition at line 1157 of file particle_system.c.
References from, ParticleSystem::particles, ParticleSimulationData::psys, reset_particle(), and ParticleSystem::totpart.
Referenced by system_step().
| void reset_particle | ( | ParticleSimulationData * | sim, |
| ParticleData * | pa, | ||
| float | dtime, | ||
| float | cfra | ||
| ) |
Definition at line 1076 of file particle_system.c.
References BoidData::acc, ParticleData::alive, ParticleData::boid, ParticleSettings::boids, ParticleSystem::cfra, BoidParticle::data, ParticleSimulationData::depsgraph, ParticleData::dietime, eBoidMode_InAir, evaluate_emitter_anim(), ListBase::first, ParticleSystem::flag, PointCache::flag, PhysicsSettings::flag, BoidParticle::gravity, PhysicsSettings::gravity, BoidData::health, BoidSettings::health, init_particle_texture(), ParticleTexture::life, ParticleData::lifetime, ParticleSettings::lifetime, PointCache::mem_cache, MIN2, BoidData::mode, ParticleSimulationData::ob, PAMAP_LIFE, 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_coords(), psys_get_dietime_from_cache(), psys_get_texture(), PSYS_OB_ANIM_RESTORE, PTCACHE_BAKED, ParticleSettings::randlife, ParticleSimulationData::scene, ParticleData::state, BoidData::state_id, BoidSettings::states, ParticleKey::time, ParticleData::time, and ParticleSettings::type.
Referenced by brush_add(), cached_step(), dynamics_step(), particle_system_update(), and reset_all_particles().
|
static |
Definition at line 3563 of file particle_system.c.
References HairKey::co, ParticleKey::co, copy_v3_v3(), ParticleData::hair, ParticleSettings::hair_step, Object::imat, invert_m4_m4(), ParticleSystem::lattice_deform_data, LOOP_PARTICLES, MEM_callocN, ParticleSystemModifierData::mesh_final, mul_m4_v3(), NULL, ParticleSimulationData::ob, Object::obmat, ParticleSystem::part, PARTICLE_P, ParticleSimulationData::psmd, ParticleSimulationData::psys, psys_create_lattice_deform_data(), psys_vec_rot_to_face(), ParticleData::state, sub_v3_v3(), HairKey::time, ParticleKey::time, ParticleData::totkey, ParticleSystem::totpart, HairKey::weight, and zero_v3().
Referenced by particle_system_update().
|
static |
Definition at line 1217 of file particle_system.c.
References BLI_findlink(), copy_particle_key(), ParticleSimulationData::depsgraph, ParticleTarget::duration, ListBase::first, ParticleTarget::flag, ParticleSystem::flag, float(), free_keyed_keys(), LOOP_PARTICLES, MEM_callocN, ParticleTarget::next, ParticleSimulationData::ob, ParticleTarget::ob, PARTICLE_P, ParticleSystem::particles, Object::particlesystem, ParticleSimulationData::psys, ParticleTarget::psys, psys_get_particle_state(), PSYS_KEYED, PSYS_KEYED_TIMING, PTARGET_VALID, ParticleSimulationData::scene, ParticleSystem::targets, time, ParticleKey::time, ParticleTarget::time, ParticleData::totkey, ParticleSystem::totkeyed, and ParticleSystem::totpart.
Referenced by particle_system_update().
|
static |
Definition at line 1724 of file particle_system.c.
References SPHRangeData::data, SPHRangeData::h, if(), SPHNeighbor::index, SPHRangeData::massfac, SPHRangeData::neighbors, SPHRangeData::npsys, SPHRangeData::pa, ParticleSystem::particles, SPHNeighbor::psys, ParticleData::size, SPH_NEIGHBORS, sqrtf, SPHRangeData::tot_neighbors, UNUSED_VARS, and SPHRangeData::use_size.
Referenced by psys_sph_init(), and sph_force_cb().
|
static |
Definition at line 1696 of file particle_system.c.
References BLI_bvhtree_range_query(), BLI_rw_mutex_lock(), BLI_rw_mutex_unlock(), callback, ParticleSettings::flag, SPHRangeData::mass, ParticleSettings::mass, SPHRangeData::massfac, SPHRangeData::npsys, ParticleSystem::part, PART_SIZEMASS, psys_bvhtree_rwlock, THREAD_LOCK_READ, SPHRangeData::tot_neighbors, tree, and SPHRangeData::use_size.
Referenced by psys_sph_density(), sph_force_cb(), sphclassical_calc_dens(), and sphclassical_force_cb().
|
static |
Definition at line 1791 of file particle_system.c.
References BLI_buffer_append, BLI_edgehash_lookup(), SPHFluidSettings::buoyancy, ParticleKey::co, copy_v3_v3(), SPHRangeData::data, data, ParticleSpring::delete_flag, dot_v3v3(), SPHData::eh, SPHFluidSettings::flag, ParticleSettings::flag, ParticleSettings::fluid, ParticleSystem::fluid_springs, SPHData::gravity, SPHRangeData::h, SPHData::hfac, if(), SPHNeighbor::index, madd_v3_v3fl(), madd_v3_v3v3fl(), SPHData::mass, SPHRangeData::mass, ParticleSettings::mass, SPHRangeData::neighbors, SPHData::new_springs, normalize_v3(), NULL, SPHData::pa, SPHRangeData::pa, ParticleSystem::part, PART_SIZEMASS, PART_TIME_AUTOSF, ParticleSpring::particle_index, ParticleSystem::particles, SPHData::pass, POINTER_AS_INT, ParticleData::prev_state, SPHData::psys, SPHNeighbor::psys, SPHFluidSettings::radius, SPHFluidSettings::rest_density, ParticleSpring::rest_length, SPHFluidSettings::rest_length, ParticleData::size, SPH_CURRENT_REST_LENGTH, sph_density_accum_cb(), sph_evaluate_func(), SPH_FAC_DENSITY, SPH_FAC_RADIUS, SPH_FAC_REPULSION, SPH_FAC_REST_LENGTH, SPH_FAC_VISCOSITY, sph_particle_courant(), SPH_VISCOELASTIC_SPRINGS, SPHFluidSettings::spring_frames, SPHFluidSettings::spring_k, state, SPHFluidSettings::stiffness_k, SPHFluidSettings::stiffness_knear, sub_v3_v3v3(), ParticleKey::time, ParticleData::time, ParticleSettings::time_flag, SPHRangeData::tot_neighbors, ParticleKey::vel, SPHFluidSettings::viscosity_beta, and SPHFluidSettings::viscosity_omega.
Referenced by psys_sph_init().
|
static |
Definition at line 2203 of file particle_system.c.
References copy_particle_key(), ParticleSettings::flag, SPHData::force_cb, integrate_particle(), SPHData::mass, ParticleSettings::mass, mul_v3_fl(), SPHData::pa, ParticleSystem::part, PART_SIZEMASS, SPHData::pass, ParticleData::prev_state, ParticleSimulationData::psys, psys_get_timestep(), ParticleData::size, ParticleData::state, sub_v3_v3v3(), and ParticleKey::vel.
Referenced by dynamics_step_sph_classical_integrate_task_cb_ex(), and dynamics_step_sph_ddr_task_cb_ex().
|
static |
Definition at line 1765 of file particle_system.c.
References add_v3_v3(), ParticleKey::co, copy_v3_v3(), SPHData::element_size, SPHData::flow, ParticleSettings::fluid, SPHNeighbor::index, len_v3(), mul_v3_v3fl(), SPHRangeData::neighbors, SPHRangeData::pa, ParticleSystem::part, ParticleSystem::particles, ParticleData::prev_state, SPHData::psys, SPHNeighbor::psys, SPHFluidSettings::radius, sub_v3_v3v3(), SPHRangeData::tot_neighbors, ParticleKey::vel, and zero_v3().
Referenced by sph_force_cb(), and sphclassical_force_cb().
|
static |
Definition at line 1573 of file particle_system.c.
References ParticleSystem::alloc_fluidsprings, ParticleSystem::fluid_springs, MEM_callocN, MEM_reallocN, NULL, PSYS_FLUID_SPRINGS_INITIAL_SIZE, and ParticleSystem::tot_fluidsprings.
Referenced by psys_sph_flush_springs().
|
static |
Definition at line 1593 of file particle_system.c.
References ParticleSystem::alloc_fluidsprings, ParticleSystem::fluid_springs, MEM_reallocN, PSYS_FLUID_SPRINGS_INITIAL_SIZE, and ParticleSystem::tot_fluidsprings.
Referenced by sph_springs_modify().
|
static |
Definition at line 1659 of file particle_system.c.
References BLI_edgehash_insert(), BLI_edgehash_new_ex(), ParticleSystem::fluid_springs, NULL, ParticleSpring::particle_index, POINTER_FROM_INT, and ParticleSystem::tot_fluidsprings.
Referenced by psys_sph_init().
|
static |
Definition at line 1608 of file particle_system.c.
References ParticleKey::co, ParticleSpring::delete_flag, SPHFluidSettings::flag, ParticleSettings::fluid, ParticleSystem::fluid_springs, normalize_v3(), ParticleSystem::part, ParticleSpring::particle_index, ParticleSystem::particles, SPHFluidSettings::plasticity_constant, ParticleData::prev_state, ParticleSpring::rest_length, ParticleData::size, sph_spring_delete(), SPH_VISCOELASTIC_SPRINGS, SPHFluidSettings::spring_k, sub_v3_v3v3(), ParticleSystem::tot_fluidsprings, and SPHFluidSettings::yield_ratio.
Referenced by dynamics_step().
|
static |
Definition at line 2100 of file particle_system.c.
References ParticleKey::co, SPHRangeData::data, data, SPHFluidSettings::flag, ParticleSettings::fluid, SPHRangeData::h, SPHData::hfac, SPHData::mass, SPHRangeData::mass, max_ff(), min_ff(), NULL, SPHRangeData::pa, ParticleSystem::part, SPHData::psys, SPHFluidSettings::radius, SPHFluidSettings::rest_density, ParticleSettings::size, sph_evaluate_func(), SPH_FAC_RADIUS, sphclassical_density_accum_cb(), ParticleData::sphdensity, and ParticleData::state.
Referenced by dynamics_step_sph_classical_calc_density_task_cb_ex().
|
static |
Definition at line 1925 of file particle_system.c.
References ParticleKey::co, SPHRangeData::data, float(), SPHRangeData::h, len_v3(), M_PI, ParticleSettings::mass, SPHRangeData::npsys, SPHRangeData::pa, ParticleSystem::part, ParticleSystem::particles, pow3f(), pow4f(), ParticleData::size, ParticleData::sphdensity, ParticleData::state, sub_v3_v3v3(), and SPHRangeData::use_size.
Referenced by psys_sph_init(), and sphclassical_calc_dens().
|
static |
Definition at line 1989 of file particle_system.c.
References SPHFluidSettings::buoyancy, ParticleKey::co, dot_v3v3(), SPHFluidSettings::flag, ParticleSettings::flag, float(), ParticleSettings::fluid, SPHData::gravity, SPHRangeData::h, SPHData::hfac, SPHNeighbor::index, M_PI, madd_v3_v3fl(), madd_v3_v3v3fl(), SPHData::mass, SPHRangeData::neighbors, normalize_v3(), NULL, SPHData::pa, SPHRangeData::pa, ParticleSystem::part, PART_SIZEMASS, PART_TIME_AUTOSF, ParticleSystem::particles, SPHData::pass, pow2f(), pow3f(), pow4f(), pow7f(), ParticleData::prev_state, SPHData::psys, SPHNeighbor::psys, SPHFluidSettings::radius, SPHFluidSettings::rest_density, ParticleData::size, sph_evaluate_func(), SPH_FAC_DENSITY, SPH_FAC_RADIUS, sph_particle_courant(), sphclassical_neighbor_accum_cb(), ParticleData::sphdensity, state, SPHFluidSettings::stiffness_k, sub_v3_v3v3(), ParticleSettings::time_flag, SPHRangeData::tot_neighbors, ParticleKey::vel, and SPHFluidSettings::viscosity_omega.
Referenced by psys_sph_init().
|
static |
Definition at line 1961 of file particle_system.c.
References ParticleKey::co, SPHRangeData::h, SPHNeighbor::index, len_v3(), SPHRangeData::neighbors, SPHRangeData::npsys, ParticleSystem::particles, SPHNeighbor::psys, SPH_NEIGHBORS, ParticleData::state, sub_v3_v3v3(), and SPHRangeData::tot_neighbors.
Referenced by sphclassical_force_cb().
|
static |
Definition at line 3675 of file particle_system.c.
References ParticleSystem::dt_frac, and TIMESTEP_EXPANSION_TOLERANCE.
Referenced by system_step().
|
static |
Calculates the next state for all particles of the system. In particles code most 'cfra - ending' are frames, 'time - ending' are 'cfra * timestep' (seconds).
Definition at line 4470 of file particle_system.c.
References ParticleSystem::alloc_fluidsprings, BKE_lattice_deform_data_destroy(), BKE_ptcache_id_clear(), BKE_ptcache_id_from_particles(), BKE_ptcache_id_reset(), BKE_ptcache_id_time(), BKE_ptcache_invalidate(), BKE_ptcache_read(), BKE_ptcache_validate(), BKE_ptcache_write(), cached_step(), ParticleSystem::cfra, CLAMP, ParticleSimulationData::courant_num, distribute_particles(), ParticleSystem::dt_frac, dynamics_step(), ELEM, emit_particles(), PointCache::endframe, eParticleSystemFlag_Pars, ParticleSystemModifierData::flag, ParticleData::flag, PointCache::flag, float(), ParticleSystem::fluid_springs, free_unexisting_particles(), ParticleSettings::from, get_base_time_step(), ID_RECALC_PSYS_RESET, initialize_all_particles(), PointCache::last_exact, ParticleSystem::lattice_deform_data, LOOP_PARTICLES, MEM_freeN, MIN_TIMESTEP, NULL, ParticleSimulationData::ob, PARS_NO_DISP, ParticleSystem::part, PART_HAIR, PART_TIME_AUTOSF, PARTICLE_P, ParticleSystem::pointcache, ParticleSimulationData::psmd, ParticleSimulationData::psys, psys_clear_temp_pointcache(), psys_frand(), psys_get_current_display_percentage(), psys_get_pointcache_start_end(), psys_reset(), PSYS_RESET_CACHE_MISS, psys_update_path_cache(), PTCACHE_BAKED, PTCACHE_BAKING, PTCACHE_CLEAR_AFTER, PTCACHE_OUTDATED, PTCACHE_READ_EXACT, PTCACHE_READ_INTERPOLATED, PTCACHE_READ_OLD, PTCACHE_REDO_NEEDED, PTCACHE_RESET_OUTDATED, ParticleSystem::recalc, reset_all_particles(), ParticleSimulationData::scene, PointCache::simframe, ParticleSettings::sta, PointCache::startframe, sync_timestep(), ParticleSettings::time_flag, ParticleSystem::tot_fluidsprings, ParticleSystem::totpart, ParticleSettings::type, update_children(), and update_timestep().
Referenced by particle_system_update().
|
static |
Definition at line 129 of file particle_system.c.
References PTCacheID::cache, ParticleSettings::distr, PointCache::flag, ParticleSettings::from, ParticleSettings::grid_res, ParticleSystem::part, PART_DISTR_GRID, PART_FROM_VERT, ParticleSystem::pointcache, PTCACHE_EXTERNAL, ParticleSettings::totpart, PointCache::totpoint, and ParticleSystem::totunexist.
Referenced by emit_particles(), and psys_reset().
|
static |
Definition at line 4083 of file particle_system.c.
References ParticleSettings::childtype, distribute_particles(), ParticleSystem::flag, ParticleSystem::part, PART_FROM_CHILD, PART_HAIR, ParticleSimulationData::psys, psys_free_children(), psys_get_tot_child(), PSYS_HAIR_DONE, ParticleSimulationData::scene, ParticleSystem::totchild, and ParticleSettings::type.
Referenced by system_step().
|
static |
Definition at line 3626 of file particle_system.c.
References BLI_spin_lock(), BLI_spin_unlock(), ParticleSimulationData::courant_num, SPHData::element_size, SPHData::flow, len_v3(), ParticleData::prev_state, spin, sub_v3_v3v3(), and ParticleKey::vel.
Referenced by dynamics_step_sph_classical_integrate_task_cb_ex(), and dynamics_step_sph_ddr_task_cb_ex().
|
static |
Definition at line 3647 of file particle_system.c.
References ParticleSimulationData::courant_num, ParticleSettings::courant_target, ParticleSystem::dt_frac, get_base_time_step(), interpf(), MIN_TIMESTEP, ParticleSystem::part, and TIMESTEP_EXPANSION_FACTOR.
Referenced by system_step().
|
static |
Definition at line 3615 of file particle_system.c.
Referenced by system_step(), and update_timestep().
|
static |
Definition at line 95 of file particle_system.c.
Referenced by psys_update_particle_bvhtree(), and sph_evaluate_func().
|
static |
Definition at line 3619 of file particle_system.c.
Referenced by update_timestep().
|
static |
Definition at line 3620 of file particle_system.c.
Referenced by sync_timestep().