| 2813 | } |
| 2814 | |
| 2815 | int vtkMultiBlockPLOT3DReader::ReadIntScalar(void* vfp, int extent[6], int wextent[6], |
| 2816 | vtkDataArray* scalar, vtkTypeUInt64 offset, const vtkMultiBlockPLOT3DReaderRecord& record) |
| 2817 | { |
| 2818 | FILE* fp = reinterpret_cast<FILE*>(vfp); |
| 2819 | vtkIdType n = vtkStructuredData::GetNumberOfPoints(extent); |
| 2820 | |
| 2821 | if (this->Internal->Settings.BinaryFile) |
| 2822 | { |
| 2823 | // precond: we assume the offset has been updated properly to step over |
| 2824 | // sub-record markers, if any. |
| 2825 | if (vtk_fseek(fp, offset, SEEK_SET) != 0) |
| 2826 | { |
| 2827 | return 0; |
| 2828 | } |
| 2829 | |
| 2830 | vtkPLOT3DArrayReader<int> arrayReader; |
| 2831 | arrayReader.ByteOrder = this->Internal->Settings.ByteOrder; |
| 2832 | vtkIdType preskip, postskip; |
| 2833 | vtkMultiBlockPLOT3DReaderInternals::CalculateSkips(extent, wextent, preskip, postskip); |
| 2834 | vtkIntArray* intArray = static_cast<vtkIntArray*>(scalar); |
| 2835 | return arrayReader.ReadScalar(fp, preskip, n, postskip, intArray->WritePointer(0, n), record) == |
| 2836 | n; |
| 2837 | } |
| 2838 | else |
| 2839 | { |
| 2840 | vtkIntArray* intArray = static_cast<vtkIntArray*>(scalar); |
| 2841 | return this->ReadIntBlock(fp, n, intArray->WritePointer(0, n)); |
| 2842 | } |
| 2843 | } |
| 2844 | |
| 2845 | int vtkMultiBlockPLOT3DReader::ReadScalar(void* vfp, int extent[6], int wextent[6], |
| 2846 | vtkDataArray* scalar, vtkTypeUInt64 offset, const vtkMultiBlockPLOT3DReaderRecord& record) |
no test coverage detected