Salome HOME
Salome 5x Impossible to create true cone
[modules/geom.git] / src / OBJECT / GEOM_FaceSource.h
1 #ifndef GEOM_FACESOURCE_H 
2 #define GEOM_FACESOURCE_H 
3  
4 #include "GEOM_DeviceActor.h" 
5  
6 #include <gp_Pnt.hxx>
7 #include <TopoDS_Face.hxx> 
8 #include <NCollection_Set.hxx> 
9  
10 typedef NCollection_Set<TopoDS_Face> TFaceSet; 
11  
12 #include <vtkPolyDataSource.h> 
13  
14 class GEOM_FaceSource; 
15 typedef GEOM_SmartPtr<GEOM_FaceSource> PFaceSource; 
16  
17  
18 class VTK_EXPORT GEOM_FaceSource: public vtkPolyDataSource 
19
20 public: 
21   vtkTypeMacro(GEOM_FaceSource,vtkPolyDataSource); 
22  
23   void AddFace(const TopoDS_Face& theFace); 
24   void Clear(){ myFaceSet.Clear();} 
25  
26 protected: 
27   TFaceSet myFaceSet; 
28  
29   static 
30   void MoveTo(gp_Pnt thePnt, 
31               vtkPoints* thePts);
32   static 
33   void DrawTo(gp_Pnt thePnt,
34               vtkPolyData* thePolyData,
35               vtkPoints* thePts); 
36  
37   GEOM_FaceSource(); 
38   ~GEOM_FaceSource(); 
39  
40 private: 
41   // Not implememnted 
42   GEOM_FaceSource(const GEOM_FaceSource&); 
43   void operator=(const GEOM_FaceSource&); 
44 }; 
45  
46  
47 #endif //GEOM_FACESOURCE_H