Sign in to follow this  

D3DXVec3TransformCoordArray

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

This topic is 4138 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.

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