Jump to content
  • Advertisement
Sign in to follow this  
derek7

D3DXVec3TransformCoordArray

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

D3DXVECTOR3 * D3DXVec3TransformCoordArray( D3DXVECTOR3* pOut, UINT OutStride, CONST D3DXVECTOR3* pV, UINT VStride, CONST D3DXMATRIX* pM, UINT n ); what does outstride and vstride mean? it mean it can do vertexbuffer(contain D3DXVECTOR3 pos ,D3DXVECTOR2 tex etc...) and set stride to sizeof(vertexstruct),doesn't it? but why is pOut D3DXVECTOR3* ? if it can do a vertexbuffer and finally it ouput a D3DXVECTOR array? or must I cast pOut to vertexstruct?

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by derek7
what does outstride and vstride mean?

it mean it can do vertexbuffer(contain D3DXVECTOR3 pos ,D3DXVECTOR2 tex etc...) and set stride to sizeof(vertexstruct),doesn't it?
Yes, exactly. If you want to transform vertices, you can pass in E.g. &vertices[0].vPos as the pointer to the vector, and sizeof(Vertex) as the stride.

Quote:
Original post by derek7
but why is pOut D3DXVECTOR3* ? if it can do a vertexbuffer and finally it ouput a D3DXVECTOR array? or must I cast pOut to vertexstruct?
You specify the stride of the output with OutStride. If you set that to sizeof(D3DXVECTOR3), you can output an array of vectors, if you set it to sizeof(Vertex) you can output a list of vertices.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!