Class: AxMatrix

AxMatrix()

new AxMatrix()

Creates a matrix object and initializes it as identity
Source:

Methods

(static) Copy(result, source)

Copies the source matrix into the result
Parameters:
Name Type Description
result AxMatrix The matrix to copy to
source AxMatrix The matrix to copy from
Source:

(static) Copy3x3(result, source)

Copies the source matrix into the result, treating them as 3x3 matrices by operating only on their first three rows and columns, ignoring the fourth row and column The fourth row and column are irrelevant in this operation and are ignored and left unchanged. It can be useful for example, in operations where translation must be disregarded
Parameters:
Name Type Description
result AxMatrix The matrix to copy to
source AxMatrix The matrix to copy from
Source:

(static) CreateIdentity(result)

Creates an identity matrix
Parameters:
Name Type Description
result AxMatrix The matrix to create identity into
Source:

(static) CreateLookAt(result, position, lookAt, up)

Creates an observer's view transformation
Parameters:
Name Type Description
result AxMatrix The matrix to create the transformation into
position AxVector3 The location of the observer
lookAt AxVector3 The location at which the abserver is looking at
up AxVector3 The observer's up direction. It represents how the observer is rolled.
Source:

(static) CreateOrientation(result, orientationVector, orientationOrigin)

Creates a matrix tranformation oriented towards the given vector
Parameters:
Name Type Description
result AxMatrix The matrix to create the transformation into
orientationVector AxVector3 The vector holding the orientation
orientationOrigin AxVector3 The vector holding the orientation origin
Source:

(static) CreateOrthographic(result, width, height, zn, zf)

Creates an orthogonal projection transformation The handedness of the projection is determined by AxMatrix.handedness
Parameters:
Name Type Description
result AxMatrix The matrix to create the transformation into
width Number The projection's width
height Number The projection's height
zn Number The projection's near clip plane distance
zf Number The projection's far clip plane distance
Source:

(static) CreateOrthographicLH(result, width, height, zn, zf)

Creates a left handed orthogonal projection transformation
Parameters:
Name Type Description
result AxMatrix The matrix to create the transformation into
width Number The projection's width
height Number The projection's height
zn Number The projection's near clip plane distance
zf Number The projection's far clip plane distance
Source:

(static) CreateOrthographicRH(result, width, height, zn, zf)

Creates a right handed orthogonal projection transformation
Parameters:
Name Type Description
result AxMatrix The matrix to create the transformation into
width Number The projection's width
height Number The projection's height
zn Number The projection's near clip plane distance
zf Number The projection's far clip plane distance
Source:

(static) CreatePerspectiveFieldOfView(result, fov, aspectHorizontal, aspectVertical, zn, zf)

Creates a perspective projection transformation The handedness of the projection is determined by AxMatrix.handedness The aspectHorizontal and aspectVertical parameters can be used to correct the field of view of the projection, usually either horizontally or vertically, according to the dimensions of the projection plane.
Parameters:
Name Type Description
result AxMatrix The matrix to create the transformation into
fov Number The field of view angle of the projectin in radians
aspectHorizontal Number Horizontal aspect ratio factor. Value of 1.0 results in no change
aspectVertical Number Vertical aspect ratio factor. Value of 1.0 results in no change
zn Number The projection's near clip plane distance
zf Number The projection's far clip plane distance
Source:

(static) CreatePerspectiveFieldOfViewLH(result, fov, aspectHorizontal, aspectVertical, zn, zf)

Creates a left handed perspective projection transformation The aspectHorizontal and aspectVertical parameters can be used to correct the field of view of the projection, usually either horizontally or vertically, according to the dimensions of the projection plane.
Parameters:
Name Type Description
result AxMatrix The matrix to create the transformation into
fov Number The field of view angle of the projectin in radians
aspectHorizontal Number Horizontal aspect ratio factor. Value of 1.0 results in no change
aspectVertical Number Vertical aspect ratio factor. Value of 1.0 results in no change
zn Number The projection's near clip plane distance
zf Number The projection's far clip plane distance
Source:

(static) CreatePerspectiveFieldOfViewRH(result, fov, aspectHorizontal, aspectVertical, zn, zf)

Creates a right handed perspective projection transformation The aspectHorizontal and aspectVertical parameters can be used to correct the field of view of the projection, usually either horizontally or vertically, according to the dimensions of the projection plane.
Parameters:
Name Type Description
result AxMatrix The matrix to create the transformation into
fov Number The field of view angle of the projectin in radians
aspectHorizontal Number Horizontal aspect ratio factor. Value of 1.0 results in no change
aspectVertical Number Vertical aspect ratio factor. Value of 1.0 results in no change
zn Number The projection's near clip plane distance
zf Number The projection's far clip plane distance
Source:

