]> SALOME platform Git repositories - modules/visu.git/blob - src/VISU_I/VISU_PrsObject_i.hh
Salome HOME
sources v1.2
[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     virtual void Update();
265     const VISU::TField*  GetField() const { return myField;}
266     const string&  GetFieldName() const { return myFieldName;}
267     int GetScalarMode() const { return myScalarMode;}
268     virtual void SetMapScale(double theMapScale = 1.0);
269
270     virtual VISU_Actor* CreateActor(const Handle(SALOME_InteractiveObject)& theIO = NULL);
271     virtual void UpdateActor(VISU_Actor* theActor);
272   };
273   Storable* ScalarMapRestore(SALOMEDS::SObject_ptr theSObject, 
274                              const string& thePrefix, const Storable::TRestoringMap& theMap)
275     throw(std::logic_error&);
276
277
278   //==============================================================================
279   class DeformedShape_i : public virtual POA_VISU::DeformedShape,
280                           public virtual ScalarMap_i
281   {
282     static int myNbPresent;
283     DeformedShape_i();
284     DeformedShape_i(const DeformedShape_i&);
285   public:
286     DeformedShape_i(Result_i* theResult, bool theAddToStudy = true);
287     virtual void SameAs(const DeformedShape_i* theOrigin);
288     virtual ~DeformedShape_i();
289     virtual void Destroy();
290
291     virtual VISU::VISUType GetType() { return VISU::TDEFORMEDSHAPE;};
292
293     virtual void SetScale(CORBA::Double theScale) { myFactor = theScale;}
294     virtual CORBA::Double GetScale() { return myFactor;}
295
296     typedef VISU::DeformedShape InterfaceType;
297
298     virtual bool isColored() { return myIsColored; }
299     virtual void setColored(bool theColor) { myIsColored = theColor; }
300     virtual void SetColor(const SALOMEDS::Color& theColor);
301
302   protected:
303     virtual DataType* DoHook(int theRestoring);
304     float myFactor;
305     vtkWarpVector *myWarpVector;
306
307   public:
308     virtual Storable* Create(const char* theMeshName, VISU::Entity theEntity, 
309                              const char* theFieldName, double theIteration);
310     virtual Storable* Restore(const Storable::TRestoringMap& theMap, int theBuilding = true)
311       throw(std::logic_error&);
312     static const string myComment;
313     virtual const char* GetComment() const;
314     virtual QString GenerateName();
315     virtual void Update();
316     virtual void ToStream(std::ostringstream& theStr);
317     static int IsPossible(Result_i* theResult, const char* theMeshName, VISU::Entity theEntity, 
318                           const char* theFieldName, double theIteration);
319     float ScaleFactor();
320     virtual void SetMapScale(double theMapScale = 1.0);
321
322     virtual VISU_Actor* CreateActor(const Handle(SALOME_InteractiveObject)& theIO = NULL);
323     virtual void UpdateActor(VISU_Actor* theActor);
324   };
325   Storable* DeformedShapeRestore(SALOMEDS::SObject_ptr theSObject, 
326                                  const string& thePrefix, const Storable::TRestoringMap& theMap)
327     throw(std::logic_error&);
328
329
330
331
332   //==============================================================================
333   class CutPlanes_i : public virtual POA_VISU::CutPlanes,
334                       public virtual ScalarMap_i
335   {
336     static int myNbPresent;
337     CutPlanes_i();
338     CutPlanes_i(const CutPlanes_i&);
339   public:
340     CutPlanes_i(Result_i* theResult, bool theAddToStudy = true);
341     virtual void SameAs(const CutPlanes_i* theOrigin);
342     virtual ~CutPlanes_i();
343     virtual void Destroy();
344
345     virtual VISU::VISUType GetType() { return VISU::TCUTPLANES;};
346
347     virtual void SetOrientationType(VISU::CutPlanes::Orientation theOrient) { 
348       myBasePlane = theOrient;
349     }
350     virtual VISU::CutPlanes::Orientation GetOrientationType() { return myBasePlane;}
351
352     virtual void SetDisplacement(CORBA::Double theDisp) { myDisplacement = theDisp;}
353     virtual CORBA::Double GetDisplacement() { return myDisplacement;}
354
355     virtual void SetNbPlanes(CORBA::Long theNb) { myNbPlanes = theNb;}
356     virtual CORBA::Long GetNbPlanes() { return myNbPlanes;}
357     
358     virtual void SetRotateX(CORBA::Double theAngle);
359     virtual CORBA::Double GetRotateX();
360     virtual void SetRotateY(CORBA::Double theAngle);
361     virtual CORBA::Double GetRotateY();
362     
363     typedef VISU::CutPlanes InterfaceType;
364
365   protected:
366     virtual DataType* DoHook(int theRestoring);
367
368     int myNbPlanes;
369     float myAng[3], myDisplacement;
370     vtkAppendPolyData *myAppendPolyData;
371     VISU::CutPlanes::Orientation myBasePlane;
372
373   public:
374     virtual Storable* Create(const char* theMeshName, VISU::Entity theEntity, 
375                              const char* theFieldName, double theIteration);
376     virtual Storable* Restore(const Storable::TRestoringMap& theMap, int theBuilding = true)
377       throw(std::logic_error&);
378     static const string myComment;
379     virtual const char* GetComment() const;
380     virtual QString GenerateName();
381     virtual void Update();
382     virtual void ToStream(std::ostringstream& theStr);
383     static int IsPossible(Result_i* theResult, const char* theMeshName, VISU::Entity theEntity, 
384                           const char* theFieldName, double theIteration);
385     void SetPlane(int theId);
386   };
387   Storable* CutPlanesRestore(SALOMEDS::SObject_ptr theSObject, 
388                              const string& thePrefix, const Storable::TRestoringMap& theMap)
389     throw(std::logic_error&);
390
391
392
393   //==============================================================================
394   class CutLines_i : public virtual POA_VISU::CutLines,
395                      public virtual ScalarMap_i
396   {
397     static int myNbPresent;
398     CutLines_i();
399     CutLines_i(const CutPlanes_i&);
400   public:
401     CutLines_i(Result_i* theResult, bool theAddToStudy = true);
402     virtual void SameAs(const CutLines_i* theOrigin);
403     virtual ~CutLines_i();
404     virtual void Destroy();
405
406     virtual VISU::VISUType GetType() { return VISU::TCUTLINES;};
407
408     virtual void SetOrientationType(VISU::CutPlanes::Orientation theOrient) { 
409       myBasePlane[0] = theOrient;
410     }
411     virtual VISU::CutPlanes::Orientation GetOrientationType() { return myBasePlane[0];}
412
413     virtual void SetOrientationType2(VISU::CutPlanes::Orientation theOrient) { 
414       myBasePlane[1] = theOrient;
415     }
416     virtual VISU::CutPlanes::Orientation GetOrientationType2() { return myBasePlane[1];}
417
418     virtual void SetDisplacement(CORBA::Double theDisp) { myDisplacement[0] = theDisp;}
419     virtual CORBA::Double GetDisplacement() { return myDisplacement[0];}
420     virtual void SetDisplacement2(CORBA::Double theDisp) { myDisplacement[1] = theDisp;}
421     virtual CORBA::Double GetDisplacement2() { return myDisplacement[1];}
422
423     virtual void SetNbLines(CORBA::Long theNb) { myNbLines = theNb;}
424     virtual CORBA::Long GetNbLines() { return myNbLines;}
425     
426     virtual void SetRotateX(CORBA::Double theAngle);
427     virtual CORBA::Double GetRotateX();
428     virtual void SetRotateY(CORBA::Double theAngle);
429     virtual CORBA::Double GetRotateY();
430
431     virtual void SetRotateX2(CORBA::Double theAngle);
432     virtual CORBA::Double GetRotateX2();
433     virtual void SetRotateY2(CORBA::Double theAngle);
434     virtual CORBA::Double GetRotateY2();
435
436     typedef VISU::CutLines InterfaceType;
437
438   protected:
439     virtual DataType* DoHook(int theRestoring);
440
441     int myNbLines;
442     vtkAppendPolyData *myAppendPolyData;
443     float myAng[2][3], myDisplacement[2];
444     VISU::CutPlanes::Orientation myBasePlane[2];
445     float myDirLn[3], myBoundPrjLn[3], myBasePnt[3];
446
447   public:
448     virtual Storable* Create(const char* theMeshName, VISU::Entity theEntity, 
449                              const char* theFieldName, double theIteration);
450     virtual Storable* Restore(const Storable::TRestoringMap& theMap, int theBuilding = true)
451       throw(std::logic_error&);
452     void BuildTableOfReal(SALOMEDS::SObject_ptr theSObject);
453     static const string myComment;
454     virtual const char* GetComment() const;
455     virtual QString GenerateName();
456     virtual void Update();
457     virtual void ToStream(std::ostringstream& theStr);
458     static int IsPossible(Result_i* theResult, const char* theMeshName, VISU::Entity theEntity, 
459                           const char* theFieldName, double theIteration);
460   };
461   Storable* CutLinesRestore(SALOMEDS::SObject_ptr theSObject, 
462                             const string& thePrefix, const Storable::TRestoringMap& theMap)
463     throw(std::logic_error&);
464
465
466
467   //==============================================================================
468   class IsoSurfaces_i : public virtual POA_VISU::IsoSurfaces,
469                         public virtual ScalarMap_i
470   {
471     static int myNbPresent;
472     IsoSurfaces_i();
473     IsoSurfaces_i(const IsoSurfaces_i&);
474   public:
475     IsoSurfaces_i(Result_i* theResult, bool theAddToStudy = true);
476     virtual void SameAs(const IsoSurfaces_i* theOrigin);
477     virtual ~IsoSurfaces_i();
478     virtual void Destroy();
479
480     virtual VISU::VISUType GetType() { return VISU::TISOSURFACE;};
481
482     virtual void SetNbSurfaces(CORBA::Long theNb) { myNbSurface = theNb;}
483     virtual CORBA::Long GetNbSurfaces() { return myNbSurface;}
484
485     virtual void SetRange(float theMin, float theMax);
486     virtual float GetRangeMin() { return myRange[0]; }
487     virtual float GetRangeMax() { return myRange[1]; }
488
489     typedef VISU::IsoSurfaces InterfaceType;
490
491   protected:
492     virtual DataType* DoHook(int theRestoring);
493
494     vtkContourFilter *myContourFilter;
495     int myNbSurface;
496     float myRange[2];
497
498   public:
499     virtual Storable* Create(const char* theMeshName, VISU::Entity theEntity, 
500                              const char* theFieldName, double theIteration);
501     virtual Storable* Restore(const Storable::TRestoringMap& theMap, int theBuilding = true)
502       throw(std::logic_error&);
503     static const string myComment;
504     virtual const char* GetComment() const;
505     virtual QString GenerateName();
506     virtual void Update();
507     virtual void ToStream(std::ostringstream& theStr);
508     static int IsPossible(Result_i* theResult, const char* theMeshName, VISU::Entity theEntity, 
509                           const char* theFieldName, double theIteration);
510     virtual void SetMapScale(double theMapScale = 1.0);
511   };
512   Storable* IsoSurfacesRestore(SALOMEDS::SObject_ptr theSObject, 
513                                const string& thePrefix, const Storable::TRestoringMap& theMap)
514     throw(std::logic_error&);
515
516
517
518   //==============================================================================
519   class StreamLines_i : public virtual POA_VISU::StreamLines,
520                         public virtual DeformedShape_i
521   {
522     static int myNbPresent;
523     StreamLines_i();
524     StreamLines_i(const StreamLines_i&);
525   public:
526     StreamLines_i(Result_i* theResult, bool theAddToStudy = true);
527     virtual void SameAs(const StreamLines_i* theOriginal);
528     virtual ~StreamLines_i();
529     virtual void Destroy();
530
531     virtual VISU::VISUType GetType() { return VISU::TSTREAMLINES;}
532
533     typedef VISU::StreamLines InterfaceType;
534
535     virtual void SetDirection(VISU::StreamLines::Direction theDirection) 
536     { myDirection = theDirection; }
537     virtual VISU::StreamLines::Direction GetDirection() { return myDirection;}
538
539     virtual void SetStepLength(CORBA::Double theStep) { myStepLength = theStep; }
540     virtual CORBA::Double GetStepLength() { return myStepLength; }
541
542     virtual void SetPropagationTime(CORBA::Double theTime) { myPropagationTime = theTime; }
543     virtual CORBA::Double GetPropagationTime() { return myPropagationTime; }
544
545     virtual void SetIntegrationStep(CORBA::Double theStep) { myIntegrationStep = theStep; }
546     virtual CORBA::Double GetIntegrationStep() { return myIntegrationStep; }
547
548     virtual void SetSource(VISU::Prs3d_ptr thePrs3d);
549     virtual VISU::Prs3d_ptr GetSource();
550
551     virtual void SetUsedPoints(CORBA::Double thePercents) { myPercents = thePercents; }
552     virtual CORBA::Double GetUsedPoints() { return myPercents; }
553
554   protected:
555     virtual DataType* DoHook(int theRestoring);
556     vtkStreamLine* myStream;
557
558     VISU::StreamLines::Direction myDirection;
559     float myStepLength;
560     float myIntegrationStep;
561     float myPropagationTime;
562     string mySourceEntry;
563     VISU::Prs3d_i* myPrs3di;
564     float myPercents;
565
566   public:
567     virtual Storable* Create(const char* theMeshName, VISU::Entity theEntity, 
568                              const char* theFieldName, double theIteration);
569     virtual Storable* Restore(const Storable::TRestoringMap& theMap, int theBuilding = true)
570       throw(std::logic_error&);
571     static const string myComment;
572     virtual const char* GetComment() const;
573     virtual QString GenerateName();
574     
575     virtual float GetMinIntegrationStep();
576     virtual float GetMaxIntegrationStep();
577     virtual float GetBasePropagationTime();
578
579     virtual void Update();
580     virtual QString GetSourceEntry() { return QString(mySourceEntry.c_str()); }
581     virtual void ToStream(std::ostringstream& theStr);
582     static int IsPossible(Result_i* theResult, const char* theMeshName, VISU::Entity theEntity, 
583                           const char* theFieldName, double theIteration);
584   };
585   Storable* StreamLinesRestore(SALOMEDS::SObject_ptr theSObject, 
586                                const string& thePrefix, const Storable::TRestoringMap& theMap)
587     throw(std::logic_error&);
588
589
590   //==============================================================================
591   class Vectors_i : public virtual POA_VISU::Vectors,
592                     public virtual DeformedShape_i
593   {
594     static int myNbPresent;
595     Vectors_i();
596     Vectors_i(const Vectors_i&);
597   public:
598     Vectors_i(Result_i* theResult, bool theAddToStudy = true);
599     virtual void SameAs(const Vectors_i* theOrigin);
600     virtual ~Vectors_i();
601     virtual void Destroy();
602
603     virtual VISU::VISUType GetType() { return VISU::TVECTORS;};
604
605     virtual void SetLineWidth(CORBA::Double theWidth) { myLineWidth = theWidth;}
606     virtual CORBA::Double GetLineWidth() { return myLineWidth;}
607
608     virtual void SetGlyphType(VISU::Vectors::GlyphType theType) { myTypeGlyph = theType;}
609     virtual VISU::Vectors::GlyphType GetGlyphType() { return myTypeGlyph;}
610     
611     virtual void SetGlyphPos(VISU::Vectors::GlyphPos thePos) { myPosGlyph = thePos;}
612     virtual VISU::Vectors::GlyphPos GetGlyphPos() { return myPosGlyph;}
613
614     typedef VISU::Vectors InterfaceType;
615
616   protected:
617     virtual DataType* DoHook(int theRestoring);
618
619     float myLineWidth;
620     VISU::Vectors::GlyphType myTypeGlyph;
621     VISU::Vectors::GlyphPos myPosGlyph;
622     vtkGlyph3D *myGlyph;
623     vtkHedgeHog *myHog;
624
625   public:
626     virtual Storable* Create(const char* theMeshName, VISU::Entity theEntity, 
627                              const char* theFieldName, double theIteration);
628     virtual Storable* Restore(const Storable::TRestoringMap& theMap, int theBuilding = true)
629       throw(std::logic_error&);
630     static const string myComment;
631     virtual const char* GetComment() const;
632     virtual QString GenerateName();
633     virtual void Update();
634     virtual void ToStream(std::ostringstream& theStr);
635     static int IsPossible(Result_i* theResult, const char* theMeshName, VISU::Entity theEntity, 
636                           const char* theFieldName, double theIteration);
637     virtual VISU_Actor* CreateActor(const Handle(SALOME_InteractiveObject)& theIO = NULL);
638     virtual void UpdateActor(VISU_Actor* theActor);
639   };
640   Storable* VectorsRestore(SALOMEDS::SObject_ptr theSObject, 
641                            const string& thePrefix, const Storable::TRestoringMap& theMap)
642     throw(std::logic_error&);
643   //==============================================================================
644 }
645 #endif
646
647