1 // GEOM OBJECT : interactive object for Geometry entities visualization
3 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
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.
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.
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
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
24 // File : GEOM_AssemblyBuilder.h
25 // Author : Christophe ATTANASIO
29 #include <vtkAssembly.h>
30 #include <vtkPropAssembly.h>
31 #include <vtkActorCollection.h>
33 // Open CASCADE Inlcudes
35 #include <TopoDS_Shape.hxx>
38 #include <SALOME_WNT.hxx>
40 #define SALOME_WNT_EXPORT
43 class SALOME_WNT_EXPORT GEOM_AssemblyBuilder {
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);
57 static void MeshShape(const TopoDS_Shape myShape,
58 Standard_Real deflection,
59 Standard_Boolean forced);
65 //------------------------------------------------------------------
66 // WARNING! Poor graphic performance :-( use BuildActors instead
67 //------------------------------------------------------------------
69 static vtkAssembly* BuildAssembly(const TopoDS_Shape& myShape,
70 Standard_Real deflection,
71 Standard_Integer amode,
72 Standard_Boolean forced);
74 //------------------------------------------------------------------
76 //------------------------------------------------------------------
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);
85 //------------------------------------------------------------------
86 // Change mode - Not implemented !!
87 //------------------------------------------------------------------
89 static void SwitchDisplayMode(vtkAssembly* mySALOMEAssembly);
90 static void SwitchDisplayMode(vtkActorCollection* mySALOMEActors);
92 //------------------------------------------------------------------
93 // Erase/Display - Not implemented !!
94 //------------------------------------------------------------------
96 static void DisplayErase(vtkAssembly* mySALOMEAssembly);
97 static void DisplayErase(vtkActorCollection* mySALOMEActors);