diff options
author | Ton Roosendaal <ton@blender.org> | 2005-04-04 22:09:47 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2005-04-04 22:09:47 +0400 |
commit | 7a377bcb05c2634a872208680aca80cc9e9a0c11 (patch) | |
tree | 787ce3fb287b9206f6a5084b25551c8fb2735979 /source/blender/makesdna | |
parent | 04e4b72e063702dc16cf41dd97c5776d03742bde (diff) |
- Made SoftBody work with Particle Force Fields.
- Added new (Particle) Deflector; type Wind.
Wind gives constant directional force. It is animatable (Ipos) and reacts
to Object scaling. Also uses FallOff. Works for particles and SoftBody
quick movie check; http://www.blender.org/bf/0001_0250.avi
test file is in download.blender.org/demo/test/wind_soft.blend
- Added MaxDist option for forcefields, to control its influence better.
Is drawn as circle in 3d window.
Forcefields are a bit weak still... should react to scaling, or not; in
that case drawing should indicate it (done for spherical field now).
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_effect_types.h | 5 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_object_types.h | 29 |
2 files changed, 21 insertions, 13 deletions
diff --git a/source/blender/makesdna/DNA_effect_types.h b/source/blender/makesdna/DNA_effect_types.h index 86dd2f299c3..dc3118b7f73 100644 --- a/source/blender/makesdna/DNA_effect_types.h +++ b/source/blender/makesdna/DNA_effect_types.h @@ -67,11 +67,6 @@ #define WAV_Y 4 #define WAV_CYCL 8 - /* Effector Fields types */ -#define PFIELD_FORCE 1 -#define PFIELD_VORTEX 2 -#define PFIELD_MAGNET 3 - typedef struct Effect { struct Effect *next, *prev; short type, flag, buttype, rt; diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h index fb11938c442..1e1c0760889 100644 --- a/source/blender/makesdna/DNA_object_types.h +++ b/source/blender/makesdna/DNA_object_types.h @@ -80,17 +80,30 @@ typedef struct LBuf { } LBuf; typedef struct PartDeflect { - short deflect; /* Deflection flag - does mesh deflect particles*/ - short forcefield; /* Force flag, do the vertices attract / repel particles ? */ - - float pdef_damp; /* Damping factor for particle deflection */ - float pdef_rdamp; /* Random element of damping for deflection */ - float pdef_perm; /* Chance of particle passing through mesh */ + short deflect; /* Deflection flag - does mesh deflect particles*/ + short forcefield; /* Force field type, do the vertices attract / repel particles ? */ + short flag; /* general settings flag */ + short pad; + + float pdef_damp; /* Damping factor for particle deflection */ + float pdef_rdamp; /* Random element of damping for deflection */ + float pdef_perm; /* Chance of particle passing through mesh */ - float f_strength; /* The strength of the force (+ or - ) */ - float f_power; /* The power law - real gravitation is 2 (square) */ + float f_strength; /* The strength of the force (+ or - ) */ + float f_power; /* The power law - real gravitation is 2 (square) */ + float maxdist; /* if indicated, use this maximum */ } PartDeflect; +/* pd->forcefield: Effector Fields types */ +#define PFIELD_FORCE 1 +#define PFIELD_VORTEX 2 +#define PFIELD_MAGNET 3 +#define PFIELD_WIND 4 + +/* pd->flag: various settings */ +#define PFIELD_USEMAX 1 + + typedef struct SoftBody { /* dynamic data */ int totpoint, totspring; |