1 // Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 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
22 // GEOM OBJECT : interactive object for Geometry entities visualization
23 // File : GEOM_AssemblyBuilder.h
24 // Author : Christophe ATTANASIO
28 #include "GEOM_OBJECT_defs.hxx"
30 #include <vtkAssembly.h>
31 #include <vtkPropAssembly.h>
32 #include <vtkActorCollection.h>
34 // Open CASCADE Inlcudes
36 #include <TopoDS_Shape.hxx>
38 class GEOM_OBJECT_EXPORT GEOM_AssemblyBuilder {
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);
52 static void MeshShape(const TopoDS_Shape myShape,
53 Standard_Real deflection,
54 Standard_Boolean forced);
60 //------------------------------------------------------------------
61 // WARNING! Poor graphic performance :-( use BuildActors instead
62 //------------------------------------------------------------------
64 static vtkAssembly* BuildAssembly(const TopoDS_Shape& myShape,
65 Standard_Real deflection,
66 Standard_Integer amode,
67 Standard_Boolean forced);
69 //------------------------------------------------------------------
71 //------------------------------------------------------------------
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);
80 //------------------------------------------------------------------
81 // Change mode - Not implemented !!
82 //------------------------------------------------------------------
84 static void SwitchDisplayMode(vtkAssembly* mySALOMEAssembly);
85 static void SwitchDisplayMode(vtkActorCollection* mySALOMEActors);
87 //------------------------------------------------------------------
88 // Erase/Display - Not implemented !!
89 //------------------------------------------------------------------
91 static void DisplayErase(vtkAssembly* mySALOMEAssembly);
92 static void DisplayErase(vtkActorCollection* mySALOMEActors);