Mat33_c.kl¶
Types¶
Mat33_c (struct)¶
The Mat33_c represents a 3 by 3 matrix. It uses Vec3_c types for each of the 3 rows.
/*
** Example: Vec4
*/
// create a matrix 3x3
Vec3_c v0(1.0, 0.0, 0.0);
Vec3_c v1(0.0, 1.0, 0.0);
Vec3_c v2(0.0, 0.0, 1.0);
Mat33_c mat(v0, v1, v2);
Fabric Engine Matrices are column-major rather than row-major¶
Most DCCs follow a row-major convention for expressing their matrices which implies that multiplication of matrices occurs in the opposite order to those in Fabric Engine.
In Maya and Softimage, to transform a point (P) by a matrix (WM), you would post-multiply the vector by the matrix by placing it on the left side of the matrix.
(P’ = P x WM)
In Fabric Engine, to transform a point (P) by a matrix (WM), you would post-multiply it by placing it on the right hand side of the matrix.
(P’ = WM x P)
When multiplying matrices together, the order of the matrices is also swapped when compared to Maya/Softimage.
To Transform a Matrix (M) into the space of a another matrix (WM), you would place the L on the right hand side of WM
(M’ = WM x M)
In Maya, Softimage and 3dsmax, the order of the matrices in the multiplication would be swapped.
(M’ = M x WM)
Methods¶
Mat33_c ( in Complex _00, in Complex _01, in Complex _02, in Complex _10, in Complex _11, in Complex _12, in Complex _20, in Complex _21, in Complex _22 ) | |
Mat33_c ( in Mat33_c other ) | |
Mat33_c ( in Vec3_c row0, in Vec3_c row1, in Vec3_c row2 ) | |
Mat33_c () | |
Mat33_c | add ? ( in Mat33_c other ) |
Mat33_c | adjoint ? () |
Boolean | almostEqual ? ( in Mat33_c other ) |
Boolean | almostEqual ? ( in Mat33_c other, in Float32 precision ) |
Mat33_c | clone ? () |
Complex | determinant ? () |
Mat33_c | divideComplex ? ( in Complex other ) |
Boolean | equal ? ( in Mat33_c other ) |
UInt32 | hash ? () |
Mat33_c | inverse ? () |
Mat33_c | inverse_safe ? () |
Mat33_c | multiply ? ( in Mat33_c other ) |
Mat33_c | multiplyComplex ? ( in Complex other ) |
Vec3_c | multiplyVector ? ( in Vec3_c other ) |
set ! ( in Complex _00, in Complex _01, in Complex _02, in Complex _10, in Complex _11, in Complex _12, in Complex _20, in Complex _21, in Complex _22 ) | |
set ! ( in Vec3_c row0, in Vec3_c row1, in Vec3_c row2 ) | |
setColumns ! ( in Vec3_c col0, in Vec3_c col1, in Vec3_c col2 ) | |
setDiagonal ! ( in Complex v ) | |
setDiagonal ! ( in Vec3_c v ) | |
setIdentity ! () | |
setNull ! () | |
setRows ! ( in Vec3_c row0, in Vec3_c row1, in Vec3_c row2 ) | |
Mat33_c | subtract ? ( in Mat33_c other ) |
Mat33_c | transpose ? () |