(static) CreateRotationAxis(result, x, y, znon-null, phinon-null)

Creates a rotation transformation around an arbitrary axis Supports two input variants - a vector input and a XYZ input
Parameters:
Name Type Description
result AxMatrix The matrix to create the rotation transformation into
x Number | AxVector3 For XYZ input - the X component of the axis around which to rotate. For vector input - the vector around which to rotate
y Number For XYZ input - the Y component of the axis around which to rotate. For vector input - the angle of rotation
z Number For XYZ input - the Z component of the axis around which to rotate. Omitted for vector input
phi Number For XYZ input - the angle of rotation around the given axis. Omitted for vector input
Source:

(static) CreateRotationAxis_2(result, axis, phi)

Creates a rotation transformation around an arbitrary axis
Parameters:
Name Type Description
result AxMatrix The matrix to create the rotation transformation into
axis AxVector3 A vector representing the axis around which to rotate
phi Number The angle of the rotation around the given axis
Source:

(static) CreateRotationX(result, phi)

Creates a rotation transformation around the X axis
Parameters:
Name Type Description
result AxMatrix The matrix to create the rotation transformation into
phi Number The angle of the rotation around the X axis
Source:

(static) CreateRotationY(result, phi)

Creates a rotation transformation around the Y axis
Parameters:
Name Type Description
result AxMatrix The matrix to create the rotation transformation into
phi Number The angle of the rotation around the Y axis
Source:

(static) CreateRotationZ(result, phi)

Creates a rotation transformation around the Z axis
Parameters:
Name Type Description
result AxMatrix The matrix to create the rotation transformation into
phi Number The angle of the rotation around the Z axis
Source:

(static) CreateScaling(result, x, ynon-null, znon-null)

Creates a scaling transformation Supports two input variants - a vector input and a XYZ input
Parameters:
Name Type Description
result AxMatrix The matrix to create the scaling transformation into
x Number | AxVector3 For XYZ input - the X component of the scaling. For vector input - The scaling vector
y Number For XYZ input - the Y component of the scaling. Omitted for vector input
z Number For XYZ input - the Z component of the scaling. Omitted for vector input
Source:

(static) CreateScaling_2(result, scaling)

Creates a scaling transformation
Parameters:
Name Type Description
result AxMatrix The matrix to create the scaling transformation into
scaling AxVector3 The scaling vector
Source:

(static) CreateTranslation(result, x, ynon-null, znon-null)

Creates a translation transformation Supports two input variants - a vector input and a XYZ input
Parameters:
Name Type Description
result AxMatrix The matrix to create the translation transformation into
x Number | AxVector3 For XYZ input - the X component of the translation. For vector input - the translation vector
y Number For XYZ input - the Y component of the translation. Omitted for vector input
z Number For XYZ input - the Z component of the translation. Omitted for vector input
Source:

(static) CreateTranslation_2(result, translation)

Creates a translation transformation
Parameters:
Name Type Description
result AxMatrix The matrix to create the translation transformation into
translation AxVector3 The translation vector
Source:

(static) ExtractEulerRotationXYZ(result, source)

Extracts the Euler rotation angles in XYZ sequence of a matrix transformation
Parameters:
Name Type Description
result AxVector3 The vector to hold the resulting Euler rotation
source AxMatrix The matrix which holds the whole transformationx
Source:

(static) GetAxisX(result, source)

Gets the X axis of a matrix transformation
Parameters:
Name Type Description
result AxVector3 The vector to hold the resulting axis
source AxMatrix The matrix which holds the whole transformation
Source:

(static) GetAxisY(result, source)

Gets the Y axis of a matrix transformation
Parameters:
Name Type Description
result AxVector3 The vector to hold the resulting axis
source AxMatrix The matrix which holds the whole transformation
Source:

(static) GetAxisZ(result, source)

Gets the Z axis of a matrix transformation
Parameters:
Name Type Description
result AxVector3 The vector to hold the resulting axis
source AxMatrix The matrix which holds the whole transformation
Source:

(static) GetScaling(result, source)

Extracts the scaling vector of a matrix transformation
Parameters:
Name Type Description
result AxVector3 The vector to hold the resulting scaling
source AxMatrix The matrix which holds the whole transformationx
Source:

(static) GetTranslation(result, source)

Gets the translation vector of a matrix transformation
Parameters:
Name Type Description
result AxVector3 The vector to hold the resulting translation
source AxMatrix The matrix which holds the whole transformation
Source:

(static) Invert(result, source)

Inverts a matrix
Parameters:
Name Type Description
result AxMatrix The matrix to hold the result of the inversion
source AxMatrix The source matrix of the inversion
Source:

(static) Invert3x3(result, source)

Inverts a matrix, treating it as a 3x3 matrix by operating only on the first three rows and columns, ignoring the fourth row and column The fourth row and column are irrelevant in this operation and are ignored and left unchanged. It is much faster than inverting the whole matrix and can be useful for example, in operations where translation must be disregarded
Parameters:
Name Type Description
result AxMatrix The matrix to hold the result of the inversion
source AxMatrix The source matrix of the inversion
Source:

(static) InvertTranspose3x3(result, source)

Inverts and transposes a matrix, treating it as a 3x3 matrix by operating only on the first three rows and columns, ignoring the fourth row and column The fourth row and column are irrelevant in this operation and are ignored and left unchanged. It is much faster than inverting the whole matrix and can be useful in some cases, particularly for generating a transformation to apply on normals, when a non-uniform scaling is in effect
Parameters:
Name Type Description
result AxMatrix The matrix to hold the result of the inversion
source AxMatrix The source matrix of the inversion
Source:

(static) Multiply(result, matrix1, matrix2)

Multiplies two matrices
Parameters:
Name Type Description
result AxMatrix The matrix to hold the result of the multiplication
matrix1 AxMatrix The first matrix to be multiplied
matrix2 AxMatrix The second matrix to be multiplied
Source:

(static) Multiply3x3(result, matrix1, matrix2)

Multiplies two matrices, treating them as 3x3 matrices by operating only on their first three rows and columns, ignoring the fourth row and column The fourth row and column are irrelevant in this operation and are ignored and left unchanged. It can be useful for example, in operations where translation must be disregarded
Parameters:
Name Type Description
result AxMatrix The matrix to hold the result of the multiplication
matrix1 AxMatrix The first matrix to be multiplied
matrix2 AxMatrix The second matrix to be multiplied
Source:

(static) SetAxisX(result, source)

Sets the X axis of a matrix transformation
Parameters:
Name Type Description
result AxMatrix The matrix to have its X axis set
source AxVector3 The vector to be set as X axis in the given matrix
Source:

(static) SetAxisY(result, source)

Sets the Y axis of a matrix transformation
Parameters:
Name Type Description
result AxMatrix The matrix to have its Y axis set
source AxVector3 The vector to be set as Y axis in the given matrix
Source:

(static) SetAxisZ(result, source)

Sets the Z axis of a matrix transformation
Parameters:
Name Type Description
result AxMatrix The matrix to have its Z axis set
source AxVector3 The vector to be set as Z axis in the given matrix
Source:

(static) SetScaling(result, scaling)

Sets the scaling of a matrix transformation
Parameters:
Name Type Description
result AxMatrix The matrix to have its scaling set
scaling AxVector3 The vector to be set as scaling in the given matrix
Source:

(static) SetTranslation(result, translation)

Sets the translation of a matrix transformation
Parameters:
Name Type Description
result AxMatrix The matrix to have its translation set
translation AxVector3 The vector to be set as translation in the given matrix
Source:

(static) Transpose(result, source)

Transposes a matrix
Parameters:
Name Type Description
result AxMatrix The matrix to hold the result of the transposing
source AxMatrix The source matrix of the transposing
Source:

(static) Transpose3x3(result, source)

Transposes a matrix, treating it as a 3x3 matrix by operating only on the first three rows and columns, ignoring the fourth row and column The fourth row and column are irrelevant in this operation and are ignored and left unchanged. It can be useful for example, in operations where translation must be disregarded
Parameters:
Name Type Description
result AxMatrix The matrix to hold the result of the transposing
source AxMatrix The source matrix of the transposing
Source:

Equals(matrix) → {Boolean}

Compares the matrix with another one and returns true if both are identical
Parameters:
Name Type Description
matrix AxMatrix The matrix to compare with
Source:
Returns:
True if identical to the given matrix
Type
Boolean

GetDeterminant() → {Number}

Calculates the determinant of the matrix
Source:
Returns:
The determinant of the matrix
Type
Number

Documentation generated by JSDoc 3.5.3 on Mon Feb 19 2018 20:39:26 GMT+0200 (FLE Standard Time)