How to create list of faces of D3DXMESH
Hi
I'm trying to develop a 3D racing game. Terrain is modelled in 3D MAX and exported to .x file.
What I want is to get a list of all faces in this mesh along with normals and middle points. I need it to calculate collisions etc.
Can anybody tell me how to do it? Not in theory, but using apropriate functions. I have no idea where to start. Thanks in advance!
Sorry to sound 'theoretical', but you could try locking the mesh to a graphics stream to get the data you need out of that, I'm not sure how practical it would be to do that real time though.
Click here for a reference
Click here for a reference
If you want to just use it to calculate collisions, etc there is a handly tool called MeshIntersect (or MeshIntersectSubset) -- which you could combine with sphere/cylinder/box detection and get pretty accurate results. Its a subset of the Mesh type.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement