------------------------------------------------------------------------------
| 216 | |
| 217 | //------------------------------------------------------------------------------ |
| 218 | int vtkAxisAlignedReflectionFilter::RequestData(vtkInformation* vtkNotUsed(request), |
| 219 | vtkInformationVector** inputVector, vtkInformationVector* outputVector) |
| 220 | { |
| 221 | vtkPartitionedDataSetCollection* outputPDSC = |
| 222 | vtkPartitionedDataSetCollection::GetData(outputVector, 0); |
| 223 | |
| 224 | vtkNew<vtkDataAssembly> outputHierarchy; |
| 225 | outputPDSC->SetDataAssembly(outputHierarchy); |
| 226 | outputHierarchy->SetRootNodeName("Root"); |
| 227 | |
| 228 | vtkDataSet* inputDS = vtkDataSet::GetData(inputVector[0], 0); |
| 229 | vtkHyperTreeGrid* inputHtg = vtkHyperTreeGrid::GetData(inputVector[0], 0); |
| 230 | vtkCompositeDataSet* inputCD = vtkCompositeDataSet::GetData(inputVector[0], 0); |
| 231 | |
| 232 | if (inputDS || inputHtg) |
| 233 | { |
| 234 | vtkDataObject* inputDO = vtkDataObject::GetData(inputVector[0], 0); |
| 235 | double bounds[6]; |
| 236 | this->ComputeBounds(inputDO, bounds); |
| 237 | if (!this->ProcessDO(inputDO, outputPDSC, bounds)) |
| 238 | { |
| 239 | vtkErrorMacro("Failed to process data object " << inputDO->GetClassName()); |
| 240 | return 0; |
| 241 | } |
| 242 | } |
| 243 | else if (inputCD) |
| 244 | { |
| 245 | double bounds[6]; |
| 246 | this->ComputeBounds(inputCD, bounds); |
| 247 | if (auto inputPDC = vtkPartitionedDataSetCollection::SafeDownCast(inputCD)) |
| 248 | { |
| 249 | if (!this->ProcessPDC(inputPDC, outputPDSC, bounds)) |
| 250 | { |
| 251 | vtkErrorMacro("Failed to process partitioned dataset collection."); |
| 252 | return 0; |
| 253 | } |
| 254 | } |
| 255 | else if (auto inputMB = vtkMultiBlockDataSet::SafeDownCast(inputCD)) |
| 256 | { |
| 257 | if (!this->ProcessMB(inputMB, outputPDSC, bounds)) |
| 258 | { |
| 259 | vtkErrorMacro("Failed to process multiblock dataset."); |
| 260 | return 0; |
| 261 | } |
| 262 | } |
| 263 | else if (auto inputPDS = vtkPartitionedDataSet::SafeDownCast(inputCD)) |
| 264 | { |
| 265 | if (!this->ProcessPDS(inputPDS, outputPDSC, bounds)) |
| 266 | { |
| 267 | vtkErrorMacro("Failed to process partitioned dataset."); |
| 268 | return 0; |
| 269 | } |
| 270 | } |
| 271 | else |
| 272 | { |
| 273 | vtkErrorMacro("Unhandled composite dataset: " << inputCD->GetClassName()); |
| 274 | return 0; |
| 275 | } |
nothing calls this directly
no test coverage detected