matrix

 Member Function  Parameter  Return  Explain
 getElement number row, col number index is from 0 to 3
(row>=0 and row <=3)
(col>=0 and col <=3)
 setElement number row, col, value None  
 identity None None  
 inverse None None  
 transpose None None  
 isIdentity None boolean  
 translation 1.  number x, y, z
2.  vec offset
None  
 rotationx number  None in degree
 rotationy number  None in degree
 rotationz number  None in degree
 rotationAxis vec axis   number angle None in degree
 rotationYawPitchRoll number yaw, pitch, roll None in degree
 scaling number x, y, z None  
 determinant None number  get determinant
       
 getRight None vec  get element[0][0], element[0][1], element[0][2]
 getUp None vec  get element[1][0], element[1][1], element[1][2]
 getFront None vec  get element[2][0], element[2][1], element[2][2]
 getPosition None vec  get element[3][0], element[3][1], element[3][2]
       
 clone None matrix  
 Operator  Parameter  Return  Explain
 * (multiplication) matrix, matrix matrix Determines the product of two matrices.
 * (multiplication) matrix, vec vec  Transforms a 3-D vector by a given matrix, projecting the result back into w = 1
  Lib Function  Parameter  Return  Explain
 new   [ quaternion ]  matrix no parameter, or quaternion
 VectorTransformCoord matrix, vec vec Transforms a 3-D vector by a given matrix, projecting the result back into w = 1
 VectorTransformNormal matrix, vec vec Transforms the 3-D vector normal by the given matrix, only supports uniform scaling matrix. For non-uniform scaling matrix, you need first inverse & transpose matrix.

Usage Example:
m = matrix.new()
v = vec.new(1,4,7)
m.scaling(3,3,2)
m.translation(2,5,6)
mr = matrix.new( quaternion.new() )
mr.rotationx(45)
m = m* mr
v = m*v
v = matrix.VectorTransformCoord(m,v)
m.inverse()
m.transpose()
v = matrix.VectorTransformNormal(m,v)
v.normalize()