The MASM Forum

General => The Campus => Topic started by: xandaz on August 25, 2012, 07:29:56 AM

Title: SetWorldTransform...HELP again....
Post by: xandaz on August 25, 2012, 07:29:56 AM
    I mean... i prolly lost count for the time i spent thinking about it and i still can't understand the matrix thing and how it translates the DC. i was masking this thing that works with the members of xform, but it's not working. Can someone look into it? please?
Title: Re: SetWorldTransform...HELP again....
Post by: Farabi on August 25, 2012, 11:08:16 PM
What youre gona do with the matrix? I spent 2 years before understand how the matrix worked  :greenclp:
Title: Re: SetWorldTransform...HELP again....
Post by: dedndave on August 26, 2012, 02:46:22 PM
(http://i52.photobucket.com/albums/g8/mew281/Animated-Long-1.gif)
Title: Re: SetWorldTransform...HELP again....
Post by: qWord on August 27, 2012, 01:21:04 AM
Hi,
a matrix allows to combine several transformation: rotate, scale, shear, translation and reflection  (http://msdn.microsoft.com/en-us/library/windows/desktop/dd145224(v=vs.85).aspx). Each of this transformation can be described through a matrix. The resulting transformation depends on the order in which the matrices get combined (matrix multiplication, CombineTransform (http://msdn.microsoft.com/en-us/library/windows/desktop/dd183466(v=vs.85).aspx)).
For example, if you want to rotate around a specific point:

    1. translate point to origin: -Px, -Py
    2. rotate
    3. translate +Px,+Py

In the attachment an example program that allows to play with transformations.
Title: Re: SetWorldTransform...HELP again....
Post by: dedndave on August 27, 2012, 02:12:01 AM
thanks for another nice example, qWord   :t
Title: Re: SetWorldTransform...HELP again....
Post by: Farabi on August 27, 2012, 11:36:50 AM
Nice example  :t
Title: Re: SetWorldTransform...HELP again....
Post by: Siekmanski on August 27, 2012, 05:00:02 PM
Cool.  8)
Title: Re: SetWorldTransform...HELP again....
Post by: xandaz on January 20, 2013, 01:56:13 AM
   Jesus....QWord...You're the master. Long time since last here. Hi All.