Blender V2.61 - r43446
|
#include "DNA_modifier_types.h"
Go to the source code of this file.
Classes | |
struct | EffectedPoint |
struct | GuideEffectorData |
struct | EffectorData |
struct | EffectorCache |
Defines | |
#define | PE_WIND_AS_SPEED 1 |
#define | PE_DYNAMIC_ROTATION 2 |
#define | PE_USE_NORMAL_DATA 4 |
#define | PE_VELOCITY_TO_IMPULSE 1 |
Typedefs | |
typedef struct EffectedPoint | EffectedPoint |
typedef struct GuideEffectorData | GuideEffectorData |
typedef struct EffectorData | EffectorData |
typedef struct EffectorCache | EffectorCache |
Functions | |
struct EffectorWeights * | BKE_add_effector_weights (struct Group *group) |
struct PartDeflect * | object_add_collision_fields (int type) |
struct Effect * | copy_effect (struct Effect *eff) |
void | copy_effects (struct ListBase *lbn, struct ListBase *lb) |
void | deselectall_eff (struct Object *ob) |
void | free_partdeflect (struct PartDeflect *pd) |
struct ListBase * | pdInitEffectors (struct Scene *scene, struct Object *ob_src, struct ParticleSystem *psys_src, struct EffectorWeights *weights) |
void | pdEndEffectors (struct ListBase **effectors) |
void | pdDoEffectors (struct ListBase *effectors, struct ListBase *colliders, struct EffectorWeights *weights, struct EffectedPoint *point, float *force, float *impulse) |
void | pd_point_from_particle (struct ParticleSimulationData *sim, struct ParticleData *pa, struct ParticleKey *state, struct EffectedPoint *point) |
void | pd_point_from_loc (struct Scene *scene, float *loc, float *vel, int index, struct EffectedPoint *point) |
void | pd_point_from_soft (struct Scene *scene, float *loc, float *vel, int index, struct EffectedPoint *point) |
float | effector_falloff (struct EffectorCache *eff, struct EffectorData *efd, struct EffectedPoint *point, struct EffectorWeights *weights) |
int | closest_point_on_surface (SurfaceModifierData *surmd, const float co[3], float surface_co[3], float surface_nor[3], float surface_vel[3]) |
int | get_effector_data (struct EffectorCache *eff, struct EffectorData *efd, struct EffectedPoint *point, int real_velocity) |
Definition in file BKE_effect.h.
#define PE_DYNAMIC_ROTATION 2 |
Definition at line 136 of file BKE_effect.h.
#define PE_USE_NORMAL_DATA 4 |
Definition at line 137 of file BKE_effect.h.
Referenced by get_effector_data(), and precalculate_effector().
#define PE_VELOCITY_TO_IMPULSE 1 |
Definition at line 140 of file BKE_effect.h.
Referenced by pdDoEffectors().
#define PE_WIND_AS_SPEED 1 |
Definition at line 135 of file BKE_effect.h.
Referenced by pd_point_from_soft(), and pdDoEffectors().
typedef struct EffectedPoint EffectedPoint |
typedef struct EffectorCache EffectorCache |
typedef struct EffectorData EffectorData |
typedef struct GuideEffectorData GuideEffectorData |
struct EffectorWeights* BKE_add_effector_weights | ( | struct Group * | group | ) | [read] |
Definition at line 103 of file effect.c.
References EffectorWeights::global_gravity, EffectorWeights::group, i, MEM_callocN(), NUM_PFIELD_TYPES, and EffectorWeights::weight.
Referenced by cloth_init(), default_particle_settings(), direct_link_modifiers(), direct_link_object(), direct_link_particlesettings(), dynamicPaint_createNewSurface(), sbNew(), and smokeModifier_createType().
int closest_point_on_surface | ( | SurfaceModifierData * | surmd, |
const float | co[3], | ||
float | surface_co[3], | ||
float | surface_nor[3], | ||
float | surface_vel[3] | ||
) |
Definition at line 539 of file effect.c.
References add_v3_v3(), BLI_bvhtree_find_nearest(), SurfaceModifierData::bvhtree, CDDM_get_face(), MVert::co, BVHTreeNearest::co, copy_v3_v3(), BVHTreeNearest::dist, SurfaceModifierData::dm, FLT_MAX, BVHTreeNearest::index, mul_v3_fl(), BVHTreeFromMesh::nearest_callback, BVHTreeNearest::no, BVHTreeFromMesh::tree, SurfaceModifierData::v, MFace::v1, MFace::v2, MFace::v3, and MFace::v4.
Referenced by boid_find_ground(), and get_effector_data().
void deselectall_eff | ( | struct Object * | ob | ) |
float effector_falloff | ( | struct EffectorCache * | eff, |
struct EffectorData * | efd, | ||
struct EffectedPoint * | point, | ||
struct EffectorWeights * | weights | ||
) |
Referenced by pdDoEffectors(), precalc_guides(), and rule_goal_avoid().
void free_partdeflect | ( | struct PartDeflect * | pd | ) |
Definition at line 158 of file effect.c.
References Tex::id, MEM_freeN(), PartDeflect::rng, rng_free(), PartDeflect::tex, and ID::us.
Referenced by free_object(), and psys_free_settings().
int get_effector_data | ( | struct EffectorCache * | eff, |
struct EffectorData * | efd, | ||
struct EffectedPoint * | point, | ||
int | real_velocity | ||
) |
Definition at line 571 of file effect.c.
References add_v3_v3(), add_v3_v3v3(), RenderData::cfra, closest_point_on_surface(), ParticleKey::co, copy_v3_v3(), Object::derivedFinal, EffectorData::distance, PartDeflect::f_size, EffectorCache::flag, PartDeflect::forcefield, DerivedMesh::getVertCo, DerivedMesh::getVertNo, EffectedPoint::index, EffectorData::index, len_v3(), EffectorData::loc, EffectedPoint::loc, mul_m4_v3(), mul_mat3_m4_v3(), mul_qt_v3(), mul_v3_fl(), EffectorData::nor, EffectorData::nor2, normalize_v3(), normalize_v3_v3(), NULL, EffectorCache::ob, ParticleSimulationData::ob, Object::obmat, ParticleSystem::particles, EffectorCache::pd, PE_USE_NORMAL_DATA, PFIELD_HARMONIC, PFIELD_SHAPE_PLANE, PFIELD_SHAPE_POINTS, PFIELD_SHAPE_SURFACE, PFIELD_VORTEX, project_v3_v3v3(), ParticleSimulationData::psys, EffectedPoint::psys, EffectorCache::psys, psys_get_particle_state(), Scene::r, ParticleKey::rot, EffectorCache::scene, ParticleSimulationData::scene, PartDeflect::shape, EffectorData::size, ParticleData::size, state, sub_v3_v3v3(), EffectorCache::surmd, ParticleKey::time, EffectorData::vec_to_point, EffectorData::vec_to_point2, EffectorData::vel, ParticleKey::vel, EffectedPoint::vel, EffectedPoint::vel_to_frame, and EffectorCache::velocity.
Referenced by pdDoEffectors(), and rule_goal_avoid().
struct PartDeflect* object_add_collision_fields | ( | int | type | ) | [read] |
Definition at line 117 of file effect.c.
References PartDeflect::f_damp, PartDeflect::f_flow, PartDeflect::f_size, PartDeflect::f_strength, PartDeflect::flag, PartDeflect::forcefield, MEM_callocN(), PartDeflect::pdef_sbdamp, PartDeflect::pdef_sbift, PartDeflect::pdef_sboft, PFIELD_DO_LOCATION, PFIELD_DO_ROTATION, PFIELD_SHAPE_PLANE, PFIELD_TEXTURE, PFIELD_VORTEX, PFIELD_WIND, PIL_check_seconds_timer(), PartDeflect::seed, PartDeflect::shape, and UndoElem::type.
Referenced by ED_object_modifier_add(), effector_add_type(), and forcefield_toggle_exec().
void pd_point_from_loc | ( | struct Scene * | scene, |
float * | loc, | ||
float * | vel, | ||
int | index, | ||
struct EffectedPoint * | point | ||
) |
Definition at line 358 of file effect.c.
References EffectedPoint::ave, EffectedPoint::flag, RenderData::frs_sec, EffectedPoint::index, EffectedPoint::loc, NULL, EffectedPoint::psys, Scene::r, EffectedPoint::rot, EffectedPoint::size, EffectedPoint::vel, EffectedPoint::vel_to_frame, and EffectedPoint::vel_to_sec.
Referenced by cloth_calc_force(), and dynamicPaint_prepareEffectStep().
void pd_point_from_particle | ( | struct ParticleSimulationData * | sim, |
struct ParticleData * | pa, | ||
struct ParticleKey * | state, | ||
struct EffectedPoint * | point | ||
) |
Definition at line 328 of file effect.c.
References ParticleKey::ave, EffectedPoint::ave, EffectedPoint::charge, ParticleKey::co, PartDeflect::f_strength, ParticleSettings::flag, EffectedPoint::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(), ParticleKey::rot, EffectedPoint::rot, ParticleData::size, EffectedPoint::size, ParticleKey::vel, 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 373 of file effect.c.
References EffectedPoint::ave, EffectedPoint::flag, RenderData::frs_sec, EffectedPoint::index, EffectedPoint::loc, NULL, PE_WIND_AS_SPEED, EffectedPoint::psys, Scene::r, EffectedPoint::rot, EffectedPoint::size, EffectedPoint::vel, EffectedPoint::vel_to_frame, and EffectedPoint::vel_to_sec.
Referenced by _scan_for_ext_spring_forces(), _softbody_calc_forces_slice_in_a_thread(), and softbody_calc_forces().
void pdDoEffectors | ( | struct ListBase * | effectors, |
struct ListBase * | colliders, | ||
struct EffectorWeights * | weights, | ||
struct EffectedPoint * | point, | ||
float * | force, | ||
float * | impulse | ||
) |
Definition at line 958 of file effect.c.
References add_v3_v3v3(), copy_v3_v3(), do_physical_effector(), do_texture_effector(), eff_calc_visibility(), effector_falloff(), EffectorData::falloff, ListBase::first, EffectorCache::flag, EffectedPoint::flag, PartDeflect::forcefield, get_effector_data(), get_effector_tot(), EffectorCache::next, p, EffectorCache::pd, PE_VELOCITY_TO_IMPULSE, PE_WIND_AS_SPEED, PFIELD_TEXTURE, step(), 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(), dynamicPaint_prepareEffectStep(), and softbody_calc_forces().
void pdEndEffectors | ( | struct ListBase ** | effectors | ) |
Definition at line 311 of file effect.c.
References BLI_freelistN(), EffectorCache::guide_data, MEM_freeN(), EffectorCache::next, and NULL.
Referenced by build_dag_object(), do_step_cloth(), dynamicPaint_prepareEffectStep(), psys_free(), psys_update_effectors(), sb_sfesf_threads_run(), scan_for_ext_spring_forces(), softbody_calc_forces(), and softbody_calc_forcesEx().
struct ListBase* pdInitEffectors | ( | struct Scene * | scene, |
struct Object * | ob_src, | ||
struct ParticleSystem * | psys_src, | ||
struct EffectorWeights * | weights | ||
) | [read] |
Definition at line 270 of file effect.c.
References add_object_to_effectors(), add_particles_to_effectors(), Scene::base, ListBase::first, PartDeflect::forcefield, Group::gobject, EffectorWeights::group, Base::lay, Object::lay, Base::next, ParticleSystem::next, GroupObject::next, NULL, GroupObject::ob, Base::object, Object::particlesystem, and Object::pd.
Referenced by build_dag_object(), do_step_cloth(), dynamicPaint_prepareEffectStep(), psys_update_effectors(), sb_sfesf_threads_run(), scan_for_ext_spring_forces(), softbody_calc_forces(), and softbody_calc_forcesEx().