Version: 6.3.1

src/SMDS/SMDS_VtkVolume.hxx

Go to the documentation of this file.
00001 // Copyright (C) 2010-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 _SMDS_VTKVOLUME_HXX_
00021 #define _SMDS_VTKVOLUME_HXX_
00022 
00023 #include "SMESH_SMDS.hxx"
00024 
00025 #include "SMDS_MeshVolume.hxx"
00026 #include "SMDS_UnstructuredGrid.hxx"
00027 #include <vector>
00028 
00029 class SMDS_EXPORT SMDS_VtkVolume: public SMDS_MeshVolume
00030 {
00031 public:
00032   SMDS_VtkVolume();
00033   SMDS_VtkVolume(std::vector<vtkIdType> nodeIds, SMDS_Mesh* mesh);
00034   ~SMDS_VtkVolume();
00035   void init(std::vector<vtkIdType> nodeIds, SMDS_Mesh* mesh);
00036 //#ifdef VTK_HAVE_POLYHEDRON
00037   void initPoly(std::vector<vtkIdType> nodeIds, std::vector<int> nbNodesPerFace, SMDS_Mesh* mesh);
00038 //#endif
00039   virtual bool ChangeNodes(const SMDS_MeshNode* nodes[], const int nbNodes);
00040   virtual bool vtkOrder(const SMDS_MeshNode* nodes[], const int nbNodes);
00041 
00042   void Print(std::ostream & OS) const;
00043   int NbFaces() const;
00044   int NbNodes() const;
00045   int NbEdges() const;
00046 
00047   // 1 <= face_ind <= NbFaces()
00048   int NbFaceNodes (const int face_ind) const;
00049   // 1 <= face_ind <= NbFaces()
00050   // 1 <= node_ind <= NbFaceNodes()
00051   const SMDS_MeshNode* GetFaceNode (const int face_ind, const int node_ind) const;
00052 
00053   virtual SMDSAbs_ElementType GetType() const;
00054   virtual vtkIdType GetVtkType() const;
00055   virtual SMDSAbs_EntityType GetEntityType() const;
00056   virtual const SMDS_MeshNode* GetNode(const int ind) const;
00057   virtual bool IsQuadratic() const;
00058   virtual bool IsPoly() const;
00059   virtual bool IsMediumNode(const SMDS_MeshNode* node) const;
00060   static void gravityCenter(SMDS_UnstructuredGrid* grid,
00061                             vtkIdType *nodeIds,
00062                             int nbNodes,
00063                             double* result);
00064   static bool isForward(double* a,double* b,double* c,double* d);
00065   int NbUniqueNodes() const;
00066   SMDS_ElemIteratorPtr uniqueNodesIterator() const;
00067   const std::vector<int> GetQuantities() const;
00068 
00069   virtual SMDS_ElemIteratorPtr elementsIterator(SMDSAbs_ElementType type) const;
00070   virtual SMDS_ElemIteratorPtr nodesIteratorToUNV() const;
00071   virtual SMDS_ElemIteratorPtr interlacedNodesElemIterator() const;
00072 
00073 protected:
00074 };
00075 
00076 #endif
Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS