public bool Contains(IntVector point) { return(point.X >= Left && point.X < Right && point.Y >= Top && point.Y < Bottom && point.Z >= Front && point.Z < Back); }
public IntRectangle Extend(IntVector extend) { return(new IntRectangle(Position - extend, Size + (extend * 2))); }
public IntRectangle Move(IntVector offset) { return(new IntRectangle(Position + offset, Size)); }
public IntRectangle(IntVector position, IntVector size) { Position = position; Size = size; }
public IntRectangle(int x, int y, int z, int width, int height, int depth) { Position = new IntVector(x, y, z); Size = new IntVector(width, height, depth); }
public static IntRectangle FromPositionAndSize(IntVector position, IntVector size) { return(new IntRectangle(position, size)); }
public static IntRectangle FromPoints(IntVector leftTop, IntVector rightBottom) { return(new IntRectangle(leftTop, rightBottom - leftTop)); }
public static IntRectangle FromCenterAndSite(IntVector center, IntVector size) { return(IntRectangle.FromPositionAndSize(center - size / 2, size)); }
public static IntVector MinMax(IntVector a, IntVector min, IntVector max) { return(Min(max, Max(min, a))); }
public static IntVector Max(IntVector a, IntVector b) { return(new IntVector(Math.Max(a.X, b.X), Math.Max(a.Y, b.Y), Math.Max(a.Z, b.Z))); }