Sanat Talmaki wrote:
I am interested in knowing if there is some tool in osg that I can use to
perform proximity queries between a pair of objects. I looked at osgbullet.
But it offers a lot more than what I basically need.
osgBullet doesn't do collision detection -- that would be redundant, as
osgBullet apps already have access to Bullet. The place to look for collision
detection operations would be Bullet's libBulletCollision. But I can tell you
from personal experience that Bullet only cares whether two objects are in
collision or not. It doesn't care about exact distances between non-colliding
objects.
So, I wanted to know if there is some way in OSG I can compute the shortest distance between the boundaries of two objects.
The obvious and simplest solution (but not very precise) would be to take the
distance between two bounding sphere centers and subtract the two radii.
If you need a more exact solution, then I guess you could render the scene with
the eye point at one object center looking at the other object center and
calculate the window space z distance between the hulls of the two objects along
the view vector and back-transform it to world space. (I know, I know... but he
DID post this question to a 3D graphics group :-) .)
--
-Paul Martz Skew Matrix Software
http://www.skew-matrix.com/
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org