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