Salome HOME
73cbea3c8de19cc22e5c8abdb2ef36c55eda4cd7
[modules/geom.git] / src / OCC2VTK / GEOM_VertexSource.h
1 // Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20 #ifndef GEOM_VERTEXSOURCE_H 
21 #define GEOM_VERTEXSOURCE_H 
22  
23 #include "OCC2VTK.h" 
24  
25 #include <TopoDS_Vertex.hxx> 
26 #include <NCollection_Set.hxx> 
27  
28 typedef NCollection_Set<TopoDS_Vertex> TVertexSet; 
29  
30 #include <vtkPoints.h> 
31 #include <vtkPolyDataAlgorithm.h> 
32
33 class vtkPolyData;
34
35 class OCC2VTK_EXPORT GEOM_VertexSource: public vtkPolyDataAlgorithm
36
37 public: 
38   vtkTypeMacro(GEOM_VertexSource,vtkPolyDataAlgorithm); 
39   static GEOM_VertexSource* New(); 
40  
41   void AddVertex(const TopoDS_Vertex& theVertex); 
42   void Clear(){ myVertexSet.Clear();} 
43  
44   static  
45   void OCC2VTK(const TopoDS_Vertex& theVertex,  
46                vtkPolyData* thePolyData, 
47                vtkPoints* thePts); 
48  
49 protected: 
50   TVertexSet myVertexSet; 
51  
52   virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
53  
54   GEOM_VertexSource(); 
55   ~GEOM_VertexSource(); 
56  
57 private: 
58   // Not implememnted 
59   GEOM_VertexSource(const GEOM_VertexSource&); 
60   void operator=(const GEOM_VertexSource&); 
61 }; 
62  
63  
64 #endif //GEOM_VERTEXSOURCE_H