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:
authorJoseph Eagar <joeedh@gmail.com>2009-07-16 10:27:37 +0400
committerJoseph Eagar <joeedh@gmail.com>2009-07-16 10:27:37 +0400
commit0b1649b2b86b52b44bdabf8e3542d8adffb55623 (patch)
tree542e10220a719f2a54e8afbee7b11195b6dac344 /source/blender/blenkernel/intern/fluidsim.c
parent3bade135035dacfdb4a3833f3fac3bf5811ce7de (diff)
parent0bfc98706ef93f90bd74b195b98c36c7dcea94dd (diff)
merge with 2.5 at r21568
Diffstat (limited to 'source/blender/blenkernel/intern/fluidsim.c')
-rw-r--r--source/blender/blenkernel/intern/fluidsim.c23
1 files changed, 21 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/fluidsim.c b/source/blender/blenkernel/intern/fluidsim.c
index 14bff9b5d57..6c684994e30 100644
--- a/source/blender/blenkernel/intern/fluidsim.c
+++ b/source/blender/blenkernel/intern/fluidsim.c
@@ -28,11 +28,15 @@
* ***** END GPL LICENSE BLOCK *****
*/
+#include "BLI_storage.h" /* _LARGEFILE_SOURCE */
+
#include "MEM_guardedalloc.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
+#include "DNA_object_fluidsim.h"
#include "DNA_object_force.h" // for pointcache
+#include "DNA_object_types.h"
#include "DNA_particle_types.h"
#include "DNA_scene_types.h" // N_T
@@ -76,7 +80,7 @@ void fluidsim_init(FluidsimModifierData *fluidmd)
if(!fss)
return;
- fss->type = OB_FSBND_NOSLIP;
+ fss->type = OB_FLUIDSIM_ENABLE;
fss->show_advancedoptions = 0;
fss->resolutionxyz = 50;
@@ -110,7 +114,7 @@ void fluidsim_init(FluidsimModifierData *fluidmd)
// no bounding box needed
// todo - reuse default init from elbeem!
- fss->typeFlags = 0;
+ fss->typeFlags = OB_FSBND_NOSLIP;
fss->domainNovecgen = 0;
fss->volumeInitType = 1; // volume
fss->partSlipValue = 0.0;
@@ -656,5 +660,20 @@ void initElbeemMesh(struct Scene *scene, struct Object *ob,
dm->release(dm);
}
+void fluid_estimate_memory(Object *ob, FluidsimSettings *fss, char *value)
+{
+ Mesh *mesh;
+
+ value[0]= '\0';
+
+ if(ob->type == OB_MESH) {
+ /* use mesh bounding box and object scaling */
+ mesh= ob->data;
+
+ fluid_get_bb(mesh->mvert, mesh->totvert, ob->obmat, fss->bbStart, fss->bbSize);
+ elbeemEstimateMemreq(fss->resolutionxyz, fss->bbSize[0],fss->bbSize[1],fss->bbSize[2], fss->maxRefine, value);
+ }
+}
+
#endif // DISABLE_ELBEEM