Exemple #1
0
        static public T[, ] GetPlane <T>(this T[, , ] array, Direction constIndex, int planeIndex)
        {
            switch (constIndex)
            {
            case Direction.x:
                return(array.GetXPlane(planeIndex));

            case Direction.y:
                return(array.GetYPlane(planeIndex));

            case Direction.z:
                return(array.GetZPlane(planeIndex));

            case Direction.zero:
                throw new ArgumentException("Direction.zero is not a proper plane's const index.");

            default:
                throw new ArgumentException("Not known value.");
            }
        }