Exemple #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);
 }
Exemple #2
0
 public IntRectangle Extend(IntVector extend)
 {
     return(new IntRectangle(Position - extend, Size + (extend * 2)));
 }
Exemple #3
0
 public IntRectangle Move(IntVector offset)
 {
     return(new IntRectangle(Position + offset, Size));
 }
Exemple #4
0
 public IntRectangle(IntVector position, IntVector size)
 {
     Position = position;
     Size     = size;
 }
Exemple #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);
 }
Exemple #6
0
 public static IntRectangle FromPositionAndSize(IntVector position, IntVector size)
 {
     return(new IntRectangle(position, size));
 }
Exemple #7
0
 public static IntRectangle FromPoints(IntVector leftTop, IntVector rightBottom)
 {
     return(new IntRectangle(leftTop, rightBottom - leftTop));
 }
Exemple #8
0
 public static IntRectangle FromCenterAndSite(IntVector center, IntVector size)
 {
     return(IntRectangle.FromPositionAndSize(center - size / 2, size));
 }
Exemple #9
0
 public static IntVector MinMax(IntVector a, IntVector min, IntVector max)
 {
     return(Min(max, Max(min, a)));
 }
Exemple #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)));
 }