------------------------------------------------------------------------------
| 549 | |
| 550 | //------------------------------------------------------------------------------ |
| 551 | void vtkXMLUnstructuredDataWriter::WriteAppendedPieceData(int index) |
| 552 | { |
| 553 | ostream& os = *(this->Stream); |
| 554 | vtkPointSet* input = this->GetPointSetInput(); |
| 555 | |
| 556 | std::streampos returnPosition = os.tellp(); |
| 557 | os.seekp(std::streampos(this->NumberOfPointsPositions[index])); |
| 558 | vtkPoints* points = input->GetPoints(); |
| 559 | this->WriteScalarAttribute("NumberOfPoints", (points ? points->GetNumberOfPoints() : 0)); |
| 560 | if (this->ErrorCode == vtkErrorCode::OutOfDiskSpaceError) |
| 561 | { |
| 562 | return; |
| 563 | } |
| 564 | os.seekp(returnPosition); |
| 565 | |
| 566 | // Split progress among point data, cell data, and point arrays. |
| 567 | float progressRange[2] = { 0, 0 }; |
| 568 | this->GetProgressRange(progressRange); |
| 569 | float fractions[4]; |
| 570 | this->CalculateDataFractions(fractions); |
| 571 | |
| 572 | // Set the range of progress for the point data arrays. |
| 573 | this->SetProgressRange(progressRange, 0, fractions); |
| 574 | |
| 575 | // Write the point data arrays. |
| 576 | this->WritePointDataAppendedData( |
| 577 | input->GetPointData(), this->CurrentTimeIndex, &this->PointDataOM->GetPiece(index)); |
| 578 | if (this->ErrorCode == vtkErrorCode::OutOfDiskSpaceError) |
| 579 | { |
| 580 | return; |
| 581 | } |
| 582 | |
| 583 | // Set the range of progress for the cell data arrays. |
| 584 | this->SetProgressRange(progressRange, 1, fractions); |
| 585 | |
| 586 | // Write the cell data arrays. |
| 587 | this->WriteCellDataAppendedData( |
| 588 | input->GetCellData(), this->CurrentTimeIndex, &this->CellDataOM->GetPiece(index)); |
| 589 | if (this->ErrorCode == vtkErrorCode::OutOfDiskSpaceError) |
| 590 | { |
| 591 | return; |
| 592 | } |
| 593 | |
| 594 | // Set the range of progress for the point specification array. |
| 595 | this->SetProgressRange(progressRange, 2, fractions); |
| 596 | |
| 597 | // Write the point specification array. |
| 598 | // Since we are writing the point let save the Modified Time of vtkPoints: |
| 599 | this->WritePointsAppendedData( |
| 600 | input->GetPoints(), this->CurrentTimeIndex, &this->PointsOM->GetPiece(index)); |
| 601 | } |
| 602 | |
| 603 | //------------------------------------------------------------------------------ |
| 604 | void vtkXMLUnstructuredDataWriter::WriteCellsInline(const char* name, vtkCellIterator* cellIter, |
no test coverage detected