Sign in to follow this  
Oliver_zx

Combine Rotations

Recommended Posts

Hey there, im new to the whole game-math. I got an issue now where you guys will propably be able to help me out. I got a WorldPosition-class which holds the pos-data for my objects in the worldspace. This includes 2 Vector3's for rotation and translation as well as Matrices for rotation/translation. Now i build a hierarchy of such worldposition so any movement/rotation of an object will result in changes of any sub-item. Thus a rotation of an object around its center will lead to a rotation of the subitem around the center of the parentitem. Now to the point..the worldpos-instances generates a matrix or all translations/rotations done to the object. This will used as device.Transform.xx when the item is rendered. Thats the idea but im unable to manage it. I just dont know how to merge the Pivot-Rotation (Move world to inverse of Pivot-Pnt, Rotate, Mode world to Pivot-Pnt again). I mean how can i save the pivot-rotation in one matrix together with the other translations ? Ah well i know its not this good described..i hope you get my point. Thanks alot for the help! oliver

Share this post


Link to post
Share on other sites
Combining two transformations mean multiplying their transformation matrices together. Depending on whether you're using OpenGL or DirectX (one is row-major and the other column-major), you will either want to multiply 'up the stack' (final matrix = local transform * parent transform * ... * world transform) or 'down the stack' (final matrix = world transform * ... * group transform * leaf transform).

Share this post


Link to post
Share on other sites
Quote:
Original post by Bob Janova
Combining two transformations mean multiplying their transformation matrices together. Depending on whether you're using OpenGL or DirectX (one is row-major and the other column-major), you will either want to multiply 'up the stack' (final matrix = local transform * parent transform * ... * world transform) or 'down the stack' (final matrix = world transform * ... * group transform * leaf transform).



ah ok...thanks for the help. Will try that out...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this