Matrix
matrix class
Constructor Summary
Public Constructor | ||
public |
constructor(matrix: Matrix | array) constructor |
Member Summary
Public Members | ||
public |
m11: float |
|
public |
m12: float |
|
public |
m13: float |
|
public |
m14: float |
|
public |
m21: float |
|
public |
m22: float |
|
public |
m23: float |
|
public |
m24: float |
|
public |
m31: float |
|
public |
m32: float |
|
public |
m33: float |
|
public |
m34: float |
|
public |
m41: float |
|
public |
m42: float |
|
public |
m43: float |
|
public |
m44: float |
Method Summary
Public Methods | ||
public |
clone(): * |
|
public |
copyMatrix(src: Matrix): void copy matrix |
|
public |
getArray(): array get array format value of matrix for WebGL |
|
public |
get Float32Array format value of matrix for WebGL |
|
public |
get Float32Array format value of transposed matrix for WebGL |
|
public |
identity(): void reset matrix |
|
public |
inverseMatrix(src: Matrix): void inverse matrix |
|
public |
blend 2 matrices. |
|
public |
matrixFromQuaternion(quat: Vector4): void set rotation matrix from quaternion |
|
public |
multiplyMatrix(src1: Matrix, src2: Matrix): void multiply matrix (src1 x src2), set result to this matrix |
|
public |
rotate matrix |
|
public |
scale matrix |
|
public |
showMatrix(): void show matrix value to console for debug |
|
public |
translate matrix |
|
public |
transposeMatrix(src: Matrix): void transpose matrix |
Public Constructors
Public Members
public m11: float source
public m12: float source
public m13: float source
public m14: float source
public m21: float source
public m22: float source
public m23: float source
public m24: float source
public m31: float source
public m32: float source
public m33: float source
public m34: float source
public m41: float source
public m42: float source
public m43: float source
public m44: float source
Public Methods
public copyMatrix(src: Matrix): void source
copy matrix
Params:
Name | Type | Attribute | Description |
src | Matrix |
Return:
void |
public getArray(): array source
get array format value of matrix for WebGL
Return:
array | matrix value |
public getWebGLFloatArrayTransposed(): Float32Array source
get Float32Array format value of transposed matrix for WebGL
public inverseMatrix(src: Matrix): void source
inverse matrix
Params:
Name | Type | Attribute | Description |
src | Matrix |
Return:
void |
public lerp(src1: Matrix, src2: Matrix, rate: float): void source
blend 2 matrices. if rate is 0, result is equal to src1. if rate is 1, result is equal to src2.
Return:
void |
public matrixFromQuaternion(quat: Vector4): void source
set rotation matrix from quaternion
Params:
Name | Type | Attribute | Description |
quat | Vector4 | Quaternion |
Return:
void |
public multiplyMatrix(src1: Matrix, src2: Matrix): void source
multiply matrix (src1 x src2), set result to this matrix
Return:
void |
public rotate(mat: Matrix, angle: float, x: float, y: float, z: float): void source
rotate matrix
Params:
Name | Type | Attribute | Description |
mat | Matrix | ||
angle | float | ||
x | float | ||
y | float | ||
z | float |
Return:
void |
public scale(mat: Matrix, x: float, y: float, z: float): void source
scale matrix
Params:
Name | Type | Attribute | Description |
mat | Matrix | ||
x | float | ||
y | float | ||
z | float |
Return:
void |