----------------------------------------------------------------------------
| 439 | |
| 440 | //---------------------------------------------------------------------------- |
| 441 | int vtkCell::Triangulate(int index, vtkIdList* ptIds, vtkPoints* pts) |
| 442 | { |
| 443 | // Convert the local ids to the global ones, plus collect the points |
| 444 | if (!this->TriangulateLocalIds(index, ptIds)) |
| 445 | { |
| 446 | return 0; |
| 447 | } |
| 448 | pts->SetNumberOfPoints(ptIds->GetNumberOfIds()); |
| 449 | for (int i = 0; i < ptIds->GetNumberOfIds(); i++) |
| 450 | { |
| 451 | pts->SetPoint(i, this->Points->GetPoint(ptIds->GetId(i))); |
| 452 | ptIds->SetId(i, this->PointIds->GetId(ptIds->GetId(i))); |
| 453 | } |
| 454 | return 1; |
| 455 | } |
| 456 | |
| 457 | //---------------------------------------------------------------------------- |
| 458 | int vtkCell::TriangulateIds(int index, vtkIdList* ptIds) |