Well, I got a job thanks to some help on another forum .
I used the class GraphicsPathto do all the hard work for me.
Here is what my method looked like:
public bool IsColliding(Vector2 point)
{
GraphicsPath gp = new GraphicsPath();
Vector2 prevPoint = points[0];
for (int i = 1; i < points.Count; i++)
{
Vector2 currentPoint = points[i];
gp.AddLine(prevPoint.X, prevPoint.Y, currentPoint.X, currentPoint.Y);
prevPoint = currentPoint;
}
gp.CloseFigure();
return gp.IsVisible(point.X, point.Y);
}
Thanks for your suggestions to both of you.
elwyn source
share