I am making a game in C# and XNA and I am using three Points to represent the hitbox of an enemy object. A Rectangle variable is used to represent the player's hitbox. I am using three Points for the enemy rather than a rectangle as the enemy is shaped like a triangle.
//Example coordinates
Point pointOne = new Point(0, 50);
Point pointTwo = new Point(50, 50);
Point pointThree = new Point(25, 0);
Rectangle rect = new Rectangle(0, 0, 10, 10);
I need a way to determine if the Rectangle overlaps the area between all of the Points, as shown in the following pictures. Would anybody be able to show me a method or some kind of code that could help me accomplish this?