Matrix3

A 3x3 matrix.

Constructor

Matrix3()

Creates and initializes the 3x3 matrix to the identity matrix.

Properties

.elements

A column-major list of matrix values.

Methods

.set ( n11, n12, n13, n21, n22, n23, n31, n32, n33 ) this

n11 -- Float
n12 -- Float
n13 -- Float
n21 -- Float
n22 -- Float
n23 -- Float
n31 -- Float
n32 -- Float
n33 -- Float
Sets the 3x3 matrix values to the given row-major sequence of values.

.copy ( m ) this

m -- Matrix4
Copies the values of matrix m into this matrix.

.fromArray ( array ) this

array -- Array The array to read the elements from.
Sets the elements of this matrix based on an array in column-major format.

.transpose () this

Transposes this matrix in place.

.transposeIntoArray ( array ) this

array -- Array
Transposes this matrix into the supplied array, and returns itself unchanged.

.determinant () this

Computes and returns the determinant of this matrix.

.multiplyScalar ( s ) this

scalar -- Float
Multiplies every component of the matrix by the scalar value s.

.applyToVector3Array ( array ) this

array -- An array in the form [vector1x, vector1y, vector1z, vector2x, vector2y, vector2z, ...]
Multiplies (applies) this matrix to every vector3 in the array.

.getNormalMatrix ( m ) this

m -- Matrix4
Sets this matrix as the normal matrix (upper left 3x3)of the passed matrix4. The normal matrix is the inverse transpose of the matrix m.

.getInverse ( m, throwOnDegenerate ) this

m -- Matrix4
throwOnDegenerate -- Boolean If true, throw an error if the matrix is degenerate (not invertible).
Set this matrix to the inverse of the passed matrix.

.identity () this

Resets this matrix to identity.

1, 0, 0
0, 1, 0
0, 0, 1

.clone () this

Creates a copy of this matrix.

.toArray ( array, offset ) this

array -- Array optional array to store the vector
offset -- Integer optional offset into the array
Writes the elements of this matrix to an array in column-major format.

Source

src/math/Matrix3.js
Edit