]> SALOME platform Git repositories - modules/visu.git/blob - src/VISU_I/VISU_PrsObject_i.hh
Salome HOME
e8d441e1fa57cc4e887f94133877ed7dc7968b3c
[modules/visu.git] / src / VISU_I / VISU_PrsObject_i.hh
1 //  Copyright (C) 2003  CEA/DEN, EDF R&D
2 //
3 //
4 //
5 //  File   : VISU_PrsObject_i.hxx
6 //  Author : Alexey PETROV
7 //  Module : VISU
8
9 #ifndef VISU_PrsObject_i_HeaderFile
10 #define VISU_PrsObject_i_HeaderFile
11
12 #include "VISU_Result_i.hh"
13 //#include "VISU_Convertor.hxx"
14 #include "Handle_SALOME_InteractiveObject.hxx"
15
16 class VISU_Extractor;
17 class VISU_FieldTransform;
18 class VISU_ScalarBarActor;
19 class VISU_LookupTable;
20 class VISU_Actor;
21
22 class vtkDataSetMapper;
23 class vtkDataSet;
24 class vtkProperty;
25
26 class vtkPolyDataMapper;
27 class vtkPolyData;
28 class vtkGeometryFilter;
29
30 class vtkWarpVector;
31 class vtkContourFilter;
32 class vtkAppendPolyData;
33
34 class vtkGlyph3D;
35 class vtkHedgeHog;
36 class vtkPolyDataSource;
37 class vtkStreamLine;
38
39 namespace VISU{
40   struct TField;
41   //==============================================================================
42   class PrsObject_i : public virtual POA_VISU::PrsObject,
43                       public virtual Storable
44   {
45     PrsObject_i(const PrsObject_i&);
46
47   public:
48     PrsObject_i(SALOMEDS::Study_ptr theStudy) : 
49       myStudy(SALOMEDS::Study::_duplicate(theStudy)) {};
50     virtual ~PrsObject_i() {}
51
52   protected:
53     string myName;
54     SALOMEDS::Study_var myStudy;
55
56   public:
57     virtual const char* GetName() const { return myName.c_str();}
58     virtual void SetName( const char* theName );
59     const SALOMEDS::Study_var& GetStudyDocument() const { return myStudy;}
60     QString GetEntry();
61   };
62
63
64   //==============================================================================
65   class Prs3d_i : public virtual POA_VISU::Prs3d,
66                   public virtual PrsObject_i
67   {
68     Prs3d_i();
69     Prs3d_i(const Prs3d_i&);
70   public:
71     Prs3d_i(Result_i* theResult);
72     virtual void SameAs(const Prs3d_i* theOrigin);
73     virtual ~Prs3d_i();
74     virtual void Destroy();
75
76     typedef vtkPolyDataMapper MapperType;
77     typedef vtkDataSet DataType;
78
79     virtual SALOMEDS::Color GetColor() { return myColor;}
80     virtual void SetColor(const SALOMEDS::Color& theColor);
81
82   protected:
83     Result_i* myResult;
84     MapperType *myMapper;
85     vtkGeometryFilter *myGeomFilter;
86     float myBounds[6];
87     struct SALOMEDS::Color myColor;
88
89     bool myAddToStudy;
90     bool CreateActor(VISU_Actor* theActor, const Handle(SALOME_InteractiveObject)& theIO = NULL);
91
92   public:
93     virtual void Update();
94     virtual const char* GetComment() const = 0;
95     virtual QString GenerateName() = 0;
96     virtual Storable* Restore(const Storable::TRestoringMap& theMap, int theBuilding = true)
97       throw(std::logic_error&);
98     virtual void ToStream(std::ostringstream& theStr);
99     virtual VISU_Actor* CreateActor(const Handle(SALOME_InteractiveObject)& theIO = NULL) = 0;
100     virtual void UpdateActor(VISU_Actor* theActor);
101     MapperType* GetMapper() const { return myMapper;}
102     Result_i* GetResult() const { return myResult; }
103   };
104
105
106   //==============================================================================
107   class Mesh_i : public virtual POA_VISU::Mesh,
108                  public virtual Prs3d_i
109   {
110     static int myNbPresent;
111     Mesh_i();
112     Mesh_i(const Mesh_i&);
113   public:
114     Mesh_i(Result_i* theResult);
115     virtual void SameAs(const Mesh_i* theOrigin);
116     virtual ~Mesh_i();
117     virtual void Destroy();
118
119     virtual VISU::VISUType GetType() { return VISU::TMESH;};
120
121     virtual void SetCellColor(const SALOMEDS::Color& theColor) { SetColor(theColor);}
122     virtual SALOMEDS::Color GetCellColor() { return GetColor();}
123
124     virtual void SetNodeColor(const SALOMEDS::Color& theColor) { myNodeColor = theColor;}
125     virtual SALOMEDS::Color GetNodeColor() { return myNodeColor;}
126
127     virtual void SetLinkColor(const SALOMEDS::Color& theColor) { myLinkColor = theColor;}
128     virtual SALOMEDS::Color GetLinkColor() { return myLinkColor;}
129
130     virtual void SetPresentationType(VISU::PresentationType theType) { myPresentType = theType;}
131     virtual PresentationType GetPresentationType() { return myPresentType;}
132
133     typedef VISU::Mesh InterfaceType;
134     typedef vtkUnstructuredGridReader InputType;
135
136   protected:
137     Storable* Build(int theRestoring);
138
139     InputType *myInput;
140     VISU::VISUType myType;
141     string myMeshName;
142     int myEntity;
143     string mySubMeshName;
144     struct SALOMEDS::Color myNodeColor, myLinkColor;
145     VISU::PresentationType myPresentType;
146
147   public:
148     virtual Storable* Create(const char* theMeshName, int theEntity);
149     virtual Storable* Create(const char* theMeshName, int theEntity, const char* theFamilyName);
150     virtual Storable* Create(const char* theMeshName, const char* theGroupName);
151     virtual Storable* Restore(const Storable::TRestoringMap& theMap, int theBuilding = true)
152       throw(std::logic_error&);
153     virtual void ToStream(std::ostringstream& theStr);
154     static const string myComment;
155     virtual const char* GetComment() const;
156     virtual QString GenerateName();
157     virtual VISU_Actor* CreateActor(const Handle(SALOME_InteractiveObject)& theIO = NULL);
158     virtual void UpdateActor(VISU_Actor* theActor);
159     virtual InputType* GetInput() const { return myInput;}
160   };
161   Storable* MeshRestore(SALOMEDS::SObject_ptr theSObject, 
162                         const string& thePrefix, const Storable::TRestoringMap& theMap)
163     throw(std::logic_error&);
164
165
166   //==============================================================================
167   class ScalarMap_i : public virtual POA_VISU::ScalarMap,
168                       public virtual Prs3d_i
169   {
170     static int myNbPresent;
171     ScalarMap_i();
172     ScalarMap_i(const ScalarMap_i&);
173
174   public:
175     ScalarMap_i(Result_i* theResult, bool theAddToStudy = true);
176     virtual void SameAs(const ScalarMap_i* theOrigin);
177     virtual ~ScalarMap_i();
178     virtual void Destroy();
179
180     virtual VISU::VISUType GetType() { return VISU::TSCALARMAP;};
181
182     virtual void SetScalarMode(CORBA::Long theScalarMode);
183     virtual CORBA::Long GetScalarMode() { return myScalarMode;}
184
185     virtual void SetScaling(VISU::Scaling theScaling);
186     virtual VISU::Scaling GetScaling();
187
188     virtual void SetRange(CORBA::Double theMin, CORBA::Double theMax);
189     virtual CORBA::Double GetMin() { return myScalarRange[0];}  
190     virtual CORBA::Double GetMax() { return myScalarRange[1];}
191
192     virtual void SetOrientation(VISU::ScalarMap::Orientation theOrientation) { 
193       myOrientation = theOrientation;
194     }
195     virtual VISU::ScalarMap::Orientation GetOrientation() { return myOrientation;}
196
197     virtual void SetPosition(CORBA::Double X, CORBA::Double Y) { myPosition[0] = X; myPosition[1] = Y;}
198     virtual CORBA::Double GetPosX() { return myPosition[0];} 
199     virtual CORBA::Double GetPosY() { return myPosition[1];}
200       
201     virtual void SetSize(CORBA::Double theWidth, CORBA::Double theHeight) { 
202       myWidth = theWidth; myHeight = theHeight;
203     }
204     virtual CORBA::Double GetWidth() { return myWidth;}  
205     virtual CORBA::Double GetHeight() { return myHeight;}
206
207     virtual void SetNbColors(CORBA::Long theNbColors) { myNumberOfColors = theNbColors;}
208     virtual CORBA::Long GetNbColors() { return myNumberOfColors;}
209
210     virtual void SetLabels(CORBA::Long theNbLabels) { myNumberOfLabels = theNbLabels;}
211     virtual CORBA::Long GetLabels() { return myNumberOfLabels;}
212     
213     virtual void SetTitle(const char* theName) { myTitle = theName;}
214     virtual char* GetTitle() { return CORBA::string_dup(myTitle.c_str());}
215
216     virtual void CalculateRange();
217     virtual void GetFieldRange(float theRange[2]);
218     virtual bool isRangeFixed() { return myIsFixedRange; }
219     
220     virtual double GetIteration() { return myIteration; }
221
222     typedef VISU::ScalarMap InterfaceType;
223     typedef VISU_Extractor InputType;
224
225   protected:
226     Storable* Build(int theRestoring);
227     virtual DataType* DoHook(int theRestoring);
228
229     InputType *myInput;
230     
231     string myMeshName;
232     int myEntity;
233     string myFieldName;
234     int myScalarMode;
235     double myIteration;
236     VISU_LookupTable *myMapperTable, *myBarTable;
237     VISU_FieldTransform *myFieldTransform;
238     const TField* myField;
239     
240     float myScalarRange[2];
241     bool myIsFixedRange;
242     bool myIsColored;
243     VISU::Scaling myScaling;
244     float myMapScale;
245
246     string myTitle;
247     VISU::ScalarMap::Orientation myOrientation;
248     int myNumberOfColors, myNumberOfLabels;
249     float myPosition[2], myWidth, myHeight;
250
251   public:
252     virtual Storable* Create(const char* theMeshName, VISU::Entity theEntity, 
253                              const char* theFieldName, double theIteration);
254     virtual Storable* Restore(const Storable::TRestoringMap& theMap, int theBuilding = true)
255       throw(std::logic_error&);
256     static const string myComment;
257     virtual const char* GetComment() const;
258     virtual QString GenerateName();
259     virtual void ToStream(std::ostringstream& theStr);
260     static int IsPossible(Result_i* theResult, const char* theMeshName, VISU::Entity theEntity, 
261                           const char* theFieldName, double theIteration);
262     InputType* GetInput() { return myInput;}
263
264     const VISU::TField*  GetField() const { return myField;}
265     const string&  GetFieldName() const { return myFieldName;}
266     int GetScalarMode() const { return myScalarMode;}
267     virtual void SetMapScale(double theMapScale = 1.0);
268
269     virtual VISU_Actor* CreateActor(const Handle(SALOME_InteractiveObject)& theIO = NULL);
270     virtual void UpdateActor(VISU_Actor* theActor);
271   };
272   Storable* ScalarMapRestore(SALOMEDS::SObject_ptr theSObject, 
273                              const string& thePrefix, const Storable::TRestoringMap& theMap)
274     throw(std::logic_error&);
275
276
277   //==============================================================================
278   class DeformedShape_i : public virtual POA_VISU::DeformedShape,
279                           public virtual ScalarMap_i
280   {
281     static int myNbPresent;
282     DeformedShape_i();
283     DeformedShape_i(const DeformedShape_i&);
284   public:
285     DeformedShape_i(Result_i* theResult, bool theAddToStudy = true);
286     virtual void SameAs(const DeformedShape_i* theOrigin);
287     virtual ~DeformedShape_i();
288     virtual void Destroy();
289
290     virtual VISU::VISUType GetType() { return VISU::TDEFORMEDSHAPE;};
291
292     virtual void SetScale(CORBA::Double theScale) { myFactor = theScale;}
293     virtual CORBA::Double GetScale() { return myFactor;}
294
295     typedef VISU::DeformedShape InterfaceType;
296
297     virtual bool isColored() { return myIsColored; }
298     virtual void setColored(bool theColor) { myIsColored = theColor; }
299     virtual void SetColor(const SALOMEDS::Color& theColor);
300
301   protected:
302     virtual DataType* DoHook(int theRestoring);
303     float myFactor;
304     vtkWarpVector *myWarpVector;
305
306   public:
307     virtual Storable* Create(const char* theMeshName, VISU::Entity theEntity, 
308                              const char* theFieldName, double theIteration);
309     virtual Storable* Restore(const Storable::TRestoringMap& theMap, int theBuilding = true)
310       throw(std::logic_error&);
311     static const string myComment;
312     virtual const char* GetComment() const;
313     virtual QString GenerateName();
314     virtual void Update();
315     virtual void ToStream(std::ostringstream& theStr);
316     static int IsPossible(Result_i* theResult, const char* theMeshName, VISU::Entity theEntity, 
317                           const char* theFieldName, double theIteration);
318     float ScaleFactor();
319     virtual void SetMapScale(double theMapScale = 1.0);
320
321     virtual VISU_Actor* CreateActor(const Handle(SALOME_InteractiveObject)& theIO = NULL);
322     virtual void UpdateActor(VISU_Actor* theActor);
323   };
324   Storable* DeformedShapeRestore(SALOMEDS::SObject_ptr theSObject, 
325                                  const string& thePrefix, const Storable::TRestoringMap& theMap)
326     throw(std::logic_error&);
327
328
329
330
331   //==============================================================================
332   class CutPlanes_i : public virtual POA_VISU::CutPlanes,
333                       public virtual ScalarMap_i
334   {
335     static int myNbPresent;
336     CutPlanes_i();
337     CutPlanes_i(const CutPlanes_i&);
338   public:
339     CutPlanes_i(Result_i* theResult, bool theAddToStudy = true);
340     virtual void SameAs(const CutPlanes_i* theOrigin);
341     virtual ~CutPlanes_i();
342     virtual void Destroy();
343
344     virtual VISU::VISUType GetType() { return VISU::TCUTPLANES;};
345
346     virtual void SetOrientationType(VISU::CutPlanes::Orientation theOrient) { 
347       myBasePlane = theOrient;
348     }
349     virtual VISU::CutPlanes::Orientation GetOrientationType() { return myBasePlane;}
350
351     virtual void SetDisplacement(CORBA::Double theDisp) { myDisplacement = theDisp;}
352     virtual CORBA::Double GetDisplacement() { return myDisplacement;}
353
354     virtual void SetNbPlanes(CORBA::Long theNb) { myNbPlanes = theNb;}
355     virtual CORBA::Long GetNbPlanes() { return myNbPlanes;}
356     
357     virtual void SetRotateX(CORBA::Double theAngle);
358     virtual CORBA::Double GetRotateX();
359     virtual void SetRotateY(CORBA::Double theAngle);
360     virtual CORBA::Double GetRotateY();
361     
362     typedef VISU::CutPlanes InterfaceType;
363
364   protected:
365     virtual DataType* DoHook(int theRestoring);
366
367     int myNbPlanes;
368     float myAng[3], myDisplacement;
369     vtkAppendPolyData *myAppendPolyData;
370     VISU::CutPlanes::Orientation myBasePlane;
371
372   public:
373     virtual Storable* Create(const char* theMeshName, VISU::Entity theEntity, 
374                              const char* theFieldName, double theIteration);
375     virtual Storable* Restore(const Storable::TRestoringMap& theMap, int theBuilding = true)
376       throw(std::logic_error&);
377     static const string myComment;
378     virtual const char* GetComment() const;
379     virtual QString GenerateName();
380     virtual void Update();
381     virtual void ToStream(std::ostringstream& theStr);
382     static int IsPossible(Result_i* theResult, const char* theMeshName, VISU::Entity theEntity, 
383                           const char* theFieldName, double theIteration);
384     void SetPlane(int theId);
385   };
386   Storable* CutPlanesRestore(SALOMEDS::SObject_ptr theSObject, 
387                              const string& thePrefix, const Storable::TRestoringMap& theMap)
388     throw(std::logic_error&);
389
390
391
392   //==============================================================================
393   class CutLines_i : public virtual POA_VISU::CutLines,
394                      public virtual ScalarMap_i
395   {
396     static int myNbPresent;
397     CutLines_i();
398     CutLines_i(const CutPlanes_i&);
399   public:
400     CutLines_i(Result_i* theResult, bool theAddToStudy = true);
401     virtual void SameAs(const CutLines_i* theOrigin);
402     virtual ~CutLines_i();
403     virtual void Destroy();
404
405     virtual VISU::VISUType GetType() { return VISU::TCUTLINES;};
406
407     virtual void SetOrientationType(VISU::CutPlanes::Orientation theOrient) { 
408       myBasePlane[0] = theOrient;
409     }
410     virtual VISU::CutPlanes::Orientation GetOrientationType() { return myBasePlane[0];}
411
412     virtual void SetOrientationType2(VISU::CutPlanes::Orientation theOrient) { 
413       myBasePlane[1] = theOrient;
414     }
415     virtual VISU::CutPlanes::Orientation GetOrientationType2() { return myBasePlane[1];}
416
417     virtual void SetDisplacement(CORBA::Double theDisp) { myDisplacement[0] = theDisp;}
418     virtual CORBA::Double GetDisplacement() { return myDisplacement[0];}
419     virtual void SetDisplacement2(CORBA::Double theDisp) { myDisplacement[1] = theDisp;}
420     virtual CORBA::Double GetDisplacement2() { return myDisplacement[1];}
421
422     virtual void SetNbLines(CORBA::Long theNb) { myNbLines = theNb;}
423     virtual CORBA::Long GetNbLines() { return myNbLines;}
424     
425     virtual void SetRotateX(CORBA::Double theAngle);
426     virtual CORBA::Double GetRotateX();
427     virtual void SetRotateY(CORBA::Double theAngle);
428     virtual CORBA::Double GetRotateY();
429
430     virtual void SetRotateX2(CORBA::Double theAngle);
431     virtual CORBA::Double GetRotateX2();
432     virtual void SetRotateY2(CORBA::Double theAngle);
433     virtual CORBA::Double GetRotateY2();
434
435     typedef VISU::CutLines InterfaceType;
436
437   protected:
438     virtual DataType* DoHook(int theRestoring);
439
440     int myNbLines;
441     vtkAppendPolyData *myAppendPolyData;
442     float myAng[2][3], myDisplacement[2];
443     VISU::CutPlanes::Orientation myBasePlane[2];
444     float myDirLn[3], myBoundPrjLn[3], myBasePnt[3];
445
446   public:
447     virtual Storable* Create(const char* theMeshName, VISU::Entity theEntity, 
448                              const char* theFieldName, double theIteration);
449     virtual Storable* Restore(const Storable::TRestoringMap& theMap, int theBuilding = true)
450       throw(std::logic_error&);
451     void BuildTableOfReal(SALOMEDS::SObject_ptr theSObject);
452     static const string myComment;
453     virtual const char* GetComment() const;
454     virtual QString GenerateName();
455     virtual void Update();
456     virtual void ToStream(std::ostringstream& theStr);
457     static int IsPossible(Result_i* theResult, const char* theMeshName, VISU::Entity theEntity, 
458                           const char* theFieldName, double theIteration);
459   };
460   Storable* CutLinesRestore(SALOMEDS::SObject_ptr theSObject, 
461                             const string& thePrefix, const Storable::TRestoringMap& theMap)
462     throw(std::logic_error&);
463
464
465
466   //==============================================================================
467   class IsoSurfaces_i : public virtual POA_VISU::IsoSurfaces,
468                         public virtual ScalarMap_i
469   {
470     static int myNbPresent;
471     IsoSurfaces_i();
472     IsoSurfaces_i(const IsoSurfaces_i&);
473   public:
474     IsoSurfaces_i(Result_i* theResult, bool theAddToStudy = true);
475     virtual void SameAs(const IsoSurfaces_i* theOrigin);
476     virtual ~IsoSurfaces_i();
477     virtual void Destroy();
478
479     virtual VISU::VISUType GetType() { return VISU::TISOSURFACE;};
480
481     virtual void SetNbSurfaces(CORBA::Long theNb) { myNbSurface = theNb;}
482     virtual CORBA::Long GetNbSurfaces() { return myNbSurface;}
483
484     virtual void SetRange(float theMin, float theMax);
485     virtual float GetRangeMin() { return myRange[0]; }
486     virtual float GetRangeMax() { return myRange[1]; }
487
488     typedef VISU::IsoSurfaces InterfaceType;
489
490   protected:
491     virtual DataType* DoHook(int theRestoring);
492
493     vtkContourFilter *myContourFilter;
494     int myNbSurface;
495     float myRange[2];
496
497   public:
498     virtual Storable* Create(const char* theMeshName, VISU::Entity theEntity, 
499                              const char* theFieldName, double theIteration);
500     virtual Storable* Restore(const Storable::TRestoringMap& theMap, int theBuilding = true)
501       throw(std::logic_error&);
502     static const string myComment;
503     virtual const char* GetComment() const;
504     virtual QString GenerateName();
505     virtual void Update();
506     virtual void ToStream(std::ostringstream& theStr);
507     static int IsPossible(Result_i* theResult, const char* theMeshName, VISU::Entity theEntity, 
508                           const char* theFieldName, double theIteration);
509     virtual void SetMapScale(double theMapScale = 1.0);
510   };
511   Storable* IsoSurfacesRestore(SALOMEDS::SObject_ptr theSObject, 
512                                const string& thePrefix, const Storable::TRestoringMap& theMap)
513     throw(std::logic_error&);
514
515
516
517   //==============================================================================
518   class StreamLines_i : public virtual POA_VISU::StreamLines,
519                         public virtual DeformedShape_i
520   {
521     static int myNbPresent;
522     StreamLines_i();
523     StreamLines_i(const StreamLines_i&);
524   public:
525     StreamLines_i(Result_i* theResult, bool theAddToStudy = true);
526     virtual void SameAs(const StreamLines_i* theOriginal);
527     virtual ~StreamLines_i();
528     virtual void Destroy();
529
530     virtual VISU::VISUType GetType() { return VISU::TSTREAMLINES;}
531
532     typedef VISU::StreamLines InterfaceType;
533
534     virtual void SetDirection(VISU::StreamLines::Direction theDirection) 
535     { myDirection = theDirection; }
536     virtual VISU::StreamLines::Direction GetDirection() { return myDirection;}
537
538     virtual void SetStepLength(CORBA::Double theStep) { myStepLength = theStep; }
539     virtual CORBA::Double GetStepLength() { return myStepLength; }
540
541     virtual void SetPropagationTime(CORBA::Double theTime) { myPropagationTime = theTime; }
542     virtual CORBA::Double GetPropagationTime() { return myPropagationTime; }
543
544     virtual void SetIntegrationStep(CORBA::Double theStep) { myIntegrationStep = theStep; }
545     virtual CORBA::Double GetIntegrationStep() { return myIntegrationStep; }
546
547     virtual void SetSource(VISU::Prs3d_ptr thePrs3d);
548     virtual VISU::Prs3d_ptr GetSource();
549
550     virtual void SetUsedPoints(CORBA::Double thePercents) { myPercents = thePercents; }
551     virtual CORBA::Double GetUsedPoints() { return myPercents; }
552
553   protected:
554     virtual DataType* DoHook(int theRestoring);
555     vtkStreamLine* myStream;
556
557     VISU::StreamLines::Direction myDirection;
558     float myStepLength;
559     float myIntegrationStep;
560     float myPropagationTime;
561     string mySourceEntry;
562     VISU::Prs3d_i* myPrs3di;
563     float myPercents;
564
565   public:
566     virtual Storable* Create(const char* theMeshName, VISU::Entity theEntity, 
567                              const char* theFieldName, double theIteration);
568     virtual Storable* Restore(const Storable::TRestoringMap& theMap, int theBuilding = true)
569       throw(std::logic_error&);
570     static const string myComment;
571     virtual const char* GetComment() const;
572     virtual QString GenerateName();
573     
574     virtual float GetMinIntegrationStep();
575     virtual float GetMaxIntegrationStep();
576     virtual float GetBasePropagationTime();
577
578     virtual void Update();
579     virtual QString GetSourceEntry() { return QString(mySourceEntry.c_str()); }
580     virtual void ToStream(std::ostringstream& theStr);
581     static int IsPossible(Result_i* theResult, const char* theMeshName, VISU::Entity theEntity, 
582                           const char* theFieldName, double theIteration);
583   };
584   Storable* StreamLinesRestore(SALOMEDS::SObject_ptr theSObject, 
585                                const string& thePrefix, const Storable::TRestoringMap& theMap)
586     throw(std::logic_error&);
587
588
589   //==============================================================================
590   class Vectors_i : public virtual POA_VISU::Vectors,
591                     public virtual DeformedShape_i
592   {
593     static int myNbPresent;
594     Vectors_i();
595     Vectors_i(const Vectors_i&);
596   public:
597     Vectors_i(Result_i* theResult, bool theAddToStudy = true);
598     virtual void SameAs(const Vectors_i* theOrigin);
599     virtual ~Vectors_i();
600     virtual void Destroy();
601
602     virtual VISU::VISUType GetType() { return VISU::TVECTORS;};
603
604     virtual void SetLineWidth(CORBA::Double theWidth) { myLineWidth = theWidth;}
605     virtual CORBA::Double GetLineWidth() { return myLineWidth;}
606
607     virtual void SetGlyphType(VISU::Vectors::GlyphType theType) { myTypeGlyph = theType;}
608     virtual VISU::Vectors::GlyphType GetGlyphType() { return myTypeGlyph;}
609     
610     virtual void SetGlyphPos(VISU::Vectors::GlyphPos thePos) { myPosGlyph = thePos;}
611     virtual VISU::Vectors::GlyphPos GetGlyphPos() { return myPosGlyph;}
612
613     typedef VISU::Vectors InterfaceType;
614
615   protected:
616     virtual DataType* DoHook(int theRestoring);
617
618     float myLineWidth;
619     VISU::Vectors::GlyphType myTypeGlyph;
620     VISU::Vectors::GlyphPos myPosGlyph;
621     vtkGlyph3D *myGlyph;
622     vtkHedgeHog *myHog;
623
624   public:
625     virtual Storable* Create(const char* theMeshName, VISU::Entity theEntity, 
626                              const char* theFieldName, double theIteration);
627     virtual Storable* Restore(const Storable::TRestoringMap& theMap, int theBuilding = true)
628       throw(std::logic_error&);
629     static const string myComment;
630     virtual const char* GetComment() const;
631     virtual QString GenerateName();
632     virtual void Update();
633     virtual void ToStream(std::ostringstream& theStr);
634     static int IsPossible(Result_i* theResult, const char* theMeshName, VISU::Entity theEntity, 
635                           const char* theFieldName, double theIteration);
636     virtual VISU_Actor* CreateActor(const Handle(SALOME_InteractiveObject)& theIO = NULL);
637     virtual void UpdateActor(VISU_Actor* theActor);
638   };
639   Storable* VectorsRestore(SALOMEDS::SObject_ptr theSObject, 
640                            const string& thePrefix, const Storable::TRestoringMap& theMap)
641     throw(std::logic_error&);
642   //==============================================================================
643 }
644 #endif
645
646