------------------------------------------------------------------------------
| 473 | |
| 474 | //------------------------------------------------------------------------------ |
| 475 | void vtkAxisAlignedReflectionFilter::ProcessStructuredGrid(vtkStructuredGrid* input, |
| 476 | vtkStructuredGrid* output, double constant[3], int mirrorDir[3], int mirrorSymmetricTensorDir[6], |
| 477 | int mirrorTensorDir[9]) |
| 478 | { |
| 479 | output->SetExtent(input->GetExtent()); |
| 480 | |
| 481 | vtkIdType numPts = input->GetNumberOfPoints(); |
| 482 | vtkSmartPointer<vtkPoints> outPoints = vtkSmartPointer<vtkPoints>::New(); |
| 483 | vtkPointData* inPD = input->GetPointData(); |
| 484 | vtkPointData* outPD = output->GetPointData(); |
| 485 | |
| 486 | outPoints->Allocate(numPts); |
| 487 | outPD->CopyAllOn(); |
| 488 | outPD->CopyAllocate(inPD); |
| 489 | |
| 490 | std::vector<std::pair<vtkIdType, int>> reflectableArrays; |
| 491 | vtkReflectionUtilities::FindAllReflectableArrays( |
| 492 | reflectableArrays, inPD, this->ReflectAllInputArrays); |
| 493 | |
| 494 | for (vtkIdType i = numPts - 1; i >= 0; i--) |
| 495 | { |
| 496 | if (this->CheckAbort()) |
| 497 | { |
| 498 | break; |
| 499 | } |
| 500 | |
| 501 | double point[3]; |
| 502 | input->GetPoint(i, point); |
| 503 | vtkIdType ptId = outPoints->InsertNextPoint(mirrorDir[0] * point[0] + constant[0], |
| 504 | mirrorDir[1] * point[1] + constant[1], mirrorDir[2] * point[2] + constant[2]); |
| 505 | outPD->CopyData(inPD, i, ptId); |
| 506 | |
| 507 | vtkReflectionUtilities::ReflectReflectableArrays(reflectableArrays, inPD, outPD, i, mirrorDir, |
| 508 | mirrorSymmetricTensorDir, mirrorTensorDir, ptId); |
| 509 | } |
| 510 | |
| 511 | output->SetPoints(outPoints); |
| 512 | } |
| 513 | |
| 514 | //------------------------------------------------------------------------------ |
| 515 | void vtkAxisAlignedReflectionFilter::ProcessPolyData(vtkPolyData* input, vtkPolyData* output, |
nothing calls this directly
no test coverage detected