------------------------------------------------------------------------------
| 283 | |
| 284 | //------------------------------------------------------------------------------ |
| 285 | int vtkRandomAttributeGenerator::ProcessComposite( |
| 286 | vtkCompositeDataSet* input, vtkCompositeDataSet* output) |
| 287 | { |
| 288 | if (input == nullptr || output == nullptr) |
| 289 | { |
| 290 | return 0; |
| 291 | } |
| 292 | output->CopyStructure(input); |
| 293 | |
| 294 | vtkSmartPointer<vtkCompositeDataIterator> it; |
| 295 | it.TakeReference(input->NewIterator()); |
| 296 | for (it->InitTraversal(); !it->IsDoneWithTraversal(); it->GoToNextItem()) |
| 297 | { |
| 298 | if (this->CheckAbort()) |
| 299 | { |
| 300 | break; |
| 301 | } |
| 302 | |
| 303 | vtkDataSet* inputDS = vtkDataSet::SafeDownCast(it->GetCurrentDataObject()); |
| 304 | if (inputDS) |
| 305 | { |
| 306 | vtkSmartPointer<vtkDataSet> outputDS; |
| 307 | outputDS.TakeReference(inputDS->NewInstance()); |
| 308 | output->SetDataSet(it, outputDS); |
| 309 | this->ProcessDataSet(inputDS, outputDS); |
| 310 | continue; |
| 311 | } |
| 312 | |
| 313 | vtkHyperTreeGrid* inputHTG = vtkHyperTreeGrid::SafeDownCast(it->GetCurrentDataObject()); |
| 314 | if (inputHTG) |
| 315 | { |
| 316 | vtkSmartPointer<vtkHyperTreeGrid> outputHTG; |
| 317 | outputHTG.TakeReference(inputHTG->NewInstance()); |
| 318 | output->SetDataSet(it, outputHTG); |
| 319 | this->ProcessHTG(inputHTG, outputHTG); |
| 320 | continue; |
| 321 | } |
| 322 | } |
| 323 | return 1; |
| 324 | } |
| 325 | |
| 326 | //------------------------------------------------------------------------------ |
| 327 | int vtkRandomAttributeGenerator::ProcessDataSet(vtkDataSet* input, vtkDataSet* output) |
no test coverage detected