• Create Account

### #ActualBurnt_Fyr

Posted 07 January 2013 - 01:47 PM

To add to, and clear up some of what columbo said, a 4x4 matrix can represent a set of orthonormal basis and a position relative to some other coordinate system. Depending on matrix layout, as in Row/Column majorness, Row/Column vectors, as well as handedness or the coordinate frame this can be setup in a few different ways. In Row Major, left handed system( that which directx uses by default) these are laid out like this:

[ x.x, x.y, x.z, 0] // X axis vector
[ y.x, y.y, y.z, 0] // Y axis
[ z.x, z.y, z.z, 0] // Z axis
[ P.x, P.y, P.z, 1] // Point in parent frame to translate local origin to.

I tend to call these the Right, Up, and Forward vectors. The x axis points to the right of your object, the Y axis points up out of your object, and the Z axis points in front of the object. So as Columbo said, your desired vector can be pulled from one of the rows of the matrix. Whether or not it is the one you define as up is up to you(pun intended) In reality, Up down left right front back, are all terms we use to describe things relative to our coordinate frame.

If this is puzzling to you, realize that the difference between row or column vectors has to deal with how we manipulate the vectors(it affects matrix multiplication)the majorness of a matrix has to deal with how it is indexed in memory(does the first index point to a row, or a column) and that the handedness really has no effect on the math until it comes to projecting onto a 2d frame.

http://fgiesen.wordpress.com/2012/02/12/row-major-vs-column-major-row-vectors-vs-column-vectors/

This article should help clear out some confusion that I may have induced.

### #1Burnt_Fyr

Posted 07 January 2013 - 01:43 PM

To add to, and clear up some of what columbo said, a 4x4 matrix can represent a set of orthonormal basis and a position relative to some other coordinate system. Depending on matrix layout, as in Row/Column majorness, Row/Column vectors, as well as handedness or the coordinate frame this can be setup in a few different ways. In Row Major, left handed system( that which directx uses by default) these are laid out like this:

[ x.x, x.y, x.z, 0] // X axis vector
[ y.x, y.y, y.z, 0] // Y axis
[ z.x, z.y, z.z, 0] // Z axis
[ P.x, P.y, P.z, 1] Point in parent from to translate to.

I tend to call these the Right, Up, and Forward vectors. The x axis points to the right of your object, the Y axis points up out of your object, and the Z axis points in front of the object. So as Columbo said, your desired vector can be pulled from one of the rows of the matrix. Whether or not it is the one you define as up is up to you(pun intended) In reality, Up down left right front back, are all terms we use to describe things relative to our coordinate frame.

If this is puzzling to you, realize that the difference between row or column vectors has to deal with how we manipulate the vectors(it affects matrix multiplication)the majorness of a matrix has to deal with how it is indexed in memory(does the first index point to a row, or a column) and that the handedness really has no effect on the math until it comes to projecting onto a 2d frame.

http://fgiesen.wordpress.com/2012/02/12/row-major-vs-column-major-row-vectors-vs-column-vectors/

This article should help clear out some confusion that I may have induced.

PARTNERS