diff options
Diffstat (limited to 'source/blender/makesdna/DNA_particle_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_particle_types.h | 54 |
1 files changed, 36 insertions, 18 deletions
diff --git a/source/blender/makesdna/DNA_particle_types.h b/source/blender/makesdna/DNA_particle_types.h index 6a0a0e1d912..157767e1d13 100644 --- a/source/blender/makesdna/DNA_particle_types.h +++ b/source/blender/makesdna/DNA_particle_types.h @@ -67,7 +67,7 @@ typedef struct ChildParticle { int pa[4]; /* nearest particles to the child, used for the interpolation */ float w[4]; /* interpolation weights for the above particles */ float fuv[4], foffset; /* face vertex weights and offset */ - float rand[3]; + float rt; } ChildParticle; typedef struct ParticleTarget { @@ -78,6 +78,13 @@ typedef struct ParticleTarget { float time, duration; } ParticleTarget; +typedef struct ParticleDupliWeight { + struct ParticleDupliWeight *next, *prev; + struct Object *ob; + short count; + short flag, rt[2]; +} ParticleDupliWeight; + typedef struct ParticleData { ParticleKey state; /* current global coordinates */ @@ -114,6 +121,8 @@ typedef struct ParticleSettings { struct BoidSettings *boids; + struct EffectorWeights *effector_weights; + int flag; short type, from, distr; /* physics modes */ @@ -146,6 +155,7 @@ typedef struct ParticleSettings { /* initial velocity factors */ float normfac, obfac, randfac, partfac, tanfac, tanphase, reactfac; + float ob_vel[3], rt; float avefac, phasefac, randrotfac, randphasefac; /* physical properties */ float mass, size, randsize, reactshape; @@ -176,10 +186,9 @@ typedef struct ParticleSettings { /* keyed particles */ int keyed_loops; - float effector_weight[10]; - struct Group *dup_group; - struct Group *eff_group; + struct ListBase dupliweights; + struct Group *eff_group; // deprecated struct Object *dup_ob; struct Object *bb_ob; struct Ipo *ipo; // xxx depreceated... old animation system @@ -209,8 +218,6 @@ typedef struct ParticleSystem{ /* note, make sure all (runtime) are NULL's in struct Object *lattice; struct Object *parent; /* particles from global space -> parent space */ - struct ListBase effectors, reactevents; /* runtime */ - struct ListBase targets; /* used for keyed and boid physics */ char name[32]; /* particle system name */ @@ -233,14 +240,20 @@ typedef struct ParticleSystem{ /* note, make sure all (runtime) are NULL's in struct PointCache *pointcache; struct ListBase ptcaches; + struct ListBase *effectors; + struct KDTree *tree; /* used for interactions with self and other systems */ + + struct ParticleDrawData *pdd; + + float *frand; /* array of 1024 random floats for fast lookups */ }ParticleSystem; /* part->type */ /* hair is allways baked static in object/geometry space */ /* other types (normal particles) are in global space and not static baked */ #define PART_EMITTER 0 -#define PART_REACTOR 1 +//#define PART_REACTOR 1 #define PART_HAIR 2 #define PART_FLUID 3 @@ -266,7 +279,7 @@ typedef struct ParticleSystem{ /* note, make sure all (runtime) are NULL's in #define PART_ROT_DYN (1<<14) /* dynamic rotation */ #define PART_SIZEMASS (1<<16) -//#define PART_KEYED_TIMING (1<<15) +//#define PART_HAIR_GRAVITY (1<<15) //#define PART_ABS_TIME (1<<17) //#define PART_GLOB_TIME (1<<18) @@ -320,12 +333,12 @@ typedef struct ParticleSystem{ /* note, make sure all (runtime) are NULL's in /* part->draw */ #define PART_DRAW_VEL 1 -//#define PART_DRAW_PATH_LEN 2 +#define PART_DRAW_GLOBAL_OB 2 #define PART_DRAW_SIZE 4 #define PART_DRAW_EMITTER 8 /* render emitter also */ #define PART_DRAW_HEALTH 16 #define PART_ABS_PATH_TIME 32 -//#define PART_DRAW_TRAIL 64 +#define PART_DRAW_COUNT_GR 64 #define PART_DRAW_BB_LOCK 128 #define PART_DRAW_PARENT 256 #define PART_DRAW_NUM 512 @@ -403,11 +416,13 @@ typedef struct ParticleSystem{ /* note, make sure all (runtime) are NULL's in #define PART_CHILD_FACES 2 /* psys->recalc */ -#define PSYS_RECALC_REDO 1 /* only do pathcache etc */ -#define PSYS_RECALC_RESET 2 /* reset everything including pointcache */ -#define PSYS_RECALC_TYPE 4 /* handle system type change */ -#define PSYS_RECALC_CHILD 16 /* only child settings changed */ -#define PSYS_RECALC_PHYS 32 /* physics type changed */ +/* starts from 8 so that the first bits can be ob->recalc */ +#define PSYS_RECALC_REDO 8 /* only do pathcache etc */ +#define PSYS_RECALC_RESET 16 /* reset everything including pointcache */ +#define PSYS_RECALC_TYPE 32 /* handle system type change */ +#define PSYS_RECALC_CHILD 64 /* only child settings changed */ +#define PSYS_RECALC_PHYS 128 /* physics type changed */ +#define PSYS_RECALC 248 /* psys->flag */ #define PSYS_CURRENT 1 @@ -422,22 +437,25 @@ typedef struct ParticleSystem{ /* note, make sure all (runtime) are NULL's in #define PSYS_HAIR_DONE 512 #define PSYS_KEYED 1024 #define PSYS_EDITED 2048 -//#define PSYS_PROTECT_CACHE 4096 +//#define PSYS_PROTECT_CACHE 4096 /* deprecated */ #define PSYS_DISABLED 8192 /* pars->flag */ #define PARS_UNEXIST 1 #define PARS_NO_DISP 2 -//#define PARS_STICKY 4 +//#define PARS_STICKY 4 /* deprecated */ #define PARS_REKEY 8 /* pars->alive */ -#define PARS_KILLED 0 +//#define PARS_KILLED 0 /* deprecated */ #define PARS_DEAD 1 #define PARS_UNBORN 2 #define PARS_ALIVE 3 #define PARS_DYING 4 +/* ParticleDupliWeight->flag */ +#define PART_DUPLIW_CURRENT 1 + /* psys->vg */ #define PSYS_TOT_VG 12 |