Salome HOME
Update copyright information
[modules/visu.git] / src / PIPELINE / VISU_VectorsPL.hxx
1 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // Copyright (C) 2003-2007  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.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22
23 //  VISU OBJECT : interactive object for VISU entities implementation
24 // File:    VISU_PipeLine.hxx
25 // Author:  Alexey PETROV
26 // Module : VISU
27 //
28 #ifndef VISU_VectorsPL_HeaderFile
29 #define VISU_VectorsPL_HeaderFile
30
31 #include "VISUPipeline.hxx"
32 #include "VISU_DeformedShapePL.hxx"
33
34 class VTKViewer_TransformFilter;
35 class VTKViewer_Transform;
36 class VTKViewer_CellCenters;
37
38 class vtkGlyphSource2D;
39 class vtkConeSource;
40 class vtkLineSource;
41
42 class vtkGlyph3D;
43
44 class VISU_UsedPointsFilter;
45
46 //----------------------------------------------------------------------------
47 class VISU_PIPELINE_EXPORT VISU_VectorsPL : public VISU_DeformedShapePL
48 {
49 public:
50   vtkTypeMacro(VISU_VectorsPL, VISU_DeformedShapePL);
51
52   static
53   VISU_VectorsPL* 
54   New();
55
56   virtual
57   unsigned long int 
58   GetMTime();
59
60   //----------------------------------------------------------------------------
61   virtual
62   void
63   SetScale(vtkFloatingPointType theScale);
64
65   virtual
66   vtkFloatingPointType
67   GetScale();
68
69   enum GlyphType{ ARROW, CONE2, CONE6, NONE};
70
71   virtual
72   void
73   SetGlyphType(GlyphType theType);
74
75   virtual
76   GlyphType
77   GetGlyphType() const;
78     
79   enum GlyphPos{ CENTER, TAIL,HEAD};
80
81   virtual
82   void
83   SetGlyphPos(GlyphPos thePos);
84
85   virtual
86   GlyphPos
87   GetGlyphPos() const;
88
89 public:
90   virtual
91   void
92   Init();
93
94   virtual
95   void
96   Build();
97
98   virtual
99   void
100   Update();
101
102   //! Gets memory size used by the instance (bytes).
103   virtual
104   unsigned long int
105   GetMemorySize();
106
107   vtkDataSet* 
108   GetOutput();
109
110   virtual
111   void
112   SetTransform(VTKViewer_Transform* theTransform); 
113
114   virtual
115   VTKViewer_Transform* 
116   GetTransform();
117   
118   virtual
119   void
120   SetMapScale(vtkFloatingPointType theMapScale = 1.0);
121
122 protected:
123   VISU_VectorsPL();
124
125   virtual
126   ~VISU_VectorsPL();
127
128   virtual
129   vtkDataSet* 
130   InsertCustomPL();
131
132   virtual
133   void
134   DoShallowCopy(VISU_PipeLine *thePipeLine,
135                 bool theIsCopyInput);
136
137   GlyphType myTypeGlyph;
138   GlyphPos myPosGlyph;
139   vtkGlyph3D *myGlyph;
140
141   vtkGlyphSource2D *myGlyphSource;
142   vtkLineSource *myLineSource;
143   vtkConeSource *myConeSource;
144
145   VTKViewer_CellCenters* myCenters;
146   VTKViewer_TransformFilter *myTransformFilter;
147
148   VISU_UsedPointsFilter* myUsedPointsFilter;
149
150 private:
151   VISU_VectorsPL(const VISU_VectorsPL&);  // Not implemented.
152   void operator=(const VISU_VectorsPL&);  // Not implemented.
153 };
154
155
156 #endif