Archived

This topic is now archived and is closed to further replies.

Big_Boy_Rees

MS VB framework

Recommended Posts

Uh hi, quick question. I''m trying to make a map making program in which the user can place meshes. (loaded from .x files-this part works) Im using the microsoft visual basic framework libary (I think thats what it is called) to load all my meshes, rotate them, scale them..etc Although Ive run into a problem whereby I can''t apply 2 transfomations (rotate, translate, scale) without cancelling the other one. If anyone has had past experience with the framework please I really need help.. Im trying to get into an IT university course a year early and it would be really great to be able to show a full working Direct X program. BTW: I am using the CD3DFrame not CD3DMesh. (I wasnt sure what the difference was, I have no understanding of what Parant and Children objects are.. If someone could explain that also it would be really great..)

Share this post


Link to post
Share on other sites
Hi

you have to multiply the matices as you go
D3DXMATRIX mat, rot, trans, scale, etc....
D3DXMAtrixIdentity(&mat);
D3DXMatrixRotationZ(&rot, 0.5);
D3DXMatrixTranslation(&trans, x,y,z);
D3DXMatrixScaling(&scale, sx, sy, sz);
D3DXMatrixMultiply(&mat, &rot, &trans);
D3DXMatrixMultiply(&mat, &mat, &scale);

Never can remember the order of multiplies but I think this is right.


Share this post


Link to post
Share on other sites
Uh sorry, Im a tad lost here. Are you saying I times the rotation matrix by the translation matrix, then times the product by the scaling maatrix?

And can I do that with the framework libary? Or do I have to add in my own codeing?

(sorry Im a bit of a newb still after 1 year)

Share this post


Link to post
Share on other sites