Mat44_c.kl

Types

Mat44_c (struct)

The Mat44_c represents a 4 by 4 matrix. It uses Vec4_c types for each of the 4 rows.

参考

Xfo, Mat33_c

/*
** Example: Mat44_c
*/

// create a matrix 4x4
Vec4_c v0(1.0, 0.0, 0.0, 0.0);
Vec4_c v1(0.0, 1.0, 0.0, 0.0);
Vec4_c v2(0.0, 0.0, 1.0, 0.0);
Vec4_c v3(0.0, 0.0, 0.0, 1.0);
Mat44_c 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)

Members

Vec4_c row0  
Vec4_c row1  
Vec4_c row2  
Vec4_c row3  

Methods

  Mat44_c ( in Complex _00, in Complex _01, in Complex _02, in Complex _03, in Complex _10, in Complex _11, in Complex _12, in Complex _13, in Complex _20, in Complex _21, in Complex _22, in Complex _23, in Complex _30, in Complex _31, in Complex _32, in Complex _33 )
  Mat44_c ( in Mat44_c other )
  Mat44_c ( in Vec4_c row0, in Vec4_c row1, in Vec4_c row2, in Vec4_c row3 )
  Mat44_c ()
Mat44_c add ? ( in Mat44_c other )
Mat44_c adjoint ? ()
Boolean almostEqual ? ( in Mat44_c other )
Boolean almostEqual ? ( in Mat44_c other, in Float32 precision )
Mat44_c clone ? ()
Complex determinant ? ()
Mat44_c divideComplex ? ( in Complex other )
Boolean equal ? ( in Mat44_c other )
UInt32 hash ? ()
Mat44_c inverse ? ()
Mat44_c inverse_safe ? ()
Boolean isNull ? ()
Mat44_c multiply ? ( in Mat44_c other )
Mat44_c multiplyComplex ? ( in Complex other )
Vec3_c multiplyVector3 ? ( in Vec3_c other )
Vec4_c multiplyVector4 ? ( in Vec4_c other )
  set ! ( in Complex _00, in Complex _01, in Complex _02, in Complex _03, in Complex _10, in Complex _11, in Complex _12, in Complex _13, in Complex _20, in Complex _21, in Complex _22, in Complex _23, in Complex _30, in Complex _31, in Complex _32, in Complex _33 )
  set ! ( in Vec3_c translation, in Mat33_c rotation, in Vec3_c scaling )
  setColumns ! ( in Vec4_c col0, in Vec4_c col1, in Vec4_c col2, in Vec4_c col3 )
  setDiagonal ! ( in Complex v )
  setDiagonal ! ( in Vec3_c v )
  setDiagonal ! ( in Vec4_c v )
  setFromMat33_c ! ( in Mat33_c m )
  setIdentity ! ()
  setNull ! ()
  setRows ! ( in Vec4_c row0, in Vec4_c row1, in Vec4_c row2, in Vec4_c row3 )
  setScaling ! ( in Vec3_c v )
  setTranslation ! ( in Vec3_c tr )
  setUpperLeft ! ( in Mat33_c m )
Mat44_c subtract ? ( in Mat44_c other )
Vec3_c translation ? ()
Mat44_c transpose ? ()
Mat33_c upperLeft ? ()
  zeroTranslation ! ()

Operators

Mat44_c = ( Param other )