Salome HOME
IPAL8941: enable Animation with Plot3D
[modules/visu.git] / src / VISU_I / VISU_TimeAnimation.cxx
index b9f713c22dbe8b2782fc54493699c60cd139372e..b074f5f15ba32ff2a5f0cb6e43b08b68ca7bc7ae 100644 (file)
@@ -17,6 +17,7 @@
 #include "VISU_IsoSurfaces_i.hh"
 #include "VISU_DeformedShape_i.hh"
 #include "VISU_CutPlanes_i.hh"
+#include "VISU_Plot3D_i.hh"
 #include "VISU_CutLines_i.hh"
 #include "VISU_Vectors_i.hh"
 #include "VISU_StreamLines_i.hh"
@@ -230,6 +231,15 @@ void VISU_TimeAnimation::generatePresentations(CORBA::Long theFieldNum) {
       }
       break;
 
+    case VISU::TPLOT3D: // Cut Planes
+      {
+       VISU::Plot3D_i* aPresent = new VISU::Plot3D_i (pResult, false);
+       aPresent->Create(aMeshName.latin1(), anEntity,
+                        aFieldName.latin1(), aTimeStampId);
+       aData.myPrs[i] = aPresent;
+      }
+      break;
+
     case VISU::TDEFORMEDSHAPE: // Deformed Shape
       {
        VISU::DeformedShape_i* aPresent = new VISU::DeformedShape_i(pResult, false);
@@ -262,6 +272,9 @@ void VISU_TimeAnimation::generatePresentations(CORBA::Long theFieldNum) {
        aData.myPrs[i] = aPresent;
       }
       break;
+    default:
+      MESSAGE("Not implemented for this presentation type: " << aData.myPrsType);
+      return;
     }
     if (aData.myPrs[i]->GetMin() < aMin) aMin = aData.myPrs[i]->GetMin();
     if (aData.myPrs[i]->GetMax() > aMax) aMax = aData.myPrs[i]->GetMax();
@@ -621,6 +634,9 @@ std::string GetPresentationComment (VISU::VISUType thePrsType)
   case VISU::TCUTPLANES:
     aPrsCmt = VISU::CutPlanes_i::myComment;
     break;
+  case VISU::TPLOT3D:
+    aPrsCmt = VISU::Plot3D_i::myComment;
+    break;
   case VISU::TDEFORMEDSHAPE:
     aPrsCmt = VISU::DeformedShape_i::myComment;
     break;
@@ -787,6 +803,8 @@ void VISU_TimeAnimation::restoreFromStudy(_PTR(SObject) theField)
       aData.myPrsType = VISU::TISOSURFACE;
     else if (strName == VISU::CutPlanes_i::myComment.c_str())
       aData.myPrsType = VISU::TCUTPLANES;
+    else if (strName == VISU::Plot3D_i::myComment.c_str())
+      aData.myPrsType = VISU::TPLOT3D;
     else if (strName == VISU::DeformedShape_i::myComment.c_str())
       aData.myPrsType = VISU::TDEFORMEDSHAPE;
     else if (strName == VISU::Vectors_i::myComment.c_str())