------------------------------------------------------------------------------
| 2966 | |
| 2967 | //------------------------------------------------------------------------------ |
| 2968 | void EnSightDataSet::ProcessGhostCells(int numCells, vtkDataSet* output) |
| 2969 | { |
| 2970 | // ensight stores as int, so we'll have to read into vector and then copy over |
| 2971 | // to the actual array |
| 2972 | std::vector<int> ghostFlags(numCells, 0); |
| 2973 | this->ReadOptionalValues(numCells, ghostFlags.data(), "ghost_flags"); |
| 2974 | vtkNew<vtkUnsignedCharArray> cellGhostArray; |
| 2975 | cellGhostArray->SetName(vtkDataSetAttributes::GhostArrayName()); |
| 2976 | cellGhostArray->SetNumberOfComponents(1); |
| 2977 | cellGhostArray->SetNumberOfTuples(numCells); |
| 2978 | |
| 2979 | for (vtkIdType i = 0; i < numCells; i++) |
| 2980 | { |
| 2981 | cellGhostArray->SetValue(i, ghostFlags[i] ? vtkDataSetAttributes::DUPLICATECELL : 0); |
| 2982 | } |
| 2983 | output->GetCellData()->AddArray(cellGhostArray); |
| 2984 | } |
| 2985 | |
| 2986 | //------------------------------------------------------------------------------ |
| 2987 | bool EnSightDataSet::ReadRigidBodyGeometryFile() |
no test coverage detected