]> SALOME platform Git repositories - modules/visu.git/blob - src/OBJECT/VISU_ScalarMapAct.h
Salome HOME
f16e6ada2d8cd1b0929d562deb39226d210278fd
[modules/visu.git] / src / OBJECT / VISU_ScalarMapAct.h
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_ScalarMapAct.h
24 //  Author : Laurent CORNABE with help of Nicolas REJNERI
25 //  Module : VISU
26 //  $Header$
27 //
28 #ifndef VISU_ScalarMapAct_HeaderFile
29 #define VISU_ScalarMapAct_HeaderFile
30
31 #include "VISU_OBJECT.h"
32 #include "VISU_DataSetActor.h"
33
34 class VISU_ScalarBarActor;
35 class VISU_PointsDeviceActor;
36
37
38 //----------------------------------------------------------------------------
39 class VISU_OBJECT_EXPORT VISU_ScalarMapAct : public VISU_DataSetActor 
40 {
41  public:
42   vtkTypeMacro(VISU_ScalarMapAct,VISU_DataSetActor);
43
44   static
45   VISU_ScalarMapAct* 
46   New();
47
48   ~VISU_ScalarMapAct();
49
50   //! Copies all properties from the given actor
51   virtual
52   void
53   DeepCopy(VISU_Actor *theActor);
54
55   virtual
56   void
57   ShallowCopyPL(VISU_PipeLine* thePipeLine);
58
59   //! Apply view transformation
60   virtual
61   void
62   SetTransform(VTKViewer_Transform* theTransform); 
63
64   virtual
65   vtkProperty* 
66   GetEdgeProperty(); 
67
68   virtual
69   void
70   SetShrinkable(bool theIsShrinkable);
71
72   virtual
73   void
74   SetShrinkFactor(vtkFloatingPointType theFactor = 0.8); 
75
76   virtual
77   void
78   SetShrink(); 
79
80   virtual
81   void
82   UnShrink(); 
83
84   virtual
85     EQuadratic2DRepresentation GetQuadratic2DRepresentation() const;
86   
87   virtual void 
88     SetQuadratic2DRepresentation( EQuadratic2DRepresentation theMode );
89
90   
91   virtual
92   void
93   SetFeatureEdgesAllowed(bool theIsFeatureEdgesAllowed);
94
95   virtual
96   void
97   SetFeatureEdgesEnabled(bool theIsFeatureEdgesEnabled);
98
99   virtual
100   void
101   SetFeatureEdgesAngle(vtkFloatingPointType theAngle = 30.0); 
102
103   virtual
104   void
105   SetFeatureEdgesFlags(bool theIsFeatureEdges,
106                        bool theIsBoundaryEdges,
107                        bool theIsManifoldEdges,
108                        bool theIsNonManifoldEdges);
109
110   virtual
111   void
112   SetFeatureEdgesColoring(bool theIsColoring);
113
114   virtual
115   void
116   SetOpacity(vtkFloatingPointType theValue);
117
118   virtual
119   vtkFloatingPointType
120   GetOpacity();
121
122   virtual
123   void
124   SetLineWidth(vtkFloatingPointType theLineWidth);
125
126   virtual
127   vtkFloatingPointType
128   GetLineWidth();
129
130   virtual
131   void
132   AddToRender(vtkRenderer* theRenderer); 
133
134   virtual
135   int
136   RenderOpaqueGeometry(vtkViewport *ren);
137
138   virtual
139   int
140   RenderTranslucentGeometry(vtkViewport *ren);
141
142   virtual
143   void
144   RemoveFromRender(vtkRenderer* theRenderer);
145
146   virtual
147   void
148   SetVisibility(int theMode);
149
150   virtual
151   int
152   GetBarVisibility();
153
154   virtual
155   VISU_ScalarBarActor* 
156   GetScalarBar();
157
158   virtual
159   void
160   SetBarVisibility(bool theMode);
161
162   virtual
163   void
164   SetRepresentation(int theMode);
165
166   virtual
167   void
168   SetShading(bool theOn = true);
169
170   virtual
171   bool
172   IsShading();
173
174   //! Gets memory size used by the instance (bytes).
175   virtual
176   unsigned long int
177   GetMemorySize();
178  
179  protected:
180   VISU_ScalarMapAct();
181
182   virtual 
183   void
184   SetMapperInput(vtkDataSet* theDataSet);
185
186   bool myBarVisibility;
187   VISU_ScalarBarActor* myScalarBar;
188
189   VISU_PointsDeviceActor* myPointsActor;
190   SVTK_DeviceActor*    mySurfaceActor;
191   SVTK_DeviceActor*    myEdgeActor;
192 };
193 //----------------------------------------------------------------------------
194
195
196 #endif