Mat44_i.kl¶
Types¶
Mat44_i (struct)¶
The Mat44_i represents a 4 by 4 matrix. It uses Vec4_i types for each of the 4 rows.
/*
** Example: Mat44_i
*/
// create a matrix 4x4
Vec4_i v0(1.0, 0.0, 0.0, 0.0);
Vec4_i v1(0.0, 1.0, 0.0, 0.0);
Vec4_i v2(0.0, 0.0, 1.0, 0.0);
Vec4_i v3(0.0, 0.0, 0.0, 1.0);
Mat44_i mat(v0, v1, v2, v3);
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¶
Mat44_i ( in Mat44_i other ) | |
Mat44_i ( in SInt32 _00, in SInt32 _01, in SInt32 _02, in SInt32 _03, in SInt32 _10, in SInt32 _11, in SInt32 _12, in SInt32 _13, in SInt32 _20, in SInt32 _21, in SInt32 _22, in SInt32 _23, in SInt32 _30, in SInt32 _31, in SInt32 _32, in SInt32 _33 ) | |
Mat44_i ( in Vec4_i row0, in Vec4_i row1, in Vec4_i row2, in Vec4_i row3 ) | |
Mat44_i () | |
Mat44_i | add ? ( in Mat44_i other ) |
Mat44_i | adjoint ? () |
Boolean | almostEqual ? ( in Mat44_i other ) |
Boolean | almostEqual ? ( in Mat44_i other, in SInt32 precision ) |
Mat44_i | clone ? () |
decompose ? ( out Vec3_i scaling, out Mat33_i rotation, out Vec3_i translation ) | |
SInt32 | determinant ? () |
Mat44_i | divideSInt32 ? ( in SInt32 other ) |
Boolean | equal ? ( in Mat44_i other ) |
get ? ( io Float32 v<> ) | |
get ? ( io Float32 v<>, in UInt32 o ) | |
get ? ( io Float32 v[] ) | |
get ? ( io Float32 v[], in UInt32 o ) | |
get ? ( io Float64 v<> ) | |
get ? ( io Float64 v<>, in UInt32 o ) | |
get ? ( io Float64 v[] ) | |
get ? ( io Float64 v[], in UInt32 o ) | |
getTr ? ( io Float64 v<> ) | |
UInt32 | hash ? () |
Mat44_i | inverse ? () |
Mat44_i | inverse_safe ? () |
Boolean | isNull ? () |
Mat44_i | multiply ? ( in Mat44_i other ) |
Mat44_i | multiplySInt32 ? ( in SInt32 other ) |
Vec3_i | multiplyVector3 ? ( in Vec3_i other ) |
Vec4_i | multiplyVector4 ? ( in Vec4_i other ) |
set ! ( in Float32 v<> ) | |
set ! ( in Float32 v<>, in UInt32 o ) | |
set ! ( in Float64 v<> ) | |
set ! ( in Float64 v<>, in UInt32 o ) | |
set ! ( in SInt32 _00, in SInt32 _01, in SInt32 _02, in SInt32 _03, in SInt32 _10, in SInt32 _11, in SInt32 _12, in SInt32 _13, in SInt32 _20, in SInt32 _21, in SInt32 _22, in SInt32 _23, in SInt32 _30, in SInt32 _31, in SInt32 _32, in SInt32 _33 ) | |
set ! ( in Vec3_i translation, in Mat33_i rotation, in Vec3_i scaling ) | |
set ! ( in Vec3_i translation, in Quat_i rotation, in Vec3_i scaling ) | |
setColumns ! ( in Vec4_i col0, in Vec4_i col1, in Vec4_i col2, in Vec4_i col3 ) | |
setDiagonal ! ( in SInt32 v ) | |
setDiagonal ! ( in Vec3_i v ) | |
setDiagonal ! ( in Vec4_i v ) | |
setFromMat33_i ! ( in Mat33_i m ) | |
setIdentity ! () | |
setNull ! () | |
setRotation ! ( in Quat_i q ) | |
setRows ! ( in Vec4_i row0, in Vec4_i row1, in Vec4_i row2, in Vec4_i row3 ) | |
setScaling ! ( in Vec3_i v ) | |
setTr ! ( in Float64 v<> ) | |
setTranslation ! ( in Vec3_i tr ) | |
setUpperLeft ! ( in Mat33_i m ) | |
Mat44_i | subtract ? ( in Mat44_i other ) |
Vec3_i | translation ? () |
Mat44_i | transpose ? () |
Mat33_i | upperLeft ? () |
zeroTranslation ! () |