Salome HOME
PAL12874: Object Vector. Provide a possibility to display a vector with arrow on...
[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.salome-platform.org/ or email : webmaster.salome@opencascade.com
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 #ifdef WNT
38 #include <SALOME_WNT.hxx>
39 #else
40 #define SALOME_WNT_EXPORT
41 #endif
42
43 class SALOME_WNT_EXPORT GEOM_AssemblyBuilder {
44
45  private:
46
47   static void InitProperties(vtkProperty* IsoProp,
48                              vtkProperty* FaceProp,
49                              vtkProperty* EdgeFProp,
50                              vtkProperty* EdgeSProp,
51                              vtkProperty* EdgeIProp,
52                              vtkProperty* VertexProp,
53                              vtkProperty* IsoPVProp,
54                              vtkProperty* EdgePVProp,
55                              vtkProperty* VertePVProp);
56
57   static void MeshShape(const TopoDS_Shape myShape,
58                         Standard_Real deflection,
59                         Standard_Boolean forced);
60
61
62  public:
63
64
65   //------------------------------------------------------------------
66   // WARNING! Poor graphic performance :-(  use BuildActors instead
67   //------------------------------------------------------------------
68  
69   static vtkAssembly* BuildAssembly(const TopoDS_Shape& myShape,
70                                     Standard_Real deflection,
71                                     Standard_Integer amode,
72                                     Standard_Boolean forced);
73
74   //------------------------------------------------------------------
75   // Good performance
76   //------------------------------------------------------------------
77
78   static vtkActorCollection* BuildActors(const TopoDS_Shape& myShape,
79                                          Standard_Real deflection,
80                                          Standard_Integer amode,
81                                          Standard_Boolean forced,
82                                          Standard_Boolean isVector = Standard_False);
83
84
85   //------------------------------------------------------------------
86   // Change mode - Not implemented !!
87   //------------------------------------------------------------------
88
89   static void SwitchDisplayMode(vtkAssembly* mySALOMEAssembly);
90   static void SwitchDisplayMode(vtkActorCollection* mySALOMEActors);
91
92   //------------------------------------------------------------------
93   // Erase/Display - Not implemented !!
94   //------------------------------------------------------------------
95
96   static void DisplayErase(vtkAssembly* mySALOMEAssembly);
97   static void DisplayErase(vtkActorCollection* mySALOMEActors);
98
99
100 };