diff options
Diffstat (limited to 'source/blender/blenkernel/BKE_effect.h')
-rw-r--r-- | source/blender/blenkernel/BKE_effect.h | 41 |
1 files changed, 34 insertions, 7 deletions
diff --git a/source/blender/blenkernel/BKE_effect.h b/source/blender/blenkernel/BKE_effect.h index bb5048a00f0..3d4154c572b 100644 --- a/source/blender/blenkernel/BKE_effect.h +++ b/source/blender/blenkernel/BKE_effect.h @@ -40,12 +40,14 @@ struct Object; struct Scene; struct ListBase; -struct Group; +struct Collection; struct ParticleSimulationData; struct ParticleData; struct ParticleKey; +struct Depsgraph; +struct ViewLayer; -struct EffectorWeights *BKE_add_effector_weights(struct Group *group); +struct EffectorWeights *BKE_add_effector_weights(struct Collection *collection); struct PartDeflect *object_add_collision_fields(int type); /* Input to effector code */ @@ -93,6 +95,7 @@ typedef struct EffectorData { typedef struct EffectorCache { struct EffectorCache *next, *prev; + struct Depsgraph *depsgraph; struct Scene *scene; struct Object *ob; struct ParticleSystem *psys; @@ -109,11 +112,35 @@ typedef struct EffectorCache { int flag; } EffectorCache; -void free_partdeflect(struct PartDeflect *pd); -struct ListBase *pdInitEffectors(struct Scene *scene, struct Object *ob_src, struct ParticleSystem *psys_src, struct EffectorWeights *weights, bool for_simulation); -void pdEndEffectors(struct ListBase **effectors); -void pdPrecalculateEffectors(struct ListBase *effectors); -void pdDoEffectors(struct ListBase *effectors, struct ListBase *colliders, struct EffectorWeights *weights, struct EffectedPoint *point, float *force, float *impulse); +typedef struct EffectorRelation { + struct EffectorRelation *next, *prev; + + struct Object *ob; + struct ParticleSystem *psys; + struct PartDeflect *pd; +} EffectorRelation; + +void free_partdeflect(struct PartDeflect *pd); + +struct ListBase *BKE_effector_relations_create( + struct Depsgraph *depsgraph, + struct ViewLayer *view_layer, + struct Collection *collection); +void BKE_effector_relations_free(struct ListBase *lb); + +struct ListBase *BKE_effectors_create( + struct Depsgraph *depsgraph, + struct Object *ob_src, + struct ParticleSystem *psys_src, + struct EffectorWeights *weights); +void BKE_effectors_apply( + struct ListBase *effectors, + struct ListBase *colliders, + struct EffectorWeights *weights, + struct EffectedPoint *point, + float *force, + float *impulse); +void BKE_effectors_free(struct ListBase *lb); 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); |