index of namespace default
 
 index of project tkmath
 
 index of module tkmath

Class tkmath.Matrix3f


SynopsisThis class represents a single precision 3x3 square matrix.

  Base classes:
  Methods: Description:


The default layout is row-major.


 
 top of page

Method add
Add another matrix m to this instance
Signature
add(Matrix3fm)
Arguments
Matrix3fmmatrix to add

 
 top of page
Method det
Calculate determinant of matrix
Signature
det():float
Returns
floatvalue of determinant

 
 top of page
Method getA
Get value of a element
Signature
getA():float
Returns
floatvalue of a element

 
 top of page
Method getAbs
Calculate the Hilbert-Schmidt norm of the matrix
Signature
getAbs():float
Returns
floatscalar matrix norm value

 
 top of page
Method getAbsSqr
Calculate the squared Hilbert-Schmidt norm of the matrix
Signature
getAbsSqr():float
Returns
floatscalar matrix norm value

 
 top of page
Method getB
Get value of b element
Signature
getB():float
Returns
floatvalue of b element

 
 top of page
Method getC
Get value of c element
Signature
getC():float
Returns
floatvalue of c element

 
 top of page
Method getCol
Get column 'col' values
Signature
getCol(intcol)
 :Vector3f
Arguments
intcolcolumn index
Returns
Vector3fvector with values from column c

 
 top of page
Method getD
Get value of d element
Signature
getD():float
Returns
floatvalue of d element

 
 top of page
Method getE
Get value of e element
Signature
getE():float
Returns
floatvalue of e element

 
 top of page
Method getF
Get value of f element
Signature
getF():float
Returns
floatvalue of f element

 
 top of page
Method getG
Get value of g element
Signature
getG():float
Returns
floatvalue of g element

 
 top of page
Method getH
Get value of h element
Signature
getH():float
Returns
floatvalue of h element

 
 top of page
Method getI
Get value of i element
Signature
getI():float
Returns
floatvalue of i element

 
 top of page
Method getRow
Get row 'row' vector
Signature
getRow(introw)
 :Vector3f
Arguments
introwrow number
Returns
Vector3fvector with values from row r

 
 top of page
Method getString
Get string representation of matrix ((a, b, c), (d, e, f), (g, h, i))
Signature
getString():String
Returns
Stringstring representation of matrix

 
 top of page
Method init
Initialize matrix. The parameters are in matrix order (row(default) or column major).
Signature
init(floata,
  floatb,
  floatc,
  floatd,
  floate,
  floatf,
  floatg,
  floath,
  floati 
  )  
Arguments
floatavalue for m11
floatbvalue for m12
floatcvalue for m13
floatdvalue for m21
floatevalue for m22
floatfvalue for m23
floatgvalue for m31
floathvalue for m32
floativalue for m33

 
 top of page
Method initCol
Initialize matrix column from scalars
Signature
initCol(intcol,
  floata,
  floatb,
  floatc 
  )  
Arguments
intcolcolumn index
floatavalue for first element
floatbvalue for second element
floatcvalue for third element

 
 top of page
Method initColumnMajor
Initialize matrix (column-major arg order. swap args if matrix is in row-major order).
Signature
initColumnMajor(floata,
  floatb,
  floatc,
  floatd,
  floate,
  floatf,
  floatg,
  floath,
  floati 
  )  
Arguments
floatavalue for m11
floatbvalue for m21
floatcvalue for m31
floatdvalue for m12
floatevalue for m22
floatfvalue for m32
floatgvalue for m13
floathvalue for m23
floativalue for m33

 
 top of page
Method initColv
Initialize matrix column from vector or array-like object
Signature
initColv(intcol,
  Vector3fv 
  )  
Arguments
intcol
Vector3fvvector with values

 
 top of page
Method initEulerXYX
Initialize with euler rotation matrix
Signature
initEulerXYX(floata,
  floatb,
  floatc 
  )  
