Objects within Convex / Frustum

Lf3THn4D
Posts: 11
Joined: Tue Mar 11, 2008 4:14 am

Objects within Convex / Frustum

Post by Lf3THn4D »

Hi, I'm working on an editor and need a way to do box selection. However I can't seem to figure how to get objects within a convex mesh from bullet. All I find is the convex sweep API which isn't very helpful for this case. Is there a way to do Convex/Frustum intersection test in bullet?
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: Objects within Convex / Frustum

Post by Erwin Coumans »

Yes, the btDbvtBroadphase supports view frustum culling to get all bounding boxes overlapping a frustum. Then you can perform further tests on those results.

See Extras/CDTestBenchmark for an example. It gives graphical feedback for view frustum and occlusion culling.
Hope this helps,
Erwin
Lf3THn4D
Posts: 11
Joined: Tue Mar 11, 2008 4:14 am

Re: Objects within Convex / Frustum

Post by Lf3THn4D »

Hmmm.. ok. thanks. :) I suppose after that for polygonal test i will have to test for each objects with the collision algorithms found in CollisionDispatch dir?

[edit]
Maybe it has been asked before but I cant seem to find the answer. But how do I actually do perfect intersection test between two objects outside of the physics system? The collision algorithm stuffs seems to be pretty tied up with the collision respond system?
[/edit]