Skip to main content

@novorender/api / Matrices

Interface: Matrices

Defined in: @novorender/src/core3d/state/index.ts:160

A helper object for computing transformation matrices between spaces on demand.

Methods​

getMatrix()​

getMatrix(from, to): ReadonlyMat4;

Defined in: @novorender/src/core3d/state/index.ts:166

Return a 4x4 matrix for transforming coordinate from one space to another.

Parameters​

ParameterTypeDescription
fromCoordSpaceThe original space.
toCoordSpaceThe destination space.

Returns​

ReadonlyMat4


getMatrixNormal()​

getMatrixNormal(from, to): ReadonlyMat3;

Defined in: @novorender/src/core3d/state/index.ts:175

Return a 3X3 matrix for transforming normals from one space to another.

Parameters​

ParameterTypeDescription
fromCoordSpaceThe original space.
toCoordSpaceThe destination space.

Returns​

ReadonlyMat3

Remarks​

Normals has to be normalized after transformation.