Version: 9.16.0
SVTK_DeviceActor.h
Go to the documentation of this file.
1// Copyright (C) 2007-2026 CEA, EDF, 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, or (at your option) any later version.
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// SVTK OBJECT : interactive object for SVTK visualization
24// File : SVTK_DeviceActor.h
25// Author :
26
27#ifndef SVTK_DEVICE_ACTOR_H
28#define SVTK_DEVICE_ACTOR_H
29
30#include "SVTK.h"
31#include "VTKViewer.h"
32#include "VTKViewer_Actor.h"
33#include "VTKViewer_MarkerDef.h"
34
35#include <vector>
36
37#include <vtkLODActor.h>
38#include <vtkProperty.h>
39
43
44class vtkCell;
45class vtkDataSet;
46class vtkShrinkFilter;
47class vtkFeatureEdges;
49class vtkPassThrough;
50class vtkAlgorithmOutput;
51
52#ifdef WIN32
53#pragma warning ( disable:4251 )
54#endif
55
57{
58 public:
60
61 static
63 New();
64
66 virtual
67 void
68 SetTransform(VTKViewer_Transform* theTransform);
69
71 virtual
72 void
73 SetMapper(vtkMapper* theMapper);
74
76 virtual
77 vtkDataSet*
78 GetInput();
79
81 virtual
82 void
83 SetInputData(vtkDataSet* theDataSet);
84
86 virtual
87 void
88 SetInputConnection(vtkAlgorithmOutput* theAlgorithmOutput);
89
92 virtual
93 vtkIdType
94 GetNodeObjId(vtkIdType theVtkID);
95
96 virtual
97 double*
98 GetNodeCoord(vtkIdType theObjID);
99
100 virtual
101 vtkIdType
102 GetElemObjId(vtkIdType theVtkID);
103
104 virtual
105 vtkCell*
106 GetElemCell(vtkIdType theObjID);
107
109 virtual
110 void
111 SetStoreMapping(bool theStoreMapping);
113
114 virtual
116 GetMTime();
117
120 double
121 GetShrinkFactor();
122
123 virtual
124 void
125 SetShrinkFactor(double value);
126
127 virtual
128 void
129 SetShrinkable(bool theIsShrinkable);
130
131 bool
132 IsShrunkable();
133
134 bool
135 IsShrunk();
136
137 virtual
138 void
139 SetShrink();
140
141 virtual
142 void
143 UnShrink();
145
148 virtual
149 bool
150 IsFeatureEdgesAllowed();
151
152 virtual
153 void
154 SetFeatureEdgesAllowed(bool theIsFeatureEdgesAllowed);
155
156 virtual
157 bool
158 IsFeatureEdgesEnabled();
159
160 virtual
161 void
162 SetFeatureEdgesEnabled(bool theIsFeatureEdgesEnabled);
163
164 virtual
165 double
166 GetFeatureEdgesAngle();
167
168 virtual
169 void
170 SetFeatureEdgesAngle(double theAngle);
171
172 virtual
173 void
174 GetFeatureEdgesFlags(bool& theIsFeatureEdges,
175 bool& theIsBoundaryEdges,
176 bool& theIsManifoldEdges,
177 bool& theIsNonManifoldEdges);
178 virtual
179 void
180 SetFeatureEdgesFlags(bool theIsFeatureEdges,
181 bool theIsBoundaryEdges,
182 bool theIsManifoldEdges,
183 bool theIsNonManifoldEdges);
184
185 virtual
186 bool
187 GetFeatureEdgesColoring();
188
189 virtual
190 void
191 SetFeatureEdgesColoring(bool theIsColoring);
193
195 virtual
196 void
197 SetRepresentation(VTKViewer::Representation::Type theMode);
198
200 GetRepresentation();
201
202 virtual
203 double
204 GetDefaultPointSize();
205
206 virtual
207 double
208 GetDefaultLineWidth();
209
210 bool
211 IsShaded();
212
213 void
214 SetShaded(bool theShaded);
216
218 void
219 SetBallEnabled( bool );
220
222 void
223 SetMarkerEnabled( bool );
224
225 void
226 SetBallScale( double );
227
228 void
229 SetMarkerStd( VTK::MarkerType, VTK::MarkerScale );
230
231 void
232 SetMarkerTexture( int, VTK::MarkerTexture );
233
235 GetMarkerType();
236
238 GetMarkerScale();
239
240 int
241 GetMarkerTexture();
243
244 virtual
245 void
246 Render(vtkRenderer *, vtkMapper *);
247
248 VTKViewer_DataSetMapper* GetDataSetMapper();
249
250 //----------------------------------------------------------------------------
252 virtual void SetQuadraticArcMode(bool theFlag);
253 virtual bool GetQuadraticArcMode();
254
255 virtual void SetQuadraticArcAngle(double theMaxAngle);
256 virtual double GetQuadraticArcAngle();
257
258 virtual
259 void
260 SetCoincident3DAllowed(bool theIsFeatureEdgesAllowed);
261
262 virtual
263 bool
264 IsCoincident3DAllowed() const;
265
266 void
267 SetResolveCoincidentTopology(bool theIsResolve);
268
269
270
271 protected:
273 vtkProperty *myProperty;
275
277 void
278 InitPipeLine(vtkMapper* theMapper);
279
282 std::vector<vtkPassThrough*> myPassFilter;
284 vtkFeatureEdges* myFeatureEdges;
286
289
292
296
297 void SetPolygonOffsetParameters(double factor,
298 double units);
299 void GetPolygonOffsetParameters(double& factor,
300 double& units);
301
304
305 private:
306 SVTK_DeviceActor(const SVTK_DeviceActor&); // Not implemented
307 void operator=(const SVTK_DeviceActor&); // Not implemented
308
309};
310
311#ifdef WIN32
312#pragma warning ( default:4251 )
313#endif
314
315#endif //SVTK_DEVICE_ACTOR_H
#define SVTK_EXPORT
Definition: SVTK.h:37
unsigned long int vtkMTimeType
Definition: VTKViewer.h:42
Definition: SVTK_DeviceActor.h:57
bool myIsShaded
Definition: SVTK_DeviceActor.h:274
bool myIsShrunk
Definition: SVTK_DeviceActor.h:288
vtkFeatureEdges * myFeatureEdges
Definition: SVTK_DeviceActor.h:284
double myPolygonOffsetFactor
Definition: SVTK_DeviceActor.h:294
bool myIsShrinkable
Definition: SVTK_DeviceActor.h:287
double myPolygonOffsetUnits
Definition: SVTK_DeviceActor.h:295
SVTK_DeviceActor(const SVTK_DeviceActor &)
std::vector< vtkPassThrough * > myPassFilter
Definition: SVTK_DeviceActor.h:282
VTKViewer::Representation::Type myRepresentation
Definition: SVTK_DeviceActor.h:272
bool myIsFeatureEdgesEnabled
Definition: SVTK_DeviceActor.h:291
vtkShrinkFilter * myShrinkFilter
Definition: SVTK_DeviceActor.h:283
vtkProperty * myProperty
Definition: SVTK_DeviceActor.h:273
void operator=(const SVTK_DeviceActor &)
VTKViewer_TransformFilter * myTransformFilter
Definition: SVTK_DeviceActor.h:281
bool myIsResolveCoincidentTopology
Definition: SVTK_DeviceActor.h:293
vtkTypeMacro(SVTK_DeviceActor, vtkLODActor) static SVTK_DeviceActor *New()
bool myIsFeatureEdgesAllowed
Definition: SVTK_DeviceActor.h:290
VTKViewer_GeometryFilter * myGeomFilter
Definition: SVTK_DeviceActor.h:280
VTKViewer_DataSetMapper * myMapper
Definition: SVTK_DeviceActor.h:285
Definition: VTKViewer_DataSetMapper.h:29
This class used same as vtkGeometryFilter. See documentation on VTK for more information.
Definition: VTKViewer_GeometryFilter.h:42
Definition: VTKViewer_TransformFilter.h:34
Describes linear transformations via a 4x4 matrix.
Definition: VTKViewer_Transform.h:34
For more information see VTK documentation
std::list< unsigned short > MarkerTexture
Definition: VTKViewer_MarkerDef.h:60