fast sphere-grid intersection
Posted
by Mat
on Stack Overflow
See other posts from Stack Overflow
or by Mat
Published on 2010-02-22T08:01:48Z
Indexed on
2010/03/15
5:39 UTC
Read the original article
Hit count: 486
hi!
given a 3D grid, a 3d point as sphere center and a radius, i'd like to quickly calculate all cells contained or intersected by the sphere.
Currently i take the the (gridaligned) boundingbox of the sphere and calculate the two cells for the min anx max point of this boundingbox. then, for each cell between those two cells, i do a box-sphere intersection test.
would be great if there was something more efficient
thanks!
© Stack Overflow or respective owner