00001 // Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE 00002 // 00003 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, 00004 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 00005 // 00006 // This library is free software; you can redistribute it and/or 00007 // modify it under the terms of the GNU Lesser General Public 00008 // License as published by the Free Software Foundation; either 00009 // version 2.1 of the License. 00010 // 00011 // This library is distributed in the hope that it will be useful, 00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 // Lesser General Public License for more details. 00015 // 00016 // You should have received a copy of the GNU Lesser General Public 00017 // License along with this library; if not, write to the Free Software 00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00019 // 00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com 00021 // 00022 00023 // SMESH SMDS : implementaion of Salome mesh data structure 00024 // 00025 #ifndef _SMDS_PolygonalFaceOfNodes_HeaderFile 00026 #define _SMDS_PolygonalFaceOfNodes_HeaderFile 00027 00028 #include "SMESH_SMDS.hxx" 00029 00030 #include "SMDS_MeshFace.hxx" 00031 //#include "SMDS_FaceOfNodes.hxx" 00032 #include "SMDS_MeshNode.hxx" 00033 #include "SMDS_Iterator.hxx" 00034 00035 #include <iostream> 00036 00037 //class SMDS_PolygonalFaceOfNodes:public SMDS_FaceOfNodes 00038 class SMDS_EXPORT SMDS_PolygonalFaceOfNodes:public SMDS_MeshFace 00039 { 00040 public: 00041 SMDS_PolygonalFaceOfNodes (std::vector<const SMDS_MeshNode *> nodes); 00042 00043 virtual SMDSAbs_ElementType GetType() const; 00044 virtual SMDSAbs_EntityType GetEntityType() const { return SMDSEntity_Polygon; } 00045 virtual bool IsPoly() const { return true; }; 00046 00047 bool ChangeNodes (std::vector<const SMDS_MeshNode *> nodes); 00048 00049 bool ChangeNodes (const SMDS_MeshNode* nodes[], 00050 const int nbNodes); 00051 // to support the same interface, as SMDS_FaceOfNodes 00052 00053 virtual int NbNodes() const; 00054 virtual int NbEdges() const; 00055 virtual int NbFaces() const; 00056 00057 virtual void Print (std::ostream & OS) const; 00058 00064 virtual const SMDS_MeshNode* GetNode(const int ind) const; 00065 00066 protected: 00067 virtual SMDS_ElemIteratorPtr elementsIterator (SMDSAbs_ElementType type) const; 00068 00069 private: 00070 std::vector<const SMDS_MeshNode *> myNodes; 00071 }; 00072 00073 #endif