Class: Matrix4x4

Raphael3d. Matrix4x4

represents 4x4 transformation matrix

new Matrix4x4()

4x4 transformation matrix
This:
Properties:
Name Type Description
m00 number (0,0) element
m01 number (0,1) element
m02 number (0,2) element
m03 number (0,3) element
m10 number (1,0) element
m11 number (1,1) element
m12 number (1,2) element
m13 number (1,3) element
m20 number (2,0) element
m21 number (2,1) element
m22 number (2,2) element
m23 number (2,3) element
m30 number (3,0) element
m31 number (3,1) element
m32 number (3,2) element
m33 number (3,3) element
m40 number (4,0) element
m41 number (4,1) element
m42 number (4,2) element
m43 number (4,3) element
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 102

Methods

beCopyOf(m) → {Raphael3d.Matrix4x4}

Changes receiver to be copy of given matrix
Parameters:
Name Type Description
m Raphael3d.Matrix4x4 matrix to be copied to receiver
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 137
Returns:
receiver
Type
Raphael3d.Matrix4x4

beIdentity() → {Raphael3d.Matrix4x4}

Changes receiver to be identity matrix
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 128
Returns:
receiver
Type
Raphael3d.Matrix4x4

copy() → {Raphael3d.Matrix4x4}

Returns copy of receiver
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 148
Returns:
new copied matrix
Type
Raphael3d.Matrix4x4

mul(m) → {Raphael3d.Matrix4x4}

Multiply receiver by given matrix from left (!). Changes receiver (!)
Parameters:
Name Type Argument Description
m Raphael3d.Matrix4x4 <optional>
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 161
Returns:
receiver
Type
Raphael3d.Matrix4x4

rotate(axis, angle, center) → {Raphael3d.Matrix4x4}

Perform rotation of receiver about arbitrary axis and given angle. Changes receiver (!)
Parameters:
Name Type Argument Description
axis Raphael3d.Vector3 unit vector of rotation axis
angle number angle of rotation
center Raphael3d.Vector3 <optional>
center of rotation
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 269
Returns:
changed receiver
Type
Raphael3d.Matrix4x4

rotateX(angle, center) → {Raphael3d.Matrix4x4}

Perform rotation of receiver about x axis and given angle. Changes receiver (!)
Parameters:
Name Type Argument Description
angle number angle of rotation
center Raphael3d.Vector3 <optional>
center of rotation
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 238
Returns:
changed receiver
Type
Raphael3d.Matrix4x4

rotateY(angle, center) → {Raphael3d.Matrix4x4}

Perform rotation of receiver about y axis and given angle. Changes receiver (!)
Parameters:
Name Type Argument Description
angle number angle of rotation
center Raphael3d.Vector3 <optional>
center of rotation
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 248
Returns:
changed receiver
Type
Raphael3d.Matrix4x4

rotateZ(angle, center) → {Raphael3d.Matrix4x4}

Perform rotation of receiver about z axis and given angle. Changes receiver (!)
Parameters:
Name Type Argument Description
angle number angle of rotation
center Raphael3d.Vector3 <optional>
center of rotation
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 258
Returns:
changed receiver
Type
Raphael3d.Matrix4x4

scale(sx, sy, sz) → {Raphael3d.Matrix4x4}

Perform scale transformation on receiver. Changes receiver (!)
Parameters:
Name Type Description
sx number scale in x direction
sy number scale in y direction
sz number scale in z direction
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 208
Returns:
changed receiver
Type
Raphael3d.Matrix4x4

shear(shxy, shyz, shzx) → {Raphael3d.Matrix4x4}

Performs shear transformation. Changes receiver (!)
Parameters:
Name Type Description
shxy number xy plane shear factor
shyz number yz plane shear factor
shzx number zx plane shear factor
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 228
Returns:
changed receiver
Type
Raphael3d.Matrix4x4

toString() → {string}

String representation of matrix
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 116
Returns:
string representation
Type
string

translate(tx, ty, tz) → {Raphael3d.Matrix4x4}

Perform translation on receiver. Changes receiver (!)
Parameters:
Name Type Description
tx number translation in x direction
ty number translation in y direction
tz number translation in z direction
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 197
Returns:
changed receiver
Type
Raphael3d.Matrix4x4

zoom(factor) → {Raphael3d.Matrix4x4}

Performs zoom trensofrmation (scale transformation with equal scale factor in all directions). Changes receiver (!)
Parameters:
Name Type Description
factor number zoom factor
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 217
Returns:
changed receiver
Type
Raphael3d.Matrix4x4

<static> create() → {Raphael3d.Matrix4x4}

Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 109
Returns:
new Matrix4x4 object
Type
Raphael3d.Matrix4x4

<static> Identity() → {Raphael3d.Matrix4x4}

Returns new ientity matrix
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 277
Returns:
new identity matrix
Type
Raphael3d.Matrix4x4

<static> PerspectiveMatrixZ(z0) → {Raphael3d.Matrix4x4}

Creates perspective matrix scaling z depth
Parameters:
Name Type Description
z0 number perspactive factor (inf -> parallel projection)
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 414
Returns:
new perspective matrix
Type
Raphael3d.Matrix4x4

<static> RotationMatrix(axis, alpha, center) → {Raphael3d.Matrix4x4}

Returns new rotation matrix (about arbitrary axis)
Parameters:
Name Type Argument Description
axis Raphael3d.Vector3 unit vector of rotation axis
alpha number angle of rotation
center Raphael3d.Vector3 <optional>
center of rotation
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 355
Returns:
new rotation matrix
Type
Raphael3d.Matrix4x4

<static> RotationXMatrix(alpha, center) → {Raphael3d.Matrix4x4}

Returns new rotation matrix (about x axis)
Parameters:
Name Type Argument Description
alpha number angle of rotation
center Raphael3d.Vector3 <optional>
center of rotation
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 300
Returns:
new rotation matrix about x axis
Type
Raphael3d.Matrix4x4

<static> RotationYMatrix(alpha, center) → {Raphael3d.Matrix4x4}

Returns new rotation matrix (about y axis)
Parameters:
Name Type Argument Description
alpha number angle of rotation
center Raphael3d.Vector3 <optional>
center of rotation
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 318
Returns:
new rotation matrix about y axis
Type
Raphael3d.Matrix4x4

<static> RotationZMatrix(alpha, center) → {Raphael3d.Matrix4x4}

Returns new rotation matrix (about z axis)
Parameters:
Name Type Argument Description
alpha number angle of rotation
center Raphael3d.Vector3 <optional>
center of rotation
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 336
Returns:
new rotation matrix about z axis
Type
Raphael3d.Matrix4x4

<static> ScaleMatrix(sx, sy, sz) → {Raphael3d.Matrix4x4}

Returns new scale matrix
Parameters:
Name Type Description
sx number scale factor in x direction
sy number scale factor in y direction
sz number scale factor in z direction
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 380
Returns:
new scale matrix
Type
Raphael3d.Matrix4x4

<static> ShearMatrix(shxy, shyz, shzx) → {Raphael3d.Matrix4x4}

Returns new shear matrix
Parameters:
Name Type Description
shxy number shear angle in xy plane
shyz number shear angle in yz plane
shzx number shear angle in zx plane
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 401
Returns:
new shear matrix
Type
Raphael3d.Matrix4x4

<static> TranslationMatrix(tx, ty, tz) → {Raphael3d.Matrix4x4}

Returns new translation matrix
Parameters:
Name Type Description
tx number translation in x direction
ty number translation in y direction
tz number translation in z direction
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 287
Returns:
new translation matrix
Type
Raphael3d.Matrix4x4

<static> ZoomMatrix() → {Raphael3d.Matrix4x4}

Returns new zoom matrix (scale matrix with equal factor in all directions)
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 391
Returns:
new scale matrix
Type
Raphael3d.Matrix4x4