Matrix rotation values

Post Reply
David Carson
Posts: 3
Joined: Tue Dec 22, 2009 2:37 am

Matrix rotation values

Post by David Carson »

I'm making the following assumptions about the rotation matrix. Is any of this incorrect?
3x3 matrix
column 1 is normalized vector in the 'right' direction.
column 2 is normalized vector in the 'up' direction.
column 3 is normalized vector in the 'look' direction.

in the code, 'pitch' refers to rotation around 'right',
'yaw' refers to rotation around 'up',
and 'roll' refers to rotation around 'look'

Thanks for any enlightenment.
Flix
Posts: 456
Joined: Tue Dec 25, 2007 1:06 pm

Re: Matrix rotation values

Post by Flix »

I don't know if this depends on the conventions you're using or not.
AFAIK in my case:

myTransform.getBasis().getColumn(0) is the X-axis (left) in global space.
myTransform.getBasis().getColumn(1) is the Y-axis (up) in global space.
myTransform.getBasis().getColumn(2) is the Z-axis (forward) in global space.

Usually they are normalized (but of course you can do weird stuff with the matrix, so it's a good thing not to be 100% confident about it).
Hope this helps.
Post Reply