Matrix3d

class Matrix3d

a 4x4 Matrix3d Object

Constructor


new Matrix3d(args: Matrix3d | number) → {}
Parameters:
Name Type Description
args Matrix3d | number

An instance of me.Matrix3d to copy from, or individual Matrix components (See Matrix3d.setTransform). If not arguments are given, the matrix will be set to Identity.

Public Properties


tx matrix3.js:39
tx: number

number

tx component of the matrix

ty matrix3.js:47
ty: number

number

ty component of the matrix

tz matrix3.js:55
tz: number

number

ty component of the matrix

Public Methods


apply matrix3.js:286
apply(v: Vector2d | Vector3d) → {Vector2d | Vector3d}

apply the current transform to the given 2d or 3d vector

Parameters:
Name Type Description
v Vector2d | Vector3d

the vector object to be transformed

Returns:
Type Description
Vector2d | Vector3d

result vector object.

applyInverse matrix3.js:309
applyInverse(v: Vector2d | Vector3d) → {Vector2d | Vector3d}

apply the inverted current transform to the given 2d or 3d vector

Parameters:
Name Type Description
v Vector2d | Vector3d

the vector object to be transformed

Returns:
Type Description
Vector2d | Vector3d

result vector object.

clone matrix3.js:582
clone() → {Matrix3d}

Clone the Matrix

Returns:
Type Description
Matrix3d
copy matrix3.js:121
copy(m: Matrix3d) → {Matrix3d}

Copies over the values from another me.Matrix3d.

Parameters:
Name Type Description
m Matrix3d

the matrix object to copy from

Returns:
Type Description
Matrix3d

Reference to this object for method chaining

equals matrix3.js:553
equals(m: Matrix3d) → {boolean}

return true if the two matrices are identical

Parameters:
Name Type Description
m Matrix3d

the other matrix

Returns:
Type Description
boolean

true if both are equals

fromMat2d matrix3.js:131
fromMat2d(m: Matrix2d) → {Matrix2d}

Copies over the upper-left 2x2 values from the given me.Matrix2d

Parameters:
Name Type Description
m Matrix2d

the matrix object to copy from

Returns:
Type Description
Matrix2d

Reference to this object for method chaining

identity matrix3.js:63
identity() → {Matrix3d}

reset the transformation matrix to the identity matrix (no transformation).
the identity matrix and parameters position :

Returns:
Type Description
Matrix3d

Reference to this object for method chaining

invert matrix3.js:229
invert() → {Matrix3d}

invert this matrix, causing it to apply the opposite transformation.

Returns:
Type Description
Matrix3d

Reference to this object for method chaining

isIdentity matrix3.js:526
isIdentity() → {boolean}

returns true if the matrix is an identity matrix.

Returns:
Type Description
boolean
multiply matrix3.js:147
multiply(m: Matrix3d) → {Matrix3d}

multiply both matrix

Parameters:
Name Type Description
m Matrix3d

Other matrix

Returns:
Type Description
Matrix3d

Reference to this object for method chaining

ortho matrix3.js:326
ortho(left: number, right: number, bottom: number, top: number, near: number, far: number) → {Matrix3d}

generate an orthogonal projection matrix, with the result replacing the current matrix

Parameters:
Name Type Description
left number

farthest left on the x-axis

right number

farthest right on the x-axis

bottom number

farthest down on the y-axis

top number

farthest up on the y-axis

near number

distance to the near clipping plane along the -Z axis

far number

distance to the far clipping plane along the -Z axis

Returns:
Type Description
Matrix3d

Reference to this object for method chaining

rotate matrix3.js:418
rotate(angle: number, v: Vector3d) → {Matrix3d}

rotate this matrix (counter-clockwise) by the specified angle (in radians).

Parameters:
Name Type Description
angle number

Rotation angle in radians.

v Vector3d

the axis to rotate around

Returns:
Type Description
Matrix3d

Reference to this object for method chaining

scale matrix3.js:363
scale(x: number, y: number, z: number) → {Matrix3d}

scale the matrix

Parameters:
Name Type Attributes Default Description
x number

a number representing the abscissa of the scaling vector.

y number

<optional>

x

a number representing the ordinate of the scaling vector.

z number

<optional>

0

a number representing the depth vector

Returns:
Type Description
Matrix3d

Reference to this object for method chaining

scaleV matrix3.js:391
scaleV(v: Vector2d | Vector3d) → {Matrix3d}

adds a 2D scaling transformation.

Parameters:
Name Type Description
v Vector2d | Vector3d

scaling vector

Returns:
Type Description
Matrix3d

Reference to this object for method chaining

scaleX matrix3.js:400
scaleX(x: number) → {Matrix3d}

specifies a 2D scale operation using the [sx, 1] scaling vector

Parameters:
Name Type Description
x number

x scaling vector

Returns:
Type Description
Matrix3d

Reference to this object for method chaining

scaleY matrix3.js:409
scaleY(y: number) → {Matrix3d}

specifies a 2D scale operation using the [1,sy] scaling vector

Parameters:
Name Type Description
y number

y scaling vector

Returns:
Type Description
Matrix3d

Reference to this object for method chaining

setTransform matrix3.js:78
setTransform(m00: number, m01: number, m02: number, m03: number, m10: number, m11: number, m12: number, m13: number, m20: number, m21: number, m22: number, m23: number, m30: number, m31: number, m32: number, m33: number) → {Matrix3d}

set the matrix to the specified value

Parameters:
Name Type Description
m00 number
m01 number
m02 number
m03 number
m10 number
m11 number
m12 number
m13 number
m20 number
m21 number
m22 number
m23 number
m30 number
m31 number
m32 number
m33 number
Returns:
Type Description
Matrix3d

Reference to this object for method chaining

toArray matrix3.js:590
toArray() → {Float32Array}

return an array representation of this Matrix

Returns:
Type Description
Float32Array
toString matrix3.js:598
toString() → {string}

convert the object to a string representation

Returns:
Type Description
string
translate matrix3.js:495
translate(x: number | Vector2d | Vector3d, y: number, z: number) → {Matrix3d}

translate the matrix position using the given vector

Parameters:
Name Type Attributes Default Description
x number | Vector2d | Vector3d

a number representing the abscissa of the vector, or a vector object

y number

<optional>

a number representing the ordinate of the vector.

z number

<optional>

0

a number representing the depth of the vector

Returns:
Type Description
Matrix3d

Reference to this object for method chaining

transpose matrix3.js:200
transpose() → {Matrix3d}

Transpose the value of this matrix.

Returns:
Type Description
Matrix3d

Reference to this object for method chaining


Powered by webdoc!