------------------------------------------------------------------------------
| 912 | |
| 913 | //------------------------------------------------------------------------------ |
| 914 | bool vtkAxisAlignedReflectionFilter::ProcessLeaf( |
| 915 | vtkDataObject* inputDataObject, vtkDataObject* outputDataObject, double bounds[6]) |
| 916 | { |
| 917 | double constant[3] = { 0.0, 0.0, 0.0 }; |
| 918 | int mirrorDir[3] = { 1, 1, 1 }; |
| 919 | int mirrorSymmetricTensorDir[6] = { 1, 1, 1, 1, 1, 1 }; |
| 920 | int mirrorTensorDir[9] = { 1, 1, 1, 1, 1, 1, 1, 1, 1 }; |
| 921 | |
| 922 | if (this->PlaneMode == PLANE) |
| 923 | { |
| 924 | if (!this->ReflectionPlane->GetAxisAligned()) |
| 925 | { |
| 926 | vtkErrorMacro("Unable to retrieve valid axis-aligned implicit function to reflect with."); |
| 927 | return false; |
| 928 | } |
| 929 | double* normal = this->ReflectionPlane->GetNormal(); |
| 930 | double* origin = this->ReflectionPlane->GetOrigin(); |
| 931 | double offset = this->ReflectionPlane->GetOffset(); |
| 932 | this->PlaneAxisInternal = X_PLANE; |
| 933 | if (normal[1] > normal[0]) |
| 934 | { |
| 935 | this->PlaneAxisInternal = Y_PLANE; |
| 936 | } |
| 937 | if (normal[2] > normal[0]) |
| 938 | { |
| 939 | this->PlaneAxisInternal = Z_PLANE; |
| 940 | } |
| 941 | this->PlaneOriginInternal[0] = origin[0] + offset; |
| 942 | this->PlaneOriginInternal[1] = origin[1] + offset; |
| 943 | this->PlaneOriginInternal[2] = origin[2] + offset; |
| 944 | } |
| 945 | else |
| 946 | { |
| 947 | switch (this->PlaneMode) |
| 948 | { |
| 949 | case X_MIN: |
| 950 | this->PlaneAxisInternal = X_PLANE; |
| 951 | this->PlaneOriginInternal[0] = bounds[0]; |
| 952 | break; |
| 953 | case Y_MIN: |
| 954 | this->PlaneAxisInternal = Y_PLANE; |
| 955 | this->PlaneOriginInternal[1] = bounds[2]; |
| 956 | break; |
| 957 | case Z_MIN: |
| 958 | this->PlaneAxisInternal = Z_PLANE; |
| 959 | this->PlaneOriginInternal[2] = bounds[4]; |
| 960 | break; |
| 961 | case X_MAX: |
| 962 | this->PlaneAxisInternal = X_PLANE; |
| 963 | this->PlaneOriginInternal[0] = bounds[1]; |
| 964 | break; |
| 965 | case Y_MAX: |
| 966 | this->PlaneAxisInternal = Y_PLANE; |
| 967 | this->PlaneOriginInternal[1] = bounds[3]; |
| 968 | break; |
| 969 | case Z_MAX: |
| 970 | this->PlaneAxisInternal = Z_PLANE; |
| 971 | this->PlaneOriginInternal[2] = bounds[5]; |
no test coverage detected