Mat44_d.kl

Types

Mat44_d (struct)

The Mat44_d represents a 4 by 4 matrix. It uses Vec4_d types for each of the 4 rows.

参考

Xfo, Mat33_d

/*
** Example: Mat44_d
*/

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

Methods

  Mat44_d ( in Float64 _00, in Float64 _01, in Float64 _02, in Float64 _03, in Float64 _10, in Float64 _11, in Float64 _12, in Float64 _13, in Float64 _20, in Float64 _21, in Float64 _22, in Float64 _23, in Float64 _30, in Float64 _31, in Float64 _32, in Float64 _33 )
  Mat44_d ( in Mat44_d other )
  Mat44_d ( in Vec4_d row0, in Vec4_d row1, in Vec4_d row2, in Vec4_d row3 )
  Mat44_d ()
Mat44_d add ? ( in Mat44_d other )
Mat44_d adjoint ? ()
Boolean almostEqual ? ( in Mat44_d other )
Boolean almostEqual ? ( in Mat44_d other, in Float64 precision )
Mat44_d clone ? ()
  decompose ? ( out Vec3_d scaling, out Mat33_d rotation, out Vec3_d translation )
Float64 determinant ? ()
Mat44_d divideFloat64 ? ( in Float64 other )
Boolean equal ? ( in Mat44_d 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_d inverse ? ()
Mat44_d inverse_safe ? ()
Boolean isNull ? ()
Mat44_d multiply ? ( in Mat44_d other )
Mat44_d multiplyFloat64 ? ( in Float64 other )
Vec3_d multiplyVector3 ? ( in Vec3_d other )
Vec4_d multiplyVector4 ? ( in Vec4_d other )
  set ! ( in Float32 v<> )
  set ! ( in Float32 v<>, in UInt32 o )
  set ! ( in Float64 _00, in Float64 _01, in Float64 _02, in Float64 _03, in Float64 _10, in Float64 _11, in Float64 _12, in Float64 _13, in Float64 _20, in Float64 _21, in Float64 _22, in Float64 _23, in Float64 _30, in Float64 _31, in Float64 _32, in Float64 _33 )
  set ! ( in Float64 v<> )
  set ! ( in Float64 v<>, in UInt32 o )
  set ! ( in Vec3_d translation, in Mat33_d rotation, in Vec3_d scaling )
  set ! ( in Vec3_d translation, in Quat_d rotation, in Vec3_d scaling )
  setColumns ! ( in Vec4_d col0, in Vec4_d col1, in Vec4_d col2, in Vec4_d col3 )
  setDiagonal ! ( in Float64 v )
  setDiagonal ! ( in Vec3_d v )
  setDiagonal ! ( in Vec4_d v )
  setFromMat33_d ! ( in Mat33_d m )
  setIdentity ! ()
  setNull ! ()
  setRotation ! ( in Quat_d q )
  setRows ! ( in Vec4_d row0, in Vec4_d row1, in Vec4_d row2, in Vec4_d row3 )
  setScaling ! ( in Vec3_d v )
  setTr ! ( in Float64 v<> )
  setTranslation ! ( in Vec3_d tr )
  setUpperLeft ! ( in Mat33_d m )
Mat44_d subtract ? ( in Mat44_d other )
Vec3_d translation ? ()
Mat44_d transpose ? ()
Mat33_d upperLeft ? ()
  zeroTranslation ! ()

Operators

Mat44_d = ( Param other )