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

Class tkmath.Matrix4d


Synopsis: This class represents a double precision 4x4 square matrix.

  Base classes:
  Methods:

Method add
Add another matrix m to this instance
Signature
add(Matrix4dm)
Arguments
Matrix4dm–matrix to add

 
→ top of page
Method BuildEulerXYX4d
Build an euler rotation matrix with XYX convention
Signature
BuildEulerXYX4d(Doublea,
  Doubleb,
  Doublec 
  )  
 :Matrix4d
Arguments
Doublea–first angle in radians
Doubleb–second angle in radians
Doublec–third angle in radians
Returns
Matrix4d–generated matrix

 
→ top of page
Method BuildEulerXYZ4d
Build an euler rotation matrix with XYZ convention
Signature
BuildEulerXYZ4d(Doublea,
  Doubleb,
  Doublec 
  )  
 :Matrix4d
Arguments
Doublea–first angle in radians
Doubleb–second angle in radians
Doublec–third angle in radians
Returns
Matrix4d–generated matrix

 
→ top of page
Method BuildEulerXZX4d
Build an euler rotation matrix with XZX convention
Signature
BuildEulerXZX4d(Doublea,
  Doubleb,
  Doublec 
  )  
 :Matrix4d
Arguments
Doublea–first angle in radians
Doubleb–second angle in radians
Doublec–third angle in radians
Returns
Matrix4d–generated matrix

 
→ top of page
Method BuildEulerXZY4d
Build an euler rotation matrix with XZY convention
Signature
BuildEulerXZY4d(Doublea,
  Doubleb,
  Doublec 
  )  
 :Matrix4d
Arguments
Doublea–first angle in radians
Doubleb–second angle in radians
Doublec–third angle in radians
Returns
Matrix4d–generated matrix

 
→ top of page
Method BuildEulerYXY4d
Build an euler rotation matrix with YXY convention
Signature
BuildEulerYXY4d(Doublea,
  Doubleb,
  Doublec 
  )  
 :Matrix4d
Arguments
Doublea–first angle in radians
Doubleb–second angle in radians
Doublec–third angle in radians
Returns
Matrix4d–generated matrix

 
→ top of page
Method BuildEulerYXZ4d
Build an euler rotation matrix with YXZ convention
Signature
BuildEulerYXZ4d(Doublea,
  Doubleb,
  Doublec 
  )  
 :Matrix4d
Arguments
Doublea–first angle in radians
Doubleb–second angle in radians
Doublec–third angle in radians
Returns
Matrix4d–generated matrix

 
→ top of page
Method BuildEulerYZX4d
Build an euler rotation matrix with YZX convention
Signature
BuildEulerYZX4d(Doublea,
  Doubleb,
  Doublec 
  )  
 :Matrix4d
Arguments
Doublea–first angle in radians
Doubleb–second angle in radians
Doublec–third angle in radians
Returns
Matrix4d–generated matrix

 
→ top of page
Method BuildEulerYZY4d
Build an euler rotation matrix with YZY convention
Signature
BuildEulerYZY4d(Doublea,
  Doubleb,
  Doublec 
  )  
 :Matrix4d
Arguments
Doublea–first angle in radians
Doubleb–second angle in radians
Doublec–third angle in radians
Returns
Matrix4d–generated matrix

 
→ top of page
Method BuildEulerZXY4d
Build an euler rotation matrix with ZXY convention
Signature
BuildEulerZXY4d(Doublea,
  Doubleb,
  Doublec 
  )  
 :Matrix4d
Arguments
Doublea–first angle in radians
Doubleb–second angle in radians
Doublec–third angle in radians
Returns
Matrix4d–generated matrix

 
→ top of page
Method BuildEulerZXZ4d
Build an euler rotation matrix with ZXZ convention
Signature
BuildEulerZXZ4d(Doublea,
  Doubleb,
  Doublec 
  )  
 :Matrix4d
Arguments
Doublea–first angle in radians
Doubleb–second angle in radians
Doublec–third angle in radians
Returns
Matrix4d–generated matrix

 
→ top of page
Method BuildEulerZYX4d
Build an euler rotation matrix with ZYX convention
Signature
BuildEulerZYX4d(Doublea,
  Doubleb,
  Doublec 
  )  
 :Matrix4d
Arguments
Doublea–first angle in radians
Doubleb–second angle in radians
Doublec–third angle in radians
Returns
Matrix4d–generated matrix

 
→ top of page
Method BuildEulerZYZ4d
Build an euler rotation matrix with ZYZ convention
Signature
BuildEulerZYZ4d(Doublea,
  Doubleb,
  Doublec 
  )  
 :Matrix4d
Arguments
Doublea–first angle in radians
Doubleb–second angle in radians
Doublec–third angle in radians
Returns
Matrix4d–generated matrix

 
→ top of page
Method BuildLookAtMatrix4d
Build a look at matrix
Signature
BuildLookAtMatrix4d(Vector3deye,
  Vector3dcenter,
  Vector3dup 
  )  
 :Matrix4d
Arguments
Vector3deye–eye direction vector
Vector3dcenter–center of camera vector
Vector3dup–vector for up direction
Returns
Matrix4d–generated matrix

 
→ top of page
Method BuildPerspectiveMatrix4d
Builds a perspective matrix
Signature
BuildPerspectiveMatrix4d(Doublefov,
  Doubleaspect,
  DoublezNear,
  DoublezFar 
  )  
 :Matrix4d
Arguments
Doublefov–field of view in degrees
Doubleaspect–aspect ratio
DoublezNear–zNear value
DoublezFar–zFar value
Returns
Matrix4d–generated matrix

 
→ top of page
Method BuildRotateMatrix4d
Build a rotation matrix
Signature
BuildRotateMatrix4d(Doubleangle,
  Vector3daxis 
  )  
 :Matrix4d
Arguments
Doubleangle–rotation angle (0..2PI)
Vector3daxis–rotation axis vector
Returns
Matrix4d–generated matrix

 
→ top of page
Method BuildTranslateMatrix4d
Build a translation matrix
Signature
BuildTranslateMatrix4d(Vector3dt)
 :Matrix4d
Arguments
Vector3dt–translation vector
Returns
Matrix4d–generated matrix

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

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

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

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

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

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

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

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

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

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

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

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

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

 
→ top of page
Method getJ
Get value of j element
Signature
getJ():Double
Returns
Double–value of j element

 
→ top of page
Method getK
Get value of k element
Signature
getK():Double
Returns
Double–value of k element

 
→ top of page
Method getL
Get value of l element
Signature
getL():Double
Returns
Double–value of l element

 
→ top of page
Method getM
Get value of m element
Signature
getM():Double
Returns
Double–value of m element

 
→ top of page
Method getN
Get value of n element
Signature
getN():Double
Returns
Double–value of n element

 
→ top of page
Method getO
Get value of o element
Signature
getO():Double
Returns
Double–value of o element

 
→ top of page
Method getP
Get value of p element
Signature
getP():Double
Returns
Double–value of p element

 
→ top of page
Method getRow
Get row 'row'
Signature
getRow(introw)
 :Vector4d
Arguments
introw–row index
Returns
Vector4d–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, j, k, l), (m, n, o, p))
Signature
getString():String
Returns
String–string representation of matrix

 
→ top of page
Method init
Initialize matrix
Signature
init(Doublea,
  Doubleb,
  Doublec,
  Doubled,
  Doublee,
  Doublef,
  Doubleg,
  Doubleh,
  Doublei,
  Doublej,
  Doublek,
  Doublel,
  Doublem,
  Doublen,
  Doubleo,
  Doublep 
  )  
Arguments
Doublea–value for a
Doubleb–value for b
Doublec–value for c
Doubled–value for d
Doublee–value for e
Doublef–value for f
Doubleg–value for g
Doubleh–value for h
Doublei–value for i
Doublej–value for j
Doublek–value for k
Doublel–value for l
Doublem–value for m
Doublen–value for n
Doubleo–value for o
Doublep–value for p

 
→ top of page
Method initCol
Initialize column 'col'
Signature
initCol(intcol,
  Doublea,
  Doubleb,
  Doublec,
  Doubled 
  )  
Arguments
intcol–
Doublea–value for first row
Doubleb–value for second row
Doublec–column index
Doubled–value for fourth row

 
→ top of page
Method initColV
Initialize column 'col'
Signature
initColV(intcol,
  Vector4dv 
  )  
Arguments
intcol–column index
Vector4dv–vector with values

 
→ top of page
Method initEulerXYX
Initialize with euler roation matrix
Signature
initEulerXYX(Doublea,
  Doubleb,
  Doublec 
  )  
Arguments
Doublea–first rotation
Doubleb–second rotation
Doublec–third rotation

 
→ top of page
Method initEulerXYZ
Initialize with euler roation matrix
Signature
initEulerXYZ(Doublea,
  Doubleb,
  Doublec 
  )  
Arguments
Doublea–first rotation
Doubleb–second rotation
Doublec–third rotation

 
→ top of page
Method initEulerXZX
Initialize with euler roation matrix
Signature
initEulerXZX(Doublea,
  Doubleb,
  Doublec 
  )  
Arguments
Doublea–first rotation
Doubleb–second rotation
Doublec–third rotation

 
→ top of page
Method initEulerXZY
Initialize with euler roation matrix
Signature
initEulerXZY(Doublea,
  Doubleb,
  Doublec 
  )  
Arguments
Doublea–first rotation
Doubleb–second rotation
Doublec–third rotation

 
→ top of page
Method initEulerYXY
Initialize with euler roation matrix
Signature
initEulerYXY(Doublea,
  Doubleb,
  Doublec 
  )  
Arguments
Doublea–first rotation
Doubleb–second rotation
Doublec–third rotation

 
→ top of page
Method initEulerYXZ
Initialize with euler roation matrix
Signature
initEulerYXZ(Doublea,
  Doubleb,
  Doublec 
  )  
Arguments
Doublea–first rotation
Doubleb–second rotation
Doublec–third rotation

 
→ top of page
Method initEulerYZX
Initialize with euler roation matrix
Signature
initEulerYZX(Doublea,
  Doubleb,
  Doublec 
  )  
Arguments
Doublea–first rotation
Doubleb–second rotation
Doublec–third rotation

 
→ top of page
Method initEulerYZY
Initialize with euler roation matrix
Signature
initEulerYZY(Doublea,
  Doubleb,
  Doublec 
  )  
Arguments
Doublea–first rotation
Doubleb–second rotation
Doublec–third rotation

 
→ top of page
Method initEulerZXY
Initialize with euler roation matrix
Signature
initEulerZXY(Doublea,
  Doubleb,
  Doublec 
  )  
Arguments
Doublea–first rotation
Doubleb–second rotation
Doublec–third rotation

 
→ top of page
Method initEulerZXZ
Initialize with euler roation matrix
Signature
initEulerZXZ(Doublea,
  Doubleb,
  Doublec 
  )  
Arguments
Doublea–first rotation
Doubleb–second rotation
Doublec–third rotation

 
→ top of page
Method initEulerZYX
Initialize with euler roation matrix
Signature
initEulerZYX(Doublea,
  Doubleb,
  Doublec 
  )  
Arguments
Doublea–first rotation
Doubleb–second rotation
Doublec–third rotation

 
→ top of page
Method initEulerZYZ
Initialize with euler roation matrix
Signature
initEulerZYZ(Doublea,
  Doubleb,
  Doublec 
  )  
Arguments
Doublea–first rotation
Doubleb–second rotation
Doublec–third rotation

 
→ top of page
Method initf
Initialize matrix
Signature
initf(floata,
  floatb,
  floatc,
  floatd,
  floate,
  floatf,
  floatg,
  floath,
  floati,
  floatj,
  floatk,
  floatl,
  floatm,
  floatn,
  floato,
  floatp 
  )  
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
floatj–value for j
floatk–value for k
floatl–value for l
floatm–value for m
floatn–value for n
floato–value for o
floatp–value for p

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

 
→ top of page
Method initRow
Initialize row 'row'
Signature
initRow(introw,
  Doublea,
  Doubleb,
  Doublec,
  Doubled 
  )  
Arguments
introw–row index
Doublea–value for first column
Doubleb–value for second column
Doublec–value for third column
Doubled–value for fourth column

 
→ top of page
Method initRowV
Initialize row 'row'
Signature
initRowV(introw,
  Vector4dv 
  )  
Arguments
introw–row index
Vector4dv–vector with values

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

 
→ top of page
Method mul
Multiply this instance by matrix m
Signature
mul(Matrix4dm)
Arguments
Matrix4dm–matrix to multiply

 
→ top of page
Method mulf
Multiply this instance with scalar value v
Signature
mulf(Doublev)
Arguments
Doublev–value to multiply

 
→ top of page
Method mulRev
Reverse-multiply matrix m by this instance (m * this)
Signature
mulRev(Matrix4dm)
Arguments
Matrix4dm–matrix to multiply

 
→ top of page
Method mulv
Multiply this instance with a 4dim vector
Signature
mulv(Vector4dv)
 :Vector4d
Arguments
Vector4dv–vector to multiply
Returns
Vector4d–resulting vector

 
→ top of page
Method New
Initialize from an array and return new instance of Matrix4d
Signature
New(Objecta)
 :Matrix4d
Arguments
Objecta–array with values
Returns
Matrix4d–new instance of Matrix4d

 
→ top of page
Method setA
Set a element to v
Signature
setA(Doublev)
Arguments
Doublev–new value for a

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

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

 
→ top of page
Method setCol
Set column 'col' with values from v
Signature
setCol(intcol,
  Vector4dv 
  )  
Arguments
intcol–column index
Vector4dv–Vector4d instance

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

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

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

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

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

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

 
→ top of page
Method setJ
Set j element to v
Signature
setJ(Doublev)
Arguments
Doublev–new value for j

 
→ top of page
Method setK
Set k element to v
Signature
setK(Doublev)
Arguments
Doublev–new value for k

 
→ top of page
Method setL
Set l element to v
Signature
setL(Doublev)
Arguments
Doublev–new value for l

 
→ top of page
Method setM
Set m element to v
Signature
setM(Doublev)
Arguments
Doublev–new value for m

 
→ top of page
Method setN
Set n element to v
Signature
setN(Doublev)
Arguments
Doublev–new value for n

 
→ top of page
Method setO
Set o element to v
Signature
setO(Doublev)
Arguments
Doublev–new value for o

 
→ top of page
Method setP
Set p element to v
Signature
setP(Doublev)
Arguments
Doublev–new value for p

 
→ top of page
Method setRow
Set row r with values from v
Signature
setRow(intr,
  Vector4dv 
  )  
Arguments
intr–row index
Vector4dv–Vector4d instance

 
→ top of page
Method sub
Substract another matrix m from this instance
Signature
sub(Matrix4dm)
Arguments
Matrix4dm–matrix to substract

 
→ top of page
Method transpose
Transpose matrix
Signature
transpose()

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

 
→ top of page
Method unitScale
Normalise matrix using Hilbert-Schmidt norm and multiply by s afterwards
Signature
unitScale(Doubles)
Arguments
Doubles–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