I've been trying to calculate if a circle is inside a square. For now I can only check if the circles center is in the square.
Thanx in Advance :)
Square/Circle Overlap test
Break the square into line segments. Check if each line segment intersects the circle if not then circle is inside if so then circle isn't inside(given what you already have ).
Quote:Original post by stonemetalAlthough you can do it this way, it shouldn't be necessary to perform per-edge tests, I don't think. You should be able to simply perform a point containment test using a square that's been 'shrunk' by the circle radius. (IINM.)
Break the square into line segments. Check if each line segment intersects the circle if not then circle is inside if so then circle isn't inside(given what you already have ).
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement