Beispiel #1
0
 public GRect(GVec2 location, decimal SizeX, decimal SizeY)
 {
     this.X     = location.X;
     this.Y     = location.Y;
     this.SizeX = SizeX;
     this.SizeY = SizeY;
 }
Beispiel #2
0
 public GRect(GVec2 upperRight, GVec2 lowerLeft)
 {
     this.X     = upperRight.X;
     this.Y     = upperRight.Y;
     this.SizeX = upperRight.X - lowerLeft.X;
     this.SizeY = upperRight.Y - lowerLeft.Y;
 }
Beispiel #3
0
 public bool IntersectsWith(GVec2 point)
 {
     if (this.X < point.X && this.X + this.SizeX > point.X &&
         this.Y < point.Y && this.Y + this.SizeY > point.Y)
     {
         return(true);
     }
     return(false);
 }
Beispiel #4
0
 public GRect(GVec2 location)
 {
     this.X        = location.X;
     this.Y        = location.Y;
     this.Location = location;
 }