smesh/src/SMDS/SMDS_VtkCellIterator.hxx

44 lines
1002 B
C++
Raw Normal View History

2010-01-08 15:53:25 +00:00
#ifndef _SMDS_VTKCELLITERATOR_HXX_
#define _SMDS_VTKCELLITERATOR_HXX_
#include "SMDS_ElemIterator.hxx"
#include "SMDS_Mesh.hxx"
2010-01-22 15:02:34 +00:00
#include "SMDSAbs_ElementType.hxx"
2010-01-08 15:53:25 +00:00
#include <vtkCell.h>
#include <vtkIdList.h>
2010-07-01 14:46:31 +00:00
class SMDS_VtkCellIterator: public SMDS_ElemIterator
2010-01-08 15:53:25 +00:00
{
public:
2010-10-15 08:56:06 +00:00
SMDS_VtkCellIterator(SMDS_Mesh* mesh, int vtkCellId, SMDSAbs_EntityType aType);
2010-01-22 15:02:34 +00:00
virtual ~SMDS_VtkCellIterator();
2010-01-08 15:53:25 +00:00
virtual bool more();
virtual const SMDS_MeshElement* next();
2010-07-01 14:46:31 +00:00
inline void exchange(vtkIdType a, vtkIdType b)
{
vtkIdType t = _vtkIdList->GetId(a);
_vtkIdList->SetId(a, _vtkIdList->GetId(b));
_vtkIdList->SetId(b, t);
}
2010-01-08 15:53:25 +00:00
protected:
2010-10-15 08:56:06 +00:00
SMDS_VtkCellIterator() {};
2010-01-08 15:53:25 +00:00
SMDS_Mesh* _mesh;
int _cellId;
int _index;
int _nbNodes;
2010-01-22 15:02:34 +00:00
SMDSAbs_EntityType _type;
2010-01-08 15:53:25 +00:00
vtkIdList* _vtkIdList;
};
2010-10-15 08:56:06 +00:00
class SMDS_VtkCellIteratorToUNV: public SMDS_VtkCellIterator
{
public:
SMDS_VtkCellIteratorToUNV(SMDS_Mesh* mesh, int vtkCellId, SMDSAbs_EntityType aType);
virtual ~SMDS_VtkCellIteratorToUNV();
};
2010-01-08 15:53:25 +00:00
#endif