me.Matrix2d(mat2dopt)

new Matrix2d(mat2dopt)

a Matrix2d Object.
the identity matrix and parameters position :

Parameters:
Name Type Attributes Description
mat2d me.Matrix2d <optional>

An instance of me.Matrix2d to copy from

arguments... Array.<Number> <optional>

Matrix elements. See me.Matrix2d.set

Extends

Members

static, readonly tx :Number

tx component of the matrix

See:

static, readonly ty :Number

ty component of the matrix

See:

Methods

static clone() → {me.Matrix2d}

Clone the Matrix

Returns:
me.Matrix2d

static copy(m) → {me.Matrix2d}

Copies over the values from another me.Matrix2d.

Parameters:
Name Type Description
m me.Matrix2d

the matrix object to copy from

Returns:
me.Matrix2d -

Reference to this object for method chaining

static identity() → {me.Matrix2d}

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

Returns:
me.Matrix2d -

Reference to this object for method chaining

static invert() → {me.Matrix2d}

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

Returns:
me.Matrix2d -

Reference to this object for method chaining

static isIdentity() → {Boolean}

returns true if the matrix is an identity matrix.

Returns:
Boolean

static multiply(b) → {me.Matrix2d}

multiply both matrix

Parameters:
Name Type Description
b me.Matrix2d

Other matrix

Returns:
me.Matrix2d -

Reference to this object for method chaining

static multiplyVector(vector) → {me.Vector2d}

Transforms the given vector according to this matrix.

Parameters:
Name Type Description
vector me.Vector2d

the vector object to be transformed

Returns:
me.Vector2d -

result vector object. Useful for chaining method calls.

static multiplyVector(vector) → {me.Vector2d}

Transforms the given vector using the inverted current matrix.

Parameters:
Name Type Description
vector me.Vector2d

the vector object to be transformed

Returns:
me.Vector2d -

result vector object. Useful for chaining method calls.

static rotate(angle) → {me.Matrix2d}

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

Parameters:
Name Type Description
angle Number

Rotation angle in radians.

Returns:
me.Matrix2d -

Reference to this object for method chaining

static scale(x, yopt) → {me.Matrix2d}

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.

Returns:
me.Matrix2d -

Reference to this object for method chaining

static scaleV(vector) → {me.Matrix2d}

adds a 2D scaling transformation.

Parameters:
Name Type Description
vector me.Vector2d

scaling vector

Returns:
me.Matrix2d -

Reference to this object for method chaining

static scaleX(x) → {me.Matrix2d}

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

Parameters:
Name Type Description
x Number

x scaling vector

Returns:
me.Matrix2d -

Reference to this object for method chaining

static scaleY(y) → {me.Matrix2d}

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

Parameters:
Name Type Description
y Number

y scaling vector

Returns:
me.Matrix2d -

Reference to this object for method chaining

static setTransform(a, b, c, d, e, f, gopt, hopt, iopt) → {me.Matrix2d}

set the matrix to the specified value

Parameters:
Name Type Attributes Default Description
a Number
b Number
c Number
d Number
e Number
f Number
g Number <optional>
0
h Number <optional>
0
i Number <optional>
1
Returns:
me.Matrix2d -

Reference to this object for method chaining

static toString() → {String}

convert the object to a string representation

Returns:
String

static translate(x, y) → {me.Matrix2d}

translate the matrix position on the horizontal and vertical axis

Parameters:
Name Type Description
x Number

the x coordindates to translate the matrix by

y Number

the y coordindates to translate the matrix by

Returns:
me.Matrix2d -

Reference to this object for method chaining

static translateV(v) → {me.Matrix2d}

translate the matrix by a vector on the horizontal and vertical axis

Parameters:
Name Type Description
v me.Vector2d

the vector to translate the matrix by

Returns:
me.Matrix2d -

Reference to this object for method chaining

static transpose() → {me.Matrix2d}

Transpose the value of this matrix.

Returns:
me.Matrix2d -

Reference to this object for method chaining