In C++, in 2D, how can I find the point of intersection between a ray (defined by one point and a direction-vector) and a rectangle (defined by x, y, w, h)?
________
| |
| |
------------------| |
|________|
This is for a none frame based simulation, so I am not quite sure how to tackle the problem.