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 |
Extends
Members
-
static, readonly tx :Number
-
tx component of the matrix
-
static, readonly ty :Number
-
ty component of the matrix
Methods
-
static apply(vector) → {me.Vector2d}
-
apply the current transform to the given 2d vector
Parameters:
Name Type Description vector
me.Vector2d the vector object to be transformed
-
static applyInverse(vector) → {me.Vector2d}
-
apply the inverted current transform to the given 2d vector
Parameters:
Name Type Description vector
me.Vector2d the vector object to be transformed
-
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
-
static equals(b) → {Boolean}
-
return true if the two matrices are identical
Parameters:
Name Type Description b
me.Matrix2d the other matrix
Returns:
Boolean -true if both are equals
-
static fromMat3d(m) → {me.Matrix2d}
-
Copies over the upper-left 3x3 values from the given me.Matrix3d
Parameters:
Name Type Description m
me.Matrix3d the matrix object to copy from
-
static identity() → {me.Matrix2d}
-
reset the transformation matrix to the identity matrix (no transformation).
the identity matrix and parameters position :
-
static invert() → {me.Matrix2d}
-
invert this matrix, causing it to apply the opposite transformation.
-
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
-
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.
-
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.
-
static scaleV(vector) → {me.Matrix2d}
-
adds a 2D scaling transformation.
Parameters:
Name Type Description vector
me.Vector2d scaling vector
-
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
-
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
-
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 -
static toArray() → {Float32Array}
-
return an array representation of this Matrix
Returns:
Float32Array -
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
-
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
-
static transpose() → {me.Matrix2d}
-
Transpose the value of this matrix.