18,700
edits
m (link fixes) |
m (link fix) |
||
Line 99: | Line 99: | ||
;Transform matrices | ;Transform matrices | ||
:Like all matrices in Oni, they are composed of 3 vectors defining rotation/scaling/shearing and a 4th vector defining a translation. | :Like all matrices in Oni, they are composed of 3 vectors defining rotation/scaling/shearing and a 4th vector defining a translation. | ||
:In the above table the 4 vectors are presented as rows ([[ | :In the above table the 4 vectors are presented as rows ([[wp:Row-_and_column-major_order|Direct 3D convention]]), although OpenGL and Oni use them as columns. | ||
:[[ | :[[wp:Transformation_matrix#Affine_transformations|Affine transformations]] use a 4x4 matrix with 4 extra coefficients (in the presentation above, one would add one column on the right): | ||
::three [[ | ::three [[wp:3D_projection|projection transform]] coefficients (all of them are zero here); one final coefficient (always 1.0 for an affine transform matrix). | ||
:Alternatively, one can think of the 3x4 matrix as a 3x3 rotation/scaling matrix and a position vector | :Alternatively, one can think of the 3x4 matrix as a 3x3 rotation/scaling matrix and a position vector | ||
::*Let X=(x, y, z) be the position of a vertex in the M3GM | ::*Let X=(x, y, z) be the position of a vertex in the M3GM |