• Advertisement
Sign in to follow this  

Combine Rotations

This topic is 4010 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
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
Sign in to follow this  

  • Advertisement