Blender V2.61 - r43446
Classes | Typedefs | Functions

effect.c File Reference

#include <stddef.h>
#include <math.h>
#include <stdlib.h>
#include "MEM_guardedalloc.h"
#include "DNA_curve_types.h"
#include "DNA_effect_types.h"
#include "DNA_group_types.h"
#include "DNA_ipo_types.h"
#include "DNA_key_types.h"
#include "DNA_lattice_types.h"
#include "DNA_listBase.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_material_types.h"
#include "DNA_object_types.h"
#include "DNA_object_force.h"
#include "DNA_particle_types.h"
#include "DNA_texture_types.h"
#include "DNA_scene_types.h"
#include "BLI_math.h"
#include "BLI_blenlib.h"
#include "BLI_jitter.h"
#include "BLI_rand.h"
#include "BLI_utildefines.h"
#include "PIL_time.h"
#include "BKE_action.h"
#include "BKE_anim.h"
#include "BKE_armature.h"
#include "BKE_blender.h"
#include "BKE_collision.h"
#include "BKE_constraint.h"
#include "BKE_deform.h"
#include "BKE_depsgraph.h"
#include "BKE_displist.h"
#include "BKE_DerivedMesh.h"
#include "BKE_cdderivedmesh.h"
#include "BKE_effect.h"
#include "BKE_global.h"
#include "BKE_group.h"
#include "BKE_ipo.h"
#include "BKE_key.h"
#include "BKE_lattice.h"
#include "BKE_mesh.h"
#include "BKE_material.h"
#include "BKE_main.h"
#include "BKE_modifier.h"
#include "BKE_object.h"
#include "BKE_particle.h"
#include "BKE_scene.h"
#include "RE_render_ext.h"
#include "RE_shader_ext.h"

Go to the source code of this file.

Classes

struct  VeNoCo

Typedefs

typedef struct VeNoCo VeNoCo

Functions

