interface.Matrices
API > Matrices
Interface: Matrices
A helper object for computing transformation matrices between spaces on demand.
Methods
getMatrix
getMatrix(
from
,to
):ReadonlyMat4
Return a 4x4 matrix for transforming coordinate from one space to another.
Parameters
Parameter | Type | Description |
---|---|---|
from | CoordSpace | The original space. |
to | CoordSpace | The destination space. |
Returns
ReadonlyMat4
Source
@novorender/core3d/state/index.ts:154
getMatrixNormal
getMatrixNormal(
from
,to
):ReadonlyMat3
Return a 3X3 matrix for transforming normals from one space to another.
Parameters
Parameter | Type | Description |
---|---|---|
from | CoordSpace | The original space. |
to | CoordSpace | The destination space. |
Returns
ReadonlyMat3
Source
@novorender/core3d/state/index.ts:163
Remarks
Normals has to be normalized after transformation.