Header menu logo Nu

Matrix4x4 Module

Functions and values

Function or value Description

CreateAffine (translation, rotation, scale)

Full Usage: CreateAffine (translation, rotation, scale)

Parameters:
Returns: Matrix4x4

Create an affine matrix from translation, rotation, and scale.

translation : Vector3
rotation : Quaternion
scale : Vector3
Returns: Matrix4x4

CreateRotation (right, up, forward)

Full Usage: CreateRotation (right, up, forward)

Parameters:
Returns: Matrix4x4

Create a rotation matrix from three orthogonal vectors.

right : Vector3
up : Vector3
forward : Vector3
Returns: Matrix4x4

m4 r0 r1 r2 r3

Full Usage: m4 r0 r1 r2 r3

Parameters:
Returns: Matrix4x4
Modifiers: inline
r0 : Vector4
r1 : Vector4
r2 : Vector4
r3 : Vector4
Returns: Matrix4x4

m4Eq x y

Full Usage: m4Eq x y

Parameters:
Returns: bool
Modifiers: inline
x : Matrix4x4
y : Matrix4x4
Returns: bool

m4Identity

Full Usage: m4Identity

Returns: Matrix4x4
Returns: Matrix4x4

m4Neq x y

Full Usage: m4Neq x y

Parameters:
Returns: bool
Modifiers: inline
x : Matrix4x4
y : Matrix4x4
Returns: bool

m4Zero

Full Usage: m4Zero

Returns: Matrix4x4
Returns: Matrix4x4

Type extensions

Type extension Description

Matrix4x4.CreateFromArray(arr)

Full Usage: Matrix4x4.CreateFromArray(arr)

Parameters:
    arr : single array

Returns: Matrix4x4

Create a matrix from an array of 16 single values.

Extended Type: Matrix4x4

arr : single array
Returns: Matrix4x4

this.Forward

Full Usage: this.Forward

Parameters:
    () : unit

Returns: Vector3
Modifiers: inline

The forward vector of the matrix.

Extended Type: Matrix4x4

() : unit
Returns: Vector3

this.Forward

Full Usage: this.Forward

Returns: Vector3
Modifiers: inline

The forward vector of the matrix.

Extended Type: Matrix4x4

Returns: Vector3

this.Inverted

Full Usage: this.Inverted

Parameters:
    () : unit

Returns: Matrix4x4
Modifiers: inline

The inverted value of a matrix. Throws if no determinant.

Extended Type: Matrix4x4

() : unit
Returns: Matrix4x4

this.Inverted

Full Usage: this.Inverted

Returns: Matrix4x4
Modifiers: inline

The inverted value of a matrix. Throws if no determinant.

Extended Type: Matrix4x4

Returns: Matrix4x4

this.IsZero

Full Usage: this.IsZero

Parameters:
    () : unit

Returns: bool
Modifiers: inline

Extended Type: Matrix4x4

() : unit
Returns: bool

this.IsZero

Full Usage: this.IsZero

Returns: bool
Modifiers: inline

Extended Type: Matrix4x4

Returns: bool

this.Right

Full Usage: this.Right

Parameters:
    () : unit

Returns: Vector3
Modifiers: inline

The right vector of the matrix.

Extended Type: Matrix4x4

() : unit
Returns: Vector3

this.Right

Full Usage: this.Right

Returns: Vector3
Modifiers: inline

The right vector of the matrix.

Extended Type: Matrix4x4

Returns: Vector3

this.RightUpForward

Full Usage: this.RightUpForward

Parameters:
    () : unit

Returns: Vector3 * Vector3 * Vector3
Modifiers: inline

Right, up, and forward matrix vectors.

Extended Type: Matrix4x4

() : unit
Returns: Vector3 * Vector3 * Vector3

this.RightUpForward

Full Usage: this.RightUpForward

Returns: Vector3 * Vector3 * Vector3
Modifiers: inline

Right, up, and forward matrix vectors.

Extended Type: Matrix4x4

Returns: Vector3 * Vector3 * Vector3

this.Rotation

Full Usage: this.Rotation

Parameters:
    () : unit

Returns: Quaternion
Modifiers: inline

The rotation extracted from an affine matrix.

Extended Type: Matrix4x4

() : unit
Returns: Quaternion

this.Rotation

Full Usage: this.Rotation

Returns: Quaternion
Modifiers: inline

The rotation extracted from an affine matrix.

Extended Type: Matrix4x4

Returns: Quaternion

this.Scale

Full Usage: this.Scale

Parameters:
    () : unit

Returns: Vector3
Modifiers: inline

The scale extracted from an affine matrix.

Extended Type: Matrix4x4

() : unit
Returns: Vector3

this.Scale

Full Usage: this.Scale

Returns: Vector3
Modifiers: inline

The scale extracted from an affine matrix.

Extended Type: Matrix4x4

Returns: Vector3

this.ToArray

Full Usage: this.ToArray

Parameters:
    () : unit

Returns: float32 array

Convert a Matrix4x4 to an array.

Extended Type: Matrix4x4

() : unit
Returns: float32 array

this.ToArray

Full Usage: this.ToArray

Parameters:
    value : single array
    offset : int

Convert a Matrix4x4 to an array.

Extended Type: Matrix4x4

value : single array
offset : int

this.Transposed

Full Usage: this.Transposed

Parameters:
    () : unit

Returns: Matrix4x4
Modifiers: inline

The transposed value of a matrix.

Extended Type: Matrix4x4

() : unit
Returns: Matrix4x4

this.Transposed

Full Usage: this.Transposed

Returns: Matrix4x4
Modifiers: inline

The transposed value of a matrix.

Extended Type: Matrix4x4

Returns: Matrix4x4

this.Up

Full Usage: this.Up

Parameters:
    () : unit

Returns: Vector3
Modifiers: inline

The up vector of the matrix.

Extended Type: Matrix4x4

() : unit
Returns: Vector3

this.Up

Full Usage: this.Up

Returns: Vector3
Modifiers: inline

The up vector of the matrix.

Extended Type: Matrix4x4

Returns: Vector3

Type something to start searching.