Back to index

salome-geom  6.5.0
GEOM_FaceSource.h
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // This library is free software; you can redistribute it and/or
00004 // modify it under the terms of the GNU Lesser General Public
00005 // License as published by the Free Software Foundation; either
00006 // version 2.1 of the License.
00007 //
00008 // This library is distributed in the hope that it will be useful,
00009 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00010 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011 // Lesser General Public License for more details.
00012 //
00013 // You should have received a copy of the GNU Lesser General Public
00014 // License along with this library; if not, write to the Free Software
00015 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00016 //
00017 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00018 //
00019 
00020 #ifndef GEOM_FACESOURCE_H 
00021 #define GEOM_FACESOURCE_H 
00022  
00023 #include "OCC2VTK.h" 
00024 
00025 #include <gp_Pnt.hxx>
00026 #include <TopoDS_Face.hxx> 
00027 #include <NCollection_Set.hxx> 
00028  
00029 typedef NCollection_Set<TopoDS_Face> TFaceSet; 
00030  
00031 #include <vtkPoints.h> 
00032 #include <vtkPolyDataSource.h> 
00033 
00034 class OCC2VTK_EXPORT GEOM_FaceSource: public vtkPolyDataSource 
00035 { 
00036 public: 
00037   vtkTypeMacro(GEOM_FaceSource,vtkPolyDataSource); 
00038  
00039   void AddFace(const TopoDS_Face& theFace); 
00040   void Clear(){ myFaceSet.Clear();} 
00041   bool IsEmpty(){return myFaceSet.IsEmpty();}
00042  
00043 protected: 
00044   TFaceSet myFaceSet; 
00045  
00046   static 
00047   void MoveTo(gp_Pnt thePnt, 
00048               vtkPoints* thePts);
00049   static 
00050   void DrawTo(gp_Pnt thePnt,
00051               vtkPolyData* thePolyData,
00052               vtkPoints* thePts); 
00053  
00054   GEOM_FaceSource(); 
00055   ~GEOM_FaceSource(); 
00056  
00057 private: 
00058   // Not implememnted 
00059   GEOM_FaceSource(const GEOM_FaceSource&); 
00060   void operator=(const GEOM_FaceSource&); 
00061 }; 
00062  
00063  
00064 #endif //GEOM_FACESOURCE_H