00001 // Copyright (C) 2007-2011 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_VERTEXSOURCE_H 00021 #define GEOM_VERTEXSOURCE_H 00022 00023 #include "OCC2VTK.h" 00024 00025 #include <TopoDS_Vertex.hxx> 00026 #include <NCollection_Set.hxx> 00027 00028 typedef NCollection_Set<TopoDS_Vertex> TVertexSet; 00029 00030 #include <vtkPoints.h> 00031 #include <vtkPolyDataSource.h> 00032 00033 class OCC2VTK_EXPORT GEOM_VertexSource: public vtkPolyDataSource 00034 { 00035 public: 00036 vtkTypeMacro(GEOM_VertexSource,vtkPolyDataSource); 00037 static GEOM_VertexSource* New(); 00038 00039 void AddVertex(const TopoDS_Vertex& theVertex); 00040 void Clear(){ myVertexSet.Clear();} 00041 00042 static 00043 void OCC2VTK(const TopoDS_Vertex& theVertex, 00044 vtkPolyData* thePolyData, 00045 vtkPoints* thePts); 00046 00047 protected: 00048 TVertexSet myVertexSet; 00049 00050 void Execute(); 00051 00052 GEOM_VertexSource(); 00053 ~GEOM_VertexSource(); 00054 00055 private: 00056 // Not implememnted 00057 GEOM_VertexSource(const GEOM_VertexSource&); 00058 void operator=(const GEOM_VertexSource&); 00059 }; 00060 00061 00062 #endif //GEOM_VERTEXSOURCE_H