rotate around local axes

  • Follow


Hi,

I have 3 rotation angles for a global orientation of a ship. From that I can 
create a transformation matrix.

Now I want to have a function to rotate that _rotated_ ship around it's 
local axes.

Something like:
mat1 = MakeRotMatrix(rx,ry,rz)
mat2 = MakeRotMatrix(deltax, deltay, deltaz)
mat = MultMatrix(mat, mat2) // or the other way round!?
GetEulerAngles(mat, &rx, &ry, &rz)

I don't know if that is right. Can someone shed light, please?



-- 
------------------------------------
Gernot Frisch
http://www.glbasic.com

0
Reply Gernot 6/17/2008 11:40:56 AM


Ignore this post. I made it my not storing any angles, but only the matrix. 
Then I multiply it with a rotation matrix and done.
The order of the multiplication switches between global and local rotation 
axes.
Sorry for bothering. 

0
Reply Gernot 6/17/2008 2:03:36 PM


Gernot Frisch schrieb:
> 
> 
> Ignore this post. I made it my not storing any angles, but only the
> matrix. 
For your application a very good choice :-)
0
Reply Paul 6/26/2008 11:58:38 PM

2 Replies
266 Views

(page loaded in 0.037 seconds)

5/23/2013 11:51:57 PM


Reply: