
Public Member Functions | |
| SMDS_MeshNode_MyIterator (SMDS_Mesh *mesh, vtkIdType *cells, int ncells, SMDSAbs_ElementType type) | |
| bool | more () |
| Return true if and only if there are other object in this iterator. | |
| const SMDS_MeshElement * | next () |
| Return the current object and step to the next one. | |
| virtual void | remove () |
| Delete the current element and step to the next one. | |
Private Attributes | |
| SMDS_Mesh * | myMesh |
| vtkIdType * | myCells |
| int | myNcells |
| SMDSAbs_ElementType | myType |
| int | iter |
| vector< SMDS_MeshElement * > | myFiltCells |
Definition at line 206 of file SMDS_MeshNode.cxx.
| SMDS_MeshNode_MyIterator.SMDS_MeshNode_MyIterator | ( | SMDS_Mesh * | mesh, |
| vtkIdType * | cells, | ||
| int | ncells, | ||
| SMDSAbs_ElementType | type | ||
| ) |
Definition at line 217 of file SMDS_MeshNode.cxx.
References SMDS_Mesh.FindElement(), SMDS_Mesh.fromVtkToSmds(), SMDS_MeshElement.GetType(), iter, myCells, myFiltCells, myMesh, and myNcells.
:
myMesh(mesh), myCells(cells), myNcells(ncells), myType(type), iter(0)
{
//MESSAGE("myNcells " << myNcells);
for (; iter<ncells; iter++)
{
int vtkId = myCells[iter];
int smdsId = myMesh->fromVtkToSmds(vtkId);
//MESSAGE("vtkId " << vtkId << " smdsId " << smdsId);
const SMDS_MeshElement* elem = myMesh->FindElement(smdsId);
if (elem->GetType() == type)
myFiltCells.push_back((SMDS_MeshElement*)elem);
}
myNcells = myFiltCells.size();
//MESSAGE("myNcells " << myNcells);
iter = 0;
//MESSAGE("SMDS_MeshNode_MyIterator (filter) " << ncells << " " << myNcells);
}
| bool SMDS_MeshNode_MyIterator.more | ( | ) | [virtual] |
Return true if and only if there are other object in this iterator.
Implements SMDS_Iterator< const SMDS_MeshElement * >.
Definition at line 239 of file SMDS_MeshNode.cxx.
| const SMDS_MeshElement* SMDS_MeshNode_MyIterator.next | ( | ) | [virtual] |
Return the current object and step to the next one.
Implements SMDS_Iterator< const SMDS_MeshElement * >.
Definition at line 244 of file SMDS_MeshNode.cxx.
References iter, and myFiltCells.
{
const SMDS_MeshElement* elem = myFiltCells[iter];
iter++;
return elem;
}
| virtual void SMDS_Iterator< const SMDS_MeshElement * >.remove | ( | ) | [virtual, inherited] |
Delete the current element and step to the next one.
Definition at line 44 of file SMDS_Iterator.hxx.
{}
int SMDS_MeshNode_MyIterator.iter [private] |
Definition at line 213 of file SMDS_MeshNode.cxx.
Referenced by more(), next(), and SMDS_MeshNode_MyIterator().
vtkIdType* SMDS_MeshNode_MyIterator.myCells [private] |
Definition at line 210 of file SMDS_MeshNode.cxx.
Referenced by SMDS_MeshNode_MyIterator().
vector<SMDS_MeshElement*> SMDS_MeshNode_MyIterator.myFiltCells [private] |
Definition at line 214 of file SMDS_MeshNode.cxx.
Referenced by next(), and SMDS_MeshNode_MyIterator().
SMDS_Mesh* SMDS_MeshNode_MyIterator.myMesh [private] |
Definition at line 209 of file SMDS_MeshNode.cxx.
Referenced by SMDS_MeshNode_MyIterator().
int SMDS_MeshNode_MyIterator.myNcells [private] |
Definition at line 211 of file SMDS_MeshNode.cxx.
Referenced by more(), and SMDS_MeshNode_MyIterator().
Definition at line 212 of file SMDS_MeshNode.cxx.