Skip to main content

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

ParameterTypeDescription
fromCoordSpaceThe original space.
toCoordSpaceThe 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

ParameterTypeDescription
fromCoordSpaceThe original space.
toCoordSpaceThe destination space.

Returns

ReadonlyMat3

Source

@novorender/core3d/state/index.ts:163

Remarks

Normals has to be normalized after transformation.