------------------------------------------------------------------------------
| 309 | |
| 310 | //------------------------------------------------------------------------------ |
| 311 | int vtkXMLPUnstructuredDataReader::ReadPieceData() |
| 312 | { |
| 313 | // Use the internal reader to read the piece. |
| 314 | this->PieceReaders[this->Piece]->UpdatePiece(0, 1, this->UpdateGhostLevel); |
| 315 | |
| 316 | vtkPointSet* input = this->GetPieceInputAsPointSet(this->Piece); |
| 317 | vtkPointSet* output = vtkPointSet::SafeDownCast(this->GetCurrentOutput()); |
| 318 | |
| 319 | // If there are some points, but no PPoints element, report the |
| 320 | // error. |
| 321 | if (!this->PPointsElement && (this->GetNumberOfPoints() > 0)) |
| 322 | { |
| 323 | vtkErrorMacro("Could not find PPoints element with 1 array."); |
| 324 | return 0; |
| 325 | } |
| 326 | |
| 327 | if (!input->GetPoints()) |
| 328 | { |
| 329 | return 0; |
| 330 | } |
| 331 | |
| 332 | // Copy the points array. |
| 333 | this->CopyArrayForPoints(input->GetPoints()->GetData(), output->GetPoints()->GetData()); |
| 334 | |
| 335 | // Let the superclass read the data it wants. |
| 336 | return this->Superclass::ReadPieceData(); |
| 337 | } |
| 338 | |
| 339 | //------------------------------------------------------------------------------ |
| 340 | void vtkXMLPUnstructuredDataReader::CopyArrayForPoints( |
nothing calls this directly
no test coverage detected