Salome HOME
DCQ : Merge with Ecole Ete a6.
[modules/visu.git] / src / VISU_I / VISU_TimeAnimation.h
index 0331f2f773b52e8bd94c2f763a7c31aa44330f74..01de4065dbb2f9767086998e5618a55145b99e30 100644 (file)
 
 #include "VISUConfig.hh"
 
-class VTKViewer_ViewFrame;
-class VISU_Actor;
+#include <vector>
 
 #include <qobject.h>
 #include <qvaluelist.h>
 #include <qthread.h>
 
+class VTKViewer_ViewFrame;
+class VISU_Actor;
+
 namespace VISU{
   class Result_i;
   class ScalarMap_i;
@@ -29,15 +31,13 @@ struct FieldData
   SALOMEDS::SObject_var myField; // field label
   long myNbTimes;                // number of Timestamps
   long myNbFrames;               // number of created Frames
-  VISU::ScalarMap_i** myPrs;         // Presentations
-  VISU_Actor** myActors;         // Actors
-  double* myTiming;              // time values
+  std::vector<VISU::ScalarMap_i*> myPrs;         // Presentations
+  std::vector<VISU_Actor*> myActors;         // Actors
+  std::vector<double> myTiming;              // time values
 };
 
 
-class VISU_TimeAnimation: public QObject, public QThread,
-                          public virtual POA_VISU::Animation,
-                          public virtual VISU::Base_i
+class VISU_TimeAnimation: public QObject, public QThread
 {
   Q_OBJECT;
  public:
@@ -45,7 +45,7 @@ class VISU_TimeAnimation: public QObject, public QThread,
   static VISU::Storable::TRestoringMap getMapOfValue(SALOMEDS::SObject_var theSObject);
   static double getTimeValue(SALOMEDS::SObject_var theTimestamp);
   
-  VISU_TimeAnimation(SALOMEDS::Study_var theStudy, VISU::View3D_ptr theView3D = VISU::View3D::_nil());
+  VISU_TimeAnimation(SALOMEDS::Study_ptr theStudy, VISU::View3D_ptr theView3D = VISU::View3D::_nil());
   ~VISU_TimeAnimation();
   
   virtual VISU::VISUType GetType() { return VISU::TNONE;};
@@ -130,4 +130,64 @@ class VISU_TimeAnimation: public QObject, public QThread,
   VTKViewer_ViewFrame* myView;
 };
 
+
+class VISU_TimeAnimation_i: public virtual POA_VISU::Animation,
+                            public virtual VISU::Base_i
+{
+  VISU_TimeAnimation* myAnim;
+public:
+  VISU_TimeAnimation_i(SALOMEDS::Study_ptr theStudy, 
+                       VISU::View3D_ptr theView3D = VISU::View3D::_nil());
+  ~VISU_TimeAnimation_i();
+
+  virtual VISU::VISUType GetType(){ return VISU::TNONE;}
+
+  virtual void addField(SALOMEDS::SObject_ptr theField);
+
+  virtual CORBA::Boolean generateFrames();
+  virtual void generatePresentations(CORBA::Long theFieldNum);
+  
+  virtual void clearView();
+
+  virtual void stopAnimation();
+  virtual void startAnimation();
+  virtual void nextFrame();
+  virtual void prevFrame();
+  virtual void firstFrame();
+  virtual void lastFrame();
+  virtual void gotoFrame(CORBA::Long theFrame);
+
+  virtual CORBA::Long getNbFields();
+  virtual CORBA::Long getNbFrames();
+  virtual CORBA::Boolean isRunning();
+  virtual CORBA::Long getCurrentFrame();
+
+  virtual VISU::ScalarMap_ptr getPresentation(CORBA::Long theField, CORBA::Long theFrame);
+
+  virtual void setPresentationType(CORBA::Long theFieldNum, VISU::VISUType theType);
+  virtual VISU::VISUType getPresentationType(CORBA::Long theFieldNum);
+
+  virtual void setSpeed(CORBA::Long theSpeed);
+  virtual CORBA::Long getSpeed();
+
+  virtual CORBA::Boolean isProportional();
+
+  virtual void setAnimationRange(CORBA::Double theMin, CORBA::Double theMax);
+
+  virtual CORBA::Double getMinRange();
+  virtual CORBA::Double getMaxRange();
+  virtual CORBA::Boolean isRangeDefined();
+
+  virtual void dumpTo(const char* thePath);
+
+  virtual CORBA::Boolean isCycling();
+
+  virtual CORBA::Double getMinTime();
+  virtual CORBA::Double getMaxTime();
+
+  virtual void setProportional(CORBA::Boolean theProp);
+  virtual void setCycling(CORBA::Boolean theCycle);
+};
+
+
 #endif  //VISU_TIMEANIMATION_H