I see that there is an Octree class in JigLibX. How would I make use of that in the physics engine to improve performance?
Also, in general, how should I be including physics object in the world to the physics model so that I am not doing collision detection or other physics calculations for all the objects in the game world at any one time? My game world is made out of buildings and roads, and the player maneuver a vehicle in the game world. One idea I have is to only enable physics object that are within my camera frustrum, so everytime the vehicle moves (since the camera will be following the vehicle), I will check all objects in the world and enable and disable depending on whether the objects are within the frustrum. This seems like a very inefficient way to do it. For the roads, I will definitely need to make use of the octree and that's why I would like how I can make use of that.
Any suggestions would be appreciated. Thanks!