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

Class tkmath.Matrix3f


Synopsis: This 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
Matrix3fm–matrix to add

 
→ top of page
Method det
Calculate determinant of matrix
Signature
det():float
Returns
float–value of determinant

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

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

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

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

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

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

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

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

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

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

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

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

 
→ top of page
Method getRow
Get row 'row' vector
Signature
getRow(introw)
 :Vector3f
Arguments
introw–row number
Returns
Vector3f–vector 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
String–string 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
floata–value for m11
floatb–value for m12
floatc–value for m13
floatd–value for m21
floate–value for m22
floatf–value for m23
floatg–value for m31
floath–value for m32
floati–value for m33

 
→ top of page
Method initCol
Initialize matrix column from scalars
Signature
initCol(intcol,
  floata,
  floatb,
  floatc 
  )  
Arguments
intcol–column index
floata–value for first element
floatb–value for second element
floatc–value 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
floata–value for m11
floatb–value for m21
floatc–value for m31
floatd–value for m12
floate–value for m22
floatf–value for m32
floatg–value for m13
floath–value for m23
floati–value for m33

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

 
→ top of page
Method initEulerXYX
Initialize with euler rotation matrix
Signature
initEulerXYX(floata,
  floatb,
  floatc 
  )  
Arguments
floata–first rotation
floatb–second rotation
floatc–third rotation

 
→ top of page
Method initEulerXYZ
Initialize with euler rotation matrix
Signature
initEulerXYZ(floata,
  floatb,
  floatc 
  )  
Arguments
floata–first rotation
floatb–second rotation
floatc–third rotation

 
→ top of page
Method initEulerXZX
Initialize with euler rotation matrix
Signature
initEulerXZX(floata,
  floatb,
  floatc 
  )  
Arguments
floata–first rotation
floatb–second rotation
floatc–third rotation

 
→ top of page
Method initEulerXZY
Initialize with euler rotation matrix
Signature
initEulerXZY(floata,
  floatb,
  floatc 
  )  
Arguments
floata–first rotation
floatb–second rotation
floatc–third rotation

 
→ top of page
Method initEulerYXY
Initialize with euler rotation matrix
Signature
initEulerYXY(floata,
  floatb,
  floatc 
  )  
Arguments
floata–first rotation
floatb–second rotation
floatc–third rotation

 
→ top of page
Method initEulerYXZ
Initialize with euler rotation matrix
Signature
initEulerYXZ(floata,
  floatb,
  floatc 
  )  
Arguments
floata–first rotation
floatb–second rotation
floatc–third rotation

 
→ top of page
Method initEulerYZX
Initialize with euler rotation matrix
Signature
initEulerYZX(floata,
  floatb,
  floatc 
  )  
Arguments
floata–first rotation
floatb–second rotation
floatc–third rotation

 
→ top of page
Method initEulerYZY
Initialize with euler rotation matrix
Signature
initEulerYZY(floata,
  floatb,
  floatc 
  )  
Arguments
floata–first rotation
floatb–second rotation
floatc–third rotation

 
→ top of page
Method initEulerZXY
Initialize with euler rotation matrix
Signature
initEulerZXY(floata,
  floatb,
  floatc 
  )  
Arguments
floata–first rotation
floatb–second rotation
floatc–third rotation

 
→ top of page
Method initEulerZXZ
Initialize with euler rotation matrix
Signature
initEulerZXZ(floata,
  floatb,
  floatc 
  )  
Arguments
floata–first rotation
floatb–second rotation
floatc–third rotation

 
→ top of page
Method initEulerZYX
Initialize with euler rotation matrix
Signature
initEulerZYX(floata,
  floatb,
  floatc 
  )  
Arguments
floata–first rotation
floatb–second rotation
floatc–third rotation

 
→ top of page
Method initEulerZYZ
Initialize with euler rotation matrix
Signature
initEulerZYZ(floata,
  floatb,
  floatc 
  )  
Arguments
floata–first rotation
floatb–second rotation
floatc–third 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
introw–row number
floata–value for first column
floatb–value for second column
floatc–value 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
floata–value for m11
floatb–value for m12
floatc–value for m13
floatd–value for m21
floate–value for m22
floatf–value for m23
floatg–value for m31
floath–value for m32
floati–value for m33

 
→ top of page
Method initRowv
Initialize matrix row from vector or array-like object
Signature
initRowv(introw,
  Vector3fv 
  )  
Arguments
introw–row index
Vector3fv–vector 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
floata–value for m11
floatb–value for m12
floatc–value for m13
floatd–value for m21
floate–value for m22
floatf–value for m23
floatg–value for m31
floath–value for m32
floati–value 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
Matrix3fm–matrix to multiply

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

 
→ top of page
Method mulv
Multiply this instance by a 3dim vector
Signature
mulv(Vector3fv)
 :Vector3f
Arguments
Vector3fv–vector to multiply
Returns
Vector3f–resulting 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
floata–value for a
floatb–value for b
floatc–value for c
floatd–value for d
floate–value for e
floatf–value for f
floatg–value for g
floath–value for h
floati–value for i
Returns
Matrix3f–new 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
floatv–new value for a

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

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

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

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

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

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

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

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

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

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

 
→ top of page
Method sub
Substract another matrix m from this instance
Signature
sub(Matrix3fm)
Arguments
Matrix3fm–matrix 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
floats–scaling 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. Tue, 3/Mar/2026 18:10:18