------------------------------------------------------------------------------
| 271 | |
| 272 | //------------------------------------------------------------------------------ |
| 273 | bool vtkHyperTreeGridPProbeFilter::DoProbing( |
| 274 | vtkDataSet* probe, vtkHyperTreeGrid* source, vtkDataSet* output, vtkIdList* localPointIds) |
| 275 | { |
| 276 | // locate all present points of probe |
| 277 | unsigned int nPoints = probe->GetNumberOfPoints(); |
| 278 | vtkNew<vtkIdList> locCellIds; |
| 279 | locCellIds->Initialize(); |
| 280 | ProbingWorklet worker(probe, this->Locator, localPointIds, locCellIds); |
| 281 | vtkSMPTools::For(0, nPoints, worker); |
| 282 | |
| 283 | // copy values from source |
| 284 | unsigned int numSourceCellArrays = source->GetCellData()->GetNumberOfArrays(); |
| 285 | for (unsigned int iA = 0; iA < numSourceCellArrays; iA++) |
| 286 | { |
| 287 | vtkDataArray* sourceArray = source->GetCellData()->GetArray(iA); |
| 288 | if (!(output->GetPointData()->HasArray(sourceArray->GetName()))) |
| 289 | { |
| 290 | vtkErrorMacro("Array " << sourceArray->GetName() << " missing in output"); |
| 291 | return false; |
| 292 | } |
| 293 | vtkDataArray* outputArray = output->GetPointData()->GetArray(sourceArray->GetName()); |
| 294 | outputArray->InsertTuplesStartingAt(0, locCellIds, sourceArray); |
| 295 | } |
| 296 | return true; |
| 297 | } |
| 298 | |
| 299 | //------------------------------------------------------------------------------ |
| 300 | bool vtkHyperTreeGridPProbeFilter::Initialize( |
no test coverage detected