Jump to content
  • Advertisement
Sign in to follow this  
Grattier

[MDX] BoxBoundProbe .. wich is before the other

This topic is 4526 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
Advertisement
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
Hum ok.. nice answer..

How does IntersectTri work? I never usedit.. can you give me a link where I can read on that or just explain me!

Thanks!

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!