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