Mat33_c (struct)

The Mat33_c represents a 3 by 3 matrix. It uses Vec3_c types for each of the 3 rows.

参考

Quat, Mat44

/*
** Example: Vec4
*/

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

Members

Vec3_c row0  
Vec3_c row1  
Vec3_c row2  

Methods

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

Operators

Mat33_c = ( Param other )

Methods in detail

Mat33_c ( in Complex _00, in Complex _01, in Complex _02, in Complex _10, in Complex _11, in Complex _12, in Complex _20, in Complex _21, in Complex _22 )

Constructor from scalars


Mat33_c ( in Mat33_c other )

copy constructor


Mat33_c ( in Vec3_c row0, in Vec3_c row1, in Vec3_c row2 )

Constructor from vectors


Mat33_c ()


Mat33_c Mat33_c.add? ( in Mat33_c other )

Overload method for the add operator


Mat33_c Mat33_c.adjoint? ()

Returns the adjoint matrix of this matrix


Boolean Mat33_c.almostEqual? ( in Mat33_c other )

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


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

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


Mat33_c Mat33_c.clone? ()

clone method


Complex Mat33_c.determinant? ()

Returns the determinant of this matrix


Mat33_c Mat33_c.divideComplex? ( in Complex other )

Returns the division of this matrix and a scalar


Boolean Mat33_c.equal? ( in Mat33_c other )

Returns true if this matrix is the same as another one


UInt32 Mat33_c.hash? ()

Hash for this value


Mat33_c Mat33_c.inverse? ()

Returns the inverse matrix of this matrix


Mat33_c Mat33_c.inverse_safe? ()


Mat33_c Mat33_c.multiply? ( in Mat33_c other )

Overload method for the multiply operator


Mat33_c Mat33_c.multiplyComplex? ( in Complex other )

Returns the product of this matrix and a scalar


Vec3_c Mat33_c.multiplyVector? ( in Vec3_c other )

Returns the product of this matrix and a vector


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

Sets each component with a single scalar value.


Mat33_c.set! ( in Vec3_c row0, in Vec3_c row1, in Vec3_c row2 )

Setter from vectors


Mat33_c.setColumns! ( in Vec3_c col0, in Vec3_c col1, in Vec3_c col2 )

Setter from vectors, column-wise


Mat33_c.setDiagonal! ( in Complex v )

setting the diagonal components of this matrix to a scalar


Mat33_c.setDiagonal! ( in Vec3_c v )

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


Mat33_c.setIdentity! ()

setting this matrix to the identity matrix


Mat33_c.setNull! ()

setting all components of the matrix to 0.0


Mat33_c.setRows! ( in Vec3_c row0, in Vec3_c row1, in Vec3_c row2 )

Setter from vectors, row-wise


Mat33_c Mat33_c.subtract? ( in Mat33_c other )

Overload method for the subtract operator


Mat33_c Mat33_c.transpose? ()

Returns the transposed matrix of this matrix

Operators in detail

Mat33_c = ( Param other )

Adds another matrix to this one