Example #1
0
 public bool Contains(IntVector point)
 {
     return(point.X >= Left && point.X < Right && point.Y >= Top && point.Y < Bottom && point.Z >= Front && point.Z < Back);
 }
Example #2
0
 public IntRectangle Extend(IntVector extend)
 {
     return(new IntRectangle(Position - extend, Size + (extend * 2)));
 }
Example #3
0
 public IntRectangle Move(IntVector offset)
 {
     return(new IntRectangle(Position + offset, Size));
 }
Example #4
0
 public IntRectangle(IntVector position, IntVector size)
 {
     Position = position;
     Size     = size;
 }
Example #5
0
 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);
 }
Example #6
0
 public static IntRectangle FromPositionAndSize(IntVector position, IntVector size)
 {
     return(new IntRectangle(position, size));
 }
Example #7
0
 public static IntRectangle FromPoints(IntVector leftTop, IntVector rightBottom)
 {
     return(new IntRectangle(leftTop, rightBottom - leftTop));
 }
Example #8
0
 public static IntRectangle FromCenterAndSite(IntVector center, IntVector size)
 {
     return(IntRectangle.FromPositionAndSize(center - size / 2, size));
 }
Example #9
0
 public static IntVector MinMax(IntVector a, IntVector min, IntVector max)
 {
     return(Min(max, Max(min, a)));
 }
Example #10
0
 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)));
 }