Skip to main content
gamedev.net
🔒 Locked

D3DXVec3TransformCoordArray

Started by derek7 0 replies 900+ views
Original Post
derek7
derek7
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?
Evil Steve
Evil Steve
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.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.