Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJanne Karhu <jhkarh@gmail.com>2009-09-05 03:06:15 +0400
committerJanne Karhu <jhkarh@gmail.com>2009-09-05 03:06:15 +0400
commitf09d6054100a17cc6129d035cf3634394f5e9377 (patch)
treec5d67a77bd266cb6a93158c38a3880dfe7086c6b /source/blender/makesdna/DNA_particle_types.h
parentec5a8c010c8100a1709786f81d5b9b501383287a (diff)
Some particles cleanup & fixes:
- Some big refresh issues with softbody & cloth point cache usage should now be fixed. - Removed sticky objects from particles (better stuff will come back when I get to updating reactor particles). - Some initial easy memory efficiency cleanup for ParticleData struct. The ultimate goal is to get particles less memory hungry -> more particles possible in single scene. - Wrong path timing clamping caused hair particles to seem disappeared when changing between normal<->hair particles. - "Calculate to current frame" in cache buttons baked instead of the intended function. - Boids particle data is now a bit better organized.
Diffstat (limited to 'source/blender/makesdna/DNA_particle_types.h')
-rw-r--r--source/blender/makesdna/DNA_particle_types.h45
1 files changed, 23 insertions, 22 deletions
diff --git a/source/blender/makesdna/DNA_particle_types.h b/source/blender/makesdna/DNA_particle_types.h
index 12c253a7cb8..d4dc3df0965 100644
--- a/source/blender/makesdna/DNA_particle_types.h
+++ b/source/blender/makesdna/DNA_particle_types.h
@@ -33,6 +33,7 @@
#define DNA_PARTICLE_TYPES_H
#include "DNA_ID.h"
+#include "DNA_boid_types.h"
struct AnimData;
@@ -52,6 +53,14 @@ typedef struct ParticleKey { /* when changed update size of struct to copy_parti
float time; /* when this key happens */
} ParticleKey;
+typedef struct BoidParticle {
+ struct Object *ground;
+ struct BoidData data;
+ float gravity[3];
+ float wander[3];
+ float rt;
+} BoidParticle;
+
/* Child particles are created around or between parent particles */
typedef struct ChildParticle {
int num, parent; /* num is face index on the final derived mesh */
@@ -69,42 +78,34 @@ typedef struct ParticleTarget {
float time, duration;
} ParticleTarget;
-/* Everything that's non dynamic for a particle: */
typedef struct ParticleData {
- struct Object *stick_ob;/* object that particle sticks to when dead */
-
- ParticleKey state; /* normally current global coordinates or */
- /* in sticky object space if dead & sticky */
+ ParticleKey state; /* current global coordinates */
ParticleKey prev_state; /* previous state */
-
+
HairKey *hair; /* hair vertices */
- ParticleKey *keys; /* keyed states */
+ ParticleKey *keys; /* keyed keys */
- struct BoidData *boid; /* boids data */
+ BoidParticle *boid; /* boids data */
- float r_rot[4]; /* random values */
- float r_ave[3],r_ve[3];
-
- float fuv[4], foffset; /* coordinates on face/edge number "num" and depth along*/
- /* face normal for volume emission */
+ int totkey; /* amount of hair or keyed keys*/
float time, lifetime; /* dietime is not nescessarily time+lifetime as */
float dietime; /* particles can die unnaturally (collision) */
- float size, sizemul; /* size and multiplier so that we can update size when ever */
-
int num; /* index to vert/edge/face */
int num_dmcache; /* index to derived mesh data (face) to avoid slow lookups */
- int totkey;
- int bpi; /* softbody body point start index */
+ float fuv[4], foffset; /* coordinates on face/edge number "num" and depth along*/
+ /* face normal for volume emission */
+
+ float size; /* size and multiplier so that we can update size when ever */
short flag;
- short alive; /* the life state of a particle */
+ short alive; /* the life state of a particle */
short loop; /* how many times particle life has looped */
- short rt2;
+ short rt;
} ParticleData;
typedef struct ParticleSettings {
@@ -258,7 +259,7 @@ typedef struct ParticleSystem{ /* note, make sure all (runtime) are NULL's in
#define PART_TRAND 128
#define PART_EDISTR 256 /* particle/face from face areas */
-#define PART_STICKY 512 /*collided particles can stick to collider*/
+//#define PART_STICKY 512 /*collided particles can stick to collider*/
#define PART_DIE_ON_COL (1<<12)
#define PART_SIZE_DEFL (1<<13) /* swept sphere deflections */
#define PART_ROT_DYN (1<<14) /* dynamic rotation */
@@ -409,7 +410,7 @@ typedef struct ParticleSystem{ /* note, make sure all (runtime) are NULL's in
/* psys->flag */
#define PSYS_CURRENT 1
-//#define PSYS_BAKING 2
+#define PSYS_GLOBAL_HAIR 2
//#define PSYS_BAKE_UI 4
#define PSYS_KEYED_TIMING 8
#define PSYS_ENABLED 16 /* deprecated */
@@ -426,7 +427,7 @@ typedef struct ParticleSystem{ /* note, make sure all (runtime) are NULL's in
/* pars->flag */
#define PARS_UNEXIST 1
#define PARS_NO_DISP 2
-#define PARS_STICKY 4
+//#define PARS_STICKY 4
#define PARS_REKEY 8
/* pars->alive */