@itwin/core-geometry 4.0.0-dev.55 → 4.0.0-dev.56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/Geometry.d.ts +5 -1
- package/lib/cjs/Geometry.d.ts.map +1 -1
- package/lib/cjs/Geometry.js +5 -1
- package/lib/cjs/Geometry.js.map +1 -1
- package/lib/cjs/geometry3d/Angle.d.ts +29 -34
- package/lib/cjs/geometry3d/Angle.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Angle.js +31 -36
- package/lib/cjs/geometry3d/Angle.js.map +1 -1
- package/lib/cjs/geometry3d/AngleSweep.d.ts +48 -43
- package/lib/cjs/geometry3d/AngleSweep.d.ts.map +1 -1
- package/lib/cjs/geometry3d/AngleSweep.js +48 -43
- package/lib/cjs/geometry3d/AngleSweep.js.map +1 -1
- package/lib/cjs/geometry3d/Matrix3d.d.ts +5 -8
- package/lib/cjs/geometry3d/Matrix3d.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Matrix3d.js +5 -8
- package/lib/cjs/geometry3d/Matrix3d.js.map +1 -1
- package/lib/cjs/geometry3d/OrderedRotationAngles.d.ts +3 -3
- package/lib/cjs/geometry3d/OrderedRotationAngles.d.ts.map +1 -1
- package/lib/cjs/geometry3d/OrderedRotationAngles.js +3 -3
- package/lib/cjs/geometry3d/OrderedRotationAngles.js.map +1 -1
- package/lib/cjs/geometry3d/Point2dArrayCarrier.d.ts +8 -10
- package/lib/cjs/geometry3d/Point2dArrayCarrier.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Point2dArrayCarrier.js +8 -10
- package/lib/cjs/geometry3d/Point2dArrayCarrier.js.map +1 -1
- package/lib/cjs/geometry3d/Point2dVector2d.d.ts +37 -34
- package/lib/cjs/geometry3d/Point2dVector2d.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Point2dVector2d.js +38 -35
- package/lib/cjs/geometry3d/Point2dVector2d.js.map +1 -1
- package/lib/cjs/geometry3d/Point3dArrayCarrier.d.ts +17 -21
- package/lib/cjs/geometry3d/Point3dArrayCarrier.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Point3dArrayCarrier.js +16 -20
- package/lib/cjs/geometry3d/Point3dArrayCarrier.js.map +1 -1
- package/lib/cjs/geometry3d/Point3dVector3d.d.ts +84 -67
- package/lib/cjs/geometry3d/Point3dVector3d.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Point3dVector3d.js +84 -67
- package/lib/cjs/geometry3d/Point3dVector3d.js.map +1 -1
- package/lib/cjs/geometry3d/Transform.d.ts +76 -66
- package/lib/cjs/geometry3d/Transform.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Transform.js +88 -77
- package/lib/cjs/geometry3d/Transform.js.map +1 -1
- package/lib/cjs/geometry3d/YawPitchRollAngles.d.ts +15 -16
- package/lib/cjs/geometry3d/YawPitchRollAngles.d.ts.map +1 -1
- package/lib/cjs/geometry3d/YawPitchRollAngles.js +14 -15
- package/lib/cjs/geometry3d/YawPitchRollAngles.js.map +1 -1
- package/lib/cjs/serialization/GeometrySamples.d.ts +72 -58
- package/lib/cjs/serialization/GeometrySamples.d.ts.map +1 -1
- package/lib/cjs/serialization/GeometrySamples.js +132 -108
- package/lib/cjs/serialization/GeometrySamples.js.map +1 -1
- package/lib/esm/Geometry.d.ts +5 -1
- package/lib/esm/Geometry.d.ts.map +1 -1
- package/lib/esm/Geometry.js +5 -1
- package/lib/esm/Geometry.js.map +1 -1
- package/lib/esm/geometry3d/Angle.d.ts +29 -34
- package/lib/esm/geometry3d/Angle.d.ts.map +1 -1
- package/lib/esm/geometry3d/Angle.js +31 -36
- package/lib/esm/geometry3d/Angle.js.map +1 -1
- package/lib/esm/geometry3d/AngleSweep.d.ts +48 -43
- package/lib/esm/geometry3d/AngleSweep.d.ts.map +1 -1
- package/lib/esm/geometry3d/AngleSweep.js +48 -43
- package/lib/esm/geometry3d/AngleSweep.js.map +1 -1
- package/lib/esm/geometry3d/Matrix3d.d.ts +5 -8
- package/lib/esm/geometry3d/Matrix3d.d.ts.map +1 -1
- package/lib/esm/geometry3d/Matrix3d.js +5 -8
- package/lib/esm/geometry3d/Matrix3d.js.map +1 -1
- package/lib/esm/geometry3d/OrderedRotationAngles.d.ts +3 -3
- package/lib/esm/geometry3d/OrderedRotationAngles.d.ts.map +1 -1
- package/lib/esm/geometry3d/OrderedRotationAngles.js +3 -3
- package/lib/esm/geometry3d/OrderedRotationAngles.js.map +1 -1
- package/lib/esm/geometry3d/Point2dArrayCarrier.d.ts +8 -10
- package/lib/esm/geometry3d/Point2dArrayCarrier.d.ts.map +1 -1
- package/lib/esm/geometry3d/Point2dArrayCarrier.js +8 -10
- package/lib/esm/geometry3d/Point2dArrayCarrier.js.map +1 -1
- package/lib/esm/geometry3d/Point2dVector2d.d.ts +37 -34
- package/lib/esm/geometry3d/Point2dVector2d.d.ts.map +1 -1
- package/lib/esm/geometry3d/Point2dVector2d.js +38 -35
- package/lib/esm/geometry3d/Point2dVector2d.js.map +1 -1
- package/lib/esm/geometry3d/Point3dArrayCarrier.d.ts +17 -21
- package/lib/esm/geometry3d/Point3dArrayCarrier.d.ts.map +1 -1
- package/lib/esm/geometry3d/Point3dArrayCarrier.js +16 -20
- package/lib/esm/geometry3d/Point3dArrayCarrier.js.map +1 -1
- package/lib/esm/geometry3d/Point3dVector3d.d.ts +84 -67
- package/lib/esm/geometry3d/Point3dVector3d.d.ts.map +1 -1
- package/lib/esm/geometry3d/Point3dVector3d.js +84 -67
- package/lib/esm/geometry3d/Point3dVector3d.js.map +1 -1
- package/lib/esm/geometry3d/Transform.d.ts +76 -66
- package/lib/esm/geometry3d/Transform.d.ts.map +1 -1
- package/lib/esm/geometry3d/Transform.js +88 -77
- package/lib/esm/geometry3d/Transform.js.map +1 -1
- package/lib/esm/geometry3d/YawPitchRollAngles.d.ts +15 -16
- package/lib/esm/geometry3d/YawPitchRollAngles.d.ts.map +1 -1
- package/lib/esm/geometry3d/YawPitchRollAngles.js +14 -15
- package/lib/esm/geometry3d/YawPitchRollAngles.js.map +1 -1
- package/lib/esm/serialization/GeometrySamples.d.ts +72 -58
- package/lib/esm/serialization/GeometrySamples.d.ts.map +1 -1
- package/lib/esm/serialization/GeometrySamples.js +132 -108
- package/lib/esm/serialization/GeometrySamples.js.map +1 -1
- package/package.json +3 -3
|
@@ -5,7 +5,7 @@ import { AxisOrder } from "../Geometry";
|
|
|
5
5
|
import { Angle } from "./Angle";
|
|
6
6
|
import { Matrix3d } from "./Matrix3d";
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* Represents a non-trivial rotation using three simple axis rotation angles and an order in which to apply them.
|
|
9
9
|
* * This class accommodates application-specific interpretation of "multiplying 3 rotation matrices" with regard to
|
|
10
10
|
* * Whether a "vector" is a "row" or a "column"
|
|
11
11
|
* * The order in which the X,Y,Z rotations are applied.
|
|
@@ -48,7 +48,7 @@ export declare class OrderedRotationAngles {
|
|
|
48
48
|
get zDegrees(): number;
|
|
49
49
|
/** (Property accessor) Return the angle of rotation around z, in radians */
|
|
50
50
|
get zRadians(): number;
|
|
51
|
-
/**
|
|
51
|
+
/** The flag controlling whether vectors are treated as rows or as columns */
|
|
52
52
|
static get treatVectorsAsColumns(): boolean;
|
|
53
53
|
static set treatVectorsAsColumns(value: boolean);
|
|
54
54
|
/**
|
|
@@ -108,7 +108,7 @@ export declare class OrderedRotationAngles {
|
|
|
108
108
|
* * In the failure case the method's return value is `undefined`.
|
|
109
109
|
* * In the failure case, if the optional result was supplied, that result will nonetheless be filled with
|
|
110
110
|
* a set of angles.
|
|
111
|
-
|
|
111
|
+
*/
|
|
112
112
|
static createFromMatrix3d(matrix: Matrix3d, order: AxisOrder, result?: OrderedRotationAngles): OrderedRotationAngles | undefined;
|
|
113
113
|
/**
|
|
114
114
|
* Create a 3x3 rotational matrix from this OrderedRotationAngles.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OrderedRotationAngles.d.ts","sourceRoot":"","sources":["../../../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,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAC/F,sBAAsB,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,EAAE,qBAAqB,GAAG,qBAAqB;IAU9G;;;;;;;;OAQG;WACW,kBAAkB,CAAC,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,CAAC,EAAE,qBAAqB,GACjG,qBAAqB,GAAG,SAAS;IAoHnC;;;QAGI;IACG,UAAU,CAAC,MAAM,CAAC,EAAE,QAAQ,GAAG,QAAQ;CA2D/C"}
|
|
@@ -13,7 +13,7 @@ const Angle_1 = require("./Angle");
|
|
|
13
13
|
const Matrix3d_1 = require("./Matrix3d");
|
|
14
14
|
/* cspell:word cxcz, cxsz, cxcy, cxsy, sxcz, sxsz, sxcy, sxsy, cycz, cysz, sycz, sysz */
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
16
|
+
* Represents a non-trivial rotation using three simple axis rotation angles and an order in which to apply them.
|
|
17
17
|
* * This class accommodates application-specific interpretation of "multiplying 3 rotation matrices" with regard to
|
|
18
18
|
* * Whether a "vector" is a "row" or a "column"
|
|
19
19
|
* * The order in which the X,Y,Z rotations are applied.
|
|
@@ -71,7 +71,7 @@ class OrderedRotationAngles {
|
|
|
71
71
|
get zRadians() {
|
|
72
72
|
return this._z.radians;
|
|
73
73
|
}
|
|
74
|
-
/**
|
|
74
|
+
/** The flag controlling whether vectors are treated as rows or as columns */
|
|
75
75
|
static get treatVectorsAsColumns() {
|
|
76
76
|
return OrderedRotationAngles._sTreatVectorsAsColumns;
|
|
77
77
|
}
|
|
@@ -154,7 +154,7 @@ class OrderedRotationAngles {
|
|
|
154
154
|
* * In the failure case the method's return value is `undefined`.
|
|
155
155
|
* * In the failure case, if the optional result was supplied, that result will nonetheless be filled with
|
|
156
156
|
* a set of angles.
|
|
157
|
-
|
|
157
|
+
*/
|
|
158
158
|
static createFromMatrix3d(matrix, order, result) {
|
|
159
159
|
// treat vector as columns
|
|
160
160
|
let m11 = matrix.coffs[0], m12 = matrix.coffs[1], m13 = matrix.coffs[2];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OrderedRotationAngles.js","sourceRoot":"","sources":["../../../src/geometry3d/OrderedRotationAngles.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F;;GAEG;AACH,0CAAkD;AAClD,mCAAgC;AAChC,yCAAsC;AAEtC,wFAAwF;AAExF;;;;;;;;;;GAUG;AACH,MAAa,qBAAqB;IAWhC,kBAAkB;IAClB,YAAoB,CAAQ,EAAE,CAAQ,EAAE,CAAQ,EAAE,SAAoB;QACpE,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC;QACZ,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC;QACZ,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC;QACZ,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC;IAC1B,CAAC;IACD,0FAA0F;IAC1F,IAAW,KAAK;QACd,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IACD,gFAAgF;IAChF,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC;IACzB,CAAC;IACD,gFAAgF;IAChF,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC;IACzB,CAAC;IACD,gFAAgF;IAChF,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC;IACzB,CAAC;IACD,4EAA4E;IAC5E,IAAW,QAAQ;QACjB,OAAO,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC;IACzB,CAAC;IACD,4EAA4E;IAC5E,IAAW,QAAQ;QACjB,OAAO,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC;IACzB,CAAC;IACD,4EAA4E;IAC5E,IAAW,QAAQ;QACjB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C,EAAE,GAAG,EAAE,EAAE,EAAE,EACrB,IAAI,GAAG,EAAE,GAAG,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,EAAE,EAAE,CAAC,EAAE,GAAG,EAAE,EAC5C,IAAI,GAAG,IAAI,GAAG,EAAE,EAAE,IAAI,GAAG,IAAI,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,CAC5C,CAAC;SACH;aAAM,IAAI,SAAS,KAAK,oBAAS,CAAC,GAAG,EAAE;YACtC,GAAG,CAAC,YAAY,CACd,EAAE,GAAG,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,GAAG,EAAE,EACrB,IAAI,GAAG,IAAI,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,IAAI,GAAG,EAAE,GAAG,IAAI,EAC3C,IAAI,GAAG,EAAE,GAAG,IAAI,EAAE,EAAE,GAAG,EAAE,EAAE,IAAI,GAAG,IAAI,GAAG,EAAE,CAC5C,CAAC;SACH;aAAM,IAAI,SAAS,KAAK,oBAAS,CAAC,GAAG,EAAE;YACtC,GAAG,CAAC,YAAY,CACd,EAAE,GAAG,EAAE,EAAE,IAAI,GAAG,IAAI,GAAG,EAAE,EAAE,IAAI,GAAG,IAAI,GAAG,EAAE,EAC3C,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,EAAE,GAAG,EAAE,EACrB,CAAC,EAAE,GAAG,EAAE,EAAE,IAAI,GAAG,IAAI,GAAG,EAAE,EAAE,IAAI,GAAG,IAAI,GAAG,EAAE,CAC7C,CAAC;SACH;aAAM;YACL,GAAG,CAAC,WAAW,EAAE,CAAC;SACnB;QACD,yEAAyE;QACzE,IAAI,CAAC,qBAAqB,CAAC,qBAAqB;YAC9C,GAAG,CAAC,gBAAgB,EAAE,CAAC;QAEzB,OAAO,GAAG,CAAC;IACb,CAAC;;AA9UD,sCAAsC;AACvB,6CAAuB,GAAY,KAAK,CAAC;AAV7C,sDAAqB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\n/** @packageDocumentation\r\n * @module CartesianGeometry\r\n */\r\nimport { AxisOrder, Geometry } from \"../Geometry\";\r\nimport { Angle } from \"./Angle\";\r\nimport { Matrix3d } from \"./Matrix3d\";\r\n\r\n/* cspell:word cxcz, cxsz, cxcy, cxsy, sxcz, sxsz, sxcy, sxsy, cycz, cysz, sycz, sysz */\r\n\r\n/**\r\n * represents a non-trivial rotation using three simple axis rotation angles and an order in which to apply them.\r\n * * This class accommodates application-specific interpretation of \"multiplying 3 rotation matrices\" with regard to\r\n * * Whether a \"vector\" is a \"row\" or a \"column\"\r\n * * The order in which the X,Y,Z rotations are applied.\r\n * * This class bakes in angle rotation directions via create functions (i.e., createRadians, createDegrees, and\r\n * createAngles) so you can define each of the 3 rotations to be clockwise or counterclockwise. The default\r\n * rotation is counterclockwise.\r\n * * Within the imodel geometry library, the preferred rotation order is encapsulated in `YawPitchRollAngles`.\r\n * @alpha\r\n */\r\nexport class OrderedRotationAngles {\r\n /** rotation around x */\r\n private _x: Angle;\r\n /** rotation around y */\r\n private _y: Angle;\r\n /** rotation around z */\r\n private _z: Angle;\r\n /** rotation order. For example XYZ means to rotate around x axis first, then y axis, and finally Z axis */\r\n private _order: AxisOrder;\r\n /** treat vectors as matrix columns */\r\n private static _sTreatVectorsAsColumns: boolean = false;\r\n /** constructor */\r\n private constructor(x: Angle, y: Angle, z: Angle, axisOrder: AxisOrder) {\r\n this._x = x;\r\n this._y = y;\r\n this._z = z;\r\n this._order = axisOrder;\r\n }\r\n /** (Property accessor) Return the `AxisOrder` controlling matrix multiplication order. */\r\n public get order(): AxisOrder {\r\n return this._order;\r\n }\r\n /** (Property accessor) Return the strongly typed angle of rotation around x. */\r\n public get xAngle(): Angle {\r\n return this._x.clone();\r\n }\r\n /** (Property accessor) Return the strongly typed angle of rotation around y. */\r\n public get yAngle(): Angle {\r\n return this._y.clone();\r\n }\r\n /** (Property accessor) Return the strongly typed angle of rotation around z. */\r\n public get zAngle(): Angle {\r\n return this._z.clone();\r\n }\r\n /** (Property accessor) Return the angle of rotation around x, in degrees */\r\n public get xDegrees(): number {\r\n return this._x.degrees;\r\n }\r\n /** (Property accessor) Return the angle of rotation around y, in degrees */\r\n public get xRadians(): number {\r\n return this._x.radians;\r\n }\r\n /** (Property accessor) Return the angle of rotation around z, in degrees */\r\n public get yDegrees(): number {\r\n return this._y.degrees;\r\n }\r\n /** (Property accessor) Return the angle of rotation around x, in radians */\r\n public get yRadians(): number {\r\n return this._y.radians;\r\n }\r\n /** (Property accessor) Return the angle of rotation around y, in radians */\r\n public get zDegrees(): number {\r\n return this._z.degrees;\r\n }\r\n /** (Property accessor) Return the angle of rotation around z, in radians */\r\n public get zRadians(): number {\r\n return this._z.radians;\r\n }\r\n /** the flag controlling whether vectors are treated as rows or as columns */\r\n public static get treatVectorsAsColumns(): boolean {\r\n return OrderedRotationAngles._sTreatVectorsAsColumns;\r\n }\r\n public static set treatVectorsAsColumns(value: boolean) {\r\n OrderedRotationAngles._sTreatVectorsAsColumns = value;\r\n }\r\n /**\r\n * Create an OrderedRotationAngles from three angles (in radians), an ordering in which to apply them when\r\n * rotating, and a flag triple controlling whether direction of x,y,z is clockwise or counterclockwise.\r\n * @param xRadians rotation around x\r\n * @param yRadians rotation around y\r\n * @param zRadians rotation around z\r\n * @param order left to right order of axis names identifies the order that rotations are applied.\r\n * For example XYZ means to rotate around x axis first, then y axis, and finally Z axis.\r\n * * Note that rotation order is reverse of rotation matrix multiplication so for XYZ the rotation\r\n * matrix multiplication would be zRot*yRot*xRot\r\n * * Visualization can be found at https://www.itwinjs.org/sandbox/SaeedTorabi/CubeRotationAroundStandardAxes\r\n * @param xyzRotationIsClockwise the flags controlling whether direction of x,y,z is clockwise or counterclockwise.\r\n * rotation direction of x,y,z: true ---> clockwise - false ---> counterclockwise.\r\n * * if xyzRotationIsClockwise is undefined it's set to [false, false, false].\r\n * @param result caller-allocated OrderedRotationAngles\r\n */\r\n public static createRadians(xRadians: number, yRadians: number, zRadians: number, order: AxisOrder,\r\n xyzRotationIsClockwise?: [boolean, boolean, boolean], result?: OrderedRotationAngles): OrderedRotationAngles {\r\n if (!xyzRotationIsClockwise) {\r\n xyzRotationIsClockwise = [false, false, false];\r\n }\r\n const xRadian = xyzRotationIsClockwise[0] ? -xRadians : xRadians;\r\n const yRadian = xyzRotationIsClockwise[1] ? -yRadians : yRadians;\r\n const zRadian = xyzRotationIsClockwise[2] ? -zRadians : zRadians;\r\n if (result) {\r\n result._x.setRadians(xRadian);\r\n result._y.setRadians(yRadian);\r\n result._z.setRadians(zRadian);\r\n result._order = order;\r\n return result;\r\n }\r\n return new OrderedRotationAngles(\r\n Angle.createRadians(xRadian),\r\n Angle.createRadians(yRadian),\r\n Angle.createRadians(zRadian),\r\n order\r\n );\r\n }\r\n /**\r\n * Create an OrderedRotationAngles from three angles (in degrees) and an ordering in which to apply\r\n * them when rotating.\r\n * @param xDegrees rotation around x\r\n * @param yDegrees rotation around y\r\n * @param zDegrees rotation around z\r\n * @param order left to right order of axis names identifies the order that rotations are applied.\r\n * For example XYZ means to rotate around x axis first, then y axis, and finally Z axis.\r\n * * Note that rotation order is reverse of rotation matrix multiplication so for XYZ the rotation\r\n * matrix multiplication would be zRot*yRot*xRot\r\n * @param xyzRotationIsClockwise the flags controlling whether direction of x,y,z is clockwise or counterclockwise.\r\n * rotation direction of x,y,z: true ---> clockwise - false ---> counterclockwise.\r\n * * if xyzRotationIsClockwise is undefined it's set to [false, false, false].\r\n * @param result caller-allocated OrderedRotationAngles\r\n */\r\n public static createDegrees(xDegrees: number, yDegrees: number, zDegrees: number, order: AxisOrder,\r\n xyzRotationIsClockwise?: [boolean, boolean, boolean], result?: OrderedRotationAngles): OrderedRotationAngles {\r\n return OrderedRotationAngles.createRadians(\r\n Angle.degreesToRadians(xDegrees),\r\n Angle.degreesToRadians(yDegrees),\r\n Angle.degreesToRadians(zDegrees),\r\n order,\r\n xyzRotationIsClockwise,\r\n result\r\n );\r\n }\r\n /**\r\n * Create an OrderedRotationAngles from three angles, an ordering in which to apply them when rotating,\r\n * and a flag triple controlling whether direction of x,y,z is clockwise or counterclockwise.\r\n * @param xRotation rotation around x\r\n * @param yRotation rotation around y\r\n * @param zRotation rotation around z\r\n * @param order left to right order of axis names identifies the order that rotations are applied\r\n * For example XYZ means to rotate around x axis first, then y axis, and finally Z axis.\r\n * * Note that rotation order is reverse of rotation matrix multiplication so for XYZ the rotation\r\n * matrix multiplication would be zRot*yRot*xRot\r\n * @param xyzRotationIsClockwise the flags controlling whether direction of x,y,z is clockwise or counterclockwise.\r\n * rotation direction of x,y,z: true ---> clockwise - false ---> counterclockwise.\r\n * * if xyzRotationIsClockwise is undefined it's set to [false, false, false].\r\n * @param result caller-allocated OrderedRotationAngles\r\n */\r\n public static createAngles(xRotation: Angle, yRotation: Angle, zRotation: Angle, order: AxisOrder,\r\n xyzRotationIsClockwise?: [boolean, boolean, boolean], result?: OrderedRotationAngles): OrderedRotationAngles {\r\n return OrderedRotationAngles.createRadians(\r\n xRotation.radians,\r\n yRotation.radians,\r\n zRotation.radians,\r\n order,\r\n xyzRotationIsClockwise,\r\n result\r\n );\r\n }\r\n /**\r\n * Create an OrderedRotationAngles from a 3x3 rotational matrix, given the ordering of axis rotations\r\n * that the matrix derives from.\r\n * * This function creates an OrderedRotationAngles with default angle rotation directions, i.e.,\r\n * it assumes all x, y, and z rotations are counterclockwise.\r\n * * In the failure case the method's return value is `undefined`.\r\n * * In the failure case, if the optional result was supplied, that result will nonetheless be filled with\r\n * a set of angles.\r\n * */\r\n public static createFromMatrix3d(matrix: Matrix3d, order: AxisOrder, result?: OrderedRotationAngles):\r\n OrderedRotationAngles | undefined {\r\n // treat vector as columns\r\n let m11 = matrix.coffs[0], m12 = matrix.coffs[1], m13 = matrix.coffs[2];\r\n let m21 = matrix.coffs[3], m22 = matrix.coffs[4], m23 = matrix.coffs[5];\r\n let m31 = matrix.coffs[6], m32 = matrix.coffs[7], m33 = matrix.coffs[8];\r\n // treat vector as rows\r\n if (!OrderedRotationAngles.treatVectorsAsColumns) {\r\n m11 = matrix.coffs[0], m12 = matrix.coffs[3], m13 = matrix.coffs[6];\r\n m21 = matrix.coffs[1], m22 = matrix.coffs[4], m23 = matrix.coffs[7];\r\n m31 = matrix.coffs[2], m32 = matrix.coffs[5], m33 = matrix.coffs[8];\r\n }\r\n\r\n let xRad: number;\r\n let yRad: number;\r\n let zRad: number;\r\n\r\n switch (order) {\r\n case AxisOrder.XYZ: {\r\n yRad = Math.asin(Math.max(-1, Math.min(1, -m31))); // limit asin domain to [-1,1]\r\n\r\n if (Math.abs(m31) < 0.99999) {\r\n xRad = Math.atan2(m32, m33);\r\n zRad = Math.atan2(m21, m11);\r\n } else {\r\n /**\r\n * If Math.abs(m31) = 1 then yRad = +-90 degrees and therefore, we have a gimbal lock.\r\n * This means xRad and zRad can be anything as long as their sum xRad + zRad is constant.\r\n * so we can pick zRad = 0 and calculate xRad (or pick xRad = 0 and calculate zRad).\r\n * Therefore, rotation matrix becomes\r\n * Matrix3d.createRowValues(\r\n * 0, +-sx, +-cx,\r\n * 0, cx, -sx,\r\n * -+1, 0, 0\r\n * );\r\n * Math details can be found\r\n * https://en.wikipedia.org/wiki/Gimbal_lock#Loss_of_a_degree_of_freedom_with_Euler_angles\r\n */\r\n xRad = Math.atan2(-m23, m22);\r\n zRad = 0;\r\n }\r\n break;\r\n } case AxisOrder.YXZ: {\r\n xRad = Math.asin(Math.max(-1, Math.min(1, m32))); // limit asin domain to [-1,1]\r\n\r\n if (Math.abs(m32) < 0.99999) {\r\n yRad = Math.atan2(-m31, m33);\r\n zRad = Math.atan2(-m12, m22);\r\n } else {\r\n yRad = Math.atan2(m13, m11);\r\n zRad = 0;\r\n }\r\n break;\r\n } case AxisOrder.ZXY: {\r\n xRad = Math.asin(Math.max(-1, Math.min(1, -m23))); // limit asin domain to [-1,1]\r\n\r\n if (Math.abs(m23) < 0.99999) {\r\n yRad = Math.atan2(m13, m33);\r\n zRad = Math.atan2(m21, m22);\r\n } else {\r\n yRad = 0;\r\n zRad = Math.atan2(-m12, m11);\r\n }\r\n break;\r\n } case AxisOrder.ZYX: {\r\n yRad = Math.asin(Math.max(-1, Math.min(1, m13))); // limit asin domain to [-1,1]\r\n\r\n if (Math.abs(m13) < 0.99999) {\r\n xRad = Math.atan2(-m23, m33);\r\n zRad = Math.atan2(-m12, m11);\r\n } else {\r\n xRad = 0;\r\n zRad = Math.atan2(m21, m22);\r\n }\r\n break;\r\n } case AxisOrder.YZX: {\r\n zRad = Math.asin(Math.max(-1, Math.min(1, -m12))); // limit asin domain to [-1,1]\r\n\r\n if (Math.abs(m12) < 0.99999) {\r\n xRad = Math.atan2(m32, m22);\r\n yRad = Math.atan2(m13, m11);\r\n } else {\r\n xRad = 0;\r\n yRad = Math.atan2(-m31, m33);\r\n }\r\n break;\r\n } case AxisOrder.XZY: {\r\n zRad = Math.asin(Math.max(-1, Math.min(1, m21))); // limit asin domain to [-1,1]\r\n\r\n if (Math.abs(m21) < 0.99999) {\r\n xRad = Math.atan2(-m23, m22);\r\n yRad = Math.atan2(-m31, m11);\r\n } else {\r\n xRad = Math.atan2(m32, m33);\r\n yRad = 0;\r\n }\r\n break;\r\n } default: {\r\n xRad = yRad = zRad = 0;\r\n }\r\n }\r\n const xyzRotationIsClockwise: [boolean, boolean, boolean] = [false, false, false];\r\n const angles = OrderedRotationAngles.createRadians(xRad, yRad, zRad, order, xyzRotationIsClockwise, result);\r\n // sanity check\r\n const matrix1 = angles.toMatrix3d();\r\n /**\r\n * Below tolerance loosened to allow sanity check to pass for\r\n *\r\n * OrderedRotationAngles.createFromMatrix3d(\r\n * OrderedRotationAngles.createDegrees(0, 89.999, 0.001, AxisOrder.XYZ).toMatrix3d(),\r\n * AxisOrder.XYZ\r\n * );\r\n *\r\n * with treatVectorsAsColumns = true.\r\n */\r\n return (matrix.maxDiff(matrix1) < 10 * Geometry.smallFraction) ? angles : undefined;\r\n }\r\n /**\r\n * Create a 3x3 rotational matrix from this OrderedRotationAngles.\r\n ** math details can be found at docs/learning/geometry/Angle.md\r\n **/\r\n public toMatrix3d(result?: Matrix3d): Matrix3d {\r\n const rot = (result !== undefined) ? result : new Matrix3d();\r\n const axisOrder = this.order;\r\n const x = this.xAngle, y = this.yAngle, z = this.zAngle;\r\n\r\n const cx = x.cos(), sx = x.sin();\r\n const cy = y.cos(), sy = y.sin();\r\n const cz = z.cos(), sz = z.sin();\r\n\r\n const cxcz = cx * cz, cxsz = cx * sz, cxcy = cx * cy, cxsy = cx * sy;\r\n const sxcz = sx * cz, sxsz = sx * sz, sxcy = sx * cy, sxsy = sx * sy;\r\n const cycz = cy * cz, cysz = cy * sz, sycz = sy * cz, sysz = sy * sz;\r\n\r\n // the rotation matrix we build below is created using column-based base rotation matrixes\r\n if (axisOrder === AxisOrder.XYZ) {\r\n rot.setRowValues(\r\n cy * cz, sxcz * sy - cxsz, cxcz * sy + sxsz,\r\n cy * sz, cxcz + sxsz * sy, cxsz * sy - sxcz,\r\n -sy, sx * cy, cx * cy,\r\n );\r\n } else if (axisOrder === AxisOrder.YXZ) {\r\n rot.setRowValues(\r\n cycz - sysz * sx, -cx * sz, cysz * sx + sycz,\r\n sycz * sx + cysz, cx * cz, sysz - cycz * sx,\r\n -cx * sy, sx, cx * cy,\r\n );\r\n } else if (axisOrder === AxisOrder.ZXY) {\r\n rot.setRowValues(\r\n cycz + sysz * sx, sycz * sx - cysz, cx * sy,\r\n cx * sz, cx * cz, -sx,\r\n cysz * sx - sycz, cycz * sx + sysz, cx * cy,\r\n );\r\n } else if (axisOrder === AxisOrder.ZYX) {\r\n rot.setRowValues(\r\n cy * cz, -cy * sz, sy,\r\n sxcz * sy + cxsz, cxcz - sxsz * sy, -sx * cy,\r\n sxsz - cxcz * sy, sxcz + cxsz * sy, cx * cy,\r\n );\r\n } else if (axisOrder === AxisOrder.YZX) {\r\n rot.setRowValues(\r\n cy * cz, -sz, sy * cz,\r\n sxsy + cxcy * sz, cx * cz, cxsy * sz - sxcy,\r\n sxcy * sz - cxsy, sx * cz, cxcy + sxsy * sz,\r\n );\r\n } else if (axisOrder === AxisOrder.XZY) {\r\n rot.setRowValues(\r\n cy * cz, sxsy - cxcy * sz, cxsy + sxcy * sz,\r\n sz, cx * cz, -sx * cz,\r\n -sy * cz, sxcy + cxsy * sz, cxcy - sxsy * sz,\r\n );\r\n } else {\r\n rot.setIdentity();\r\n }\r\n // if we need row-based rotation matrix, we transpose the rotation matrix\r\n if (!OrderedRotationAngles.treatVectorsAsColumns)\r\n rot.transposeInPlace();\r\n\r\n return rot;\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"OrderedRotationAngles.js","sourceRoot":"","sources":["../../../src/geometry3d/OrderedRotationAngles.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F;;GAEG;AACH,0CAAkD;AAClD,mCAAgC;AAChC,yCAAsC;AAEtC,wFAAwF;AAExF;;;;;;;;;;GAUG;AACH,MAAa,qBAAqB;IAWhC,kBAAkB;IAClB,YAAoB,CAAQ,EAAE,CAAQ,EAAE,CAAQ,EAAE,SAAoB;QACpE,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC;QACZ,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC;QACZ,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC;QACZ,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC;IAC1B,CAAC;IACD,0FAA0F;IAC1F,IAAW,KAAK;QACd,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IACD,gFAAgF;IAChF,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC;IACzB,CAAC;IACD,gFAAgF;IAChF,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC;IACzB,CAAC;IACD,gFAAgF;IA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,GAAG,EAAE,CAC7C,CAAC;SACH;aAAM;YACL,GAAG,CAAC,WAAW,EAAE,CAAC;SACnB;QACD,yEAAyE;QACzE,IAAI,CAAC,qBAAqB,CAAC,qBAAqB;YAC9C,GAAG,CAAC,gBAAgB,EAAE,CAAC;QAEzB,OAAO,GAAG,CAAC;IACb,CAAC;;AA9UD,sCAAsC;AACvB,6CAAuB,GAAY,KAAK,CAAC;AAV7C,sDAAqB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\n/** @packageDocumentation\r\n * @module CartesianGeometry\r\n */\r\nimport { AxisOrder, Geometry } from \"../Geometry\";\r\nimport { Angle } from \"./Angle\";\r\nimport { Matrix3d } from \"./Matrix3d\";\r\n\r\n/* cspell:word cxcz, cxsz, cxcy, cxsy, sxcz, sxsz, sxcy, sxsy, cycz, cysz, sycz, sysz */\r\n\r\n/**\r\n * Represents a non-trivial rotation using three simple axis rotation angles and an order in which to apply them.\r\n * * This class accommodates application-specific interpretation of \"multiplying 3 rotation matrices\" with regard to\r\n * * Whether a \"vector\" is a \"row\" or a \"column\"\r\n * * The order in which the X,Y,Z rotations are applied.\r\n * * This class bakes in angle rotation directions via create functions (i.e., createRadians, createDegrees, and\r\n * createAngles) so you can define each of the 3 rotations to be clockwise or counterclockwise. The default\r\n * rotation is counterclockwise.\r\n * * Within the imodel geometry library, the preferred rotation order is encapsulated in `YawPitchRollAngles`.\r\n * @alpha\r\n */\r\nexport class OrderedRotationAngles {\r\n /** rotation around x */\r\n private _x: Angle;\r\n /** rotation around y */\r\n private _y: Angle;\r\n /** rotation around z */\r\n private _z: Angle;\r\n /** rotation order. For example XYZ means to rotate around x axis first, then y axis, and finally Z axis */\r\n private _order: AxisOrder;\r\n /** treat vectors as matrix columns */\r\n private static _sTreatVectorsAsColumns: boolean = false;\r\n /** constructor */\r\n private constructor(x: Angle, y: Angle, z: Angle, axisOrder: AxisOrder) {\r\n this._x = x;\r\n this._y = y;\r\n this._z = z;\r\n this._order = axisOrder;\r\n }\r\n /** (Property accessor) Return the `AxisOrder` controlling matrix multiplication order. */\r\n public get order(): AxisOrder {\r\n return this._order;\r\n }\r\n /** (Property accessor) Return the strongly typed angle of rotation around x. */\r\n public get xAngle(): Angle {\r\n return this._x.clone();\r\n }\r\n /** (Property accessor) Return the strongly typed angle of rotation around y. */\r\n public get yAngle(): Angle {\r\n return this._y.clone();\r\n }\r\n /** (Property accessor) Return the strongly typed angle of rotation around z. */\r\n public get zAngle(): Angle {\r\n return this._z.clone();\r\n }\r\n /** (Property accessor) Return the angle of rotation around x, in degrees */\r\n public get xDegrees(): number {\r\n return this._x.degrees;\r\n }\r\n /** (Property accessor) Return the angle of rotation around y, in degrees */\r\n public get xRadians(): number {\r\n return this._x.radians;\r\n }\r\n /** (Property accessor) Return the angle of rotation around z, in degrees */\r\n public get yDegrees(): number {\r\n return this._y.degrees;\r\n }\r\n /** (Property accessor) Return the angle of rotation around x, in radians */\r\n public get yRadians(): number {\r\n return this._y.radians;\r\n }\r\n /** (Property accessor) Return the angle of rotation around y, in radians */\r\n public get zDegrees(): number {\r\n return this._z.degrees;\r\n }\r\n /** (Property accessor) Return the angle of rotation around z, in radians */\r\n public get zRadians(): number {\r\n return this._z.radians;\r\n }\r\n /** The flag controlling whether vectors are treated as rows or as columns */\r\n public static get treatVectorsAsColumns(): boolean {\r\n return OrderedRotationAngles._sTreatVectorsAsColumns;\r\n }\r\n public static set treatVectorsAsColumns(value: boolean) {\r\n OrderedRotationAngles._sTreatVectorsAsColumns = value;\r\n }\r\n /**\r\n * Create an OrderedRotationAngles from three angles (in radians), an ordering in which to apply them when\r\n * rotating, and a flag triple controlling whether direction of x,y,z is clockwise or counterclockwise.\r\n * @param xRadians rotation around x\r\n * @param yRadians rotation around y\r\n * @param zRadians rotation around z\r\n * @param order left to right order of axis names identifies the order that rotations are applied.\r\n * For example XYZ means to rotate around x axis first, then y axis, and finally Z axis.\r\n * * Note that rotation order is reverse of rotation matrix multiplication so for XYZ the rotation\r\n * matrix multiplication would be zRot*yRot*xRot\r\n * * Visualization can be found at https://www.itwinjs.org/sandbox/SaeedTorabi/CubeRotationAroundStandardAxes\r\n * @param xyzRotationIsClockwise the flags controlling whether direction of x,y,z is clockwise or counterclockwise.\r\n * rotation direction of x,y,z: true ---> clockwise - false ---> counterclockwise.\r\n * * if xyzRotationIsClockwise is undefined it's set to [false, false, false].\r\n * @param result caller-allocated OrderedRotationAngles\r\n */\r\n public static createRadians(xRadians: number, yRadians: number, zRadians: number, order: AxisOrder,\r\n xyzRotationIsClockwise?: [boolean, boolean, boolean], result?: OrderedRotationAngles): OrderedRotationAngles {\r\n if (!xyzRotationIsClockwise) {\r\n xyzRotationIsClockwise = [false, false, false];\r\n }\r\n const xRadian = xyzRotationIsClockwise[0] ? -xRadians : xRadians;\r\n const yRadian = xyzRotationIsClockwise[1] ? -yRadians : yRadians;\r\n const zRadian = xyzRotationIsClockwise[2] ? -zRadians : zRadians;\r\n if (result) {\r\n result._x.setRadians(xRadian);\r\n result._y.setRadians(yRadian);\r\n result._z.setRadians(zRadian);\r\n result._order = order;\r\n return result;\r\n }\r\n return new OrderedRotationAngles(\r\n Angle.createRadians(xRadian),\r\n Angle.createRadians(yRadian),\r\n Angle.createRadians(zRadian),\r\n order\r\n );\r\n }\r\n /**\r\n * Create an OrderedRotationAngles from three angles (in degrees) and an ordering in which to apply\r\n * them when rotating.\r\n * @param xDegrees rotation around x\r\n * @param yDegrees rotation around y\r\n * @param zDegrees rotation around z\r\n * @param order left to right order of axis names identifies the order that rotations are applied.\r\n * For example XYZ means to rotate around x axis first, then y axis, and finally Z axis.\r\n * * Note that rotation order is reverse of rotation matrix multiplication so for XYZ the rotation\r\n * matrix multiplication would be zRot*yRot*xRot\r\n * @param xyzRotationIsClockwise the flags controlling whether direction of x,y,z is clockwise or counterclockwise.\r\n * rotation direction of x,y,z: true ---> clockwise - false ---> counterclockwise.\r\n * * if xyzRotationIsClockwise is undefined it's set to [false, false, false].\r\n * @param result caller-allocated OrderedRotationAngles\r\n */\r\n public static createDegrees(xDegrees: number, yDegrees: number, zDegrees: number, order: AxisOrder,\r\n xyzRotationIsClockwise?: [boolean, boolean, boolean], result?: OrderedRotationAngles): OrderedRotationAngles {\r\n return OrderedRotationAngles.createRadians(\r\n Angle.degreesToRadians(xDegrees),\r\n Angle.degreesToRadians(yDegrees),\r\n Angle.degreesToRadians(zDegrees),\r\n order,\r\n xyzRotationIsClockwise,\r\n result\r\n );\r\n }\r\n /**\r\n * Create an OrderedRotationAngles from three angles, an ordering in which to apply them when rotating,\r\n * and a flag triple controlling whether direction of x,y,z is clockwise or counterclockwise.\r\n * @param xRotation rotation around x\r\n * @param yRotation rotation around y\r\n * @param zRotation rotation around z\r\n * @param order left to right order of axis names identifies the order that rotations are applied\r\n * For example XYZ means to rotate around x axis first, then y axis, and finally Z axis.\r\n * * Note that rotation order is reverse of rotation matrix multiplication so for XYZ the rotation\r\n * matrix multiplication would be zRot*yRot*xRot\r\n * @param xyzRotationIsClockwise the flags controlling whether direction of x,y,z is clockwise or counterclockwise.\r\n * rotation direction of x,y,z: true ---> clockwise - false ---> counterclockwise.\r\n * * if xyzRotationIsClockwise is undefined it's set to [false, false, false].\r\n * @param result caller-allocated OrderedRotationAngles\r\n */\r\n public static createAngles(xRotation: Angle, yRotation: Angle, zRotation: Angle, order: AxisOrder,\r\n xyzRotationIsClockwise?: [boolean, boolean, boolean], result?: OrderedRotationAngles): OrderedRotationAngles {\r\n return OrderedRotationAngles.createRadians(\r\n xRotation.radians,\r\n yRotation.radians,\r\n zRotation.radians,\r\n order,\r\n xyzRotationIsClockwise,\r\n result\r\n );\r\n }\r\n /**\r\n * Create an OrderedRotationAngles from a 3x3 rotational matrix, given the ordering of axis rotations\r\n * that the matrix derives from.\r\n * * This function creates an OrderedRotationAngles with default angle rotation directions, i.e.,\r\n * it assumes all x, y, and z rotations are counterclockwise.\r\n * * In the failure case the method's return value is `undefined`.\r\n * * In the failure case, if the optional result was supplied, that result will nonetheless be filled with\r\n * a set of angles.\r\n */\r\n public static createFromMatrix3d(matrix: Matrix3d, order: AxisOrder, result?: OrderedRotationAngles):\r\n OrderedRotationAngles | undefined {\r\n // treat vector as columns\r\n let m11 = matrix.coffs[0], m12 = matrix.coffs[1], m13 = matrix.coffs[2];\r\n let m21 = matrix.coffs[3], m22 = matrix.coffs[4], m23 = matrix.coffs[5];\r\n let m31 = matrix.coffs[6], m32 = matrix.coffs[7], m33 = matrix.coffs[8];\r\n // treat vector as rows\r\n if (!OrderedRotationAngles.treatVectorsAsColumns) {\r\n m11 = matrix.coffs[0], m12 = matrix.coffs[3], m13 = matrix.coffs[6];\r\n m21 = matrix.coffs[1], m22 = matrix.coffs[4], m23 = matrix.coffs[7];\r\n m31 = matrix.coffs[2], m32 = matrix.coffs[5], m33 = matrix.coffs[8];\r\n }\r\n\r\n let xRad: number;\r\n let yRad: number;\r\n let zRad: number;\r\n\r\n switch (order) {\r\n case AxisOrder.XYZ: {\r\n yRad = Math.asin(Math.max(-1, Math.min(1, -m31))); // limit asin domain to [-1,1]\r\n\r\n if (Math.abs(m31) < 0.99999) {\r\n xRad = Math.atan2(m32, m33);\r\n zRad = Math.atan2(m21, m11);\r\n } else {\r\n /**\r\n * If Math.abs(m31) = 1 then yRad = +-90 degrees and therefore, we have a gimbal lock.\r\n * This means xRad and zRad can be anything as long as their sum xRad + zRad is constant.\r\n * so we can pick zRad = 0 and calculate xRad (or pick xRad = 0 and calculate zRad).\r\n * Therefore, rotation matrix becomes\r\n * Matrix3d.createRowValues(\r\n * 0, +-sx, +-cx,\r\n * 0, cx, -sx,\r\n * -+1, 0, 0\r\n * );\r\n * Math details can be found\r\n * https://en.wikipedia.org/wiki/Gimbal_lock#Loss_of_a_degree_of_freedom_with_Euler_angles\r\n */\r\n xRad = Math.atan2(-m23, m22);\r\n zRad = 0;\r\n }\r\n break;\r\n } case AxisOrder.YXZ: {\r\n xRad = Math.asin(Math.max(-1, Math.min(1, m32))); // limit asin domain to [-1,1]\r\n\r\n if (Math.abs(m32) < 0.99999) {\r\n yRad = Math.atan2(-m31, m33);\r\n zRad = Math.atan2(-m12, m22);\r\n } else {\r\n yRad = Math.atan2(m13, m11);\r\n zRad = 0;\r\n }\r\n break;\r\n } case AxisOrder.ZXY: {\r\n xRad = Math.asin(Math.max(-1, Math.min(1, -m23))); // limit asin domain to [-1,1]\r\n\r\n if (Math.abs(m23) < 0.99999) {\r\n yRad = Math.atan2(m13, m33);\r\n zRad = Math.atan2(m21, m22);\r\n } else {\r\n yRad = 0;\r\n zRad = Math.atan2(-m12, m11);\r\n }\r\n break;\r\n } case AxisOrder.ZYX: {\r\n yRad = Math.asin(Math.max(-1, Math.min(1, m13))); // limit asin domain to [-1,1]\r\n\r\n if (Math.abs(m13) < 0.99999) {\r\n xRad = Math.atan2(-m23, m33);\r\n zRad = Math.atan2(-m12, m11);\r\n } else {\r\n xRad = 0;\r\n zRad = Math.atan2(m21, m22);\r\n }\r\n break;\r\n } case AxisOrder.YZX: {\r\n zRad = Math.asin(Math.max(-1, Math.min(1, -m12))); // limit asin domain to [-1,1]\r\n\r\n if (Math.abs(m12) < 0.99999) {\r\n xRad = Math.atan2(m32, m22);\r\n yRad = Math.atan2(m13, m11);\r\n } else {\r\n xRad = 0;\r\n yRad = Math.atan2(-m31, m33);\r\n }\r\n break;\r\n } case AxisOrder.XZY: {\r\n zRad = Math.asin(Math.max(-1, Math.min(1, m21))); // limit asin domain to [-1,1]\r\n\r\n if (Math.abs(m21) < 0.99999) {\r\n xRad = Math.atan2(-m23, m22);\r\n yRad = Math.atan2(-m31, m11);\r\n } else {\r\n xRad = Math.atan2(m32, m33);\r\n yRad = 0;\r\n }\r\n break;\r\n } default: {\r\n xRad = yRad = zRad = 0;\r\n }\r\n }\r\n const xyzRotationIsClockwise: [boolean, boolean, boolean] = [false, false, false];\r\n const angles = OrderedRotationAngles.createRadians(xRad, yRad, zRad, order, xyzRotationIsClockwise, result);\r\n // sanity check\r\n const matrix1 = angles.toMatrix3d();\r\n /**\r\n * Below tolerance loosened to allow sanity check to pass for\r\n *\r\n * OrderedRotationAngles.createFromMatrix3d(\r\n * OrderedRotationAngles.createDegrees(0, 89.999, 0.001, AxisOrder.XYZ).toMatrix3d(),\r\n * AxisOrder.XYZ\r\n * );\r\n *\r\n * with treatVectorsAsColumns = true.\r\n */\r\n return (matrix.maxDiff(matrix1) < 10 * Geometry.smallFraction) ? angles : undefined;\r\n }\r\n /**\r\n * Create a 3x3 rotational matrix from this OrderedRotationAngles.\r\n ** math details can be found at docs/learning/geometry/Angle.md\r\n **/\r\n public toMatrix3d(result?: Matrix3d): Matrix3d {\r\n const rot = (result !== undefined) ? result : new Matrix3d();\r\n const axisOrder = this.order;\r\n const x = this.xAngle, y = this.yAngle, z = this.zAngle;\r\n\r\n const cx = x.cos(), sx = x.sin();\r\n const cy = y.cos(), sy = y.sin();\r\n const cz = z.cos(), sz = z.sin();\r\n\r\n const cxcz = cx * cz, cxsz = cx * sz, cxcy = cx * cy, cxsy = cx * sy;\r\n const sxcz = sx * cz, sxsz = sx * sz, sxcy = sx * cy, sxsy = sx * sy;\r\n const cycz = cy * cz, cysz = cy * sz, sycz = sy * cz, sysz = sy * sz;\r\n\r\n // the rotation matrix we build below is created using column-based base rotation matrixes\r\n if (axisOrder === AxisOrder.XYZ) {\r\n rot.setRowValues(\r\n cy * cz, sxcz * sy - cxsz, cxcz * sy + sxsz,\r\n cy * sz, cxcz + sxsz * sy, cxsz * sy - sxcz,\r\n -sy, sx * cy, cx * cy,\r\n );\r\n } else if (axisOrder === AxisOrder.YXZ) {\r\n rot.setRowValues(\r\n cycz - sysz * sx, -cx * sz, cysz * sx + sycz,\r\n sycz * sx + cysz, cx * cz, sysz - cycz * sx,\r\n -cx * sy, sx, cx * cy,\r\n );\r\n } else if (axisOrder === AxisOrder.ZXY) {\r\n rot.setRowValues(\r\n cycz + sysz * sx, sycz * sx - cysz, cx * sy,\r\n cx * sz, cx * cz, -sx,\r\n cysz * sx - sycz, cycz * sx + sysz, cx * cy,\r\n );\r\n } else if (axisOrder === AxisOrder.ZYX) {\r\n rot.setRowValues(\r\n cy * cz, -cy * sz, sy,\r\n sxcz * sy + cxsz, cxcz - sxsz * sy, -sx * cy,\r\n sxsz - cxcz * sy, sxcz + cxsz * sy, cx * cy,\r\n );\r\n } else if (axisOrder === AxisOrder.YZX) {\r\n rot.setRowValues(\r\n cy * cz, -sz, sy * cz,\r\n sxsy + cxcy * sz, cx * cz, cxsy * sz - sxcy,\r\n sxcy * sz - cxsy, sx * cz, cxcy + sxsy * sz,\r\n );\r\n } else if (axisOrder === AxisOrder.XZY) {\r\n rot.setRowValues(\r\n cy * cz, sxsy - cxcy * sz, cxsy + sxcy * sz,\r\n sz, cx * cz, -sx * cz,\r\n -sy * cz, sxcy + cxsy * sz, cxcy - sxsy * sz,\r\n );\r\n } else {\r\n rot.setIdentity();\r\n }\r\n // if we need row-based rotation matrix, we transpose the rotation matrix\r\n if (!OrderedRotationAngles.treatVectorsAsColumns)\r\n rot.transposeInPlace();\r\n\r\n return rot;\r\n }\r\n}\r\n"]}
|
|
@@ -59,17 +59,15 @@ export declare class Point2dArrayCarrier extends IndexedXYCollection {
|
|
|
59
59
|
*/
|
|
60
60
|
crossProductXAndYIndexIndex(origin: XAndY, indexA: number, indexB: number): number | undefined;
|
|
61
61
|
/**
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
*/
|
|
69
|
-
crossProductIndexIndexIndex(originIndex: number, indexA: number, indexB: number): number | undefined;
|
|
70
|
-
/**
|
|
71
|
-
* read-only property for number of XYZ in the collection.
|
|
62
|
+
* Return the cross product of vectors from point at originIndex to points at indexA and indexB
|
|
63
|
+
* @param originIndex index of origin
|
|
64
|
+
* @param indexA index of first target within the array
|
|
65
|
+
* @param indexB index of second target within the array
|
|
66
|
+
* @param result caller-allocated vector.
|
|
67
|
+
* @returns return true if indexA, indexB both valid
|
|
72
68
|
*/
|
|
69
|
+
crossProductIndexIndexIndex(originIndex: number, indexA: number, indexB: number): number | undefined;
|
|
70
|
+
/** Read-only property for number of XYZ in the collection. */
|
|
73
71
|
get length(): number;
|
|
74
72
|
/**
|
|
75
73
|
* Get x coordinate by point index, with no index checking
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Point2dArrayCarrier.d.ts","sourceRoot":"","sources":["../../../src/geometry3d/Point2dArrayCarrier.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAM,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAEnC;;;;;;EAME;AACF,qBAAa,mBAAoB,SAAQ,mBAAmB;IAC1D,wCAAwC;IACjC,IAAI,EAAE,OAAO,EAAE,CAAC;IACvB,wCAAwC;gBACrB,IAAI,EAAE,OAAO,EAAE;IAIlC,8BAA8B;IACvB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;IAG3C;;;;;;OAMG;IACa,6BAA6B,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,SAAS;IAOnG;;;;;OAKG;IACa,+BAA+B,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,SAAS;IAOvG;;;;;;OAMG;IACa,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,SAAS;IAKzG;;;;;;OAMG;IACa,gBAAgB,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,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M,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAK9G;;;;;;;OAOG;IACa,2BAA2B,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAKpH,8DAA8D;IAC9D,IAAoB,MAAM,IAAI,MAAM,CAEnC;IAED;;;OAGG;IACa,yBAAyB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM;IAIrE;;;OAGG;IACa,yBAAyB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM;CAGtE"}
|
|
@@ -93,21 +93,19 @@ class Point2dArrayCarrier extends IndexedXYCollection_1.IndexedXYCollection {
|
|
|
93
93
|
return undefined;
|
|
94
94
|
}
|
|
95
95
|
/**
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
96
|
+
* Return the cross product of vectors from point at originIndex to points at indexA and indexB
|
|
97
|
+
* @param originIndex index of origin
|
|
98
|
+
* @param indexA index of first target within the array
|
|
99
|
+
* @param indexB index of second target within the array
|
|
100
|
+
* @param result caller-allocated vector.
|
|
101
|
+
* @returns return true if indexA, indexB both valid
|
|
102
|
+
*/
|
|
103
103
|
crossProductIndexIndexIndex(originIndex, indexA, indexB) {
|
|
104
104
|
if (this.isValidIndex(originIndex) && this.isValidIndex(indexA) && this.isValidIndex(indexB))
|
|
105
105
|
return Point2dVector2d_1.XY.crossProductToPoints(this.data[originIndex], this.data[indexA], this.data[indexB]);
|
|
106
106
|
return undefined;
|
|
107
107
|
}
|
|
108
|
-
/**
|
|
109
|
-
* read-only property for number of XYZ in the collection.
|
|
110
|
-
*/
|
|
108
|
+
/** Read-only property for number of XYZ in the collection. */
|
|
111
109
|
get length() {
|
|
112
110
|
return this.data.length;
|
|
113
111
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-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AI,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC;QACpE,OAAO,SAAS,CAAC;IACnB,CAAC;IAED;;;;;;;OAOG;IACa,2BAA2B,CAAC,MAAa,EAAE,MAAc,EAAE,MAAc;QACvF,IAAI,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC;YACxD,OAAO,oBAAE,CAAC,oBAAoB,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;QAC/E,OAAO,SAAS,CAAC;IACnB,CAAC;IACD;;;;;;;OAOG;IACa,2BAA2B,CAAC,WAAmB,EAAE,MAAc,EAAE,MAAc;QAC7F,IAAI,IAAI,CAAC,YAAY,CAAC,WAAW,CAAC,IAAI,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC;YAC1F,OAAO,oBAAE,CAAC,oBAAoB,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;QAC/F,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,8DAA8D;IAC9D,IAAoB,MAAM;QACxB,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC;IAC1B,CAAC;IAED;;;OAGG;IACa,yBAAyB,CAAC,UAAkB;QAC1D,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IACjC,CAAC;IAED;;;OAGG;IACa,yBAAyB,CAAC,UAAkB;QAC1D,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IACjC,CAAC;CACF;AA9GD,kDA8GC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module CartesianGeometry\r\n */\r\n/* eslint-disable @typescript-eslint/naming-convention, no-empty */\r\n\r\nimport { IndexedXYCollection } from \"./IndexedXYCollection\";\r\nimport { Point2d, Vector2d, XY } from \"./Point2dVector2d\";\r\nimport { XAndY } from \"./XYZProps\";\r\n\r\n/**\r\n * Helper object to access members of a Point2d[] in geometric calculations.\r\n * * The collection holds only a reference to the actual array.\r\n * * The actual array may be replaced by the user as needed.\r\n * * When replaced, there is no cached data to be updated.\r\n * @public\r\n*/\r\nexport class Point2dArrayCarrier extends IndexedXYCollection {\r\n /** reference to array being queried. */\r\n public data: Point2d[];\r\n /** CAPTURE caller supplied array ... */\r\n public constructor(data: Point2d[]) {\r\n super();\r\n this.data = data;\r\n }\r\n /** test if index is valid */\r\n public isValidIndex(index: number): boolean {\r\n return index >= 0 && index < this.data.length;\r\n }\r\n /**\r\n * Access by index, returning strongly typed Point2d\r\n * * This returns the xy value but NOT reference to the point in the \"carried\" array.\r\n * @param index index of point within the array\r\n * @param result caller-allocated destination\r\n * @returns undefined if the index is out of bounds\r\n */\r\n public override getPoint2dAtCheckedPointIndex(index: number, result?: Point2d): Point2d | undefined {\r\n if (this.isValidIndex(index)) {\r\n const source = this.data[index];\r\n return Point2d.create(source.x, source.y, result);\r\n }\r\n return undefined;\r\n }\r\n /**\r\n * Access by index, returning strongly typed Vector2d\r\n * @param index index of point within the array\r\n * @param result caller-allocated destination\r\n * @returns undefined if the index is out of bounds\r\n */\r\n public override getVector2dAtCheckedVectorIndex(index: number, result?: Vector2d): Vector2d | undefined {\r\n if (this.isValidIndex(index)) {\r\n const source = this.data[index];\r\n return Vector2d.create(source.x, source.y, result);\r\n }\r\n return undefined;\r\n }\r\n /**\r\n * Return a vector from the point at indexA to the point at indexB\r\n * @param indexA index of point within the array\r\n * @param indexB index of point within the array\r\n * @param result caller-allocated vector.\r\n * @returns undefined if either index is out of bounds\r\n */\r\n public override vectorIndexIndex(indexA: number, indexB: number, result?: Vector2d): Vector2d | undefined {\r\n if (this.isValidIndex(indexA) && this.isValidIndex(indexB))\r\n return Vector2d.createStartEnd(this.data[indexA], this.data[indexB], result);\r\n return undefined;\r\n }\r\n /**\r\n * Return a vector from given origin to point at indexB\r\n * @param origin origin for vector\r\n * @param indexB index of point within the array\r\n * @param result caller-allocated vector.\r\n * @returns undefined if index is out of bounds\r\n */\r\n public override vectorXAndYIndex(origin: XAndY, indexB: number, result?: Vector2d): Vector2d | undefined {\r\n if (this.isValidIndex(indexB))\r\n return Vector2d.createStartEnd(origin, this.data[indexB], result);\r\n return undefined;\r\n }\r\n\r\n /**\r\n * Return the cross product of vectors from origin to points at indexA and indexB\r\n * @param origin origin for vector\r\n * @param indexA index of first target within the array\r\n * @param indexB index of second target within the array\r\n * @param result caller-allocated vector.\r\n * @returns undefined if either index is out of bounds\r\n */\r\n public override crossProductXAndYIndexIndex(origin: XAndY, indexA: number, indexB: number): number | undefined {\r\n if (this.isValidIndex(indexA) && this.isValidIndex(indexB))\r\n return XY.crossProductToPoints(origin, this.data[indexA], this.data[indexB]);\r\n return undefined;\r\n }\r\n /**\r\n * Return the cross product of vectors from point at originIndex to points at indexA and indexB\r\n * @param originIndex index of origin\r\n * @param indexA index of first target within the array\r\n * @param indexB index of second target within the array\r\n * @param result caller-allocated vector.\r\n * @returns return true if indexA, indexB both valid\r\n */\r\n public override crossProductIndexIndexIndex(originIndex: number, indexA: number, indexB: number): number | undefined {\r\n if (this.isValidIndex(originIndex) && this.isValidIndex(indexA) && this.isValidIndex(indexB))\r\n return XY.crossProductToPoints(this.data[originIndex], this.data[indexA], this.data[indexB]);\r\n return undefined;\r\n }\r\n /** Read-only property for number of XYZ in the collection. */\r\n public override get length(): number {\r\n return this.data.length;\r\n }\r\n\r\n /**\r\n * Get x coordinate by point index, with no index checking\r\n * @param pointIndex index to access\r\n */\r\n public override getXAtUncheckedPointIndex(pointIndex: number): number {\r\n return this.data[pointIndex].x;\r\n }\r\n\r\n /**\r\n * Get y coordinate by point index, with no index checking\r\n * @param pointIndex index to access\r\n */\r\n public override getYAtUncheckedPointIndex(pointIndex: number): number {\r\n return this.data[pointIndex].y;\r\n }\r\n}\r\n"]}
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
import { BeJSONFunctions, PerpParallelOptions } from "../Geometry";
|
|
5
5
|
import { Angle } from "./Angle";
|
|
6
6
|
import { XAndY, XYProps } from "./XYZProps";
|
|
7
|
-
/**
|
|
7
|
+
/**
|
|
8
|
+
* Minimal object containing x,y and operations that are meaningful without change in both point and vector.
|
|
8
9
|
* * `XY` is not instantiable.
|
|
9
10
|
* * The derived (instantiable) classes are
|
|
10
11
|
* * `Point2d`
|
|
@@ -29,15 +30,15 @@ export declare class XY implements XAndY {
|
|
|
29
30
|
isAlmostEqual(other: XAndY, tol?: number): boolean;
|
|
30
31
|
/** Returns true if this and other have equal x,y parts within Geometry.smallMetricDistance. */
|
|
31
32
|
isAlmostEqualXY(x: number, y: number, tol?: number): boolean;
|
|
32
|
-
/**
|
|
33
|
+
/** Return a json array `[x,y]` */
|
|
33
34
|
toJSON(): XYProps;
|
|
34
|
-
/**
|
|
35
|
+
/** Return a json object `{x: 1, y:2}` */
|
|
35
36
|
toJSONXY(): XYProps;
|
|
36
37
|
/**
|
|
37
38
|
* Set x and y from a JSON input such as `[1,2]` or `{x:1, y:2}`
|
|
38
39
|
* * If no JSON input is provided, 0 would be used as default values for x and y.
|
|
39
40
|
* @param json the JSON input
|
|
40
|
-
|
|
41
|
+
*/
|
|
41
42
|
setFromJSON(json?: XYProps): void;
|
|
42
43
|
/** Return the distance from this point to other */
|
|
43
44
|
distance(other: XAndY): number;
|
|
@@ -45,17 +46,13 @@ export declare class XY implements XAndY {
|
|
|
45
46
|
distanceSquared(other: XAndY): number;
|
|
46
47
|
/** Return the largest absolute distance between corresponding components */
|
|
47
48
|
maxDiff(other: XAndY): number;
|
|
48
|
-
/**
|
|
49
|
-
* Return the x,y component corresponding to 0,1.
|
|
50
|
-
*/
|
|
49
|
+
/** Return the x,y component corresponding to 0,1 */
|
|
51
50
|
at(index: number): number;
|
|
52
|
-
/**
|
|
53
|
-
* Set value at index 0 or 1.
|
|
54
|
-
*/
|
|
51
|
+
/** Set value at index 0 or 1 */
|
|
55
52
|
setAt(index: number, value: number): void;
|
|
56
53
|
/** Return the index (0,1) of the x,y component with largest absolute value */
|
|
57
54
|
indexOfMaxAbs(): number;
|
|
58
|
-
/**
|
|
55
|
+
/** Returns true if the x,y components are both small by metric metric tolerance */
|
|
59
56
|
get isAlmostZero(): boolean;
|
|
60
57
|
/** Return the largest absolute value of any component */
|
|
61
58
|
maxAbs(): number;
|
|
@@ -63,15 +60,15 @@ export declare class XY implements XAndY {
|
|
|
63
60
|
magnitude(): number;
|
|
64
61
|
/** Return the squared magnitude of the vector. */
|
|
65
62
|
magnitudeSquared(): number;
|
|
66
|
-
/**
|
|
63
|
+
/** Returns true if the x,y components are exactly equal. */
|
|
67
64
|
isExactEqual(other: XAndY): boolean;
|
|
68
|
-
/**
|
|
65
|
+
/** Returns true if x,y match `other` within metric tolerance */
|
|
69
66
|
isAlmostEqualMetric(other: XAndY, distanceTol?: number): boolean;
|
|
70
67
|
/** Return a (full length) vector from this point to other */
|
|
71
68
|
vectorTo(other: XAndY, result?: Vector2d): Vector2d;
|
|
72
69
|
/** Return a unit vector from this point to other */
|
|
73
70
|
unitVectorTo(other: XAndY, result?: Vector2d): Vector2d | undefined;
|
|
74
|
-
/**
|
|
71
|
+
/** Cross product of vectors from origin to targets */
|
|
75
72
|
static crossProductToPoints(origin: XAndY, targetA: XAndY, targetB: XAndY): number;
|
|
76
73
|
}
|
|
77
74
|
/** 2D point with `x`,`y` as properties
|
|
@@ -80,7 +77,7 @@ export declare class XY implements XAndY {
|
|
|
80
77
|
export declare class Point2d extends XY implements BeJSONFunctions {
|
|
81
78
|
/** Constructor for Point2d */
|
|
82
79
|
constructor(x?: number, y?: number);
|
|
83
|
-
/**
|
|
80
|
+
/** Return a new Point2d with x,y coordinates from this. */
|
|
84
81
|
clone(result?: Point2d): Point2d;
|
|
85
82
|
/**
|
|
86
83
|
* Return a point (newly created unless result provided) with given x,y coordinates
|
|
@@ -93,20 +90,22 @@ export declare class Point2d extends XY implements BeJSONFunctions {
|
|
|
93
90
|
* Set x and y from a JSON input such as `[1,2]` or `{x:1, y:2}`
|
|
94
91
|
* * If no JSON input is provided, 0 would be used as default values for x and y.
|
|
95
92
|
* @param json the JSON input
|
|
96
|
-
|
|
93
|
+
*/
|
|
97
94
|
static fromJSON(json?: XYProps): Point2d;
|
|
98
95
|
/** Create (or optionally reuse) a Point2d from another object with fields x and y */
|
|
99
96
|
static createFrom(xy: XAndY | undefined, result?: Point2d): Point2d;
|
|
100
97
|
/** Create a Point2d with both coordinates zero. */
|
|
101
98
|
static createZero(result?: Point2d): Point2d;
|
|
102
|
-
/**
|
|
99
|
+
/**
|
|
100
|
+
* Starting at this point, move along vector by tangentFraction of the vector length, and then
|
|
103
101
|
* to the left by leftFraction of the perpendicular vector length.
|
|
104
102
|
* @param tangentFraction distance to move along the vector, as a fraction of vector
|
|
105
103
|
* @param leftFraction distance to move perpendicular to the vector, as a fraction of the rotated vector
|
|
106
104
|
* @param vector the other vector
|
|
107
105
|
*/
|
|
108
106
|
addForwardLeft(tangentFraction: number, leftFraction: number, vector: Vector2d): Point2d;
|
|
109
|
-
/**
|
|
107
|
+
/**
|
|
108
|
+
* Interpolate at tangentFraction between this instance and point, and then Move by leftFraction
|
|
110
109
|
* along the xy perpendicular of the vector between the points.
|
|
111
110
|
*/
|
|
112
111
|
forwardLeftInterpolate(tangentFraction: number, leftFraction: number, point: XAndY): Point2d;
|
|
@@ -138,7 +137,8 @@ export declare class Point2d extends XY implements BeJSONFunctions {
|
|
|
138
137
|
* @param target2 target of second vector
|
|
139
138
|
*/
|
|
140
139
|
crossProductToPoints(target1: XAndY, target2: XAndY): number;
|
|
141
|
-
/**
|
|
140
|
+
/**
|
|
141
|
+
* Return the fractional coordinate of the projection of this instance x,y onto the
|
|
142
142
|
* line from startPoint to endPoint.
|
|
143
143
|
* @param startPoint start point of line
|
|
144
144
|
* @param endPoint end point of line
|
|
@@ -146,7 +146,8 @@ export declare class Point2d extends XY implements BeJSONFunctions {
|
|
|
146
146
|
*/
|
|
147
147
|
fractionOfProjectionToLine(startPoint: Point2d, endPoint: Point2d, defaultFraction?: number): number;
|
|
148
148
|
}
|
|
149
|
-
/**
|
|
149
|
+
/**
|
|
150
|
+
* 2D vector with `x`,`y` as properties
|
|
150
151
|
* @public
|
|
151
152
|
*/
|
|
152
153
|
export declare class Vector2d extends XY implements BeJSONFunctions {
|
|
@@ -167,13 +168,13 @@ export declare class Vector2d extends XY implements BeJSONFunctions {
|
|
|
167
168
|
static unitY(scale?: number): Vector2d;
|
|
168
169
|
/** Return a Vector2d with components 0,0 */
|
|
169
170
|
static createZero(result?: Vector2d): Vector2d;
|
|
170
|
-
/**
|
|
171
|
+
/** Copy contents from another Point3d, Point2d, Vector2d, or Vector3d, or leading entries of Float64Array */
|
|
171
172
|
static createFrom(data: XAndY | Float64Array, result?: Vector2d): Vector2d;
|
|
172
173
|
/**
|
|
173
174
|
* Set x and y from a JSON input such as `[1,2]` or `{x:1, y:2}`
|
|
174
175
|
* * If no JSON input is provided, 0 would be used as default values for x and y.
|
|
175
176
|
* @param json the JSON input
|
|
176
|
-
|
|
177
|
+
*/
|
|
177
178
|
static fromJSON(json?: XYProps): Vector2d;
|
|
178
179
|
/** Return a new Vector2d from polar coordinates for radius and Angle from x axis */
|
|
179
180
|
static createPolar(r: number, theta: Angle): Vector2d;
|
|
@@ -188,7 +189,8 @@ export declare class Vector2d extends XY implements BeJSONFunctions {
|
|
|
188
189
|
* @param offset offset distance
|
|
189
190
|
*/
|
|
190
191
|
static createOffsetBisector(unitPerpA: Vector2d, unitPerpB: Vector2d, offset: number): Vector2d | undefined;
|
|
191
|
-
/**
|
|
192
|
+
/**
|
|
193
|
+
* Return a (new or optionally reused) vector which is `this` divided by `denominator`
|
|
192
194
|
* * return undefined if denominator is zero.
|
|
193
195
|
*/
|
|
194
196
|
safeDivideOrNull(denominator: number, result?: Vector2d): Vector2d | undefined;
|
|
@@ -200,7 +202,7 @@ export declare class Vector2d extends XY implements BeJSONFunctions {
|
|
|
200
202
|
* it's returning the length of the projection as a fraction of the target magnitude.
|
|
201
203
|
* @param target the target vector
|
|
202
204
|
* @param defaultFraction the returned value in case magnitude square of target vector is very small
|
|
203
|
-
|
|
205
|
+
*/
|
|
204
206
|
fractionOfProjectionToVector(target: Vector2d, defaultFraction?: number): number;
|
|
205
207
|
/** Return a new vector with components negated from this instance. */
|
|
206
208
|
negate(result?: Vector2d): Vector2d;
|
|
@@ -210,18 +212,19 @@ export declare class Vector2d extends XY implements BeJSONFunctions {
|
|
|
210
212
|
rotate90CWXY(result?: Vector2d): Vector2d;
|
|
211
213
|
/** Return a unit vector perpendicular to this instance. */
|
|
212
214
|
unitPerpendicularXY(result?: Vector2d): Vector2d;
|
|
213
|
-
/**
|
|
215
|
+
/** Return a new Vector2d rotated CCW by given angle */
|
|
214
216
|
rotateXY(angle: Angle, result?: Vector2d): Vector2d;
|
|
215
|
-
/**
|
|
217
|
+
/**
|
|
218
|
+
* Return a vector computed at fractional position between this vector and vectorB
|
|
216
219
|
* @param fraction fractional position. 0 is at `this`. 1 is at `vectorB`.
|
|
217
220
|
* True fractions are "between", negatives are "before this", beyond 1 is "beyond vectorB".
|
|
218
221
|
* @param vectorB second vector
|
|
219
222
|
* @param result optional preallocated result.
|
|
220
223
|
*/
|
|
221
224
|
interpolate(fraction: number, vectorB: Vector2d, result?: Vector2d): Vector2d;
|
|
222
|
-
/**
|
|
225
|
+
/** Return {this + vector}. */
|
|
223
226
|
plus(vector: XAndY, result?: Vector2d): Vector2d;
|
|
224
|
-
/**
|
|
227
|
+
/** Return {this - vector}. */
|
|
225
228
|
minus(vector: XAndY, result?: Vector2d): Vector2d;
|
|
226
229
|
/** Return {point + vector \* scalar} */
|
|
227
230
|
plusScaled(vector: XAndY, scaleFactor: number, result?: Vector2d): Vector2d;
|
|
@@ -231,21 +234,21 @@ export declare class Vector2d extends XY implements BeJSONFunctions {
|
|
|
231
234
|
plus3Scaled(vectorA: XAndY, scalarA: number, vectorB: XAndY, scalarB: number, vectorC: XAndY, scalarC: number, result?: Vector2d): Vector2d;
|
|
232
235
|
/** Return {this * scale} */
|
|
233
236
|
scale(scale: number, result?: Vector2d): Vector2d;
|
|
234
|
-
/**
|
|
237
|
+
/** Return a vector parallel to this but with specified length */
|
|
235
238
|
scaleToLength(length: number, result?: Vector2d): Vector2d | undefined;
|
|
236
|
-
/**
|
|
239
|
+
/** Return the dot product of this with vectorB */
|
|
237
240
|
dotProduct(vectorB: XAndY): number;
|
|
238
|
-
/**
|
|
241
|
+
/** Dot product with vector from pointA to pointB */
|
|
239
242
|
dotProductStartEnd(pointA: XAndY, pointB: XAndY): number;
|
|
240
|
-
/**
|
|
243
|
+
/** Vector cross product {this CROSS vectorB} */
|
|
241
244
|
crossProduct(vectorB: XAndY): number;
|
|
242
245
|
/**
|
|
243
|
-
*
|
|
246
|
+
* Return the radians (as a simple number, not strongly typed Angle) signed angle from this to vectorB.
|
|
244
247
|
* This is positive if the shortest turn is counterclockwise, negative if clockwise.
|
|
245
248
|
*/
|
|
246
249
|
radiansTo(vectorB: XAndY): number;
|
|
247
250
|
/**
|
|
248
|
-
*
|
|
251
|
+
* Return the (strongly typed) signed angle from this to vectorB.
|
|
249
252
|
* This is positive if the shortest turn is counterclockwise, negative if clockwise.
|
|
250
253
|
*/
|
|
251
254
|
angleTo(vectorB: XAndY): Angle;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Point2dVector2d.d.ts","sourceRoot":"","sources":["../../../src/geometry3d/Point2dVector2d.ts"],"names":[],"mappings":"AAKA;;GAEG;AAIH,OAAO,E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