Skip to main content
GameDev.net gamedev.net
🔒 Locked

MS VB framework

Started by Big_Boy_Rees Nov 2, 2002 at 5:21 AM 2 replies 300+ views
Original Post
Big_Boy_Rees
Big_Boy_Rees
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..)
yes, yes I am stupid.
WonderWorld
WonderWorld
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.


Big_Boy_Rees
Big_Boy_Rees
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)
yes, yes I am stupid.
Big_Boy_Rees
Big_Boy_Rees
Nevermind, I got it working now. I just followed that order of matrix multiplication and added to the framework.. Thanx, I think.
yes, yes I am stupid.

Topic Locked

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

Sign in to reply to this topic.