------------------------------------------------------------------------------
| 641 | |
| 642 | //------------------------------------------------------------------------------ |
| 643 | int vtkUnstructuredGrid::InitializeFacesRepresentation(vtkIdType numPrevCells) |
| 644 | { |
| 645 | if (this->Faces || this->FaceLocations) |
| 646 | { |
| 647 | vtkErrorMacro("Face information already exist for this unstructured grid. " |
| 648 | "InitializeFacesRepresentation returned without execution."); |
| 649 | return 0; |
| 650 | } |
| 651 | |
| 652 | this->Faces = vtkSmartPointer<vtkCellArray>::New(); |
| 653 | this->Faces->AllocateEstimate(this->Types->GetSize() * 6, 4); // assume 4 pts/face |
| 654 | this->FaceLocations = vtkSmartPointer<vtkCellArray>::New(); |
| 655 | this->FaceLocations->AllocateEstimate(this->Types->GetSize(), 6); // assume 6 faces/cell |
| 656 | |
| 657 | // FaceLocations must be padded until the current position |
| 658 | for (vtkIdType i = 0; i < numPrevCells; i++) |
| 659 | { |
| 660 | this->FaceLocations->InsertNextCell(0); |
| 661 | } |
| 662 | |
| 663 | return 1; |
| 664 | } |
| 665 | |
| 666 | //------------------------------------------------------------------------------ |
| 667 | vtkMTimeType vtkUnstructuredGrid::GetMeshMTime() |
no test coverage detected