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:
Diffstat (limited to 'source/blender/blenkernel/BKE_pointcache.h')
-rw-r--r--source/blender/blenkernel/BKE_pointcache.h19
1 files changed, 13 insertions, 6 deletions
diff --git a/source/blender/blenkernel/BKE_pointcache.h b/source/blender/blenkernel/BKE_pointcache.h
index 10550ccdc05..03a86b6566a 100644
--- a/source/blender/blenkernel/BKE_pointcache.h
+++ b/source/blender/blenkernel/BKE_pointcache.h
@@ -118,7 +118,7 @@ typedef struct PTCacheID {
unsigned int data_types, info_types;
/* copies point data to cache data */
- int (*write_elem)(int index, void *calldata, void **data);
+ int (*write_elem)(int index, void *calldata, void **data, int cfra);
/* copies point data to cache data */
int (*write_stream)(PTCacheFile *pf, void *calldata);
/* copies cache cata to point data */
@@ -128,10 +128,10 @@ typedef struct PTCacheID {
/* interpolated between previously read point data and cache data */
void (*interpolate_elem)(int index, void *calldata, void **data, float frs_sec, float cfra, float cfra1, float cfra2, float *old_data);
- /* total number of simulated points */
- int (*totpoint)(void *calldata);
- /* number of points written for current cache frame (currently not used) */
- int (*totwrite)(void *calldata);
+ /* total number of simulated points (the cfra parameter is just for using same function pointer with totwrite) */
+ int (*totpoint)(void *calldata, int cfra);
+ /* number of points written for current cache frame */
+ int (*totwrite)(void *calldata, int cfra);
int (*write_header)(PTCacheFile *pf);
int (*read_header)(PTCacheFile *pf);
@@ -236,7 +236,7 @@ void BKE_ptcache_id_from_cloth(PTCacheID *pid, struct Object *ob, struct ClothMo
void BKE_ptcache_id_from_smoke(PTCacheID *pid, struct Object *ob, struct SmokeModifierData *smd);
void BKE_ptcache_id_from_smoke_turbulence(PTCacheID *pid, struct Object *ob, struct SmokeModifierData *smd);
-void BKE_ptcache_ids_from_object(struct ListBase *lb, struct Object *ob);
+void BKE_ptcache_ids_from_object(struct ListBase *lb, struct Object *ob, struct Scene *scene, int duplis);
/***************** Global funcs ****************************/
void BKE_ptcache_remove(void);
@@ -258,6 +258,7 @@ int BKE_ptcache_data_size(int data_type);
/* Memory cache read/write helpers. */
void BKE_ptcache_mem_init_pointers(struct PTCacheMem *pm);
void BKE_ptcache_mem_incr_pointers(struct PTCacheMem *pm);
+int BKE_ptcache_mem_seek_pointers(int point_index, struct PTCacheMem *pm);
/* Copy a specific data type from cache data to point data. */
void BKE_ptcache_data_get(void **data, int type, int index, void *to);
@@ -302,4 +303,10 @@ void BKE_ptcache_toggle_disk_cache(struct PTCacheID *pid);
/* Loads simulation from external (disk) cache files. */
void BKE_ptcache_load_external(struct PTCacheID *pid);
+/* Set correct flags after successful simulation step */
+void BKE_ptcache_validate(struct PointCache *cache, int framenr);
+
+/* Set correct flags after unsuccessful simulation step */
+void BKE_ptcache_invalidate(struct PointCache *cache);
+
#endif