doxygen: add newline after \file
[blender.git] / intern / elbeem / intern / elbeem.cpp
index 0deed50..01e4801 100644 (file)
@@ -1,3 +1,6 @@
+/** \file
+ * \ingroup elbeem
+ */
 /******************************************************************************
  *
  * El'Beem - Free Surface Fluid Simulation with the Lattice Boltzmann Method
@@ -96,6 +99,13 @@ int elbeemInit() {
        return 0;
 }
 
+// fluidsim end
+extern "C" 
+int elbeemFree() {
+       
+       return 0;
+}
+
 // start fluidsim init
 extern "C" 
 int elbeemAddDomain(elbeemSimulationSettings *settings) {
@@ -197,6 +207,7 @@ int elbeemAddMesh(elbeemMesh *mesh) {
        
        ntlGeometryObjModel *obj = new ntlGeometryObjModel( );
        gpWorld->getRenderGlobals()->getSimScene()->addGeoClass( obj );
+       gpWorld->getRenderGlobals()->getRenderScene()->addGeoClass(obj);
        obj->initModel(
                        mesh->numVertices, mesh->vertices, mesh->numTriangles, mesh->triangles,
                        mesh->channelSizeVertices, mesh->channelVertices );
@@ -210,7 +221,13 @@ int elbeemAddMesh(elbeemMesh *mesh) {
        obj->setGeoInitId( mesh->parentDomainId+1 );
        obj->setGeoInitIntersect(true);
        obj->setGeoInitType(initType);
-       obj->setGeoPartSlipValue(mesh->obstaclePartslip);
+       
+       // abuse partslip value for control fluid: reverse control keys or not
+       if(initType == FGI_CONTROL)
+               obj->setGeoPartSlipValue(mesh->obstacleType);
+       else
+               obj->setGeoPartSlipValue(mesh->obstaclePartslip);
+       
        obj->setGeoImpactFactor(mesh->obstacleImpactFactor);
        
        /* fluid control features */
@@ -253,6 +270,7 @@ int elbeemSimulate(void) {
                if(getElbeemState() != SIMWORLD_STOP) {
                        // ok, we're done...
                        delete gpWorld;
+                       
                        gpWorld = NULL;
                        debMsgStd("elbeemSimulate",DM_NOTIFY, "El'Beem simulation done, time: "<<getTimeString(timeend-timestart)<<".\n", 2 ); 
                } else {