Getting list of triangles within certain distance

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
EricDB
Posts: 8
Joined: Wed Nov 09, 2005 1:47 am

Getting list of triangles within certain distance

Post by EricDB »

Let's say I'm colliding a sphere against a terrain or level mesh. I'm interested in finding all triangles such that the distance to the closest point on the triangle from the sphere's center is less than the radius of the sphere.

The math is no problem, but I'm brand new to Irrlicht, and to 3D game programming, so I'm wondering how this can be done in an optimized way. Does Irrlicht have built-in functionality for finding triangles near a certain point, and if not, how would I integrate my own code?
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

currently the traingle selector's getTriangles does not work with spheres. I'd recommend copying and modifying the code for ITriangleSelector::getTriangles(..., AABB), then submitting it as a patch for the triangle selector so we can all use it :)
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
Post Reply