[MDX] BoxBoundProbe .. wich is before the other
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+
Quote:Original post by GrattierHmm, 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]
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?? ..
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 GrattierDon'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.
If I can't, i will create a temp mesh instead of a boundboxprobe... test it and destroy it without drawing it.
hth
Jack
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!
How does IntersectTri work? I never usedit.. can you give me a link where I can read on that or just explain me!
Thanks!
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement