smat3d.md 2.5 KB


id: smat3d title: SMat3D

sidebar_label: SMat3D

A 3x3 matrix.

Constructors

Method New(a:Double, b:Double, c:Double, d:Double, e:Double, f:Double, g:Double, h:Double, i:Double)

Creates a new SMat3D from the supplied arguments.


Operators

Method Operator+:SMat3D(z:SMat3D Var)

Adds z to the matrix, returning a new matrix.


Method Operator-:SMat3D(z:SMat3D Var)

Subtracts z from the matrix, returning a new matrix.


Method Operator*:SMat3D(z:SMat3D Var)

Multiplies the matrix by z, the dot product, returning a new matrix.


Methods

Method Apply:SVec2D(v:SVec2D)

Applies the matrix to the vector v, returning a new vector.


Method Apply:SVec3D(v:SVec3D)

Applies the matrix to the vector v, returning a new vector.


Method Apply:SVec4D(v:SVec4D)

Applies the matrix to the vector v, returning a new vector.


Method Adjoint:SMat3D()

Returns the transposition of the cofactor matrix.


Method CompMul:SMat3D(z:SMat3D Var)

Multiplies the matrix by z by its components, or element-wise matrix multiplication, return a new matrix.


Method Determinant:Double()

Returns the determinant of the matrix.


Method Invert:SMat3D()

Returns the inverse of the matrix.


Method Rotate:SMat3D(angle:Double)

Rotates the matrix on a 2D rotation in the XY plane by angle degrees, returning a new matrix.


Method RotateZ:SMat3D(angle:Double)

Rotates the matrix around the Z axis by angle degrees, returning a new matrix.


Method Scale:SMat3D(s:SVec2D)

Scales the matrix by s, returning a new matrix.


Method Translate:SMat3D(x:Double, y:Double, z:Double)

Returns a translation with the specified x, y, and z displacements.


Method Translate:SMat3D(t:SVec3D)

Returns a translation with displacement vector s.


Method Transpose:SMat3D()

Returns a transposition of the matrix.


Method ToString:String() Override

Returns a String representation of the matrix.


Functions

Function Identity:SMat3D()

Return the 3x3 identity matrix.


Function Rotation:SMat3D(angle:Double)

Returns a rotation matrix of angle degrees.


Function Scaling:SMat3D(s:SVec2D)

Returns a scaling matrix of s.