1 |
|
2 | import { Point, PvjsonNode, AttachablePoint, Orientation, PvjsonEdge, StartSegmentDetailsMap, Side } from "./gpml2pvjson";
|
3 | export declare const START_SIDE_TO_ORIENTATION_MAP: {
|
4 | right: number[];
|
5 | bottom: number[];
|
6 | left: number[];
|
7 | top: number[];
|
8 | };
|
9 | export declare const START_SIDE_TO_EMANATION_ANGLE_MAPPINGS: import("lodash").Dictionary<number>;
|
10 | export declare const EMANATION_ANGLE_TO_START_SIDE_MAPPINGS: Map<any, any>;
|
11 | export declare const START_SEGMENT_DETAILS_MAPS: StartSegmentDetailsMap[];
|
12 | export interface ISmartPoint {
|
13 | x: number;
|
14 | y: number;
|
15 | curve?: any;
|
16 | moveTo?: any;
|
17 | orientation?: Orientation;
|
18 | }
|
19 | export declare class SmartPoint implements ISmartPoint {
|
20 | x: number;
|
21 | y: number;
|
22 | curve?: any;
|
23 | moveTo?: any;
|
24 | orientation?: Orientation;
|
25 | constructor(point: ISmartPoint);
|
26 | angle: () => number;
|
27 | fromArray: ([x, y]: [number, number]) => void;
|
28 | toArray: () => number[];
|
29 | }
|
30 | export declare class SmartVector {
|
31 | angle: number;
|
32 | p0: SmartPoint;
|
33 | p1: SmartPoint;
|
34 | constructor(p0: ISmartPoint, p1: ISmartPoint);
|
35 | angleDistance: (vector2: any) => number;
|
36 | }
|
37 | export declare class SmartPath {
|
38 | points: SmartPoint[];
|
39 | sum: SmartVector;
|
40 | path: any;
|
41 | constructor(points: ISmartPoint[], edge?: any);
|
42 | position: (scalar: number, accuracy?: number) => {
|
43 | x: any;
|
44 | y: any;
|
45 | angle: number;
|
46 | };
|
47 | }
|
48 | export declare function addAngles(angle1: number, angle2: number): number;
|
49 | export declare function crossProduct(u: [number, number], v: [number, number]): number;
|
50 | export declare function flipOrientation(orientation: Orientation): Orientation;
|
51 | export declare function flipSide(side: Side): Side;
|
52 | export declare function getMinimumAngleBetweenVectors(vectorDirectionAngle1: number, vectorDirectionAngle2: number): number;
|
53 | export declare function getAngleOfEmanationFromPoint(point: AttachablePoint): number;
|
54 | export declare function reverseAngle(angle: any): number;
|
55 | export declare function getAngleAtPoint(edge: PvjsonEdge, positionX: number): number;
|
56 | export declare function getAngleFromPointToPoint({ x: x0, y: y0 }: {
|
57 | x: any;
|
58 | y: any;
|
59 | }, { x: x1, y: y1 }: {
|
60 | x: any;
|
61 | y: any;
|
62 | }): number;
|
63 | export declare function getStartSideByOrientation([orientationX, orientationY]: Orientation): Side;
|
64 |
|
65 |
|
66 |
|
67 |
|
68 | export declare function invertMatrix(M: any): any[];
|
69 | export declare function multiplyMatrices(m1: any, m2: any): any[];
|
70 |
|
71 |
|
72 |
|
73 |
|
74 |
|
75 |
|
76 |
|
77 |
|
78 |
|
79 |
|
80 |
|
81 |
|
82 |
|
83 |
|
84 |
|
85 |
|
86 |
|
87 |
|
88 |
|
89 |
|
90 | export declare function rotate(theta: number): [[number, number, 0], [number, number, 0], [0, 0, 1]];
|
91 | export declare function scale([xScale, yScale]: [number, number]): [[number, 0, 0], [0, number, 0], [0, 0, 1]];
|
92 | export declare function translate([xTranslation, yTranslation]: [number, number]): [[1, 0, number], [0, 1, number], [0, 0, 1]];
|
93 | export declare function getTransformationMatrix(transformationSequence: any): number[][];
|
94 | export declare function multiplyMatrixByVector(transformationMatrix: any, vector: any): number[][];
|
95 |
|
96 |
|
97 |
|
98 |
|
99 |
|
100 |
|
101 |
|
102 |
|
103 |
|
104 |
|
105 |
|
106 |
|
107 |
|
108 |
|
109 |
|
110 |
|
111 |
|
112 |
|
113 |
|
114 |
|
115 |
|
116 |
|
117 |
|
118 |
|
119 |
|
120 |
|
121 |
|
122 |
|
123 |
|
124 |
|
125 |
|
126 |
|
127 |
|
128 |
|
129 |
|
130 |
|
131 |
|
132 |
|
133 |
|
134 |
|
135 |
|
136 |
|
137 |
|
138 |
|
139 |
|
140 |
|
141 |
|
142 |
|
143 |
|
144 |
|
145 |
|
146 |
|
147 |
|
148 |
|
149 |
|
150 |
|
151 |
|
152 | export declare function sameSide(p1: Point, p2: Point, a: Point, b: Point): boolean;
|
153 | export declare function transform({ element, transformOrigin, transformationSequence }: {
|
154 | element: PvjsonNode;
|
155 | transformOrigin?: string;
|
156 | transformationSequence?: any[];
|
157 | }): PvjsonNode;
|