Arguments
floatafirst rotation
floatbsecond rotation
floatcthird rotation

 
 top of page
Method initEulerXYZ
Initialize with euler rotation matrix
Signature
initEulerXYZ(floata,
  floatb,
  floatc 
  )  
Arguments
floatafirst rotation
floatbsecond rotation
floatcthird rotation

 
 top of page
Method initEulerXZX
Initialize with euler rotation matrix
Signature
initEulerXZX(floata,
  floatb,
  floatc 
  )  
Arguments
floatafirst rotation
floatbsecond rotation
floatcthird rotation

 
 top of page
Method initEulerXZY
Initialize with euler rotation matrix
Signature
initEulerXZY(floata,
  floatb,
  floatc 
  )  
Arguments
floatafirst rotation
floatbsecond rotation
floatcthird rotation

 
 top of page
Method initEulerYXY
Initialize with euler rotation matrix
Signature
initEulerYXY(floata,
  floatb,
  floatc 
  )  
Arguments
floatafirst rotation
floatbsecond rotation
floatcthird rotation

 
 top of page
Method initEulerYXZ
Initialize with euler rotation matrix
Signature
initEulerYXZ(floata,
  floatb,
  floatc 
  )  
Arguments
floatafirst rotation
floatbsecond rotation
floatcthird rotation

 
 top of page
Method initEulerYZX
Initialize with euler rotation matrix
Signature
initEulerYZX(floata,
  floatb,
  floatc 
  )  
Arguments
floatafirst rotation
floatbsecond rotation
floatcthird rotation

 
 top of page
Method initEulerYZY
Initialize with euler rotation matrix
Signature
initEulerYZY(floata,
  floatb,
  floatc 
  )  
Arguments
floatafirst rotation
floatbsecond rotation
floatcthird rotation

 
 top of page
Method initEulerZXY
Initialize with euler rotation matrix
Signature
initEulerZXY(floata,
  floatb,
  floatc 
  )  
Arguments
floatafirst rotation
floatbsecond rotation
floatcthird rotation

 
 top of page
Method initEulerZXZ
Initialize with euler rotation matrix
Signature
initEulerZXZ(floata,
  floatb,
  floatc 
  )  
Arguments
floatafirst rotation
floatbsecond rotation
floatcthird rotation

 
 top of page
Method initEulerZYX
Initialize with euler rotation matrix
Signature
initEulerZYX(floata,
  floatb,
  floatc 
  )  
Arguments
floatafirst rotation
floatbsecond rotation
floatcthird rotation

 
 top of page
Method initEulerZYZ
Initialize with euler rotation matrix
Signature
initEulerZYZ(floata,
  floatb,
  floatc 
  )  
Arguments
floatafirst rotation
floatbsecond rotation
floatcthird rotation

 
 top of page
Method initIdentity
Initialize with identity matrix.
Signature
initIdentity()

 
 top of page
Method initRotatef
same as initEulerXYZ()
Signature
initRotatef(floatx,
  floaty 
  )  
Arguments
floatx
floaty

 
 top of page
Method initRotatev
same as initEulerXYZ(v.x, v.y, v.z)
Signature
initRotatev(Vector3fv)
Arguments
Vector3fv

 
 top of page
Method initRowf
Initialize matrix row from scalars
Signature
initRowf(introw,
  floata,
  floatb,
  floatc 
  )  
Arguments
introwrow number
floatavalue for first column
floatbvalue for second column
floatcvalue for third column

 
 top of page
Method initRowMajor
Initialize matrix (row-major arg order. swap args if matrix is in column-major order).
Signature
initRowMajor(floata,
  floatb,
  floatc,
  floatd,
  floate,
  floatf,
  floatg,
  floath,
  floati 
  )  
Arguments
floatavalue for m11
floatbvalue for m12
floatcvalue for m13
floatdvalue for m21
floatevalue for m22
floatfvalue for m23
floatgvalue for m31
floathvalue for m32
floativalue for m33

 
 top of page
