Salome HOME
Issue 0020904: [CEA 411] export VTK in GEOM
[modules/geom.git] / src / OBJECT / GEOM_AssemblyBuilder.h
1 //  Copyright (C) 2007-2010  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 //  GEOM OBJECT : interactive object for Geometry entities visualization
24 //  File   : GEOM_AssemblyBuilder.h
25 //  Author : Christophe ATTANASIO
26 //  Module : GEOM
27 //  $Header$
28 //
29 #include "GEOM_OBJECT_defs.hxx"
30
31 class vtkProperty;
32 class vtkAssembly;
33 class vtkActorCollection;
34
35 // Open CASCADE Inlcudes
36 #include <TopoDS.hxx>
37 #include <TopoDS_Shape.hxx>
38
39 class GEOM_OBJECT_EXPORT GEOM_AssemblyBuilder {
40
41  private:
42
43   static void InitProperties(vtkProperty* IsoProp,
44                              vtkProperty* FaceProp,
45                              vtkProperty* EdgeFProp,
46                              vtkProperty* EdgeSProp,
47                              vtkProperty* EdgeIProp,
48                              vtkProperty* VertexProp,
49                              vtkProperty* IsoPVProp,
50                              vtkProperty* EdgePVProp,
51                              vtkProperty* VertePVProp);
52
53  public:
54
55
56   //------------------------------------------------------------------
57   // WARNING! Poor graphic performance :-(  use BuildActors instead
58   //------------------------------------------------------------------
59  
60   static vtkAssembly* BuildAssembly(const TopoDS_Shape& myShape,
61                                     Standard_Real deflection,
62                                     Standard_Integer amode,
63                                     Standard_Boolean forced);
64
65   //------------------------------------------------------------------
66   // Good performance
67   //------------------------------------------------------------------
68
69   static vtkActorCollection* BuildActors(const TopoDS_Shape& myShape,
70                                          Standard_Real deflection,
71                                          Standard_Integer amode,
72                                          Standard_Boolean forced,
73                                          Standard_Boolean isVector = Standard_False);
74
75
76   //------------------------------------------------------------------
77   // Change mode - Not implemented !!
78   //------------------------------------------------------------------
79
80   static void SwitchDisplayMode(vtkAssembly* mySALOMEAssembly);
81   static void SwitchDisplayMode(vtkActorCollection* mySALOMEActors);
82
83   //------------------------------------------------------------------
84   // Erase/Display - Not implemented !!
85   //------------------------------------------------------------------
86
87   static void DisplayErase(vtkAssembly* mySALOMEAssembly);
88   static void DisplayErase(vtkActorCollection* mySALOMEActors);
89
90
91 };