Home Reference Source
public class | source

Matrix4

Static Method Summary

Static Public Methods
public static

fromJSON(): *

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public

$matrix: *

public
Private Members
private

__mat: *

Method Summary

Public Methods
public

addToHashDigest(hash: *): *

public

alignAxis(axis: *, vec: *): *

public

clearTranslation(set_w_to_one: boolean): *

public

clone(): *

public

copy(): *

public

copyColumn(i: *): *

public

copyColumnTo(i: *, vec: *): *

public

decompose(_translate: *, _rotate: *, _scale: *, _skew: *, _perspective: *, order: *): boolean

public
public
public

divide(divisor: *): *

public

equals(m: *): *

public

euler_rotate(x: *, y: *, z: *): *

public

euler_rotate_order(x: *, y: *, z: *, order: *): *

public

frustum(left: *, right: *, bottom: *, top: *, near: *, far: *): *

public
public
public

invert(): *

public

load(): *

public

loadColumn(i: *, vec: *): *

public

loadSTRUCT(reader: *)

public

lookat(pos: *, target: *, up: *): *

public
public

makeNormalMatrix(normal: *, up: *): *

public
public

multiply(mat: *): *

public

normalize(): *

public

ortho(left: *, right: *, bottom: *, top: *, near: *, far: *): *

public

orthographic(scale: *, aspect: *, near: *, far: *): *

public

perspective(fovy: *, aspect: *, zNear: *, zFar: *): *

public

preMultiply(mat: *): *

public

preScale(x: *, y: *, z: *, w: number): *

public

preTranslate(x: *, y: *, z: *): *

public

rotate(angle: *, x: *, y: *, z: *): *

public

scale(x: *, y: *, z: *, w: number): *

public

setTranslation(x: *, y: *, z: *, resetW: boolean): *

public

setUniform(ctx: *, loc: *, transpose: *): *

public

toJSON(): {"isPersp": *, "items": *}

public

toString(): *

public

translate(x: *, y: *, z: *): *

public

transpose(): *

Private Methods
private

_determinant2x2(a: *, b: *, c: *, d: *): *

private

_determinant3x3(a1: *, a2: *, a3: *, b1: *, b2: *, b3: *, c1: *, c2: *, c3: *): *

private
private

Static Public Methods

public static fromJSON(): * source

Return:

*

Public Constructors

public constructor() source

Public Members

public $matrix: * source

public isPersp: boolean source

Private Members

private __mat: * source

Public Methods

public addToHashDigest(hash: *): * source

Params:

NameTypeAttributeDescription
hash *

Return:

*

public alignAxis(axis: *, vec: *): * source

Params:

NameTypeAttributeDescription
axis *
vec *

Return:

*

public clearTranslation(set_w_to_one: boolean): * source

Params:

NameTypeAttributeDescription
set_w_to_one boolean
  • optional
  • default: false

Return:

*

public clone(): * source

Return:

*

public copy(): * source

Return:

*

public copyColumn(i: *): * source

Params:

NameTypeAttributeDescription
i *

Return:

*

public copyColumnTo(i: *, vec: *): * source

Params:

NameTypeAttributeDescription
i *
vec *

Return:

*

public decompose(_translate: *, _rotate: *, _scale: *, _skew: *, _perspective: *, order: *): boolean source

Params:

NameTypeAttributeDescription
_translate *
_rotate *
_scale *
_skew *
_perspective *
order *
  • optional

Return:

boolean

public determinant(): * source

Return:

*

public determinant(): * source

Return:

*

public divide(divisor: *): * source

Params:

NameTypeAttributeDescription
divisor *

Return:

*

public equals(m: *): * source

Params:

NameTypeAttributeDescription
m *

Return:

*

public euler_rotate(x: *, y: *, z: *): * source

Params:

NameTypeAttributeDescription
x *
y *
z *

Return:

*

public euler_rotate_order(x: *, y: *, z: *, order: *): * source

Params:

NameTypeAttributeDescription
x *
y *
z *
order *
  • optional

Return:

*

public frustum(left: *, right: *, bottom: *, top: *, near: *, far: *): * source

Params:

NameTypeAttributeDescription
left *
right *
bottom *
top *
near *
far *

Return:

*

public getAsArray(): undefined[] source

Return:

undefined[]

public getAsFloat32Array(): * source

Return:

*

public invert(): * source

Return:

*

public load(): * source

Return:

*

public loadColumn(i: *, vec: *): * source

Params:

NameTypeAttributeDescription
i *
vec *

Return:

*

public loadSTRUCT(reader: *) source

Params:

NameTypeAttributeDescription
reader *

public lookat(pos: *, target: *, up: *): * source

Params:

NameTypeAttributeDescription
pos *
target *
up *

Return:

*

public makeIdentity(): * source

Return:

*

public makeNormalMatrix(normal: *, up: *): * source

Params:

NameTypeAttributeDescription
normal *
up *
  • optional
  • default: undefined

Return:

*

public makeRotationOnly(): * source

Return:

*

public multiply(mat: *): * source

Params:

NameTypeAttributeDescription
mat *

Return:

*

public normalize(): * source

Return:

*

public ortho(left: *, right: *, bottom: *, top: *, near: *, far: *): * source

Params:

NameTypeAttributeDescription
left *
right *
bottom *
top *
near *
far *

Return:

*

public orthographic(scale: *, aspect: *, near: *, far: *): * source

Params:

NameTypeAttributeDescription
scale *
aspect *
near *
far *

Return:

*

public perspective(fovy: *, aspect: *, zNear: *, zFar: *): * source

Params:

NameTypeAttributeDescription
fovy *
aspect *
zNear *
zFar *

Return:

*

public preMultiply(mat: *): * source

Params:

NameTypeAttributeDescription
mat *

Return:

*

public preScale(x: *, y: *, z: *, w: number): * source

Params:

NameTypeAttributeDescription
x *
y *
z *
w number
  • optional
  • default: 1

Return:

*

public preTranslate(x: *, y: *, z: *): * source

Params:

NameTypeAttributeDescription
x *
y *
z *

Return:

*

public rotate(angle: *, x: *, y: *, z: *): * source

Params:

NameTypeAttributeDescription
angle *
x *
y *
z *

Return:

*

public scale(x: *, y: *, z: *, w: number): * source

Params:

NameTypeAttributeDescription
x *
y *
z *
w number
  • optional
  • default: 1

Return:

*

public setTranslation(x: *, y: *, z: *, resetW: boolean): * source

Params:

NameTypeAttributeDescription
x *
y *
z *
resetW boolean
  • optional
  • default: true

Return:

*

public setUniform(ctx: *, loc: *, transpose: *): * source

Params:

NameTypeAttributeDescription
ctx *
loc *
transpose *

Return:

*

public toJSON(): {"isPersp": *, "items": *} source

Return:

{"isPersp": *, "items": *}

public toString(): * source

Return:

*

public translate(x: *, y: *, z: *): * source

Params:

NameTypeAttributeDescription
x *
y *
z *

Return:

*

public transpose(): * source

Return:

*

Private Methods

private _determinant2x2(a: *, b: *, c: *, d: *): * source

Params:

NameTypeAttributeDescription
a *
b *
c *
d *

Return:

*

private _determinant3x3(a1: *, a2: *, a3: *, b1: *, b2: *, b3: *, c1: *, c2: *, c3: *): * source

Params:

NameTypeAttributeDescription
a1 *
a2 *
a3 *
b1 *
b2 *
b3 *
c1 *
c2 *
c3 *

Return:

*

private _determinant4x4(): * source

Return:

*

private _makeAdjoint() source