]> SALOME platform Git repositories - modules/visu.git/blob - src/PIPELINE/VISU_VectorsPL.hxx
Salome HOME
Join modifications from branch OCC_debug_for_3_2_0b1
[modules/visu.git] / src / PIPELINE / VISU_VectorsPL.hxx
1 //  VISU OBJECT : interactive object for VISU entities implementation
2 //
3 //  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
5 // 
6 //  This library is free software; you can redistribute it and/or 
7 //  modify it under the terms of the GNU Lesser General Public 
8 //  License as published by the Free Software Foundation; either 
9 //  version 2.1 of the License. 
10 // 
11 //  This library is distributed in the hope that it will be useful, 
12 //  but WITHOUT ANY WARRANTY; without even the implied warranty of 
13 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
14 //  Lesser General Public License for more details. 
15 // 
16 //  You should have received a copy of the GNU Lesser General Public 
17 //  License along with this library; if not, write to the Free Software 
18 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
19 // 
20 //  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
21 //
22 //
23 // File:    VISU_PipeLine.hxx
24 // Author:  Alexey PETROV
25 // Module : VISU
26
27 #ifndef VISU_VectorsPL_HeaderFile
28 #define VISU_VectorsPL_HeaderFile
29
30 #include "VISU_DeformedShapePL.hxx"
31
32 class VTKViewer_TransformFilter;
33 class VTKViewer_Transform;
34 class vtkCellCenters;
35
36 class vtkGlyphSource2D;
37 class vtkConeSource;
38 class vtkLineSource;
39
40 class vtkGlyph3D;
41
42 class VISU_VectorsPL : public VISU_DeformedShapePL
43 {
44 protected:
45   VISU_VectorsPL();
46   VISU_VectorsPL(const VISU_VectorsPL&);
47
48   virtual
49   ~VISU_VectorsPL();
50
51 public:
52   vtkTypeMacro(VISU_VectorsPL,VISU_DeformedShapePL);
53
54   static
55   VISU_VectorsPL* 
56   New();
57
58   virtual
59   void
60   ShallowCopy(VISU_PipeLine *thePipeLine);
61
62   virtual
63   void
64   SetScale(vtkFloatingPointType theScale);
65
66   virtual
67   vtkFloatingPointType
68   GetScale();
69
70   enum GlyphType{ ARROW, CONE2, CONE6, NONE};
71
72   virtual
73   void
74   SetGlyphType(GlyphType theType) 
75   {
76     myTypeGlyph = theType;
77   }
78
79   virtual
80   GlyphType
81   GetGlyphType() 
82   {
83     return myTypeGlyph;
84   }
85     
86   enum GlyphPos{ CENTER, TAIL,HEAD};
87
88   virtual
89   void
90   SetGlyphPos(GlyphPos thePos) 
91   { 
92     myPosGlyph = thePos;
93   }
94
95   virtual
96   GlyphPos
97   GetGlyphPos() 
98   {
99     return myPosGlyph;
100   }
101
102 public:
103   virtual
104   void
105   Init();
106
107   virtual
108   void
109   Update();
110
111   vtkDataSet* 
112   GetOutput();
113
114   virtual
115   void
116   SetTransform(VTKViewer_Transform* theTransform); 
117
118   virtual
119   VTKViewer_Transform* 
120   GetTransform();
121   
122   virtual
123   void
124   SetMapScale(vtkFloatingPointType theMapScale = 1.0);
125
126 protected:
127   virtual
128   THook* 
129   DoHook();
130
131   GlyphType myTypeGlyph;
132   GlyphPos myPosGlyph;
133   vtkGlyph3D *myBaseGlyph;
134   vtkGlyph3D *myTransformedGlyph;
135
136   vtkGlyphSource2D *myGlyphSource;
137   vtkLineSource *myLineSource;
138   vtkConeSource *myConeSource;
139
140   vtkCellCenters* myCenters;
141   VTKViewer_TransformFilter *myTransformFilter;
142 };
143
144
145 #endif