Atlantis.Matrix Class
Create a matrix. Parameter can be a matrix, an array of 16 floats or nothing (all fields case are sets to 0).
Constructor
Item Index
Methods
- add static
- add
- createOrthograhic static
- createOrthographicOffCenter static
- createPerspectiveFieldOfView static
- createPerspectiveFieldOfViewRH static
- createPerspectiveOffCenter static
- createPerspectiveOffCenter static
- createRotationX static
- createRotationX static
- createRotationY static
- createScale static
- createTranslation static
- createWorld static
- getBackward
- getDown
- getForward
- getIdentityValues
- getLeft
- getMatrixIdentity static
- getRight
- getUp
- getZeroValues
- invert
- invert static
- multiply static
- multiply
- set
- setBackward
- setDown
- setForward
- setIdentity
- setLeft
- setRight
- setTranslation
- setUp
- subtract
- subtract static
- toArray
- toString
Methods
add
-
matA
-
matB
Add two matrix.
Parameters:
-
matA
Atlantis.MatrixA matrix
-
matB
Atlantis.MatrixAnother matrix to add with the first
Returns:
Return a new matrix.
createOrthograhic
-
width
-
height
-
zNear
-
zFar
Create an orthogonal projection matrix.
Returns:
createOrthographicOffCenter
-
width
-
height
-
zNear
-
zFar
Create a customized orthogonal projection matrix.
Returns:
createPerspectiveFieldOfView
-
fov
-
aspect
-
near
-
far
Create a perspective field of view matrix with Left hand notation.
Parameters:
Returns:
Return a matrix of this type of perspective.
createPerspectiveFieldOfViewRH
-
fov
-
aspect
-
near
-
far
Create a perspective field of view matrix with Right hand notation.
Parameters:
Returns:
Return a matrix of this type of perspective.
createPerspectiveOffCenter
-
left
-
right
-
bottom
-
top
-
zNear
-
zFar
Create a custom perspective matrix.
Parameters:
-
left
NumberMinimum X value of the viewing volume.
-
right
NumberMaximum X value of the viewing volume.
-
bottom
NumberMinimum Y value of the viewing volume.
-
top
NumberMaximum Y value of the viewing volume.
-
zNear
NumberMinimum Z value of the viewing volume.
-
zFar
NumberMaximum Z value of the viewing volume.
Returns:
Return a new custom perspective matrix.
createPerspectiveOffCenter
-
left
-
right
-
bottom
-
top
-
zNear
-
zFar
Create a custom perspective matrix (Right hand).
Parameters:
-
left
NumberMinimum X value of the viewing volume.
-
right
NumberMaximum X value of the viewing volume.
-
bottom
NumberMinimum Y value of the viewing volume.
-
top
NumberMaximum Y value of the viewing volume.
-
zNear
NumberMinimum Z value of the viewing volume.
-
zFar
NumberMaximum Z value of the viewing volume.
Returns:
Return a new custom perspective matrix.
createRotationX
-
rotation
Create a rotation matrix on X axis.
Parameters:
-
rotation
Atlantis.Vector3An angle in radians
Returns:
Return a rotation matrix on X axis.
createRotationX
-
rotation
Create a rotation matrix on Z axis.
Parameters:
-
rotation
Atlantis.Vector3An angle in radians
Returns:
Return a rotation matrix on Z axis.
createRotationY
-
rotation
Create a rotation matrix on Y axis.
Parameters:
-
rotation
Atlantis.Vector3An angle in radians
Returns:
Return a rotation matrix on Y axis.
createScale
-
sx
-
sy
-
sz
Create a scale matrix.
Parameters:
Returns:
Return a scale matrix.
createTranslation
-
x
-
y
-
z
Create a translation matrix.
Returns:
Return a matrix translation.
createWorld
-
position
-
forward
-
upVector
Create a world matrix.
Parameters:
-
position
Atlantis.Vector3 -
forward
Atlantis.Vector3 -
upVector
Atlantis.Vector3
Returns:
Return a world matrix.
getBackward
()
Atlantis.Matrix
Gets the backward of the matrix.
Returns:
Return a the backward vector of the matrix.
getDown
()
Atlantis.Matrix
Gets the down of the matrix.
Returns:
Return a the down vector of the matrix.
getForward
()
Atlantis.Matrix
Gets the forward of the matrix.
Returns:
Return a the forward vector of the matrix.
getIdentityValues
()
Array
Gets identity value for push it into matrix.
Returns:
Return an array that correspond of identity matrix.
getLeft
()
Atlantis.Matrix
Gets the left of the matrix.
Returns:
Return a the left vector of the matrix.
getMatrixIdentity
()
Atlantis.Matrix
static
Gets an identity matrix.
Returns:
Return an identity matrix.
getRight
()
Atlantis.Matrix
Gets the right of the matrix.
Returns:
Return a the right vector of the matrix.
getUp
()
Atlantis.Matrix
Gets the up of the matrix.
Returns:
Return a the up vector of the matrix.
invert
()
Invert the current Matrix.
invert
-
matrix
Calculate the inverse of the specified matrix.
Parameters:
-
matrix
ObjectThe matrix to use.
Returns:
Return the inverse of the matrix.
multiply
-
matrixA
-
matrixB
-
matrixC
Multiply a two matrix.
Parameters:
-
matrixA
Atlantis.MatrixA matrix.
-
matrixB
Atlantis.MatrixAnother matrix.
-
matrixC
Atlantis.MatrixAnother matrix (optional).
Returns:
Return a new matrix.
multiply
-
matrix
Multiply this matrix by another matrix.
Parameters:
-
matrix
Atlantis.MatrixA matrix to multiply.
set
-
values
Set all values of the matrix.
Parameters:
-
values
ArrayAn array of 16 values who start at M11 and stop at M44
setIdentity
()
Sets the matrix to identity.
setLeft
-
vector
Sets the left of the matrix.
Parameters:
-
vector
Atlantis.Vector3A vector to use.
setTranslation
-
position
Sets translation.
Parameters:
-
position
Atlantis.Vetor3The position to set.
subtract
-
matrix
Subtract a matrix to this matrix.
Parameters:
-
matrix
Atlantis.MatrixA matrix to add.
subtract
-
matA
-
matB
Subtract two matrix.
Parameters:
-
matA
Atlantis.MatrixA matrix.
-
matB
Atlantis.MatrixAnother matrix to use to subtract with the first matrix.
Returns:
Return a new matrix.