Example #1
0
        public static void InvertRotate(this IQuboidLogic p, int i)
        {
            switch (i)
            {
            case 0:
                break;

            case 1:
                Rotate(p, 1);
                break;

            case 2:
                Rotate(p, 2);
                break;

            case 3:
                Rotate(p, 5);
                break;

            case 4:
                Rotate(p, 4);
                break;

            case 5:
                Rotate(p, 3);
                break;

            default:
                break;
            }
        }
Example #2
0
        public static void RotateAxisParallel(this IQuboidLogic type)
        {
            double help = type.Width;

            type.Width  = (type.Height);
            type.Height = (help);
        }
Example #3
0
        public static void RotateAxisVertical(this IQuboidLogic type)
        {
            double help = type.Width;

            type.Width  = (type.Length);
            type.Length = (help);
        }
Example #4
0
        public static void RotateAxisHorizontal(this IQuboidLogic type)
        {
            double help = type.Length;

            type.Length = (type.Height);
            type.Height = (help);
        }
Example #5
0
        internal static void Rotate(this IQuboidLogic quboid, int i)
        {
            switch (i)
            {
            case 0:
                break;

            case 1:
                RotateAxisVertical(quboid);
                break;

            case 2:
                RotateAxisHorizontal(quboid);
                break;

            case 3:
                RotateAxisHorizontal(quboid);
                RotateAxisVertical(quboid);
                break;

            case 4:
                RotateAxisParallel(quboid);
                break;

            case 5:
                RotateAxisParallel(quboid);
                RotateAxisVertical(quboid);
                break;

            default:
                break;
            }
        }
Example #6
0
        public static double GetHeight(this IQuboidLogic logicHolder, int rotation)
        {
            var Logic = logicHolder;

            switch (rotation)
            {
            case 0:
                return(Logic.Height);

            case 1:
                return(Logic.Height);

            case 2:
                return(Logic.Length);

            case 3:
                return(Logic.Length);

            case 4:
                return(Logic.Width);

            case 5:
                return(Logic.Width);

            default:
                return(-1);
            }
        }
Example #7
0
 public static bool Contains(this IQuboidPlace qplace, IQuboidLogic package, int rotation)
 {
     if (qplace.Length >= package.GetLength(rotation) &&
         qplace.Width >= package.GetWidth(rotation) &&
         qplace.Height >= package.GetHeight(rotation))
     {
         return(true);
     }
     return(false);
 }
Example #8
0
 public static double Ground(this IQuboidLogic logicHolder, int rotation)
 {
     return(logicHolder.GetLength(rotation) * logicHolder.GetWidth(rotation));
 }
Example #9
0
 public static double Space(this IQuboidLogic logic)
 {
     return(logic.Length * logic.Width * logic.Height);
 }
Example #10
0
 public static double MaxSideValue(this IQuboidLogic logicHolder)
 {
     return(Math.Max(logicHolder.Length, Math.Max(logicHolder.Width, logicHolder.Height)));
 }