Method initRowv
Initialize matrix row from vector or array-like object
Signature
initRowv(introw,
  Vector3fv 
  )  
Arguments
introwrow index
Vector3fvvector with values

 
 top of page
Method initScalef
Signature
initScalef()

 
 top of page
Method initScalev
Signature
initScalev(floatx,
  floaty 
  )  
Arguments
floatx
floaty

 
 top of page
Method initTranslatef
Signature
initTranslatef(floatx,
  floaty 
  )  
Arguments
floatx
floaty

 
 top of page
Method initTranslatev
Signature
initTranslatev()

 
 top of page
Method initTranspose
Initialize matrix (swap arg row/column order).
Signature
initTranspose(floata,
  floatb,
  floatc,
  floatd,
  floate,
  floatf,
  floatg,
  floath,
  floati 
  )  
Arguments
floatavalue for m11
floatbvalue for m12
floatcvalue for m13
floatdvalue for m21
floatevalue for m22
floatfvalue for m23
floatgvalue for m31
floathvalue for m32
floativalue for m33

 
 top of page
Method invert
Calculate inversion of matrix, so that A*A-1=U
Signature
invert()

 
 top of page
Method isIdentity
Check if this is an identity matrix (diagonal=1, other=0)
Signature
isIdentity()

 
 top of page
Method mul
Multiply this instance by matrix m
Signature
mul(Matrix3fm)
Arguments
Matrix3fmmatrix to multiply

 
 top of page
Method mulf
Multiply this instance by scalar value f
Signature
mulf(floatf)
Arguments
floatfvalue to multiply

 
 top of page
Method mulv
Multiply this instance by a 3dim vector
Signature
mulv(Vector3fv)
 :Vector3f
Arguments
Vector3fvvector to multiply
Returns
Vector3fresulting vector

 
 top of page
Method New
Initialize and return new instance of Matrix3f. The parameters are in matrix order (row(default) or column major).
Signature
New(floata,
  floatb,
  floatc,
  floatd,
  floate,
  floatf,
  floatg,
  floath,
  floati 
  )  
 :Matrix3f
Arguments
floatavalue for a
floatbvalue for b
floatcvalue for c
floatdvalue for d
floatevalue for e
floatfvalue for f
floatgvalue for g
floathvalue for h
floativalue for i
Returns
Matrix3fnew instance of Matrix3f

 
 top of page
Method rotatef
Multiply by X=>Y=>Z rotation matrix (radian angles)
Signature
rotatef(floatx,
  floaty,
  floatz 
  )  
Arguments
floatx
floaty
floatz

 
 top of page
Method rotatev
Multiply by v.x=>v.y=>v.z rotation matrix (radian angles)
Signature
rotatev(Vector3fv)
Arguments
Vector3fv

 
 top of page
Method scalef
Multiply by scale matrix
Signature
scalef(floatx,
  floaty,
  floatz 
  )  
Arguments
floatx
floaty
floatz

 
 top of page
Method scalev
Multiply by scale matrix
Signature
scalev(Vector3fv)
Arguments
Vector3fv

 
 top of page
Method setA
Set a element to v
Signature
setA(floatv)
Arguments
floatvnew value for a

 
 top of page
Method setB
Set b element to v
Signature
setB(floatv)
Arguments
floatvnew value for b

 
 top of page
Method setC
Set c element to v
Signature
setC(floatv)
Arguments
floatvnew value for c

 
 top of page
Method setCol
Set column 'col' with values from v
Signature
setCol(intc,
  Vector3fv 
  )  
Arguments
intccolumn number
Vector3fvVector3f instance

 
 top of page
Method setD
Set d element to v
Signature
setD(floatv)
Arguments
floatvnew value for d

 
 top of page
Method setE
Set e element to v
Signature
setE(floatv)
Arguments
floatvnew value for e

 
 top of page
