• Advertisement
Sign in to follow this  

How do I get total Vertices from a mesh????

This topic is 4582 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

Hi, i would like to know how to get the total number of vertices within a particular mesh. Is there a specific function for this or do i have to access the vertex info? Thanks.

Share this post


Link to post
Share on other sites
Advertisement
D3DX mesh? If that is the case than there are functions for retrieving the number of vertices, faces, etc.

Share this post


Link to post
Share on other sites
Hi the FireSoul,
Depending on if you use Managed DirectX or DirectX

[The Methods/Functions]
Native DirectX
ID3DXMesh::GetNumVertices Method : Retrieves the number of vertices in the mesh.
Managed DirectX
BaseMesh.NumberVertices Property : Retrieves the number of vertices in a mesh.

If you have any more questions please don't hestitate to ask.

Share this post


Link to post
Share on other sites
Cheers!, i just thought it would be easier to ask here than to go searching for half an hour :).

Thanks again.

O yea, and its just normal direct x ( not managed).

Share this post


Link to post
Share on other sites
hi,

you don't need half an hour, just open the SDK docs at ID3DXMesh. I did this right now :)
GetFVF if probably what you need now.

kp

Share this post


Link to post
Share on other sites
Quote:
Original post by FireSoul
is there a method for getting the number of bytes per vertex?

To complement what kovacsp said about ID3DXMesh::GetFVF() - you'll probably want to use D3DXGetFVFVertexSize() to decode the return value...

hth
Jack

Share this post


Link to post
Share on other sites
cheers!, I really hate searching, lol. Now thanks to you lot i can get on with my program :).

Thanks.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement