Class threedee.Matrix
A matrix with 4x4 entries.
Defined in: Matrix.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Field Attributes | Field Name and Description |
---|---|
The matrix entry 0;0.
|
|
The matrix entry 0;1.
|
|
The matrix entry 0;2.
|
|
The matrix entry 0;3.
|
|
The matrix entry 1;0.
|
|
The matrix entry 1;1.
|
|
The matrix entry 1;2.
|
|
The matrix entry 1;3.
|
|
The matrix entry 2;0.
|
|
The matrix entry 2;1.
|
|
The matrix entry 2;2.
|
|
The matrix entry 2;3.
|
|
The matrix entry 3;0.
|
|
The matrix entry 3;1.
|
|
The matrix entry 3;2.
|
|
The matrix entry 3;3.
|
Method Attributes | Method Name and Description |
---|---|
copy()
Returns a copy of this matrix.
|
|
<static> |
threedee.Matrix.count()
Returns and resets the current instance counter.
|
divide(f)
Divides this matrix by the specified factor.
|
|
Returns the determinant of the matrix.
|
|
invert()
Inverts this matrix.
|
|
multiply(f)
Multiplies this matrix with the specified factor.
|
|
rotateX(r)
X-Rotates this matrix by the specified angle
|
|
rotateY(r)
Y-Rotates this matrix by the specified angle
|
|
rotateZ(r)
Z-Rotates this matrix by the specified angle
|
|
scale(fx, fy, fz)
Scales this matrix by the specified factors
|
|
scaleX(f)
X-Scales this matrix by the specified factor
|
|
scaleY(f)
Y-Scales this matrix by the specified factor
|
|
scaleZ(f)
Z-Scales this matrix by the specified factor
|
|
set(m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33)
Sets the matrix entries.
|
|
Sets the entries of this matrix to an identity matrix.
|
|
setRotateX(angle)
Sets the entries of this matrix to an X rotation matrix.
|
|
setRotateY(angle)
Sets the entries of this matrix to an Y rotation matrix.
|
|
setRotateZ(angle)
Sets the entries of this matrix to an Z rotation matrix.
|
|
setScale(fx, fy, fz)
Sets the entries of this matrix to a scaling matrix.
|
|
setScaleX(f)
Sets the entries of this matrix to a X scaling matrix.
|
|
setScaleY(f)
Sets the entries of this matrix to a Y scaling matrix.
|
|
setScaleZ(f)
Sets the entries of this matrix to a Z scaling matrix.
|
|
setTranslate(dx, dy, dz)
Sets the entries of this matrix to a translation matrix.
|
|
Sets the entries of this matrix to a X translation matrix.
|
|
Sets the entries of this matrix to a Y translation matrix.
|
|
Sets the entries of this matrix to a Z translation matrix.
|
|
transform(m)
Multiplies this matrix with the specified matrix.
|
|
translate(dx, dy, dz)
Translates this matrix by the specified deltas
|
|
translateX(d)
X-Translates this matrix by the specified delta
|
|
translateY(d)
Y-Translates this matrix by the specified delta
|
|
translateZ(d)
Z-Translates this matrix by the specified delta
|
Field Detail
m00
The matrix entry 0;0.
m01
The matrix entry 0;1.
m02
The matrix entry 0;2.
m03
The matrix entry 0;3.
m10
The matrix entry 1;0.
m11
The matrix entry 1;1.
m12
The matrix entry 1;2.
m13
The matrix entry 1;3.
m20
The matrix entry 2;0.
m21
The matrix entry 2;1.
{*}
m22
The matrix entry 2;2.
m23
The matrix entry 2;3.
m30
The matrix entry 3;0.
m31
The matrix entry 3;1.
m32
The matrix entry 3;2.
m33
The matrix entry 3;3.
Method Detail
{!threedee.Matrix}
copy()
Returns a copy of this matrix.
- Returns:
- {!threedee.Matrix} A copy of this matrix
<static>
{number}
threedee.Matrix.count()
Returns and resets the current instance counter.
- Returns:
- {number} The number of created instances since the last call.
{!threedee.Matrix}
divide(f)
Divides this matrix by the specified factor.
- Parameters:
- {number} f
- The factor
- Returns:
- {!threedee.Matrix} This matrix
{number}
getDeterminant()
Returns the determinant of the matrix.
- Returns:
- {number} The determinant of the matrix
{!threedee.Matrix}
invert()
Inverts this matrix.
- Returns:
- {!threedee.Matrix} This matrix
{!threedee.Matrix}
multiply(f)
Multiplies this matrix with the specified factor.
- Parameters:
- {number} f
- The factor
- Returns:
- {!threedee.Matrix} This matrix
{!threedee.Matrix}
rotateX(r)
X-Rotates this matrix by the specified angle
- Parameters:
- {number} r
- The angle in clock-wise RAD
- Returns:
- {!threedee.Matrix} This matrix
{!threedee.Matrix}
rotateY(r)
Y-Rotates this matrix by the specified angle
- Parameters:
- {number} r
- The angle in clock-wise RAD
- Returns:
- {!threedee.Matrix} This matrix
{!threedee.Matrix}
rotateZ(r)
Z-Rotates this matrix by the specified angle
- Parameters:
- {number} r
- The angle in clock-wise RAD
- Returns:
- {!threedee.Matrix} This matrix
{!threedee.Matrix}
scale(fx, fy, fz)
Scales this matrix by the specified factors
- Parameters:
- {number} fx
- The X factor
- {number} fy
- The Y factor. Optional. Defaults to fx.
- {number} fz
- The Z factor. Optional. Defaults to fx.
- Returns:
- {!threedee.Matrix} This matrix
{!threedee.Matrix}
scaleX(f)
X-Scales this matrix by the specified factor
- Parameters:
- {number} f
- The factor
- Returns:
- {!threedee.Matrix} This matrix
{!threedee.Matrix}
scaleY(f)
Y-Scales this matrix by the specified factor
- Parameters:
- {number} f
- The factor
- Returns:
- {!threedee.Matrix} This matrix
{!threedee.Matrix}
scaleZ(f)
Z-Scales this matrix by the specified factor
- Parameters:
- {number} f
- The factor
- Returns:
- {!threedee.Matrix} This matrix
{!threedee.Matrix}
set(m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33)
Sets the matrix entries.
- Parameters:
- {number} m00
- The matrix entry 0;0
- {number} m01
- The matrix entry 0;1
- {number} m02
- The matrix entry 0;2
- {number} m03
- The matrix entry 0;3
- {number} m10
- The matrix entry 1;0
- {number} m11
- The matrix entry 1;1
- {number} m12
- The matrix entry 1;2
- {number} m13
- The matrix entry 1;3
- {number} m20
- The matrix entry 2;0
- {number} m21
- The matrix entry 2;1
- {number} m22
- The matrix entry 2;2
- {number} m23
- The matrix entry 2;3
- {number} m30
- The matrix entry 3;0
- {number} m31
- The matrix entry 3;1
- {number} m32
- The matrix entry 3;2
- {number} m33
- The matrix entry 3;3
- Returns:
- {!threedee.Matrix} This matrix
{!threedee.Matrix}
setIdentity()
Sets the entries of this matrix to an identity matrix.
- Returns:
- {!threedee.Matrix} The matrix
{!threedee.Matrix}
setRotateX(angle)
Sets the entries of this matrix to an X rotation matrix.
- Parameters:
- {number} angle
- The rotation angle in clock-wise RAD
- Returns:
- {!threedee.Matrix} This matrix
{!threedee.Matrix}
setRotateY(angle)
Sets the entries of this matrix to an Y rotation matrix.
- Parameters:
- {number} angle
- The rotation angle in anti-clock-wise RAD
- Returns:
- {!threedee.Matrix} This matrix
{!threedee.Matrix}
setRotateZ(angle)
Sets the entries of this matrix to an Z rotation matrix.
- Parameters:
- {number} angle
- The rotation angle in anti-clock-wise RAD
- Returns:
- {!threedee.Matrix} This matrix
{!threedee.Matrix}
setScale(fx, fy, fz)
Sets the entries of this matrix to a scaling matrix.
- Parameters:
- {number} fx
- The X scale factor
- {number} fy
- The Y scale factor. Optional. Defaults to fx.
- {number} fz
- The Z scale factor. Optional. Defaults to fx.
- Returns:
- {!threedee.Matrix} This matrix
{!threedee.Matrix}
setScaleX(f)
Sets the entries of this matrix to a X scaling matrix.
- Parameters:
- {number} f
- The scale factor
- Returns:
- {!threedee.Matrix} This matrix
{!threedee.Matrix}
setScaleY(f)
Sets the entries of this matrix to a Y scaling matrix.
- Parameters:
- {number} f
- The scale factor
- Returns:
- {!threedee.Matrix} This matrix
{!threedee.Matrix}
setScaleZ(f)
Sets the entries of this matrix to a Z scaling matrix.
- Parameters:
- {number} f
- The scale factor
- Returns:
- {!threedee.Matrix} This matrix
{!threedee.Matrix}
setTranslate(dx, dy, dz)
Sets the entries of this matrix to a translation matrix.
- Parameters:
- {number} dx
- The X delta
- {number} dy
- The Y delta.
- {number} dz
- The Z delta.
- Returns:
- {!threedee.Matrix} This matrix
{!threedee.Matrix}
setTranslateX(d)
Sets the entries of this matrix to a X translation matrix.
- Parameters:
- {number} d
- The delta
- Returns:
- {!threedee.Matrix} This matrix
{!threedee.Matrix}
setTranslateY(d)
Sets the entries of this matrix to a Y translation matrix.
- Parameters:
- {number} d
- The delta
- Returns:
- {!threedee.Matrix} This matrix
{!threedee.Matrix}
setTranslateZ(d)
Sets the entries of this matrix to a Z translation matrix.
- Parameters:
- {number} d
- The delta
- Returns:
- {!threedee.Matrix} This matrix
{!threedee.Matrix}
transform(m)
Multiplies this matrix with the specified matrix. The result is written
to this matrix.
- Parameters:
- {!threedee.Matrix} m
- The other matrix
- Returns:
- {!threedee.Matrix} This matrix
{!threedee.Matrix}
translate(dx, dy, dz)
Translates this matrix by the specified deltas
- Parameters:
- {number} dx
- The X delta
- {number} dy
- The Y delta
- {number} dz
- The Z delta
- Returns:
- {!threedee.Matrix} This matrix
{!threedee.Matrix}
translateX(d)
X-Translates this matrix by the specified delta
- Parameters:
- {number} d
- The delta
- Returns:
- {!threedee.Matrix} This matrix
{!threedee.Matrix}
translateY(d)
Y-Translates this matrix by the specified delta
- Parameters:
- {number} d
- The delta
- Returns:
- {!threedee.Matrix} This matrix
{!threedee.Matrix}
translateZ(d)
Z-Translates this matrix by the specified delta
- Parameters:
- {number} d
- The delta
- Returns:
- {!threedee.Matrix} This matrix