------------------------------------------------------------------------------
| 828 | |
| 829 | //------------------------------------------------------------------------------ |
| 830 | void vtkDataSetSurfaceFilter::ExecuteFaceQuads(vtkDataSet* input, vtkPolyData* output, int maxFlag, |
| 831 | vtkIdType* ext, int aAxis, int bAxis, int cAxis, vtkIdType* wholeExt, bool checkVisibility) |
| 832 | { |
| 833 | vtkPoints* outPts; |
| 834 | vtkCellArray* outPolys; |
| 835 | vtkPointData *inPD, *outPD; |
| 836 | vtkCellData *inCD, *outCD; |
| 837 | vtkIdType pInc[3]; |
| 838 | vtkIdType qInc[3]; |
| 839 | vtkIdType cOutInc; |
| 840 | double pt[3]; |
| 841 | vtkIdType inStartPtId; |
| 842 | vtkIdType inStartCellId; |
| 843 | vtkIdType outStartPtId; |
| 844 | vtkIdType outPtId; |
| 845 | vtkIdType inId, outId; |
| 846 | vtkIdType ib, ic; |
| 847 | int aA2, bA2, cA2; |
| 848 | |
| 849 | outPts = output->GetPoints(); |
| 850 | outPD = output->GetPointData(); |
| 851 | inPD = input->GetPointData(); |
| 852 | outCD = output->GetCellData(); |
| 853 | inCD = input->GetCellData(); |
| 854 | |
| 855 | pInc[0] = 1; |
| 856 | pInc[1] = (ext[1] - ext[0] + 1); |
| 857 | pInc[2] = (ext[3] - ext[2] + 1) * pInc[1]; |
| 858 | // quad increments (cell increments, but cInc could be confused with c axis). |
| 859 | qInc[0] = 1; |
| 860 | qInc[1] = ext[1] - ext[0]; |
| 861 | // The conditions are for when we have one or more degenerate axes (2d or 1d cells). |
| 862 | if (qInc[1] == 0) |
| 863 | { |
| 864 | qInc[1] = 1; |
| 865 | } |
| 866 | qInc[2] = (ext[3] - ext[2]) * qInc[1]; |
| 867 | if (qInc[2] == 0) |
| 868 | { |
| 869 | qInc[2] = qInc[1]; |
| 870 | } |
| 871 | |
| 872 | // Temporary variables to avoid many multiplications. |
| 873 | aA2 = aAxis * 2; |
| 874 | bA2 = bAxis * 2; |
| 875 | cA2 = cAxis * 2; |
| 876 | |
| 877 | // We might as well put the test for this face here. |
| 878 | if (ext[bA2] == ext[bA2 + 1] || ext[cA2] == ext[cA2 + 1]) |
| 879 | { |
| 880 | return; |
| 881 | } |
| 882 | if (maxFlag) |
| 883 | { |
| 884 | if (ext[aA2 + 1] < wholeExt[aA2 + 1]) |
| 885 | { |
| 886 | return; |
| 887 | } |
no test coverage detected