EffectorWeights * BKE_add_effector_weights (Group *group)
PartDeflect * object_add_collision_fields (int type)
void free_partdeflect (PartDeflect *pd)
static void precalculate_effector (EffectorCache *eff)
static EffectorCache * new_effector_cache (Scene *scene, Object *ob, ParticleSystem *psys, PartDeflect *pd)
static void add_object_to_effectors (ListBase **effectors, Scene *scene, EffectorWeights *weights, Object *ob, Object *ob_src)
static void add_particles_to_effectors (ListBase **effectors, Scene *scene, EffectorWeights *weights, Object *ob, ParticleSystem *psys, ParticleSystem *psys_src)
ListBase * pdInitEffectors (Scene *scene, Object *ob_src, ParticleSystem *psys_src, EffectorWeights *weights)
void pdEndEffectors (ListBase **effectors)
void pd_point_from_particle (ParticleSimulationData *sim, ParticleData *pa, ParticleKey *state, EffectedPoint *point)
void pd_point_from_loc (Scene *scene, float *loc, float *vel, int index, EffectedPoint *point)
void pd_point_from_soft (Scene *scene, float *loc, float *vel, int index, EffectedPoint *point)
static void eff_tri_ray_hit (void *UNUSED(userData), int UNUSED(index), const BVHTreeRay *UNUSED(ray), BVHTreeRayHit *hit)
static float eff_calc_visibility (ListBase *colliders, EffectorCache *eff, EffectorData *efd, EffectedPoint *point)
static float wind_func (struct RNG *rng, float strength)
static float falloff_func (float fac, int usemin, float mindist, int usemax, float maxdist, float power)
static float falloff_func_dist (PartDeflect *pd, float fac)
static float falloff_func_rad (PartDeflect *pd, float fac)
float effector_falloff (EffectorCache *eff, EffectorData *efd, EffectedPoint *UNUSED(point), 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 (EffectorCache *eff, EffectorData *efd, EffectedPoint *point, int real_velocity)
static void get_effector_tot (EffectorCache *eff, EffectorData *efd, EffectedPoint *point, int *tot, int *p, int *step)
static void do_texture_effector (EffectorCache *eff, EffectorData *efd, EffectedPoint *point, float *total_force)
static void do_physical_effector (EffectorCache *eff, EffectorData *efd, EffectedPoint *point, float *total_force)
void pdDoEffectors (ListBase *effectors, ListBase *colliders, EffectorWeights *weights, EffectedPoint *point, float *force, float *impulse)

Detailed Description

Definition in file effect.c.


Typedef Documentation

typedef struct VeNoCo VeNoCo

Function Documentation

static void add_object_to_effectors ( ListBase **  effectors,
Scene *  scene,
EffectorWeights *  weights,
Object *  ob,
Object *  ob_src 
) [static]
static void add_particles_to_effectors ( ListBase **  effectors,
Scene *  scene,
EffectorWeights *  weights,
Object *  ob,
ParticleSystem *  psys,
ParticleSystem *  psys_src 
) [static]
EffectorWeights* BKE_add_effector_weights ( Group *  group) [read]
int closest_point_on_surface ( SurfaceModifierData *  surmd,
const float  co[3],
float  surface_co[3],
float  surface_nor[3],
float  surface_vel[3] 
)
static void do_physical_effector ( EffectorCache *  eff,
EffectorData *  efd,
EffectedPoint *  point,
float *  total_force 
) [static]
static void do_texture_effector ( EffectorCache *  eff,
EffectorData *  efd,
EffectedPoint *  point,
float *  total_force 
) [static]
static float eff_calc_visibility ( ListBase *  colliders,
EffectorCache *  eff,
EffectorData *  efd,
EffectedPoint *  point 
) [static]
static void eff_tri_ray_hit ( void *  UNUSEDuserData,
int   UNUSEDindex,
const BVHTreeRay *  UNUSEDray,
BVHTreeRayHit *  hit 
) [static]

Definition at line 394 of file effect.c.

References BVHTreeRayHit::dist, and BVHTreeRayHit::index.

Referenced by eff_calc_visibility().

float effector_falloff ( EffectorCache *  eff,
EffectorData *  efd,
EffectedPoint *  UNUSEDpoint,
EffectorWeights *  weights 
)
static float falloff_func ( float  fac,
int  usemin,
float  mindist,
int  usemax,
float  maxdist,
float  power 
) [static]

Definition at line 474 of file effect.c.

References pow().

Referenced by falloff_func_dist(), and falloff_func_rad().

static float falloff_func_dist ( PartDeflect *  pd,
float  fac 
) [static]
static float falloff_func_rad ( PartDeflect *  pd,
float  fac 
) [static]
void free_partdeflect ( 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 ( EffectorCache *  eff,
EffectorData *  efd,
EffectedPoint *  point,
int  real_velocity 
)
static void get_effector_tot ( EffectorCache *  eff,
EffectorData *  efd,
EffectedPoint *  point,
int *  tot,
int *  p,
int *  step 
) [static]
static EffectorCache* new_effector_cache ( Scene *  scene,
Object *  ob,
ParticleSystem *  psys,
PartDeflect *  pd 
) [static]
PartDeflect* object_add_collision_fields ( int  type) [read]
void pd_point_from_loc ( Scene *  scene,
float *  loc,
float *  vel,
int  index,
EffectedPoint *  point 
)
void pd_point_from_particle ( ParticleSimulationData *  sim,
ParticleData *  pa,
ParticleKey *  state,
EffectedPoint *  point 
)
void pd_point_from_soft ( Scene *  scene,
float *  loc,
float *  vel,
int  index,
EffectedPoint *  point 
)
void pdDoEffectors ( ListBase *  effectors,
ListBase *  colliders,
EffectorWeights *  weights,
EffectedPoint *  point,
float *  force,
float *  impulse 
)
void pdEndEffectors ( ListBase **  effectors)
ListBase* pdInitEffectors ( Scene *  scene,
Object *  ob_src,
ParticleSystem *  psys_src,
EffectorWeights *  weights 
) [read]
static void precalculate_effector ( EffectorCache *  eff) [static]
static float wind_func ( struct RNG *  rng,
float  strength 
) [static]

Definition at line 457 of file effect.c.

References random(), rng_getFloat(), rng_getInt(), and TNT::sign().

Referenced by do_physical_effector().