namespace Orvid.Graphics { /// /// The class that defines a bounding box. /// public class BoundingBox { private int right; private int left; private int top; private int bottom; /// /// The default constructor. /// /// The farthest left side of the bounding box. /// The farthest right side of the bounding box. /// The farthest up side of the bounding box. /// The farthest down side of the bounding box. public BoundingBox(int ileft, int iright, int itop, int ibottom) { this.left = ileft; this.right = iright; this.top = itop; this.bottom = ibottom; } /// /// Returns true if the given point is inside the bounding box. /// /// The point to check. /// public bool IsInBounds(Vec2 p) { return ((p.X < right && p.X > left) && (p.Y < top && p.Y > bottom)); } } }