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