QuadRingMatrix4

QuadRingMatrix4

4x4 matrix over a quadratic field with determinant 1 (o make inversion easier).

Constructor

new QuadRingMatrix4()

Source:
Author:
  • Mostly borrowed from Three.js

Classes

QuadRingMatrix4

Members

a

Source:

The 4x4 matrix with all the a-parts. This data is need for the shader

b

Source:

The 4x4 matrix with all the b-parts. This data is need for the shader

elements :Array.<QuadRingElement>

Source:

The elements of the matrix, in a column-major order

Type:

isQuadRingMatrix4 :boolean

Source:

Flag to precise the type of the object

Type:
  • boolean

ring :QuadRing

Source:

The underlying quadratic ring

Type:

Methods

clone() → {QuadRingMatrix4}

Source:

Return a copy of the current matrix.

Returns:
Type
QuadRingMatrix4

copy(m) → {QuadRingMatrix4}

Source:

Set the current matrix to m

Parameters:
Name Type Description
m QuadRingMatrix4
Returns:
Type
QuadRingMatrix4

equals(matrix) → {boolean}

Source:

Check if the two matrices are equal

Parameters:
Name Type Description
matrix QuadRingMatrix4
Returns:
Type
boolean

fromArray(array, offset) → {QuadRingMatrix4}

Source:

Set the coefficient from an array

Parameters:
Name Type Default Description
array Array.<QuadRingElement>
offset number 0
Returns:
Type
QuadRingMatrix4

getEntry(i, j) → {QuadRingElement}

Source:

Return the ij-entry

Parameters:
Name Type Description
i number

the row index

j number

the column index

Returns:
Type
QuadRingElement

identity()

Source:

Set the current matrix to the identity

invert() → {QuadRingMatrix4}

Source:

Set the matrix to its inverse. We recall that the determinant of the matrix is assumed to be one.

Returns:
Type
QuadRingMatrix4

multiply(m) → {QuadRingMatrix4}

Source:

Matrix multiplication

Parameters:
Name Type Description
m QuadRingMatrix4
Returns:
Type
QuadRingMatrix4

multiplyMatrices(m1, m2) → {QuadRingMatrix4}

Source:

Set the matrix to the product m1 * m2

Parameters:
Name Type Description
m1 QuadRingMatrix4
m2 QuadRingMatrix4
Returns:
Type
QuadRingMatrix4

multiplyScalar(s) → {QuadRingMatrix4}

Source:

Multiply the matrix by a scalar

Parameters:
Name Type Description
s QuadRingElement
Returns:
Type
QuadRingMatrix4

premultiply(m) → {QuadRingMatrix4}

Source:

Matrix pre-multiplication

Parameters:
Name Type Description
m QuadRingMatrix4
Returns:
Type
QuadRingMatrix4

set(n11, n12, n13, n14, n21, n22, n23, n24, n31, n32, n33, n34, n41, n42, n43, n44) → {QuadRingMatrix4}

Source:

Set the elements of this matrix to the supplied row-major values n11, n12, ... n44.

Parameters:
Name Type Description
n11 QuadRingElement
n12 QuadRingElement
n13 QuadRingElement
n14 QuadRingElement
n21 QuadRingElement
n22 QuadRingElement
n23 QuadRingElement
n24 QuadRingElement
n31 QuadRingElement
n32 QuadRingElement
n33 QuadRingElement
n34 QuadRingElement
n41 QuadRingElement
n42 QuadRingElement
n43 QuadRingElement
n44 QuadRingElement
Returns:
Type
QuadRingMatrix4

setEntry(i, j, value) → {QuadRingMatrix4}

Source:

Set the value of the ij-entry

Parameters:
Name Type Description
i number

the row index

j number

the column index

value QuadRingElement
Returns:
Type
QuadRingMatrix4

toArray(array, offset) → {Array.<QuadRingElement>}

Source:

Return the elements of the matrix as an array

Parameters:
Name Type Default Description
array Array.<QuadRingElement>
offset number 0
Returns:
Type
Array.<QuadRingElement>

toMatrix4() → {Matrix4}

Source:

Convert the matrix to a Matrix4 (with number type entries)

Returns:
Type
Matrix4

transpose() → {QuadRingMatrix4}

Source:

Set the matrix to its transpose

Returns:
Type
QuadRingMatrix4