Original Post
I'm trying to find the max/min vertex positions on a mesh so I can dynamically assign a bounding box to the mesh if one isn't provided. I think the best way of doing this (since I'm working with a number of different file types) is to pass the vertex buffer to a function to iterate through the bufer and find it that way. If I'm wrong or if you know of a better way let me know. Either way, I'm working with an XFile first, but I load them using the D3DX library, so I don't know how to get the raw vertex buffer by its self. There's a function called GetPrivateData that is apart of the IDirect3DVertexBuffer9 interface, but it needs a REFGUID. Does anyone know what thats for, or how I can get it, or if this is even the right method to use? Or just any general input about what I'm doing to get a bounding box around any mesh would be great too! Thanks.