Salome HOME
PR: debug SMDS memimp
[modules/smesh.git] / src / SMDS / SMDS_VtkCellIterator.hxx
index f739851623e8d158c03a903485bcde0de125a876..3a98cfac9d8defe6ee0e3708650f8bcd78fc12be 100644 (file)
@@ -3,6 +3,7 @@
 
 #include "SMDS_ElemIterator.hxx"
 #include "SMDS_Mesh.hxx"
+#include "SMDSAbs_ElementType.hxx"
 
 #include <vtkCell.h>
 #include <vtkIdList.h>
 class SMDS_VtkCellIterator : public SMDS_ElemIterator
 {
 public:
-  SMDS_VtkCellIterator(SMDS_Mesh* mesh, int vtkCellId);
+  SMDS_VtkCellIterator(SMDS_Mesh* mesh, int vtkCellId, SMDSAbs_EntityType aType);
+  virtual ~SMDS_VtkCellIterator();
   virtual bool more();
   virtual const SMDS_MeshElement* next();
+  inline void exchange(vtkIdType a, vtkIdType b) { vtkIdType t = _vtkIdList->GetId(a);
+                                                                                                  _vtkIdList->SetId(a, _vtkIdList->GetId(b));
+                                                   _vtkIdList->SetId(b, t); };
 protected:
   SMDS_Mesh* _mesh;
   int _cellId;
   int _index;
   int _nbNodes;
+  SMDSAbs_EntityType _type;
   vtkIdList* _vtkIdList;
 };