/// <summary> /// Test to see if the rectangle is inside the viewing area. /// </summary> /// <param name="rectangle">Rectangle to test.</param> /// <returns></returns> public bool IsViewable(Rectangle rectangle) { return(ViewingArea.Intersects(rectangle) || ViewingArea.Contains(rectangle.Center.X, rectangle.Center.Y)); }
/// <summary> /// Test to see if the position is inside the viewing area. /// </summary> /// <param name="position">Position to test.</param> /// <returns></returns> public bool IsViewable(Vector2 position) { return(ViewingArea.Contains((int)position.X, (int)position.Y)); }