]> Creatis software - creaVtk.git/blobdiff - bbtk_creaVtk_PKG/src/bbcreaVtkMeshManager_tool.cxx
3521 CompareImages
[creaVtk.git] / bbtk_creaVtk_PKG / src / bbcreaVtkMeshManager_tool.cxx
index 1be40ffb74bc0dbe960e7b41d1d6f712894d8d4e..af15435ffdf8500aac153a788b7cd89cc5fef748 100644 (file)
@@ -32,13 +32,19 @@ void MeshManager_tool::Process()
         if (bbGetInputTool()==10) // Undo
         {
                bbGetInputMeshManagerModel()->Undo();
-            //printf("EED Warning!   MeshManager_tool Undo   Not implemented.\n");
+               std::vector<double> outData = bbGetInputMeshManagerModel()->GetReferencePoint();
+               std::vector<double> refNormal = bbGetInputMeshManagerModel()->GetReferenceNormal();
+               outData.insert(outData.end(), refNormal.begin(), refNormal.end());
+               bbSetOutputOut(outData);
         } // if Tool 10 Undo
         
         if (bbGetInputTool()==20) // Redo
         {
                bbGetInputMeshManagerModel()->Redo();
-            //printf("EED Warning!   MeshManager_tool Redo   Not implemented.\n");
+               std::vector<double> outData = bbGetInputMeshManagerModel()->GetReferencePoint();
+               std::vector<double> refNormal = bbGetInputMeshManagerModel()->GetReferenceNormal();
+               outData.insert(outData.end(), refNormal.begin(), refNormal.end());
+               bbSetOutputOut(outData);
         } // if Tool 20 Redo
 
         if (bbGetInputTool()==30)  // Set
@@ -58,10 +64,12 @@ void MeshManager_tool::Process()
         } // if Tool 35 Set memory mode
                if(bbGetInputTool() == 37) // Save State Memory Mode
         {
-               if(bbGetInputStringParam().length() > 0){       
-                               cout << " MeshManager_tool : MeshManagerModel    Executed tool 37" << endl;//bGetInputMeshManagerModel()->Save();
+               if(bbGetInputDoubleParams().size() == 8){       
+                               std::vector<double> point = {bbGetInputDoubleParams()[0], bbGetInputDoubleParams()[1], bbGetInputDoubleParams()[2]};
+                               bbGetInputMeshManagerModel()->SetReferencePoint(point);
+                               std::vector<double> normVect = {bbGetInputDoubleParams()[3], bbGetInputDoubleParams()[4], bbGetInputDoubleParams()[5]};
+                               bbGetInputMeshManagerModel()->SetReferenceNormal(normVect);
                        bbGetInputMeshManagerModel()->SaveMemoryMode();
-                   //  cout << bbGetInputStringParam() << endl;
                }
         }
         if (bbGetInputTool()==32)  // Copy and Set
@@ -96,6 +104,7 @@ void MeshManager_tool::Process()
     } else {
         printf("EED Warning! MeshManager_tool : MeshManagerModel not defined. \n");
     }// if MeshManagerModel != NULL
+    
 }
 
 //=====