Namespace: mat4f

vr. mat4f

Source:
  • vr.js, line 1134

Methods

<static> create() → {vr.mat4f.Type}

Creates a matrix object.

Source:
  • vr.js, line 1159
Returns:

Matrix.

Type
vr.mat4f.Type

<static> makeIdentity(v)

Makes an identity matrix.

Parameters:
Name Type Description
v vr.mat4f.Type

Destination matrix.

Source:
  • vr.js, line 1169

<static> makePerspective(v, fovy, aspect, near, far)

Makes a perspective projection matrix.

Parameters:
Name Type Description
v vr.mat4f.Type

Destination matrix.

fovy number

FOV along Y.

aspect number

Aspect ratio.

near number

Near plane distance.

far number

Far plane distance.

Source:
  • vr.js, line 1221

<static> makeRect(v, x, y, w, h)

Makes a matrix describing a rectangle.

Parameters:
Name Type Description
v vr.mat4f.Type

Destination matrix.

x number

Rectangle X.

y number

Rectangle Y.

w number

Rectangle width.

h number

Rectangle height.

Source:
  • vr.js, line 1202

<static> makeTranslation(v, x, y, z)

Makes a translation matrix.

Parameters:
Name Type Description
v vr.mat4f.Type

Destination matrix.

x number

Translation along X.

y number

Translation along Y.

z number

Translation along Z.

Source:
  • vr.js, line 1184

<static> multiply(v, a, b)

Multiples matrices a and b in order and stores the result in v.

Parameters:
Name Type Description
v vr.mat4f.Type

Destination matrix.

a vr.mat4f.Type

LHS matrix.

b vr.mat4f.Type

RHS matrix.

Source:
  • vr.js, line 1243

Type Definitions

Type

Simple 4x4 float32 matrix storage type.

Type:
  • Float32Array
Source:
  • vr.js, line 1151
Example
[ m00 m01 m02 m03    [  0  1  2  3
  m10 m11 m12 m13       4  5  6  7
  m20 m21 m22 m23       8  9 10 11
  m30 m31 m32 m33 ]    12 13 14 15 ]