How to create a D3DXMatrix
hi guys i was wondering how i would change a Square from just a set of drawn vertices to a matrix so i could translate and rotate it?
well i was trying to translate my square but how would i do that?
for instance i have a class Car, and an mCar object of the class car. And i want to take input in and translate
for example
DXDMatrixTranslate(&mCar,x,y,z);
but how would i make it so that mCar is a matrix to traslate?
for instance i have a class Car, and an mCar object of the class car. And i want to take input in and translate
for example
DXDMatrixTranslate(&mCar,x,y,z);
but how would i make it so that mCar is a matrix to traslate?
I think that you're thinking about this the wrong way. A matrix is just used to store your position, rotation, and scaling values. In order to use that to translate your car object you need to multiply each vertex by that matrix. You can do this in directx by setting your world matrix to the matrix you've built using D3DXMatrixTranslation.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement