   Ray Tracing and Tool Development
  I''m trying to develop a tool to create a nav system for an AI in a game. All that''s left is to actualy create the nav system. For this I need to run a Ray trace from a Plane at the camera''s position to a level model geometry. The Level is stored in a single nav mesh (only way our tech programer could get it to work in the EXTREMELY limited time we''ve got) I need to know how to extract the geometry information from a structure derived from D3DXMESHCONTAINER. After that, I should be able to take care of the rest.  
  D3DXMESHCONTAINER contains a member, D3DXMESHDATA MeshData, which contains D3DXMESHDATATYPE Type and a mesh pointer union.  Based on Type, the pointer can be LPD3DXMESH pMeshLPD3DXPMESHpPMeshLPD3DXPATCHMESH pPatchMeshbut is probably pMesh.  That gives you a D3DX mesh, from which you can extract the vertex and index buffers to get the mesh data.   I like pie. 