|
Blender
V2.93
|
#include "BLI_utildefines.h"Go to the source code of this file.
Classes | |
| struct | EffectedPoint |
| struct | GuideEffectorData |
| struct | EffectorData |
| struct | EffectorCache |
| struct | EffectorRelation |
| struct | SimDebugElement |
| struct | SimDebugData |
Typedefs | |
| typedef struct EffectedPoint | EffectedPoint |
| typedef struct GuideEffectorData | GuideEffectorData |
| typedef struct EffectorData | EffectorData |
| typedef struct EffectorCache | EffectorCache |
| typedef struct EffectorRelation | EffectorRelation |
| typedef struct SimDebugElement | SimDebugElement |
| typedef enum eSimDebugElement_Type | eSimDebugElement_Type |
| typedef struct SimDebugData | SimDebugData |
Enumerations | |
| enum | eSimDebugElement_Type { SIM_DEBUG_ELEM_DOT , SIM_DEBUG_ELEM_CIRCLE , SIM_DEBUG_ELEM_LINE , SIM_DEBUG_ELEM_VECTOR , SIM_DEBUG_ELEM_STRING } |
Variables | |
| SimDebugData * | _sim_debug_data |
| #define _VA_SIM_DEBUG_HASH1 | ( | a | ) | (BKE_sim_debug_data_hash(a)) |
Definition at line 183 of file BKE_effect.h.
| #define _VA_SIM_DEBUG_HASH2 | ( | a, | |
| b | |||
| ) | (BKE_sim_debug_data_hash_combine(BKE_sim_debug_data_hash(a), _VA_SIM_DEBUG_HASH1(b))) |
Definition at line 184 of file BKE_effect.h.
| #define _VA_SIM_DEBUG_HASH3 | ( | a, | |
| b, | |||
| c | |||
| ) | (BKE_sim_debug_data_hash_combine(BKE_sim_debug_data_hash(a), _VA_SIM_DEBUG_HASH2(b, c))) |
Definition at line 186 of file BKE_effect.h.
| #define _VA_SIM_DEBUG_HASH4 | ( | a, | |
| b, | |||
| c, | |||
| d | |||
| ) | (BKE_sim_debug_data_hash_combine(BKE_sim_debug_data_hash(a), _VA_SIM_DEBUG_HASH3(b, c, d))) |
Definition at line 188 of file BKE_effect.h.
| #define _VA_SIM_DEBUG_HASH5 | ( | a, | |
| b, | |||
| c, | |||
| d, | |||
| e | |||
| ) | (BKE_sim_debug_data_hash_combine(BKE_sim_debug_data_hash(a), _VA_SIM_DEBUG_HASH4(b, c, d, e))) |
Definition at line 190 of file BKE_effect.h.
| #define _VA_SIM_DEBUG_HASH6 | ( | a, | |
| b, | |||
| c, | |||
| d, | |||
| e, | |||
| f | |||
| ) | (BKE_sim_debug_data_hash_combine(BKE_sim_debug_data_hash(a), _VA_SIM_DEBUG_HASH5(b, c, d, e, f))) |
Definition at line 192 of file BKE_effect.h.
| #define _VA_SIM_DEBUG_HASH7 | ( | a, | |
| b, | |||
| c, | |||
| d, | |||
| e, | |||
| f, | |||
| g | |||
| ) |
Definition at line 194 of file BKE_effect.h.
| #define _VA_SIM_DEBUG_HASH8 | ( | a, | |
| b, | |||
| c, | |||
| d, | |||
| e, | |||
| f, | |||
| g, | |||
| h | |||
| ) |
Definition at line 197 of file BKE_effect.h.
| #define BKE_sim_debug_data_add_circle | ( | p, | |
| radius, | |||
| r, | |||
| g, | |||
| b, | |||
| category, | |||
| ... | |||
| ) |
Definition at line 250 of file BKE_effect.h.
| #define BKE_sim_debug_data_add_dot | ( | p, | |
| r, | |||
| g, | |||
| b, | |||
| category, | |||
| ... | |||
| ) |
Definition at line 243 of file BKE_effect.h.
| #define BKE_sim_debug_data_add_line | ( | p1, | |
| p2, | |||
| r, | |||
| g, | |||
| b, | |||
| category, | |||
| ... | |||
| ) |
Definition at line 257 of file BKE_effect.h.
Definition at line 269 of file BKE_effect.h.
| #define BKE_sim_debug_data_add_vector | ( | p, | |
| d, | |||
| r, | |||
| g, | |||
| b, | |||
| category, | |||
| ... | |||
| ) |
Definition at line 263 of file BKE_effect.h.
| #define BKE_sim_debug_data_remove | ( | ... | ) | BKE_sim_debug_data_remove_element(SIM_DEBUG_HASH(__VA_ARGS__)) |
Definition at line 275 of file BKE_effect.h.
| #define PE_USE_NORMAL_DATA 4 |
Definition at line 171 of file BKE_effect.h.
| #define PE_VELOCITY_TO_IMPULSE 1 |
Definition at line 174 of file BKE_effect.h.
| #define PE_WIND_AS_SPEED 1 |
Definition at line 170 of file BKE_effect.h.
| #define SIM_DEBUG_HASH | ( | ... | ) | VA_NARGS_CALL_OVERLOAD(_VA_SIM_DEBUG_HASH, __VA_ARGS__) |
Definition at line 201 of file BKE_effect.h.
| typedef struct EffectedPoint EffectedPoint |
| typedef struct EffectorCache EffectorCache |
| typedef struct EffectorData EffectorData |
| typedef struct EffectorRelation EffectorRelation |
| typedef enum eSimDebugElement_Type eSimDebugElement_Type |
| typedef struct GuideEffectorData GuideEffectorData |
| typedef struct SimDebugData SimDebugData |
| typedef struct SimDebugElement SimDebugElement |
| Enumerator | |
|---|---|
| SIM_DEBUG_ELEM_DOT | |
| SIM_DEBUG_ELEM_CIRCLE | |
| SIM_DEBUG_ELEM_LINE | |
| SIM_DEBUG_ELEM_VECTOR | |
| SIM_DEBUG_ELEM_STRING | |
Definition at line 214 of file BKE_effect.h.
| struct EffectorWeights* BKE_effector_add_weights | ( | struct Collection * | collection | ) |
Definition at line 73 of file effect.c.
References EffectorWeights::global_gravity, EffectorWeights::group, MEM_callocN, NUM_PFIELD_TYPES, and EffectorWeights::weight.
Referenced by BKE_fluid_modifier_create_type_data(), BKE_modifier_blend_read_data(), dynamicPaint_createNewSurface(), initData(), object_blend_read_data(), particle_settings_blend_read_data(), particle_settings_blend_read_lib(), particle_settings_init(), sbNew(), and scene_blend_read_data().
| struct ListBase* BKE_effector_relations_create | ( | struct Depsgraph * | depsgraph, |
| struct ViewLayer * | view_layer, | ||
| struct Collection * | collection | ||
| ) |
Definition at line 227 of file effect.c.
References add_effector_relation(), BASE_ENABLED_RENDER, BASE_ENABLED_VIEWPORT, BKE_collection_or_layer_objects(), DAG_EVAL_RENDER, DEG_get_mode(), depsgraph, Base::flag, PartDeflect::forcefield, LISTBASE_FOREACH, MEM_callocN, Base::next, NULL, Base::object, Object::particlesystem, Object::pd, ParticleSettings::pd, ParticleSettings::pd2, and psys_check_enabled().
Referenced by blender::deg::build_effector_relations().
| void BKE_effector_relations_free | ( | struct ListBase * | lb | ) |
Definition at line 265 of file effect.c.
References BLI_freelistN(), and MEM_freeN.
Referenced by blender::deg::clear_physics_relations().
| void BKE_effectors_apply | ( | struct ListBase * | effectors, |
| struct ListBase * | colliders, | ||
| struct EffectorWeights * | weights, | ||
| struct EffectedPoint * | point, | ||
| float * | force, | ||
| float * | wind_force, | ||
| float * | impulse | ||
| ) |
Definition at line 1145 of file effect.c.
References add_v3_v3(), add_v3_v3v3(), do_physical_effector(), do_texture_effector(), eff_calc_visibility(), effector_falloff(), PartDeflect::f_wind_factor, EffectorData::falloff, ListBase::first, EffectedPoint::flag, EffectorCache::flag, PartDeflect::forcefield, get_effector_data(), get_effector_tot(), madd_v3_v3fl(), EffectorCache::next, EffectorCache::pd, PE_VELOCITY_TO_IMPULSE, PE_WIND_AS_SPEED, PFIELD_TEXTURE, sub_v3_v3v3(), and EffectorData::vel.
Referenced by _scan_for_ext_spring_forces(), _softbody_calc_forces_slice_in_a_thread(), basic_force_cb(), boid_body(), cloth_calc_force(), do_path_effectors(), and dynamic_paint_prepare_effect_cb().
| struct ListBase* BKE_effectors_create | ( | struct Depsgraph * | depsgraph, |
| struct Object * | ob_src, | ||
| struct ParticleSystem * | psys_src, | ||
| struct EffectorWeights * | weights, | ||
| bool | use_rotation | ||
| ) |
Definition at line 333 of file effect.c.
References add_effector_evaluation(), BKE_object_get_evaluated_mesh(), BLI_findstring(), DEG_get_effector_relations(), DEG_get_evaluated_id(), DEG_get_evaluated_scene(), depsgraph, ParticleSettings::flag, EffectorWeights::group, if(), is_effector_relevant(), LISTBASE_FOREACH, NULL, ParticleSystem::part, PART_SELF_EFFECT, Object::particlesystem, Object::pd, ParticleSettings::pd, ParticleSettings::pd2, PFIELD_SHAPE_POINTS, scene, and PartDeflect::shape.
Referenced by do_step_cloth(), dynamicPaint_prepareEffectStep(), psys_update_effectors(), sb_sfesf_threads_run(), and softbody_calc_forces().
| void BKE_effectors_free | ( | struct ListBase * | lb | ) |
Definition at line 388 of file effect.c.
References BLI_freelistN(), LISTBASE_FOREACH, and MEM_freeN.
Referenced by do_step_cloth(), dynamicPaint_prepareEffectStep(), psys_free(), psys_update_effectors(), sb_sfesf_threads_run(), and softbody_calc_forces().
| struct PartDeflect* BKE_partdeflect_copy | ( | const struct PartDeflect * | pd_src | ) |
Definition at line 125 of file effect.c.
References BLI_rng_copy(), MEM_dupallocN, NULL, and PartDeflect::rng.
Referenced by particle_settings_copy_data().
| void BKE_partdeflect_free | ( | struct PartDeflect * | pd | ) |
Definition at line 137 of file effect.c.
References BLI_rng_free(), MEM_freeN, and PartDeflect::rng.
Referenced by object_free_data(), and particle_settings_free_data().
| struct PartDeflect* BKE_partdeflect_new | ( | int | type | ) |
Definition at line 86 of file effect.c.
References ceil(), PartDeflect::f_damp, PartDeflect::f_flow, PartDeflect::f_size, PartDeflect::f_strength, PartDeflect::f_wind_factor, PartDeflect::flag, PartDeflect::forcefield, MEM_callocN, PartDeflect::pdef_cfrict, PartDeflect::pdef_sbdamp, PartDeflect::pdef_sbift, PartDeflect::pdef_sboft, PFIELD_CLOTH_USE_CULLING, PFIELD_DO_LOCATION, PFIELD_DO_ROTATION, PFIELD_FLUIDFLOW, PFIELD_SHAPE_PLANE, PFIELD_TEXTURE, PFIELD_VORTEX, PFIELD_WIND, PIL_check_seconds_timer(), PartDeflect::seed, PartDeflect::shape, and type.
Referenced by ED_object_modifier_add(), effector_add_exec(), and forcefield_toggle_exec().
| void BKE_sim_debug_data_add_element | ( | int | type, |
| const float | v1[3], | ||
| const float | v2[3], | ||
| const char * | str, | ||
| float | r, | ||
| float | g, | ||
| float | b, | ||
| const char * | category, | ||
| unsigned int | hash | ||
| ) |
Definition at line 1322 of file effect.c.
References _sim_debug_data, BKE_sim_debug_data_set_enabled(), BLI_ghashutil_strhash_p(), BLI_strncpy(), SimDebugElement::category_hash, SimDebugElement::color, copy_v3_v3(), debug_data_insert(), G, G_DEBUG_SIMDATA, SimDebugElement::hash, hash, MEM_callocN, r, str, SimDebugElement::str, SimDebugElement::type, type, SimDebugElement::v1, v1, SimDebugElement::v2, v2, and zero_v3().
| void BKE_sim_debug_data_clear | ( | void | ) |
Definition at line 1383 of file effect.c.
References _sim_debug_data, BLI_ghash_clear(), debug_element_free(), SimDebugData::gh, and NULL.
| void BKE_sim_debug_data_clear_category | ( | const char * | category | ) |
Definition at line 1393 of file effect.c.
References _sim_debug_data, BLI_ghash_remove(), BLI_ghashIterator_done(), BLI_ghashIterator_getValue(), BLI_ghashIterator_init(), BLI_ghashIterator_step(), BLI_ghashutil_strhash_p(), SimDebugElement::category_hash, debug_element_free(), SimDebugData::gh, and NULL.
Referenced by cloth_continuum_step(), and SIM_cloth_solve().
| void BKE_sim_debug_data_free | ( | void | ) |
Definition at line 1300 of file effect.c.
References _sim_debug_data, BLI_ghash_free(), debug_element_free(), SimDebugData::gh, MEM_freeN, and NULL.
Referenced by BKE_sim_debug_data_set_enabled().
| bool BKE_sim_debug_data_get_enabled | ( | void | ) |
Definition at line 1295 of file effect.c.
References _sim_debug_data, and NULL.
| unsigned int BKE_sim_debug_data_hash | ( | int | i | ) |
Definition at line 1223 of file effect.c.
References BLI_ghashutil_uinthash().
| unsigned int BKE_sim_debug_data_hash_combine | ( | unsigned int | kx, |
| unsigned int | ky | ||
| ) |
Definition at line 1228 of file effect.c.
References Freestyle::a, Freestyle::c, and rot.
| void BKE_sim_debug_data_remove_element | ( | unsigned int | hash | ) |
Definition at line 1373 of file effect.c.
References _sim_debug_data, BLI_ghash_remove(), debug_element_free(), SimDebugData::gh, SimDebugElement::hash, hash, and NULL.
| void BKE_sim_debug_data_set_enabled | ( | bool | enable | ) |
Definition at line 1281 of file effect.c.
References _sim_debug_data, BKE_sim_debug_data_free(), BLI_ghash_new(), debug_element_compare(), debug_element_hash(), SimDebugData::gh, and MEM_callocN.
Referenced by BKE_sim_debug_data_add_element().
| int closest_point_on_surface | ( | struct SurfaceModifierData * | surmd, |
| const float | co[3], | ||
| float | surface_co[3], | ||
| float | surface_nor[3], | ||
| float | surface_vel[3] | ||
| ) |
Definition at line 657 of file effect.c.
References add_v3_v3(), BLI_bvhtree_find_nearest(), SurfaceModifierData::bvhtree, BVHTreeNearest::co, MVert::co, copy_v3_v3(), BVHTreeNearest::dist_sq, BVHTreeNearest::index, BVHTreeFromMesh::loop, BVHTreeFromMesh::looptri, mul_v3_fl(), BVHTreeFromMesh::nearest_callback, BVHTreeNearest::no, BVHTreeFromMesh::tree, MLoopTri::tri, MLoop::v, and SurfaceModifierData::v.
Referenced by boid_find_ground(), and get_effector_data().
| float effector_falloff | ( | struct EffectorCache * | eff, |
| struct EffectorData * | efd, | ||
| struct EffectedPoint * | point, | ||
| struct EffectorWeights * | weights | ||
| ) |
Referenced by precalc_guides(), and rule_goal_avoid().
| int get_effector_data | ( | struct EffectorCache * | eff, |
| struct EffectorData * | efd, | ||
| struct EffectedPoint * | point, | ||
| int | real_velocity | ||
| ) |
Definition at line 693 of file effect.c.
References add_v3_v3(), add_v3_v3v3(), BKE_object_get_evaluated_mesh(), SurfaceModifierData::bvhtree, closest_point_on_surface(), MVert::co, copy_v3_v3(), DEG_get_ctime(), EffectorCache::depsgraph, ParticleSimulationData::depsgraph, EffectorData::distance, ELEM, PartDeflect::f_size, EffectorCache::flag, PartDeflect::forcefield, EffectedPoint::index, EffectorData::index, len_v3(), EffectedPoint::loc, EffectorData::loc, mul_m4_v3(), mul_mat3_m4_v3(), mul_qt_v3(), mul_v3_fl(), Mesh::mvert, MVert::no, EffectorData::nor, EffectorData::nor2, normal_short_to_float_v3(), normalize_v3(), normalize_v3_v3(), NULL, EffectorCache::ob, ParticleSimulationData::ob, Object::obmat, ParticleSystem::particles, EffectorCache::pd, PE_USE_NORMAL_DATA, PFIELD_HARMONIC, PFIELD_SHAPE_LINE, PFIELD_SHAPE_PLANE, PFIELD_SHAPE_POINTS, PFIELD_SHAPE_SURFACE, PFIELD_VORTEX, project_v3_v3v3(), EffectedPoint::psys, EffectorCache::psys, ParticleSimulationData::psys, psys_get_particle_state(), ret, EffectorCache::scene, ParticleSimulationData::scene, PartDeflect::shape, EffectorData::size, ParticleData::size, state, sub_v3_v3v3(), EffectorCache::surmd, EffectorData::vec_to_point, EffectorData::vec_to_point2, EffectedPoint::vel, EffectorData::vel, EffectedPoint::vel_to_frame, and zero_v3().
Referenced by BKE_effectors_apply(), and rule_goal_avoid().
| void pd_point_from_loc | ( | struct Scene * | scene, |
| float * | loc, | ||
| float * | vel, | ||
| int | index, | ||
| struct EffectedPoint * | point | ||
| ) |
Definition at line 438 of file effect.c.
References EffectedPoint::ave, EffectedPoint::flag, float(), RenderData::frs_sec, EffectedPoint::index, EffectedPoint::loc, NULL, EffectedPoint::psys, Scene::r, EffectedPoint::rot, scene, EffectedPoint::size, EffectedPoint::vel, EffectedPoint::vel_to_frame, and EffectedPoint::vel_to_sec.
Referenced by cloth_calc_force(), and dynamic_paint_prepare_effect_cb().
| void pd_point_from_particle | ( | struct ParticleSimulationData * | sim, |
| struct ParticleData * | pa, | ||
| struct ParticleKey * | state, | ||
| struct EffectedPoint * | point | ||
| ) |
Definition at line 402 of file effect.c.
References EffectedPoint::ave, EffectedPoint::charge, PartDeflect::f_strength, EffectedPoint::flag, ParticleSettings::flag, PartDeflect::forcefield, EffectedPoint::index, EffectedPoint::loc, NULL, ParticleSystem::part, PART_ROT_DYN, ParticleSystem::particles, ParticleSettings::pd, ParticleSettings::pd2, PFIELD_CHARGE, EffectedPoint::psys, ParticleSimulationData::psys, psys_get_timestep(), EffectedPoint::rot, EffectedPoint::size, ParticleData::size, state, EffectedPoint::vel, EffectedPoint::vel_to_frame, and EffectedPoint::vel_to_sec.
Referenced by basic_force_cb(), boid_body(), do_path_effectors(), precalc_guides(), and rule_goal_avoid().
| void pd_point_from_soft | ( | struct Scene * | scene, |
| float * | loc, | ||
| float * | vel, | ||
| int | index, | ||
| struct EffectedPoint * | point | ||
| ) |
Definition at line 453 of file effect.c.
References EffectedPoint::ave, EffectedPoint::flag, float(), RenderData::frs_sec, EffectedPoint::index, EffectedPoint::loc, NULL, PE_WIND_AS_SPEED, EffectedPoint::psys, Scene::r, EffectedPoint::rot, scene, EffectedPoint::size, EffectedPoint::vel, EffectedPoint::vel_to_frame, and EffectedPoint::vel_to_sec.
Referenced by _scan_for_ext_spring_forces(), and _softbody_calc_forces_slice_in_a_thread().
|
extern |
Definition at line 1221 of file effect.c.
Referenced by BKE_sim_debug_data_add_element(), BKE_sim_debug_data_clear(), BKE_sim_debug_data_clear_category(), BKE_sim_debug_data_free(), BKE_sim_debug_data_get_enabled(), BKE_sim_debug_data_remove_element(), and BKE_sim_debug_data_set_enabled().