@temporary-escape/mod-sdk / Matrix4f
Class: Matrix4f
Defined in: math/matrix4f.ts:7
Constructors
Constructor
ts
new Matrix4f(): Matrix4f;Defined in: math/matrix4f.ts:13
Returns
Matrix4f
Properties
| Property | Type | Defined in |
|---|---|---|
c0 | Vector4f | math/matrix4f.ts:8 |
c1 | Vector4f | math/matrix4f.ts:9 |
c2 | Vector4f | math/matrix4f.ts:10 |
c3 | Vector4f | math/matrix4f.ts:11 |
Methods
get()
ts
get(i: number): Vector4f;Defined in: math/matrix4f.ts:24
Get a column vector from the matrix.
Parameters
| Parameter | Type | Description |
|---|---|---|
i | number | Column index in range [0, 3]. |
Returns
set()
ts
set(i: number, v: Vector4f): void;Defined in: math/matrix4f.ts:33
Set a column vector from the matrix.
Parameters
| Parameter | Type | Description |
|---|---|---|
i | number | Column index in range [0, 3]. |
v | Vector4f | Column vector. |
Returns
void
add()
ts
static add(a: Matrix4f, b: Matrix4f): Matrix4f;Defined in: math/matrix4f.ts:337
Parameters
| Parameter | Type |
|---|---|
a | Matrix4f |
b | Matrix4f |
Returns
Matrix4f
determinant()
ts
static determinant(m: Matrix4f): number;Defined in: math/matrix4f.ts:248
Return the determinant of a squared matrix.
Parameters
| Parameter | Type |
|---|---|
m | Matrix4f |
Returns
number
div()
ts
static div(a: Matrix4f, b: Matrix4f): Matrix4f;Defined in: math/matrix4f.ts:384
Parameters
| Parameter | Type |
|---|---|
a | Matrix4f |
b | Matrix4f |
Returns
Matrix4f
equal()
ts
static equal(a: Matrix4f, b: Matrix4f): Vector4b;Defined in: math/matrix4f.ts:398
Perform a component-wise equal-to comparison of two matrices. Return a boolean vector which components value is True if this expression is satisfied per column of the matrices.
Parameters
| Parameter | Type |
|---|---|
a | Matrix4f |
b | Matrix4f |
Returns
identity()
ts
static identity(): Matrix4f;Defined in: math/matrix4f.ts:48
Builds an identity matrix.
Returns
Matrix4f
inverse()
ts
static inverse(m: Matrix4f): Matrix4f;Defined in: math/matrix4f.ts:127
Returns the inverse of a matrix.
Parameters
| Parameter | Type |
|---|---|
m | Matrix4f |
Returns
Matrix4f
lookAt()
ts
static lookAt(
eye: Vector3f,
center: Vector3f,
up: Vector3f
): Matrix4f;Defined in: math/matrix4f.ts:57
Build a look at view matrix based on the default handedness. The engine compiles GLM with GLM_FORCE_LEFT_HANDED, so this matches glm::lookAtLH (which is what glm::lookAt resolves to in the engine).
Parameters
| Parameter | Type |
|---|---|
eye | Vector3f |
center | Vector3f |
up | Vector3f |
Returns
Matrix4f
mat3Cast()
ts
static mat3Cast(m: Matrix4f): Matrix3f;Defined in: math/matrix4f.ts:419
Parameters
| Parameter | Type |
|---|---|
m | Matrix4f |
Returns
matrixCompMult()
ts
static matrixCompMult(a: Matrix4f, b: Matrix4f): Matrix4f;Defined in: math/matrix4f.ts:285
Multiply matrix x by matrix y component-wise, i.e., result[i][j] is the scalar product of x[i][j] and y[i][j].
Parameters
| Parameter | Type |
|---|---|
a | Matrix4f |
b | Matrix4f |
Returns
Matrix4f
mul()
ts
static mul(a: Matrix4f, b: Matrix4f): Matrix4f;Defined in: math/matrix4f.ts:355
Parameters
| Parameter | Type |
|---|---|
a | Matrix4f |
b | Matrix4f |
Returns
Matrix4f
notEqual()
ts
static notEqual(a: Matrix4f, b: Matrix4f): Vector4b;Defined in: math/matrix4f.ts:410
Perform a component-wise not-equal-to comparison of two matrices.
Parameters
| Parameter | Type |
|---|---|
a | Matrix4f |
b | Matrix4f |
Returns
outerProduct()
ts
static outerProduct(c: Vector4f, r: Vector4f): Matrix4f;Defined in: math/matrix4f.ts:299
Treats the first parameter c as a column vector and the second parameter r as a row vector and does a linear algebraic matrix multiply c * r.
Parameters
| Parameter | Type |
|---|---|
c | Vector4f |
r | Vector4f |
Returns
Matrix4f
quatCast()
ts
static quatCast(m: Matrix4f): Quaternion;Defined in: math/matrix4f.ts:120
Converts the matrix into a quaternion.
Parameters
| Parameter | Type |
|---|---|
m | Matrix4f |
Returns
rotate()
ts
static rotate(
m: Matrix4f,
angle: number,
axis: Vector3f
): Matrix4f;Defined in: math/matrix4f.ts:77
Builds a rotation 4 * 4 matrix created from an axis vector and an angle.
Parameters
| Parameter | Type |
|---|---|
m | Matrix4f |
angle | number |
axis | Vector3f |
Returns
Matrix4f
scale()
ts
static scale(m: Matrix4f, v: Vector3f): Matrix4f;Defined in: math/matrix4f.ts:311
Builds a scale 4 * 4 matrix created from 3 scalars.
Parameters
| Parameter | Type |
|---|---|
m | Matrix4f |
v | Vector3f |
Returns
Matrix4f
sub()
ts
static sub(a: Matrix4f, b: Matrix4f): Matrix4f;Defined in: math/matrix4f.ts:346
Parameters
| Parameter | Type |
|---|---|
a | Matrix4f |
b | Matrix4f |
Returns
Matrix4f
translate()
ts
static translate(m: Matrix4f, v: Vector3f): Matrix4f;Defined in: math/matrix4f.ts:323
Builds a translation 4 * 4 matrix created from a vector of 3 components.
Parameters
| Parameter | Type |
|---|---|
m | Matrix4f |
v | Vector3f |
Returns
Matrix4f
transpose()
ts
static transpose(m: Matrix4f): Matrix4f;Defined in: math/matrix4f.ts:236
Returns the transposed matrix of x.
Parameters
| Parameter | Type |
|---|---|
m | Matrix4f |
Returns
Matrix4f
