import { Point } from "../geometries/point.js"; import { Matrix3d } from "./matrix3d.js"; import { Vector2d } from "./vector2d.js"; import { Vector3d } from "./vector3d.js"; type ConstructorArg = [Matrix2d] | [Matrix3d] | [number, number, number, number, number, number] | [number, number, number, number, number, number, number, number, number] | [undefined] | []; /** * a Matrix2d Object.
* the identity matrix and parameters position :
* * @category Math */ export declare class Matrix2d { /** * The matrix values */ val: Float32Array; /** * Constructs a new Matrix2d object. * @param value - The values to initialize the matrix with. */ constructor(...value: ConstructorArg); /** * Gets the tx component of the matrix. * @returns The tx component of the matrix. */ get tx(): number; /** * Gets the ty component of the matrix. * @returns The ty component of the matrix. */ get ty(): number; /** * reset the transformation matrix to the identity matrix (no transformation).
* the identity matrix and parameters position :
* * @returns Reference to this object for method chaining */ identity(): this; /** * Set the matrix to the specified value. * @param values - The matrix components. * @returns Reference to this object for method chaining */ setTransform(...values: [number, number, number, number, number, number] | [number, number, number, number, number, number, number, number, number]): this; /** * Multiplies the current transformation with the matrix described by the arguments of this method. * @param a a component * @param b b component * @param c c component * @param d d component * @param e e component * @param f f component * @returns Reference to this object for method chaining */ transform(a: number, b: number, c: number, d: number, e: number, f: number): this; /** * Copies over the values from another me.Matrix2d. * @param m - the matrix object to copy from * @returns Reference to this object for method chaining */ copy(m: Matrix2d): this; /** * Extract the 2D affine components from the given Matrix3d * @param m - the 4x4 matrix to extract from * @returns Reference to this object for method chaining */ fromMat3d(m: Matrix3d): this; /** * multiply both matrix * @param m - the other matrix * @returns Reference to this object for method chaining */ multiply(m: Matrix2d): this; /** * Transpose the value of this matrix. * @returns Reference to this object for method chaining */ transpose(): this; /** * invert this matrix, causing it to apply the opposite transformation. * @returns Reference to this object for method chaining */ invert(): this; /** * apply the current transform to the given 2d or 3d vector or point * @param v - the vector object to be transformed * @returns result vector object. */ apply(v: Vector2d | Vector3d | Point): Vector2d | Point | Vector3d; /** * apply the inverted current transform to the given 2d vector * @param v - the vector object to be transformed * @returns result vector object. */ applyInverse(v: Vector2d): Vector2d; /** * scale the matrix * @param x - a number representing the abscissa of the scaling vector. * @param [y] - a number representing the ordinate of the scaling vector. * @returns Reference to this object for method chaining */ scale(x: number, y?: number): this; /** * adds a 2D scaling transformation. * @param v - scaling vector * @returns Reference to this object for method chaining */ scaleV(v: Vector2d): this; /** * specifies a 2D scale operation using the [sx, 1] scaling vector * @param x - x scaling vector * @returns Reference to this object for method chaining */ scaleX(x: number): this; /** * specifies a 2D scale operation using the [1,sy] scaling vector * @param y - y scaling vector * @returns Reference to this object for method chaining */ scaleY(y: number): this; /** * rotate the matrix (counter-clockwise) by the specified angle (in radians). * @param angle - Rotation angle in radians. * @returns Reference to this object for method chaining */ rotate(angle: number): this; /** * translate the matrix position on the horizontal and vertical axis * @param x - the x coordindates or a vector to translate the matrix by * @param [y] - the y coordindates to translate the matrix by * @returns Reference to this object for method chaining */ translate(x: number, y: number): Matrix2d; translate(vector: Vector2d): Matrix2d; /** * Check if matrix is an identity matrix. * @returns true if the matrix is an identity matrix */ isIdentity(): boolean; /** * return true if the two matrices are identical * @param m - the other matrix * @returns true if both are equals */ equals(m: Matrix2d): boolean; /** * Clone the Matrix * @returns a clones matrix */ clone(): Matrix2d; /** * return an array representation of this Matrix * @returns the internal matrix values */ toArray(): Float32Array; /** * convert the object to a string representation * @returns string representation of the matrix */ toString(): string; } export declare const matrix2dPool: import("../system/pool.js").Pool; export {}; //# sourceMappingURL=matrix2d.d.ts.map