c# - Circle and line segment collision -
this question has answer here:
what algorithm use check whether line intersects circle? , @ coordinate along circles edge occurred?
calculate distance between center of circle , line described here.
check if closest point between endpoints of line segment. if between them, check if distance smaller radius; otherwise check if 1 of edge points inside circle.
Comments
Post a Comment