public static double[,] Create3DReflectionMatrix(Matrix3DReflectionPlane axis) { var output = CreateIdentityMatrix(4); if (axis == Matrix3DReflectionPlane.XY) { output[2, 2] *= -1; } else if (axis == Matrix3DReflectionPlane.YZ) { output[0, 0] *= -1; } else if (axis == Matrix3DReflectionPlane.ZX) { output[1, 1] *= -1; } return(output); }
/// <summary> /// Creates 3-dimensional reflection matrix over the specified plane. /// </summary> public static Matrix Create3DReflectionMatrix(Matrix3DReflectionPlane plane) { return(new Matrix(MatrixFunctions.Create3DReflectionMatrix(plane))); }