Salome HOME
Merge from V5_1_4_BR 07/05/2010
[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   static void MeshShape(const TopoDS_Shape myShape,
54                         Standard_Real deflection,
55                         Standard_Boolean forced);
56
57
58  public:
59
60
61   //------------------------------------------------------------------
62   // WARNING! Poor graphic performance :-(  use BuildActors instead
63   //------------------------------------------------------------------
64  
65   static vtkAssembly* BuildAssembly(const TopoDS_Shape& myShape,
66                                     Standard_Real deflection,
67                                     Standard_Integer amode,
68                                     Standard_Boolean forced);
69
70   //------------------------------------------------------------------
71   // Good performance
72   //------------------------------------------------------------------
73
74   static vtkActorCollection* BuildActors(const TopoDS_Shape& myShape,
75                                          Standard_Real deflection,
76                                          Standard_Integer amode,
77                                          Standard_Boolean forced,
78                                          Standard_Boolean isVector = Standard_False);
79
80
81   //------------------------------------------------------------------
82   // Change mode - Not implemented !!
83   //------------------------------------------------------------------
84
85   static void SwitchDisplayMode(vtkAssembly* mySALOMEAssembly);
86   static void SwitchDisplayMode(vtkActorCollection* mySALOMEActors);
87
88   //------------------------------------------------------------------
89   // Erase/Display - Not implemented !!
90   //------------------------------------------------------------------
91
92   static void DisplayErase(vtkAssembly* mySALOMEAssembly);
93   static void DisplayErase(vtkActorCollection* mySALOMEActors);
94
95
96 };