title: Where to start on encapsulating a 3D mesh in a Bounding Volume Hierarchy
body: <p>I am working on a rather rudimentary rigid body physics simulator for my studies. I require very fine-grain collision detection. That is, I require the XYZ point of colliding polygons of the meshes. I cannot just encapsulate the meshes in rough bounding volumes and base my collision responses on them. </p>
  
  <p>So, for meshes with a high number of polygons I obviously need a BVH (or something equivalent). Where I need help is an algorithm I can run in a pre-processing step which generates a BVH from the mesh. My background is games and all of the resources I have found thus far wrap entire meshes in convex polyhedra, and do not go as far as testing the meshes themselves. This is because games can get away with rough physics such as this. </p>
  
  <p>I am currently reading through Ericson's Real Time Collision Detection which is quite helpful, but I am wondering if anyone knows of any books/papers which specifically deal with this problem.</p>
  
  <p>I also was planning on generating AABB's from the polygons. Each frame while traversing the BVH I would transform the AABB by the rigid body's transformation matrix, creating an OABB. Then I would test the OABB's for intersection. I have not implemented this yet and is all theorycraft at the moment. If anyone has any experience doing this, any tips or more efficient algorithms would be greatly appreciated!</p>