Testing whether a line segment intersects a sphere

后端 未结 4 383
感动是毒
感动是毒 2020-12-17 03:42

I am trying to determine whether a line segment (i.e. between two points) intersects a sphere. I am not interested in the position of the intersection, just whether or not t

4条回答
  •  一生所求
    2020-12-17 04:03

    you sorta have to work that the position anyway if you want accuracy. The only way to improve speed algorithmically is to switch from ray-sphere intersection to ray-bounding-box intersection.

    Or you could go deeper and try and improve sqrt and other inner function calls

    http://wiki.cgsociety.org/index.php/Ray_Sphere_Intersection

提交回复
热议问题