Sign in to follow this  
anhoppe

Accessing model mesh data

Recommended Posts

Hi guys, I can't figure out how to access the triangle data from a loaded model. I think I need to access the VertexBuffer (via the indices of the IndexBuffer), but I don't get how it works. Could someone give me a hint? BTW, I need the triangle data for 3D picking. Is it better to use a custom content loader to get the vertex data? -- thank you

Share this post


Link to post
Share on other sites
Assuming you're talking about XNA, you can get the meshes using the Meshes property, and then use the VertexBuffer and IndexBuffer property of each mesh. See the documentation of the Model class for more info.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this