///
import { Point, PvjsonNode, AttachablePoint, Orientation, PvjsonEdge, StartSegmentDetailsMap, Side } from "./gpml2pvjson";
export declare const START_SIDE_TO_ORIENTATION_MAP: {
right: number[];
bottom: number[];
left: number[];
top: number[];
};
export declare const START_SIDE_TO_EMANATION_ANGLE_MAPPINGS: import("lodash").Dictionary;
export declare const EMANATION_ANGLE_TO_START_SIDE_MAPPINGS: Map;
export declare const START_SEGMENT_DETAILS_MAPS: StartSegmentDetailsMap[];
export interface ISmartPoint {
x: number;
y: number;
curve?: any;
moveTo?: any;
orientation?: Orientation;
}
export declare class SmartPoint implements ISmartPoint {
x: number;
y: number;
curve?: any;
moveTo?: any;
orientation?: Orientation;
constructor(point: ISmartPoint);
angle: () => number;
fromArray: ([x, y]: [number, number]) => void;
toArray: () => number[];
}
export declare class SmartVector {
angle: number;
p0: SmartPoint;
p1: SmartPoint;
constructor(p0: ISmartPoint, p1: ISmartPoint);
angleDistance: (vector2: any) => number;
}
export declare class SmartPath {
points: SmartPoint[];
sum: SmartVector;
path: any;
constructor(points: ISmartPoint[], edge?: any);
position: (scalar: number, accuracy?: number) => {
x: any;
y: any;
angle: number;
};
}
export declare function addAngles(angle1: number, angle2: number): number;
export declare function crossProduct(u: [number, number], v: [number, number]): number;
export declare function flipOrientation(orientation: Orientation): Orientation;
export declare function flipSide(side: Side): Side;
export declare function getMinimumAngleBetweenVectors(vectorDirectionAngle1: number, vectorDirectionAngle2: number): number;
export declare function getAngleOfEmanationFromPoint(point: AttachablePoint): number;
export declare function reverseAngle(angle: any): number;
export declare function getAngleAtPoint(edge: PvjsonEdge, positionX: number): number;
export declare function getAngleFromPointToPoint({ x: x0, y: y0 }: {
x: any;
y: any;
}, { x: x1, y: y1 }: {
x: any;
y: any;
}): number;
export declare function getStartSideByOrientation([orientationX, orientationY]: Orientation): Side;
/**
* Calculate the inverse matrix.
* @returns {Matrix}
*/
export declare function invertMatrix(M: any): any[];
export declare function multiplyMatrices(m1: any, m2: any): any[];
/**
* rotate
*
* @param theta (float): rotation angle in radians, measured clockwise
* @return transformation matrix for rotation
*
* Note that for Canvas and SVG, the y axis points down:
*
* *---------> x
* |
* |
* |
* v
*
* y
*
* The transformation matrix returned takes this into account and is intentionally
* different from the transformation matrix that would be returned if the y-axis
* pointed up, as is common in many math classes.
*/
export declare function rotate(theta: number): [[number, number, 0], [number, number, 0], [0, 0, 1]];
export declare function scale([xScale, yScale]: [number, number]): [[number, 0, 0], [0, number, 0], [0, 0, 1]];
export declare function translate([xTranslation, yTranslation]: [number, number]): [[1, 0, number], [0, 1, number], [0, 0, 1]];
export declare function getTransformationMatrix(transformationSequence: any): number[][];
export declare function multiplyMatrixByVector(transformationMatrix: any, vector: any): number[][];
/**
* sameSide
*
* Calculate whether the current edge's second point, a, (end of first segment)
* and its final point, b, are both on the same side of the referenced edge.
*
* current edge: pipes/hyphens
* referenced edge: dots
*
* Example of True
*
* p1
* .
* .
* *------------a
* . |
* . |
* . |
* . |
* . |
* . |
* . |
* . |
* . |
* . |
* . *-----b
* .
* .
* p2
*
*
* Example of False
*
* p1
* .
* *------------a
* . |
* . |
* . |
* . |
* . |
* .|
* |.
* | .
* | .
* | .
* *-----b .
* .
* p2
*
*
* @param {Object} p1 - first point of the referenced edge
* @param {Object} p2 - last point of the referenced edge
* @param {Object} a - last point of the first segment of the current edge (the point following the start point)
* @param {Object} b - point where the current edge ends
* @return {Boolean) - whether the last point of the first segment of the current edge is on the same side as the last point of the current edge
*/
export declare function sameSide(p1: Point, p2: Point, a: Point, b: Point): boolean;
export declare function transform({ element, transformOrigin, transformationSequence }: {
element: PvjsonNode;
transformOrigin?: string;
transformationSequence?: any[];
}): PvjsonNode;