SALOME - SMESH
|
00001 // Copyright (C) 2007-2008 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 // SMESH SMDS : implementaion of Salome mesh data structure 00023 // 00024 #ifndef _SMDS_PolygonalFaceOfNodes_HeaderFile 00025 #define _SMDS_PolygonalFaceOfNodes_HeaderFile 00026 00027 #include "SMESH_SMDS.hxx" 00028 00029 #include "SMDS_MeshFace.hxx" 00030 //#include "SMDS_FaceOfNodes.hxx" 00031 #include "SMDS_MeshNode.hxx" 00032 #include "SMDS_Iterator.hxx" 00033 00034 #include <iostream> 00035 00036 //class SMDS_PolygonalFaceOfNodes:public SMDS_FaceOfNodes 00037 class SMDS_EXPORT SMDS_PolygonalFaceOfNodes:public SMDS_MeshFace 00038 { 00039 public: 00040 SMDS_PolygonalFaceOfNodes (std::vector<const SMDS_MeshNode *> nodes); 00041 00042 virtual SMDSAbs_ElementType GetType() const; 00043 virtual SMDSAbs_EntityType GetEntityType() const { return SMDSEntity_Polygon; } 00044 virtual bool IsPoly() const { return true; }; 00045 00046 bool ChangeNodes (std::vector<const SMDS_MeshNode *> nodes); 00047 00048 bool ChangeNodes (const SMDS_MeshNode* nodes[], 00049 const int nbNodes); 00050 // to support the same interface, as SMDS_FaceOfNodes 00051 00052 virtual int NbNodes() const; 00053 virtual int NbEdges() const; 00054 virtual int NbFaces() const; 00055 00056 virtual void Print (std::ostream & OS) const; 00057 00063 virtual const SMDS_MeshNode* GetNode(const int ind) const; 00064 00065 protected: 00066 virtual SMDS_ElemIteratorPtr elementsIterator (SMDSAbs_ElementType type) const; 00067 00068 private: 00069 std::vector<const SMDS_MeshNode *> myNodes; 00070 }; 00071 00072 #endif