Method setF
Set f element to v
Signature
setF(floatv)
Arguments
floatvnew value for f

 
 top of page
Method setG
Set g element to v
Signature
setG(floatv)
Arguments
floatvnew value for g

 
 top of page
Method setH
Set h element to v
Signature
setH(floatv)
Arguments
floatvnew value for h

 
 top of page
Method setI
Set i element to v
Signature
setI(floatv)
Arguments
floatvnew value for i

 
 top of page
Method setRow
Initialize row 'row' with values from v
Signature
setRow(introw,
  Vector3fv 
  )  
Arguments
introwrow number
Vector3fvVector3f instance

 
 top of page
Method sub
Substract another matrix m from this instance
Signature
sub(Matrix3fm)
Arguments
Matrix3fmmatrix to substract

 
 top of page
Method translatef
Multiply by translation matrix
Signature
translatef(floatx,
  floaty 
  )  
Arguments
floatx
floaty

 
 top of page
Method translatev
Multiply by translation matrix
Signature
translatev(Vector2fv)
Arguments
Vector2fv

 
 top of page
Method transpose
Transpose matrix
Signature
transpose()

 
 top of page
Method unit
Normalise matrix with Hilbert-Schmidt norm
Signature
unit()

 
 top of page
Method unitScale
Normalise matrix using Hilbert-Schmidt norm and multiply by s afterwards
Signature
unitScale(floats)
Arguments
floatsscaling factor

 
 top of page
 

Project Modules:tkmath 
Project Classes:Complexd , Complexf , Math , Matrix , Matrix2d , Matrix2f , Matrix2x3f , Matrix3d , Matrix3f , Matrix4d , Matrix4f , Quaterniond , Quaternionf , Vector2d , Vector2f , Vector3d , Vector3f , Vector4d , Vector4f 
Project Functions:absd , absf , acoscd , acoscf , acosd , acosf , acoshcd , acoshcf , acoshd , acoshf , asincd , asincf , asind , asinf , asinhcd , asinhcf , asinhd , asinhf , atan2d , atan2f , atancd , atancf , atand , atanf , atanhcd , atanhcf , atanhd , atanhf , ceild , ceilf , complexd , complexf , complexfPolar , complexfPolar , coscd , coscf , cosd , cosf , coshcd , coshcf , coshd , coshf , exp10d , exp10f , exp2d , exp2f , expcd , expcf , expd , expf , f16_from_f32 , f32_from_f16 , floord , floorf , fx16_from_f16 , hypotd , hypotf , log10d , log10f , log2d , log2f , logcd , logcf , logd , logf , matrix2d , matrix2f , matrix2x3f , matrix3d , matrix3f , matrix4d , matrix4f , modd , modf , powcd , powcf , powd , powf , quaterniond , quaternionf , relCmpd , relCmpf , relErrCmpd , relErrCmpf , roundd , roundf , sincd , sincf , sind , sinf , sinhcd , sinhcf , sinhd , sinhf , sqrtcd , sqrtcf , sqrtd , sqrtf , tancf , tancf , tand , tanf , tanhcd , tanhcf , tanhd , tanhf , vector2d , vector2f , vector3d , vector3f , vector4d , vector4f 
All Namespaces:default , graph , ui 
All Projects:core , eqxmms , ShaderVG , ShaderVG_Text , tkanalogrytm , tkchipmunk , tkclap , tkfileutils , tkfreeglut , tkfreetype2 , tkfreeverb , tkmath , tkmidi , tkmidipipe , tkminnie , tkoldmath , tkopengl , tkportaudio , tkradiastools , tksamplechain , tksampleedit , tksampler , tksdl , tksdl_net , tksidplay2 , tkspeexdsp , tksqlite , tktriangulate , tkui , tkvst2 , tkzip , ui , yingtest 


auto-generated by "DOG", the TkScript document generator. Thu, 11/Dec/2025 13:41:59