Mat44_cd.kl

Types

Mat44_cd (struct)

The Mat44_cd represents a 4 by 4 matrix. It uses Vec4_cd types for each of the 4 rows.

参考

Xfo, Mat33_cd

/*
** Example: Mat44_cd
*/

// create a matrix 4x4
Vec4_cd v0(1.0, 0.0, 0.0, 0.0);
Vec4_cd v1(0.0, 1.0, 0.0, 0.0);
Vec4_cd v2(0.0, 0.0, 1.0, 0.0);
Vec4_cd v3(0.0, 0.0, 0.0, 1.0);
Mat44_cd 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_cd row0  
Vec4_cd row1  
Vec4_cd row2  
Vec4_cd row3  

Methods

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

Operators

Mat44_cd = ( Param other )