# Collisions between mesh (bounding-box) and Vertex/Index Buffer

I have a short Question: I'm trying to add Collisions in my 3D DirectX9 game and my World is Stored in a LPDIRECT3DVERTEXBUFFER9 and LPDIRECT3DINDEXBUFFER9 and Rendered per DrawIndexedPrimitive. My Player is a LPD3DXMESH loaded from a .X file. Now I want to detect Collisions between the two! How can I do that? After some research I could only find Collisions between Bounding Boxes and/or Rays!

• If there's no additional structure to your world (ie. it's not a terrain heightmap, or decomposed into collision primitives like boxes, spheres, capsules...) then you're basically working with a triangle soup. All you can really do is check for collisions against each triangle individually, usually using some kind of spatial partitioning structure to help narrow down which triangles are close enough to consider. Obviously this gets expensive if you have many triangles, so it's highly recommended to have a collision representation that's lower-resolution than the one you use for rendering. – DMGregory Nov 16 '15 at 17:49