# Could anyone pleae explain about Transform_Mat function ?

## Recommended Posts

Hello everyone,Yep, the title says all. Actually, there are many sites giving simple tutorials about this function but none of them makes me understand it anyway. Could anyone help me ?Thanks in advance. Best Rgds,Laugher

##### Share on other sites
 Help AVSIM continue to serve you!Please donate today!

I mean this function in SCASM file: Transform_Mat( 0 761 -8310 ; xzy 1 0 0 0 -0.4342 -0.9008 0 0.9008 -0.4342 )As said, many sources just give me a definition of this function with a few parameters explained. As of now, I still don't know how it works.Thanks.

##### Share on other sites

Hi Laugher.You might want to go to Microsoft's web site, and download the HUGE DirectX9 SDK.A Transform Matrix apparently defines location, rotation, and size, relative to other objects or to a refpoint.Arno probably has an answer about this, but short of studying modern 3d geometry, I don't think there is a simple answer. I'm sorry I'm not of more help.Dick

##### Share on other sites

Oh, Dick, you have my big thanks for a very quick reply!I may have to try that SDK document as your suggestion.Best Rgds,Laugher

##### Share on other sites

>... but short of studying>modern 3d geometry, I don't think there is a simple answer...>Hah hah...you're right. I've been reading articles regarding this thing on the net while wating for the download of SDK document to complete. I got headach... :( Plenty of complex equations are shown there.Maybe, a final equation on rotating around each axis, moving along specific axis and/or scaling an object being shown here would be very great.Thank you.Best Rgds,Laugher

##### Share on other sites

Hi Laugher,Check this part of the DirectX SDK:http://msdn.microsoft.com/archive/default....es/rotation.aspIt defines how the matrix works for a rotation around each angle. By multiplying these different matrices you can get a rotation around all angles. As you can imagine it will become quite complex with sine and cosine functions then :).You will also see that the DirectX matrix is a bit complexer (it is 4x4), but in general it works the same.Please note that SCASM also has a Transform_Mat command with the following synthax:Transform_Mat( a xo zo yo p b h )Here you just enter the angles and SCASM does the calculations for you.

##### Share on other sites

Thanks a lot, arno!:)

## Create an account

Register a new account

• Tom Allensworth,
Founder of AVSIM Online

• ### Hot Spots

• Flight Simulation's Premier Resource!

AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!