API Documentation

for 0.0.1
Show:

Matrix4 Class

Matrix4 class

This class extends the one from Three.js, API available here : http://threejs.org/docs/#Reference/Math/Matrix4

Methods

applyToVector3Array

(
  • a
)

Multiplies (applies) this matrix to every vector3 in the array.

Parameters:

  • a Array

Returns:

Array

clone

()

Returns:

Matrix4

compose

(
  • translation
  • quaternion
  • scale
)

Parameters:

Returns:

Matrix4

copy

(
  • m
)

Parameters:

Returns:

Matrix4

copyPosition

(
  • m
)

Parameters:

Returns:

Matrix4

decompose

(
  • translation
  • quaternion
  • scale
)

Parameters:

Returns:

Array

determinant

()

Returns:

Float

extractBasis

(
  • xAxis
  • yAxis
  • zAxis
)

Parameters:

Returns:

Matrix4

extractRotation

(
  • m
)

Parameters:

Returns:

Matrix4

flattenToArrayOffset

(
  • flat
  • offset
)

Parameters:

  • flat Array
  • offset Integer

Returns:

Array

getInverse

(
  • m
)

Parameters:

Returns:

Matrix4

identity

()

Returns:

Matrix4

lookAt

(
  • eye
  • center
  • up
)

Parameters:

Returns:

Matrix4

makeBasis

(
  • xAxis
  • yAxis
  • zAxis
)

Parameters:

Returns:

Matrix4

makeFrustum

(
  • left
  • right
  • bottom
  • top
  • near
  • far
)

Parameters:

  • left Float
  • right Float
  • bottom Float
  • top Float
  • near Float
  • far Float

Returns:

Matrix4

makeOrthographic

(
  • left
  • right
  • top
  • bottom
  • near
  • far
)

Parameters:

  • left Float
  • right Float
  • top Float
  • bottom Float
  • near Float
  • far Float

Returns:

Matrix4

makePerspective

(
  • fov
  • aspect
  • near
  • far
)

Parameters:

  • fov Float
  • aspect Float
  • near Float
  • far Float

Returns:

Matrix4

makeRotationAxis

(
  • axis
  • theta
)

Sets this matrix as rotation transform around axis by angle radians. Based on [link:http://www.gamedev.net/reference/articles/article1199.asp.

Parameters:

Returns:

Matrix4

makeRotationFromEuler

(
  • euler
)

Sets the rotation submatrix of this matrix to the rotation specified by Euler angles, the rest of the matrix is identity. Default order is "XYZ".

Parameters:

Returns:

Matrix4

makeRotationFromQuaternion

(
  • q
)

Parameters:

Returns:

Matrix4

makeRotationX

(
  • theta
)

Sets this matrix as rotation transform around x axis by theta radians.

Parameters:

  • theta Float

Returns:

Matrix4

makeRotationY

(
  • theta
)

Sets this matrix as rotation transform around y axis by theta radians.

Parameters:

  • theta Float

Returns:

Matrix4

makeRotationZ

(
  • theta
)

Sets this matrix as rotation transform around z axis by theta radians.

Parameters:

  • theta Float

Returns:

Matrix4

makeScale

(
  • x
  • y
  • z
)

Parameters:

  • x Float
  • y Float
  • z Float

Returns:

Matrix4

makeTranslation

(
  • x
  • y
  • z
)

Parameters:

  • x Float
  • y Float
  • z Float

Returns:

Matrix4

multiply

(
  • m
)

Parameters:

Returns:

Matrix4

multiplyMatrices

(
  • a
  • b
)

Parameters:

Returns:

Matrix4

multiplyScalar

(
  • s
)

Parameters:

  • s Float

Returns:

Matrix4

multiplyToArray

(
  • a
  • b
  • r
)

Parameters:

Returns:

Matrix4

scale

(
  • v
)

Parameters:

Returns:

Matrix4

set

(
  • n11
  • n12
  • n13
  • n14
  • n21
  • n22
  • n23
  • n24
  • n31
  • n32
  • n33
  • n34
  • n41
  • n42
  • n43
  • n44
)

Parameters:

  • n11 Float
  • n12 Float
  • n13 Float
  • n14 Float
  • n21 Float
  • n22 Float
  • n23 Float
  • n24 Float
  • n31 Float
  • n32 Float
  • n33 Float
  • n34 Float
  • n41 Float
  • n42 Float
  • n43 Float
  • n44 Float

Returns:

Matrix4

setPosition

(
  • v
)

Parameters:

Returns:

Matrix4

transpose

()

Returns:

Matrix4