------------------------------------------------------------------------------ Clip this quadratic pyramid using scalar value provided. Like contouring, except that it cuts the pyramid to produce tetrahedra.
| 682 | // except that it cuts the pyramid to produce tetrahedra. |
| 683 | // |
| 684 | void vtkQuadraticPyramid::Clip(double value, vtkDataArray* cellScalars, |
| 685 | vtkIncrementalPointLocator* locator, vtkCellArray* tets, vtkPointData* inPd, vtkPointData* outPd, |
| 686 | vtkCellData* inCd, vtkIdType cellId, vtkCellData* outCd, int insideOut) |
| 687 | { |
| 688 | int i; |
| 689 | // create six linear pyramid + 4 tetra |
| 690 | this->Subdivide(inPd, inCd, cellId, cellScalars); |
| 691 | |
| 692 | // contour each linear pyramid separately |
| 693 | this->Scalars->SetNumberOfTuples(5); // num of vertices |
| 694 | for (i = 0; i < 6; i++) // for each subdivided pyramid |
| 695 | { |
| 696 | for (int j = 0; j < 5; j++) // for each of the five vertices of the pyramid |
| 697 | { |
| 698 | this->Pyramid->Points->SetPoint(j, this->Points->GetPoint(LinearPyramids[i][j])); |
| 699 | this->Pyramid->PointIds->SetId(j, LinearPyramids[i][j]); |
| 700 | this->Scalars->SetValue(j, this->CellScalars->GetValue(LinearPyramids[i][j])); |
| 701 | } |
| 702 | this->Pyramid->Clip(value, this->Scalars, locator, tets, this->PointData, outPd, this->CellData, |
| 703 | i, outCd, insideOut); |
| 704 | } |
| 705 | |
| 706 | this->Scalars->SetNumberOfTuples(4); // num of vertices |
| 707 | for (i = 6; i < 10; i++) // for each subdivided tetra |
| 708 | { |
| 709 | for (int j = 0; j < 4; j++) // for each of the four vertices of the tetra |
| 710 | { |
| 711 | this->Tetra->Points->SetPoint(j, this->Points->GetPoint(LinearPyramids[i][j])); |
| 712 | this->Tetra->PointIds->SetId(j, LinearPyramids[i][j]); |
| 713 | this->Scalars->SetValue(j, this->CellScalars->GetValue(LinearPyramids[i][j])); |
| 714 | } |
| 715 | this->Tetra->Clip(value, this->Scalars, locator, tets, this->PointData, outPd, this->CellData, |
| 716 | i, outCd, insideOut); |
| 717 | } |
| 718 | this->ResizeArrays(13); |
| 719 | } |
| 720 | |
| 721 | //------------------------------------------------------------------------------ |
| 722 | // Compute interpolation functions for the fifteen nodes. |
nothing calls this directly
no test coverage detected