Traverse list of edges in table. Return the edge as (p1,p2), where p1 and p2 are point id's. Method return value is <0 if the list is exhausted; otherwise a valid id >=0. The value of p1 is guaranteed to be <= p2. The return value is an id that can be used for accessing attributes.
| 421 | // otherwise a valid id >=0. The value of p1 is guaranteed to be <= p2. The |
| 422 | // return value is an id that can be used for accessing attributes. |
| 423 | vtkIdType vtkEdgeTable::GetNextEdge(vtkIdType& p1, vtkIdType& p2) |
| 424 | { |
| 425 | for (; this->Position[0] <= this->TableMaxId; this->Position[0]++, this->Position[1] = (-1)) |
| 426 | { |
| 427 | if (this->Table[this->Position[0]] != nullptr && |
| 428 | ++this->Position[1] < this->Table[this->Position[0]]->GetNumberOfIds()) |
| 429 | { |
| 430 | p1 = this->Position[0]; |
| 431 | p2 = this->Table[this->Position[0]]->GetId(this->Position[1]); |
| 432 | if (this->StoreAttributes == 1) |
| 433 | { |
| 434 | return this->Attributes[this->Position[0]]->GetId(this->Position[1]); |
| 435 | } |
| 436 | else |
| 437 | { |
| 438 | return (-1); |
| 439 | } |
| 440 | } |
| 441 | } |
| 442 | |
| 443 | return (-1); |
| 444 | } |
| 445 | |
| 446 | //------------------------------------------------------------------------------ |
| 447 | // Traverse list of edges in table. Return the edge as (p1,p2), where p1 and |
no test coverage detected