Sign in to follow this  
GSide

how to properly get the mesh face triangle vertices

Recommended Posts

Can you please help me or provide me some sample code on how to properly get the 3 vertices (triangle) of face of a mesh from x, coz I’m trying to implement a vertex in triangle collision detection. Advance thanks!

Share this post


Link to post
Share on other sites
You need to lock the vertex buffer which returns you a pointer to the vertex data. You may also need to lock the index buffer to find out which vertices each triangle uses. When locking the vertex buffer you also have to be careful about the FVF - you may not know what it is. If this is the case I suggest doing a clone mesh first to get the mesh in a format you know about.

Share this post


Link to post
Share on other sites
Thanks Trip99 I will dig up on it!

I’ve already visited your site before and now it’s become even greater!
You are such magnificent Trip99!

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