Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "mulv"

Index

Variables

Functions

Variables

Const mulV

mulV: MultiMatOpMV = vop(1)

Matrix-vector multiplication. Supports in-place modification, i.e. if out === v.

param
param
param

Const mulV22

mulV22: MatOpMV = mulV.add(4, (out, m, v) =>setC2(out || v,dotS2(m, v, 0, 0, 2),dotS2(m, v, 1, 0, 2)))

Multiplies M22 m with 2D vector v. Supports in-place modification, i.e. if out === v.

param
param
param

Const mulV23

mulV23: MatOpMV = mulV.add(6, (out, m, v) =>setC2(out || v,dotS2(m, v, 0, 0, 2) + m[4],dotS2(m, v, 1, 0, 2) + m[5]))

Multiplies M23 m with 2D vector v. Supports in-place modification, i.e. if out === v.

param
param
param

Const mulV33

mulV33: MatOpMV = mulV.add(9, (out, m, v) =>setC3(out || v,dotS3(m, v, 0, 0, 3),dotS3(m, v, 1, 0, 3),dotS3(m, v, 2, 0, 3)))

Multiplies M33 m with 3D vector v. Supports in-place modification, i.e. if out === v.

param
param
param

Const mulV44

mulV44: MatOpMV = mulV.add(16, (out, m, v) =>setC4(out || v,dotS4(m, v, 0, 0, 4),dotS4(m, v, 1, 0, 4),dotS4(m, v, 2, 0, 4),dotS4(m, v, 3, 0, 4)))

Multiplies M44 m with 4D vector v. Supports in-place modification, i.e. if out === v.

param
param
param

Functions

Const mulV344

  • mulV344(out: Vec, m: ReadonlyVec, v: ReadonlyVec): Vec
  • Multiplies M44 m with 3D vector v and assumes w=1, i.e. the vector is interpreted as [x,y,z,1]. After transformation applies perspective divide of the resulting XYZ components.

    Parameters

    • out: Vec
    • m: ReadonlyVec
    • v: ReadonlyVec

    Returns Vec

Const mulVQ

  • mulVQ(out: Vec, q: ReadonlyVec, v: ReadonlyVec): Vec
  • Multiplies quaternion q with 3D vector v. Returns transformed vector or modifies in-place if out is null or v.

    Parameters

    • out: Vec
    • q: ReadonlyVec
    • v: ReadonlyVec

    Returns Vec

Generated using TypeDoc