toto_tata
toto_tata

Reputation: 15432

OpenGL : non rotated 4x4 matrix

Let's say that I have a 4x4 matrix like this:

a11 a12 a13 tx
a21 a22 a23 ty
a31 a32 a33 tz
a41 a42 a43 w

Is it true to say that the non rotated matrix is :

1 0 0 tx
0 1 0 ty
0 0 1 tz
0 0 0 w

?

Upvotes: 0

Views: 54

Answers (1)

BDL
BDL

Reputation: 22173

In general, the statement is wrong. By removing the left 3 columns, also other effects than just the rotation are removed. For example, scaling factors as well as skewing is also stored in this region. Also, by maintaining the w value, the result could contain some other things than just translation.

If you assume that the original matrix was only composed by rotations and translations, then the assumption is true. Although in this case, removing only the upper 3x3 matrix would yield the same result since the last row will be [0, 0, 0, 1] anyway.

Upvotes: 1

Related Questions