import '../../assert/js/assert.js';
import '../../globals.js';
/**
 * 3-dimensional Matrix
 *
 * @author Jonathan Olson <jonathan.olson@colorado.edu>
 */
import Enumeration from '../../phet-core/js/Enumeration.js';
import EnumerationValue from '../../phet-core/js/EnumerationValue.js';
import Pool, { TPoolable } from '../../phet-core/js/Pool.js';
import IOType from '../../tandem/js/types/IOType.js';
import Matrix4 from './Matrix4.js';
import Vector2 from './Vector2.js';
import Vector3 from './Vector3.js';
export declare class Matrix3Type extends EnumerationValue {
    static readonly OTHER: Matrix3Type;
    static readonly IDENTITY: Matrix3Type;
    static readonly TRANSLATION_2D: Matrix3Type;
    static readonly SCALING: Matrix3Type;
    static readonly AFFINE: Matrix3Type;
    static readonly enumeration: Enumeration<Matrix3Type>;
}
type NineNumbers = [
    number,
    number,
    number,
    number,
    number,
    number,
    number,
    number,
    number
];
export type Matrix3StateObject = {
    entries: NineNumbers;
    type: string;
};
export default class Matrix3 implements TPoolable {
    entries: NineNumbers;
    type: Matrix3Type;
    /**
     * Creates an identity matrix, that can then be mutated into the proper form.
     */
    constructor();
    initialize(): this;
    /**
     * Convenience getter for the individual 0,0 entry of the matrix.
     */
    m00(): number;
    /**
     * Convenience getter for the individual 0,1 entry of the matrix.
     */
    m01(): number;
    /**
     * Convenience getter for the individual 0,2 entry of the matrix.
     */
    m02(): number;
    /**
     * Convenience getter for the individual 1,0 entry of the matrix.
     */
    m10(): number;
    /**
     * Convenience getter for the individual 1,1 entry of the matrix.
     */
    m11(): number;
    /**
     * Convenience getter for the individual 1,2 entry of the matrix.
     */
    m12(): number;
    /**
     * Convenience getter for the individual 2,0 entry of the matrix.
     */
    m20(): number;
    /**
     * Convenience getter for the individual 2,1 entry of the matrix.
     */
    m21(): number;
    /**
     * Convenience getter for the individual 2,2 entry of the matrix.
     */
    m22(): number;
    /**
     * Returns whether this matrix is an identity matrix.
     */
    isIdentity(): boolean;
    /**
     * Returns whether this matrix is likely to be an identity matrix (returning false means "inconclusive, may be
     * identity or not"), but true is guaranteed to be an identity matrix.
     */
    isFastIdentity(): boolean;
    /**
     * Returns whether this matrix is a translation matrix.
     * By this we mean it has no shear, rotation, or scaling
     * It may be a translation of zero.
     */
    isTranslation(): boolean;
    /**
     * Returns whether this matrix is an affine matrix (e.g. no shear).
     */
    isAffine(): boolean;
    /**
     * Returns whether it's an affine matrix where the components of transforms are independent, i.e. constructed from
     * arbitrary component scaling and translation.
     */
    isAligned(): boolean;
    /**
     * Returns if it's an affine matrix where the components of transforms are independent, but may be switched (unlike isAligned)
     *
     * i.e. the 2x2 rotational sub-matrix is of one of the two forms:
     * A 0  or  0  A
     * 0 B      B  0
     * This means that moving a transformed point by (x,0) or (0,y) will result in a motion along one of the axes.
     */
    isAxisAligned(): boolean;
    /**
     * Returns whether every single entry in this matrix is a finite number (non-NaN, non-infinite).
     */
    isFinite(): boolean;
    /**
     * Returns the determinant of this matrix.
     */
    getDeterminant(): number;
    get determinant(): number;
    /**
     * Returns the 2D translation, assuming multiplication with a homogeneous vector
     */
    getTranslation(): Vector2;
    get translation(): Vector2;
    /**
     * Returns a vector that is equivalent to ( T(1,0).magnitude(), T(0,1).magnitude() ) where T is a relative transform
     */
    getScaleVector(): Vector2;
    get scaleVector(): Vector2;
    /**
     * Returns the total "amount" of scaled area in this matrix (which will be negative if it flips the coordinate system).
     * For instance, Matrix3.scaling( 2 ) will return 4, since it scales the area by 4.
     */
    getSignedScale(): number;
    /**
     * Returns the angle in radians for the 2d rotation from this matrix, between pi, -pi
     */
    getRotation(): number;
    get rotation(): number;
    /**
     * Returns an identity-padded copy of this matrix with an increased dimension.
     */
    toMatrix4(): Matrix4;
    /**
     * Returns an identity-padded copy of this matrix with an increased dimension, treating this matrix's affine
     * components only.
     */
    toAffineMatrix4(): Matrix4;
    /**
     * Returns a string form of this object
     */
    toString(): string;
    /**
     * Creates an SVG form of this matrix, for high-performance processing in SVG output.
     */
    toSVGMatrix(): SVGMatrix;
    /**
     * Returns the CSS form (simplified if possible) for this transformation matrix.
     */
    getCSSTransform(): string;
    get cssTransform(): string;
    /**
     * Returns the CSS-like SVG matrix form for this transformation matrix.
     */
    getSVGTransform(): string;
    get svgTransform(): string;
    /**
     * Returns a parameter object suitable for use with jQuery's .css()
     */
    getCSSTransformStyles(): Record<string, string>;
    get cssTransformStyles(): Record<string, string>;
    /**
     * Returns exact equality with another matrix
     */
    equals(matrix: Matrix3): boolean;
    /**
     * Returns equality within a margin of error with another matrix
     */
    equalsEpsilon(matrix: Matrix3, epsilon: number): boolean;
    /**
     * Returns a copy of this matrix
     */
    copy(): Matrix3;
    /**
     * Returns a new matrix, defined by this matrix plus the provided matrix
     */
    plus(matrix: Matrix3): Matrix3;
    /**
     * Returns a new matrix, defined by this matrix plus the provided matrix
     */
    minus(matrix: Matrix3): Matrix3;
    /**
     * Returns a transposed copy of this matrix
     */
    transposed(): Matrix3;
    /**
     * Returns a negated copy of this matrix
     */
    negated(): Matrix3;
    /**
     * Returns an inverted copy of this matrix
     */
    inverted(): Matrix3;
    /**
     * Returns a matrix, defined by the multiplication of this * matrix.
     *
     * @param matrix
     * @returns - NOTE: this may be the same matrix!
     */
    timesMatrix(matrix: Matrix3): Matrix3;
    /**
     * Returns the multiplication of this matrix times the provided vector (treating this matrix as homogeneous, so that
     * it is the technical multiplication of (x,y,1)).
     */
    timesVector2(vector2: Vector2): Vector2;
    /**
     * Returns the multiplication of this matrix times the provided vector
     */
    timesVector3(vector3: Vector3): Vector3;
    /**
     * Returns the multiplication of the transpose of this matrix times the provided vector (assuming the 2x2 quadrant)
     */
    timesTransposeVector2(vector2: Vector2): Vector2;
    /**
     * TODO: this operation seems to not work for transformDelta2, should be vetted https://github.com/phetsims/dot/issues/96
     */
    timesRelativeVector2(vector2: Vector2): Vector2;
    /**
     * Sets the entire state of the matrix, in row-major order.
     *
     * NOTE: Every mutable method goes through rowMajor
     */
    rowMajor(v00: number, v01: number, v02: number, v10: number, v11: number, v12: number, v20: number, v21: number, v22: number, type?: Matrix3Type): this;
    /**
     * Sets this matrix to be a copy of another matrix.
     */
    set(matrix: Matrix3): this;
    /**
     * Sets this matrix to be a copy of the column-major data stored in an array (e.g. WebGL).
     */
    setArray(array: number[] | Float32Array | Float64Array): this;
    /**
     * Sets the individual 0,0 component of this matrix.
     */
    set00(value: number): this;
    /**
     * Sets the individual 0,1 component of this matrix.
     */
    set01(value: number): this;
    /**
     * Sets the individual 0,2 component of this matrix.
     */
    set02(value: number): this;
    /**
     * Sets the individual 1,0 component of this matrix.
     */
    set10(value: number): this;
    /**
     * Sets the individual 1,1 component of this matrix.
     */
    set11(value: number): this;
    /**
     * Sets the individual 1,2 component of this matrix.
     */
    set12(value: number): this;
    /**
     * Sets the individual 2,0 component of this matrix.
     */
    set20(value: number): this;
    /**
     * Sets the individual 2,1 component of this matrix.
     */
    set21(value: number): this;
    /**
     * Sets the individual 2,2 component of this matrix.
     */
    set22(value: number): this;
    /**
     * Makes this matrix effectively immutable to the normal methods (except direct setters?)
     */
    makeImmutable(): this;
    /**
     * Sets the entire state of the matrix, in column-major order.
     */
    columnMajor(v00: number, v10: number, v20: number, v01: number, v11: number, v21: number, v02: number, v12: number, v22: number, type: Matrix3Type): this;
    /**
     * Sets this matrix to itself plus the given matrix.
     */
    add(matrix: Matrix3): this;
    /**
     * Sets this matrix to itself minus the given matrix.
     */
    subtract(m: Matrix3): this;
    /**
     * Sets this matrix to its own transpose.
     */
    transpose(): this;
    /**
     * Sets this matrix to its own negation.
     */
    negate(): this;
    /**
     * Sets this matrix to its own inverse.
     */
    invert(): this;
    /**
     * Sets this matrix to the value of itself times the provided matrix
     */
    multiplyMatrix(matrix: Matrix3): this;
    /**
     * Mutates this matrix, equivalent to (translation * this).
     */
    prependTranslation(x: number, y: number): this;
    /**
     * Sets this matrix to the 3x3 identity matrix.
     */
    setToIdentity(): this;
    /**
     * Sets this matrix to the affine translation matrix.
     */
    setToTranslation(x: number, y: number): this;
    /**
     * Sets this matrix to the affine scaling matrix.
     */
    setToScale(x: number, y?: number): this;
    /**
     * Sets this matrix to an affine matrix with the specified row-major values.
     */
    setToAffine(m00: number, m01: number, m02: number, m10: number, m11: number, m12: number): this;
    /**
     * Sets the matrix to a rotation defined by a rotation of the specified angle around the given unit axis.
     *
     * @param axis - normalized
     * @param angle - in radians
     */
    setToRotationAxisAngle(axis: Vector3, angle: number): this;
    /**
     * Sets this matrix to a rotation around the x axis (in the yz plane).
     *
     * @param angle - in radians
     */
    setToRotationX(angle: number): this;
    /**
     * Sets this matrix to a rotation around the y axis (in the xz plane).
     *
     * @param angle - in radians
     */
    setToRotationY(angle: number): this;
    /**
     * Sets this matrix to a rotation around the z axis (in the xy plane).
     *
     * @param angle - in radians
     */
    setToRotationZ(angle: number): this;
    /**
     * Sets this matrix to the combined translation+rotation (where the rotation logically would happen first, THEN it
     * would be translated).
     *
     * @param x
     * @param y
     * @param angle - in radians
     */
    setToTranslationRotation(x: number, y: number, angle: number): this;
    /**
     * Sets this matrix to the combined translation+rotation (where the rotation logically would happen first, THEN it
     * would be translated).
     *
     * @param translation
     * @param angle - in radians
     */
    setToTranslationRotationPoint(translation: Vector2, angle: number): this;
    /**
     * Sets this matrix to the combined scale+translation+rotation.
     *
     * The order of operations is scale, then rotate, then translate.
     *
     * @param x
     * @param y
     * @param angle - in radians
     */
    setToScaleTranslationRotation(scale: number, x: number, y: number, angle: number): this;
    /**
     * Sets this matrix to the combined translation+rotation (where the rotation logically would happen first, THEN it
     * would be translated).
     *
     * @param translation
     * @param angle - in radians
     */
    setToScaleTranslationRotationPoint(scale: number, translation: Vector2, angle: number): this;
    /**
     * Sets this matrix to the values contained in an SVGMatrix.
     */
    setToSVGMatrix(svgMatrix: SVGMatrix): this;
    /**
     * Sets this matrix to a rotation matrix that rotates A to B (Vector3 instances), by rotating about the axis
     * A.cross( B ) -- Shortest path. ideally should be unit vectors.
     */
    setRotationAToB(a: Vector3, b: Vector3): this;
    /**
     * Sets the vector to the result of (matrix * vector), as a homogeneous multiplication.
     *
     * @returns - The vector that was mutated
     */
    multiplyVector2(vector2: Vector2): Vector2;
    /**
     * Sets the vector to the result of (matrix * vector).
     *
     * @returns - The vector that was mutated
     */
    multiplyVector3(vector3: Vector3): Vector3;
    /**
     * Sets the vector to the result of (transpose(matrix) * vector), ignoring the translation parameters.
     *
     * @returns - The vector that was mutated
     */
    multiplyTransposeVector2(v: Vector2): Vector2;
    /**
     * Sets the vector to the result of (matrix * vector - matrix * zero). Since this is a homogeneous operation, it is
     * equivalent to the multiplication of (x,y,0).
     *
     * @returns - The vector that was mutated
     */
    multiplyRelativeVector2(v: Vector2): Vector2;
    /**
     * Sets the transform of a Canvas 2D rendering context to the affine part of this matrix
     */
    canvasSetTransform(context: CanvasRenderingContext2D): void;
    /**
     * Appends to the affine part of this matrix to the Canvas 2D rendering context
     */
    canvasAppendTransform(context: CanvasRenderingContext2D): void;
    /**
     * Copies the entries of this matrix over to an arbitrary array (typed or normal).
     */
    copyToArray(array: number[] | Float32Array | Float64Array): number[] | Float32Array | Float64Array;
    freeToPool(): void;
    static readonly pool: Pool<typeof Matrix3>;
    /**
     * Returns an identity matrix.
     */
    static identity(): Matrix3;
    /**
     * Returns a translation matrix.
     */
    static translation(x: number, y: number): Matrix3;
    /**
     * Returns a translation matrix computed from a vector.
     */
    static translationFromVector(vector: Vector2 | Vector3): Matrix3;
    /**
     * Returns a matrix that scales things in each dimension.
     */
    static scaling(x: number, y?: number): Matrix3;
    /**
     * Returns a matrix that scales things in each dimension.
     */
    static scale(x: number, y?: number): Matrix3;
    /**
     * Returns an affine matrix with the given parameters.
     */
    static affine(m00: number, m01: number, m02: number, m10: number, m11: number, m12: number): Matrix3;
    /**
     * Creates a new matrix with all entries determined in row-major order.
     */
    static rowMajor(v00: number, v01: number, v02: number, v10: number, v11: number, v12: number, v20: number, v21: number, v22: number, type?: Matrix3Type): Matrix3;
    /**
     * Returns a matrix rotation defined by a rotation of the specified angle around the given unit axis.
     *
     * @param axis - normalized
     * @param angle - in radians
     */
    static rotationAxisAngle(axis: Vector3, angle: number): Matrix3;
    /**
     * Returns a matrix that rotates around the x axis (in the yz plane).
     *
     * @param angle - in radians
     */
    static rotationX(angle: number): Matrix3;
    /**
     * Returns a matrix that rotates around the y axis (in the xz plane).
     *
     * @param angle - in radians
     */
    static rotationY(angle: number): Matrix3;
    /**
     * Returns a matrix that rotates around the z axis (in the xy plane).
     *
     * @param angle - in radians
     */
    static rotationZ(angle: number): Matrix3;
    /**
     * Returns a combined 2d translation + rotation (with the rotation effectively applied first).
     *
     * @param angle - in radians
     */
    static translationRotation(x: number, y: number, angle: number): Matrix3;
    /**
     * Standard 2d rotation matrix for a given angle.
     *
     * @param angle - in radians
     */
    static rotation2(angle: number): Matrix3;
    /**
     * Returns a matrix which will be a 2d rotation around a given x,y point.
     *
     * @param angle - in radians
     * @param x
     * @param y
     */
    static rotationAround(angle: number, x: number, y: number): Matrix3;
    /**
     * Returns a matrix which will be a 2d rotation around a given 2d point.
     *
     * @param angle - in radians
     * @param point
     */
    static rotationAroundPoint(angle: number, point: Vector2): Matrix3;
    /**
     * Returns a matrix equivalent to a given SVGMatrix.
     */
    static fromSVGMatrix(svgMatrix: SVGMatrix): Matrix3;
    /**
     * Returns a rotation matrix that rotates A to B, by rotating about the axis A.cross( B ) -- Shortest path. ideally
     * should be unit vectors.
     */
    static rotateAToB(a: Vector3, b: Vector3): Matrix3;
    /**
     * Shortcut for translation times a matrix (without allocating a translation matrix), see scenery#119
     */
    static translationTimesMatrix(x: number, y: number, matrix: Matrix3): Matrix3;
    /**
     * Serialize to an Object that can be handled by PhET-iO
     */
    static toStateObject(matrix3: Matrix3): Matrix3StateObject;
    /**
     * Convert back from a serialized Object to a Matrix3
     */
    static fromStateObject(stateObject: Matrix3StateObject): Matrix3;
    static IDENTITY: Matrix3;
    static X_REFLECTION: Matrix3;
    static Y_REFLECTION: Matrix3;
    static Matrix3IO: IOType;
}
declare const m3: (v00: number, v01: number, v02: number, v10: number, v11: number, v12: number, v20: number, v21: number, v22: number, type?: Matrix3Type) => Matrix3;
export { m3 };
//# sourceMappingURL=Matrix3.d.ts.map