@temporary-escape/mod-sdk / Matrix3f
Class: Matrix3f
Defined in: math/matrix3f.ts:5
Constructors
Constructor
ts
new Matrix3f(): Matrix3f;Defined in: math/matrix3f.ts:10
Returns
Matrix3f
Properties
| Property | Type | Defined in |
|---|---|---|
c0 | Vector3f | math/matrix3f.ts:6 |
c1 | Vector3f | math/matrix3f.ts:7 |
c2 | Vector3f | math/matrix3f.ts:8 |
Methods
get()
ts
get(i: number): Vector3f;Defined in: math/matrix3f.ts:20
Get a column vector from the matrix.
Parameters
| Parameter | Type | Description |
|---|---|---|
i | number | Column index in range [0, 2]. |
Returns
set()
ts
set(i: number, v: Vector3f): void;Defined in: math/matrix3f.ts:29
Set a column vector from the matrix.
Parameters
| Parameter | Type | Description |
|---|---|---|
i | number | Column index in range [0, 2]. |
v | Vector3f | Column vector. |
Returns
void
add()
ts
static add(a: Matrix3f, b: Matrix3f): Matrix3f;Defined in: math/matrix3f.ts:198
Parameters
| Parameter | Type |
|---|---|
a | Matrix3f |
b | Matrix3f |
Returns
Matrix3f
determinant()
ts
static determinant(m: Matrix3f): number;Defined in: math/matrix3f.ts:160
Return the determinant of a squared matrix.
Parameters
| Parameter | Type |
|---|---|
m | Matrix3f |
Returns
number
div()
ts
static div(a: Matrix3f, b: Matrix3f): Matrix3f;Defined in: math/matrix3f.ts:254
Parameters
| Parameter | Type |
|---|---|
a | Matrix3f |
b | Matrix3f |
Returns
Matrix3f
equal()
ts
static equal(a: Matrix3f, b: Matrix3f): Vector3b;Defined in: math/matrix3f.ts:267
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 | Matrix3f |
b | Matrix3f |
Returns
identity()
ts
static identity(): Matrix3f;Defined in: math/matrix3f.ts:42
Builds an identity matrix.
Returns
Matrix3f
inverse()
ts
static inverse(m: Matrix3f): Matrix3f;Defined in: math/matrix3f.ts:113
Returns the inverse of a matrix.
Parameters
| Parameter | Type |
|---|---|
m | Matrix3f |
Returns
Matrix3f
lookAt()
ts
static lookAt(
eye: Vector3f,
center: Vector3f,
up: Vector3f
): Matrix3f;Defined in: math/matrix3f.ts:52
Build a look at view matrix based on the default handedness. glm::lookAt only produces a 4x4 matrix, so this returns the upper-left 3x3 (rotation) part of the left-handed look at matrix (the engine compiles GLM with GLM_FORCE_LEFT_HANDED).
Parameters
| Parameter | Type |
|---|---|
eye | Vector3f |
center | Vector3f |
up | Vector3f |
Returns
Matrix3f
matrixCompMult()
ts
static matrixCompMult(a: Matrix3f, b: Matrix3f): Matrix3f;Defined in: math/matrix3f.ts:177
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 | Matrix3f |
b | Matrix3f |
Returns
Matrix3f
mul()
ts
static mul(a: Matrix3f, b: Matrix3f): Matrix3f;Defined in: math/matrix3f.ts:214
Parameters
| Parameter | Type |
|---|---|
a | Matrix3f |
b | Matrix3f |
Returns
Matrix3f
notEqual()
ts
static notEqual(a: Matrix3f, b: Matrix3f): Vector3b;Defined in: math/matrix3f.ts:278
Perform a component-wise not-equal-to comparison of two matrices.
Parameters
| Parameter | Type |
|---|---|
a | Matrix3f |
b | Matrix3f |
Returns
outerProduct()
ts
static outerProduct(c: Vector3f, r: Vector3f): Matrix3f;Defined in: math/matrix3f.ts:190
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 | Vector3f |
r | Vector3f |
Returns
Matrix3f
quatCast()
ts
static quatCast(m: Matrix3f): Quaternion;Defined in: math/matrix3f.ts:66
Converts the matrix into a quaternion.
Parameters
| Parameter | Type |
|---|---|
m | Matrix3f |
Returns
sub()
ts
static sub(a: Matrix3f, b: Matrix3f): Matrix3f;Defined in: math/matrix3f.ts:206
Parameters
| Parameter | Type |
|---|---|
a | Matrix3f |
b | Matrix3f |
Returns
Matrix3f
transpose()
ts
static transpose(m: Matrix3f): Matrix3f;Defined in: math/matrix3f.ts:149
Returns the transposed matrix of x.
Parameters
| Parameter | Type |
|---|---|
m | Matrix3f |
Returns
Matrix3f
