Mat33_cd (struct)

The Mat33_cd represents a 3 by 3 matrix. It uses Vec3_cd types for each of the 3 rows.

参考

Quat, Mat44

/*
** Example: Vec4
*/

// create a matrix 3x3
Vec3_cd v0(1.0, 0.0, 0.0);
Vec3_cd v1(0.0, 1.0, 0.0);
Vec3_cd v2(0.0, 0.0, 1.0);
Mat33_cd 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)

Mat33_cd Mat33_cd Mat33_cd

Members

Vec3_cd row0  
Vec3_cd row1  
Vec3_cd row2  

Methods

  Mat33_cd ( in Complex_d _00, in Complex_d _01, in Complex_d _02, in Complex_d _10, in Complex_d _11, in Complex_d _12, in Complex_d _20, in Complex_d _21, in Complex_d _22 )
  Mat33_cd ( in Mat33_cd other )
  Mat33_cd ( in Vec3_cd row0, in Vec3_cd row1, in Vec3_cd row2 )
  Mat33_cd ()
Mat33_cd add ? ( in Mat33_cd other )
Mat33_cd adjoint ? ()
Boolean almostEqual ? ( in Mat33_cd other )
Boolean almostEqual ? ( in Mat33_cd other, in Float32 precision )
Mat33_cd clone ? ()
Complex_d determinant ? ()
Mat33_cd divideComplex_d ? ( in Complex_d other )
Boolean equal ? ( in Mat33_cd other )
UInt32 hash ? ()
Mat33_cd inverse ? ()
Mat33_cd inverse_safe ? ()
Mat33_cd multiply ? ( in Mat33_cd other )
Mat33_cd multiplyComplex_d ? ( in Complex_d other )
Vec3_cd multiplyVector ? ( in Vec3_cd other )
  set ! ( in Complex_d _00, in Complex_d _01, in Complex_d _02, in Complex_d _10, in Complex_d _11, in Complex_d _12, in Complex_d _20, in Complex_d _21, in Complex_d _22 )
  set ! ( in Vec3_cd row0, in Vec3_cd row1, in Vec3_cd row2 )
  setColumns ! ( in Vec3_cd col0, in Vec3_cd col1, in Vec3_cd col2 )
  setDiagonal ! ( in Complex_d v )
  setDiagonal ! ( in Vec3_cd v )
  setIdentity ! ()
  setNull ! ()
  setRows ! ( in Vec3_cd row0, in Vec3_cd row1, in Vec3_cd row2 )
Mat33_cd subtract ? ( in Mat33_cd other )
Mat33_cd transpose ? ()

Operators

Mat33_cd = ( Param other )

Methods in detail

Mat33_cd ( in Complex_d _00, in Complex_d _01, in Complex_d _02, in Complex_d _10, in Complex_d _11, in Complex_d _12, in Complex_d _20, in Complex_d _21, in Complex_d _22 )

Constructor from scalars


Mat33_cd ( in Mat33_cd other )

copy constructor


Mat33_cd ( in Vec3_cd row0, in Vec3_cd row1, in Vec3_cd row2 )

Constructor from vectors


Mat33_cd ()


Mat33_cd Mat33_cd.add? ( in Mat33_cd other )

Overload method for the add operator


Mat33_cd Mat33_cd.adjoint? ()

Returns the adjoint matrix of this matrix


Boolean Mat33_cd.almostEqual? ( in Mat33_cd other )

Returns true if this matrix is almost the same as another one (using a default precision)


Boolean Mat33_cd.almostEqual? ( in Mat33_cd other, in Float32 precision )

Returns true if this matrix is almost equal to the given matrix within the provided precision range


Mat33_cd Mat33_cd.clone? ()

clone method


Complex_d Mat33_cd.determinant? ()

Returns the determinant of this matrix


Mat33_cd Mat33_cd.divideComplex_d? ( in Complex_d other )

Returns the division of this matrix and a scalar


Boolean Mat33_cd.equal? ( in Mat33_cd other )

Returns true if this matrix is the same as another one


UInt32 Mat33_cd.hash? ()

Hash for this value


Mat33_cd Mat33_cd.inverse? ()

Returns the inverse matrix of this matrix


Mat33_cd Mat33_cd.inverse_safe? ()


Mat33_cd Mat33_cd.multiply? ( in Mat33_cd other )

Overload method for the multiply operator


Mat33_cd Mat33_cd.multiplyComplex_d? ( in Complex_d other )

Returns the product of this matrix and a scalar


Vec3_cd Mat33_cd.multiplyVector? ( in Vec3_cd other )

Returns the product of this matrix and a vector


Mat33_cd.set! ( in Complex_d _00, in Complex_d _01, in Complex_d _02, in Complex_d _10, in Complex_d _11, in Complex_d _12, in Complex_d _20, in Complex_d _21, in Complex_d _22 )

Sets each component with a single scalar value.


Mat33_cd.set! ( in Vec3_cd row0, in Vec3_cd row1, in Vec3_cd row2 )

Setter from vectors


Mat33_cd.setColumns! ( in Vec3_cd col0, in Vec3_cd col1, in Vec3_cd col2 )

Setter from vectors, column-wise


Mat33_cd.setDiagonal! ( in Complex_d v )

setting the diagonal components of this matrix to a scalar


Mat33_cd.setDiagonal! ( in Vec3_cd v )

setting the diagonal components of this matrix to the components of a vector


Mat33_cd.setIdentity! ()

setting this matrix to the identity matrix


Mat33_cd.setNull! ()

setting all components of the matrix to 0.0


Mat33_cd.setRows! ( in Vec3_cd row0, in Vec3_cd row1, in Vec3_cd row2 )

Setter from vectors, row-wise


Mat33_cd Mat33_cd.subtract? ( in Mat33_cd other )

Overload method for the subtract operator


Mat33_cd Mat33_cd.transpose? ()

Returns the transposed matrix of this matrix

Operators in detail

Mat33_cd = ( Param other )

Adds another matrix to this one