Advertisement Jump to content
Sign in to follow this  
GSide

how to properly get the mesh face triangle vertices

This topic is 4920 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!