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; } }
public static void RotateAxisParallel(this IQuboidLogic type) { double help = type.Width; type.Width = (type.Height); type.Height = (help); }
public static void RotateAxisVertical(this IQuboidLogic type) { double help = type.Width; type.Width = (type.Length); type.Length = (help); }
public static void RotateAxisHorizontal(this IQuboidLogic type) { double help = type.Length; type.Length = (type.Height); type.Height = (help); }
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; } }
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); } }
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); }
public static double Ground(this IQuboidLogic logicHolder, int rotation) { return(logicHolder.GetLength(rotation) * logicHolder.GetWidth(rotation)); }
public static double Space(this IQuboidLogic logic) { return(logic.Length * logic.Width * logic.Height); }
public static double MaxSideValue(this IQuboidLogic logicHolder) { return(Math.Max(logicHolder.Length, Math.Max(logicHolder.Width, logicHolder.Height))); }