------------------------------------------------------------------------------
| 118 | |
| 119 | //------------------------------------------------------------------------------ |
| 120 | void vtkXMLPolyDataWriter::WriteInlinePiece(vtkIndent indent) |
| 121 | { |
| 122 | // Split progress range by the approximate fraction of data written |
| 123 | // by each step in this method. |
| 124 | float progressRange[2] = { 0.f, 0.f }; |
| 125 | this->GetProgressRange(progressRange); |
| 126 | float fractions[6]; |
| 127 | this->CalculateSuperclassFraction(fractions); |
| 128 | |
| 129 | // Set the range of progress for superclass. |
| 130 | this->SetProgressRange(progressRange, 0, fractions); |
| 131 | |
| 132 | // Let the superclass write its data. |
| 133 | this->Superclass::WriteInlinePiece(indent); |
| 134 | if (this->ErrorCode == vtkErrorCode::OutOfDiskSpaceError) |
| 135 | { |
| 136 | return; |
| 137 | } |
| 138 | |
| 139 | vtkPolyData* input = this->GetInput(); |
| 140 | |
| 141 | // Set the range of progress for Verts. |
| 142 | this->SetProgressRange(progressRange, 1, fractions); |
| 143 | |
| 144 | // Write the Verts. |
| 145 | this->WriteCellsInline("Verts", input->GetVerts(), nullptr, indent); |
| 146 | if (this->ErrorCode == vtkErrorCode::OutOfDiskSpaceError) |
| 147 | { |
| 148 | return; |
| 149 | } |
| 150 | |
| 151 | // Set the range of progress for Lines. |
| 152 | this->SetProgressRange(progressRange, 2, fractions); |
| 153 | |
| 154 | // Write the Lines. |
| 155 | this->WriteCellsInline("Lines", input->GetLines(), nullptr, indent); |
| 156 | if (this->ErrorCode == vtkErrorCode::OutOfDiskSpaceError) |
| 157 | { |
| 158 | return; |
| 159 | } |
| 160 | |
| 161 | // Set the range of progress for Strips. |
| 162 | this->SetProgressRange(progressRange, 3, fractions); |
| 163 | |
| 164 | // Write the Strips. |
| 165 | this->WriteCellsInline("Strips", input->GetStrips(), nullptr, indent); |
| 166 | if (this->ErrorCode == vtkErrorCode::OutOfDiskSpaceError) |
| 167 | { |
| 168 | return; |
| 169 | } |
| 170 | |
| 171 | // Set the range of progress for Polys. |
| 172 | this->SetProgressRange(progressRange, 4, fractions); |
| 173 | |
| 174 | // Write the Polys. |
| 175 | this->WriteCellsInline("Polys", input->GetPolys(), nullptr, indent); |
| 176 | } |
| 177 |
nothing calls this directly
no test coverage detected