------------------------------------------------------------------------------
| 804 | |
| 805 | //------------------------------------------------------------------------------ |
| 806 | void vtkHyperTreeGridPlaneCutter::PlaneCut( |
| 807 | int i, int j, double cellCoords[8][3], int& n, double point[][3]) |
| 808 | { |
| 809 | // The distance between vertex indices gives us the axis direction |
| 810 | if (j - i == 1) |
| 811 | { |
| 812 | // X direction |
| 813 | point[n][0] = |
| 814 | (this->Plane[3] - this->Plane[1] * cellCoords[i][1] - this->Plane[2] * cellCoords[i][2]) / |
| 815 | this->Plane[0]; |
| 816 | point[n][1] = cellCoords[i][1]; |
| 817 | point[n][2] = cellCoords[i][2]; |
| 818 | } // if ( j - i == 1 ) |
| 819 | else if (j - i == 2) |
| 820 | { |
| 821 | // Y direction |
| 822 | point[n][0] = cellCoords[i][0]; |
| 823 | point[n][1] = |
| 824 | (this->Plane[3] - this->Plane[0] * cellCoords[i][0] - this->Plane[2] * cellCoords[i][2]) / |
| 825 | this->Plane[1]; |
| 826 | point[n][2] = cellCoords[i][2]; |
| 827 | } // else if ( j - i == 2 ) |
| 828 | else // if ( j - i == 4 ) |
| 829 | { |
| 830 | // Z direction |
| 831 | point[n][0] = cellCoords[i][0]; |
| 832 | point[n][1] = cellCoords[i][1]; |
| 833 | point[n][2] = |
| 834 | (this->Plane[3] - this->Plane[0] * cellCoords[i][0] - this->Plane[1] * cellCoords[i][1]) / |
| 835 | this->Plane[2]; |
| 836 | } // else if ( j - i == 4 ) |
| 837 | |
| 838 | // Move to next point |
| 839 | ++n; |
| 840 | } |
| 841 | |
| 842 | //------------------------------------------------------------------------------ |
| 843 | void vtkHyperTreeGridPlaneCutter::ReorderCutPoints(int n, double points[][3]) |
no outgoing calls
no test coverage detected