Jump to content
  • Advertisement
Sign in to follow this  
averisk

Tetrahedron vs Sphere (yes, another specific collision detection problem)

This topic is 4850 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I need to check the intersection of a tetrahedron (ie. four point 3d object) and a sphere. It needs to be very fast and I don't think what I've come up with so far is going to cut it: For each face: Get the closest point on the plane. If the sphere is above the plane, return false. If the sphere intersects plane, and the point is within the face, return true. Otherwise, continue. Also record whether the sphere intersects the plane or not, so that if we find that it doesn't intersect any of the planes, we can return true immediately (completely within tetra) Now, I think this is great except for the case where the sphere intersects one of the corners/edges... And I don't want to try getting the distance to all six edges as a final check. Maybe I'll have to... Can anyone think of a better idea? I'd check www.magic-software.com but it doesn't appear to exist anymore :( PS: Know any good alternatives to magic-software? Thanks [Edited by - averisk on August 6, 2005 1:30:07 AM]

Share this post


Link to post
Share on other sites
Advertisement
Check if the sphere is inside all the planes, if true, is intersecting, return.
Find the distance to each triangle, store the nearest distance found (or distance^2), check against sphere center and radius (or radius^2). The Geometric Tools site has a triangle distance example.

A Voronoi region method could also be used (see Wm3DistVector3Frustum3.cpp).

Another triangle-distance method is shown in Real-time Collision Detection.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!