Sign in to follow this  

[MDX] BoxBoundProbe .. wich is before the other

This topic is 4310 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

Hi, I'm using geometry.BoxBoundProbe in my program for intersect testing.. it work #1 but there is no intersectinformation like mesh.intersect give.. So how can i know wich object is before the other?? .. If I can't, i will create a temp mesh instead of a boundboxprobe... test it and destroy it without drawing it. Thanks a+

Share this post


Link to post
Share on other sites
Quote:
Original post by Grattier
I'm using geometry.BoxBoundProbe in my program for intersect testing.. it work #1 but there is no intersectinformation like mesh.intersect give.. So how can i know wich object is before the other?? ..
Hmm, interesting. I presume MDX is the same as native in this case, but the only out/return data is a BOOL. No intersection information at all [oh]

A possible solution would be to use [D3DX]BoxBoundProbe() and if it returns TRUE then you can further interrogate it using [D3DX]IntersectTri(). Defining 12 triangles for a bounding box isn't difficult, and depending on context you might be able to reduce it to 6 (or less) due to back face culling.

Quote:
Original post by Grattier
If I can't, i will create a temp mesh instead of a boundboxprobe... test it and destroy it without drawing it.
Don't create/destroy a mesh on every test - that'll really hurt performance. Instead, create a box mesh at the same time as you load/manipulate your geometry and keep re-using it for intersection tests.

hth
Jack

Share this post


Link to post
Share on other sites

This topic is 4310 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this