----------------------------------------------------------------------------
| 3537 | |
| 3538 | //---------------------------------------------------------------------------- |
| 3539 | void ClonePointData(vtkPointSet* ps, vtkPointSet* clone, ::UnstructuredDataInformation& info) |
| 3540 | { |
| 3541 | vtkPointData* clonePointData = clone->GetPointData(); |
| 3542 | vtkPointData* psPointData = ps->GetPointData(); |
| 3543 | clonePointData->CopyAllOn(); |
| 3544 | clonePointData->CopyAllocate(psPointData, clone->GetNumberOfPoints()); |
| 3545 | clonePointData->SetNumberOfTuples(clone->GetNumberOfPoints()); |
| 3546 | |
| 3547 | if (vtkIdList* redirectionMap = info.OutputToInputPointIdRedirectionMap) |
| 3548 | { |
| 3549 | for (int arrayId = 0; arrayId < clonePointData->GetNumberOfArrays(); ++arrayId) |
| 3550 | { |
| 3551 | psPointData->GetAbstractArray(arrayId)->GetTuples( |
| 3552 | redirectionMap, clonePointData->GetAbstractArray(arrayId)); |
| 3553 | } |
| 3554 | } |
| 3555 | else |
| 3556 | { |
| 3557 | for (int arrayId = 0; arrayId < clonePointData->GetNumberOfArrays(); ++arrayId) |
| 3558 | { |
| 3559 | vtkAbstractArray* sourceArray = psPointData->GetAbstractArray(arrayId); |
| 3560 | sourceArray->GetTuples( |
| 3561 | 0, sourceArray->GetNumberOfTuples() - 1, clonePointData->GetAbstractArray(arrayId)); |
| 3562 | } |
| 3563 | } |
| 3564 | // We need to initialize newly allocated ghosts to zero |
| 3565 | if (vtkUnsignedCharArray* ghostPoints = clonePointData->GetGhostArray()) |
| 3566 | { |
| 3567 | auto ghostRange = vtk::DataArrayValueRange<1>(ghostPoints); |
| 3568 | std::fill(ghostRange.begin() + info.NumberOfInputPoints, ghostRange.end(), 0); |
| 3569 | } |
| 3570 | } |
| 3571 | |
| 3572 | //---------------------------------------------------------------------------- |
| 3573 | void ClonePoints(vtkPointSet* ps, vtkPointSet* clone, ::UnstructuredDataInformation& info) |
no test coverage detected