@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
|
@@ -78,17 +78,19 @@ export declare class Transform implements BeJSONFunctions {
|
|
|
78
78
|
clone(result?: Transform): Transform;
|
|
79
79
|
/**
|
|
80
80
|
* Return a modified copy of `this` Transform so that its `matrix` part is rigid (`origin` part is untouched).
|
|
81
|
-
* *
|
|
81
|
+
* * @see [[Matrix3d.axisOrderCrossProductsInPlace]] documentation for details of how the matrix is modified to rigid.
|
|
82
82
|
*/
|
|
83
83
|
cloneRigid(axisOrder?: AxisOrder): Transform | undefined;
|
|
84
|
-
/** Create a Transform with the given `origin` and `matrix`. */
|
|
84
|
+
/** Create a Transform with the given `origin` and `matrix`. Inputs are captured, not cloned. */
|
|
85
85
|
static createRefs(origin: XYZ | undefined, matrix: Matrix3d, result?: Transform): Transform;
|
|
86
|
-
/** Create a Transform with complete contents given */
|
|
86
|
+
/** Create a Transform with complete contents given. `q` inputs make the matrix and `a` inputs make the origin */
|
|
87
87
|
static createRowValues(qxx: number, qxy: number, qxz: number, ax: number, qyx: number, qyy: number, qyz: number, ay: number, qzx: number, qzy: number, qzz: number, az: number, result?: Transform): Transform;
|
|
88
88
|
/** Create a Transform with all zeros */
|
|
89
89
|
static createZero(result?: Transform): Transform;
|
|
90
90
|
/**
|
|
91
91
|
* Create a Transform with translation provided by x,y,z parts.
|
|
92
|
+
* * Translation Transform maps any vector `v` to `v + p` where `p = (x,y,z)`
|
|
93
|
+
* * Visualization can be found at https://www.itwinjs.org/sandbox/SaeedTorabi/MoveCube
|
|
92
94
|
* @param x x part of translation
|
|
93
95
|
* @param y y part of translation
|
|
94
96
|
* @param z z part of translation
|
|
@@ -98,6 +100,8 @@ export declare class Transform implements BeJSONFunctions {
|
|
|
98
100
|
static createTranslationXYZ(x?: number, y?: number, z?: number, result?: Transform): Transform;
|
|
99
101
|
/**
|
|
100
102
|
* Create a Transform with specified `translation` part.
|
|
103
|
+
* * Translation Transform maps any vector `v` to `v + translation`
|
|
104
|
+
* * Visualization can be found at https://www.itwinjs.org/sandbox/SaeedTorabi/MoveCube
|
|
101
105
|
* @param translation x,y,z parts of the translation
|
|
102
106
|
* @param result optional pre-allocated Transform
|
|
103
107
|
* @returns new or updated transform
|
|
@@ -123,6 +127,7 @@ export declare class Transform implements BeJSONFunctions {
|
|
|
123
127
|
* local-to-world mapping.
|
|
124
128
|
* * This function is a closely related to `createFixedPointAndMatrix` whose point input is the fixed point
|
|
125
129
|
* of the world-to-world transformation.
|
|
130
|
+
* * If origin is `undefined`, (0,0,0) is used. If matrix is `undefined` the identity matrix is used.
|
|
126
131
|
*/
|
|
127
132
|
static createOriginAndMatrix(origin: XYZ | undefined, matrix: Matrix3d | undefined, result?: Transform): Transform;
|
|
128
133
|
/** Create a Transform using the given `origin` and columns of the `matrix`. If `undefined` zero is used. */
|
|
@@ -131,7 +136,7 @@ export declare class Transform implements BeJSONFunctions {
|
|
|
131
136
|
static createOriginAndMatrixColumns(origin: XYZ, vectorX: Vector3d, vectorY: Vector3d, vectorZ: Vector3d, result?: Transform): Transform;
|
|
132
137
|
/**
|
|
133
138
|
* Create a Transform such that its `matrix` part is rigid.
|
|
134
|
-
*
|
|
139
|
+
* @see [[Matrix3d.createRigidFromColumns]] for details of how the matrix is created to be rigid.
|
|
135
140
|
*/
|
|
136
141
|
static createRigidFromOriginAndColumns(origin: XYZ | undefined, vectorX: Vector3d, vectorY: Vector3d, axisOrder: AxisOrder, result?: Transform): Transform | undefined;
|
|
137
142
|
/**
|
|
@@ -141,14 +146,15 @@ export declare class Transform implements BeJSONFunctions {
|
|
|
141
146
|
*/
|
|
142
147
|
static createFixedPointAndMatrix(fixedPoint: XYAndZ | undefined, matrix: Matrix3d, result?: Transform): Transform;
|
|
143
148
|
/**
|
|
144
|
-
* Create a transform with the specified `matrix` and points `a` and `b`. The returned Transform
|
|
145
|
-
* point `p` to `M*(p-a) + b` (i.e., `Tp = M*(p-a) + b`) so
|
|
149
|
+
* Create a transform with the specified `matrix` and points `a` and `b`. The returned Transform maps
|
|
150
|
+
* point `p` to `M*(p-a) + b` (i.e., `Tp = M*(p-a) + b`), so maps `a` to 'b'.
|
|
146
151
|
*/
|
|
147
152
|
static createMatrixPickupPutdown(matrix: Matrix3d, a: Point3d, b: Point3d, result?: Transform): Transform;
|
|
148
153
|
/**
|
|
149
154
|
* Create a Transform which leaves the fixedPoint unchanged and scales everything else around it by
|
|
150
|
-
* a single scale factor. The returned Transform
|
|
155
|
+
* a single scale factor. The returned Transform maps a point `p` to `M*p + (f - M*f)`
|
|
151
156
|
* where `f` is the fixedPoint and M is the scale matrix (i.e., `Tp = M*(p-f) + f`).
|
|
157
|
+
* * Visualization can be found at https://www.itwinjs.org/sandbox/SaeedTorabi/ScaleCube
|
|
152
158
|
*/
|
|
153
159
|
static createScaleAboutPoint(fixedPoint: Point3d, scale: number, result?: Transform): Transform;
|
|
154
160
|
/**
|
|
@@ -172,35 +178,40 @@ export declare class Transform implements BeJSONFunctions {
|
|
|
172
178
|
*/
|
|
173
179
|
multiplyXYZ(x: number, y: number, z?: number, result?: Point3d): Point3d;
|
|
174
180
|
/**
|
|
175
|
-
* Multiply a specific row (component) of the
|
|
176
|
-
* at the same row. Return the result.
|
|
181
|
+
* Multiply a specific row (component) of the 3x4 instance times (x,y,z,1). Return the result.
|
|
177
182
|
*/
|
|
178
183
|
multiplyComponentXYZ(componentIndex: number, x: number, y: number, z?: number): number;
|
|
179
184
|
/**
|
|
180
|
-
* Multiply a specific row (component) of the
|
|
181
|
-
* at the same row times w. Return the result.
|
|
185
|
+
* Multiply a specific row (component) of the 3x4 instance times (x,y,z,w). Return the result.
|
|
182
186
|
*/
|
|
183
187
|
multiplyComponentXYZW(componentIndex: number, x: number, y: number, z: number, w: number): number;
|
|
184
188
|
/**
|
|
185
|
-
*
|
|
186
|
-
*
|
|
189
|
+
* Transform the homogeneous point. Return as a new `Point4d`, or in the pre-allocated result (if result is given).
|
|
190
|
+
* * If `p = (x,y,z)` then this method computes `Tp = M*p + o*w` and returns the `Point4d` formed by `Tp` in the
|
|
191
|
+
* first three coordinates, and `w` in the fourth.
|
|
192
|
+
* * Logically, this is multiplication by the 4x4 matrix formed from the 3x4 instance augmented with fourth row 0001.
|
|
187
193
|
*/
|
|
188
194
|
multiplyXYZW(x: number, y: number, z: number, w: number, result?: Point4d): Point4d;
|
|
189
195
|
/**
|
|
190
|
-
*
|
|
191
|
-
*
|
|
192
|
-
* (
|
|
196
|
+
* Transform the homogeneous point. Return as new `Float64Array` with size 4, or in the pre-allocated result (if
|
|
197
|
+
* result is given).
|
|
198
|
+
* * If `p = (x,y,z)` then this method computes `Tp = M*p + o*w` and returns the `Float64Array` formed by `Tp`
|
|
199
|
+
* in the first 3 numbers of the array and `w` as the fourth.
|
|
200
|
+
* * Logically, this is multiplication by the 4x4 matrix formed from the 3x4 instance augmented with fourth row 0001.
|
|
193
201
|
*/
|
|
194
202
|
multiplyXYZWToFloat64Array(x: number, y: number, z: number, w: number, result?: Float64Array): Float64Array;
|
|
195
203
|
/**
|
|
196
|
-
*
|
|
197
|
-
*
|
|
204
|
+
* * Transform the point. Return as new `Float64Array` with size 3, or in the pre-allocated result (if result is given).
|
|
205
|
+
* * If `p = (x,y,z)` then this method computes `Tp = M*p + o` and returns it as the first 3 elements of the array.
|
|
198
206
|
*/
|
|
199
207
|
multiplyXYZToFloat64Array(x: number, y: number, z: number, result?: Float64Array): Float64Array;
|
|
200
208
|
/**
|
|
201
|
-
*
|
|
202
|
-
*
|
|
203
|
-
*
|
|
209
|
+
* Multiply the homogeneous point by the transpose of `this` Transform. Return as a new `Point4d` or in the
|
|
210
|
+
* pre-allocated result (if result is given).
|
|
211
|
+
* * If `p = (x,y,z)` then this method computes `M^t*p` and returns it in the first three coordinates of the `Point4d`,
|
|
212
|
+
* and `o*p + w` in the fourth.
|
|
213
|
+
* * Logically, this is multiplication by the transpose of the 4x4 matrix formed from the 3x4 instance augmented with
|
|
214
|
+
* fourth row 0001.
|
|
204
215
|
*/
|
|
205
216
|
multiplyTransposeXYZW(x: number, y: number, z: number, w: number, result?: Point4d): Point4d;
|
|
206
217
|
/** For each point in the array, replace point by the transformed point (using `Tp = M*p + o`) */
|
|
@@ -208,25 +219,29 @@ export declare class Transform implements BeJSONFunctions {
|
|
|
208
219
|
/** For each point in the 2d array, replace point by the transformed point (using `Tp = M*p + o`) */
|
|
209
220
|
multiplyPoint3dArrayArrayInPlace(chains: Point3d[][]): void;
|
|
210
221
|
/**
|
|
211
|
-
*
|
|
212
|
-
* `p = MInverse
|
|
213
|
-
*
|
|
222
|
+
* Multiply the point by the inverse Transform.
|
|
223
|
+
* * If for a point `p` we have `Tp = M*p + o = q`, then `p = MInverse*(q - o) = TInverse q` so `TInverse`
|
|
224
|
+
* Transform has matrix part `MInverse` and origin part `-MInverse*o`.
|
|
214
225
|
* * Return as a new point or in the optional `result`.
|
|
215
226
|
* * Returns `undefined` if the `matrix` part if this Transform is singular.
|
|
216
227
|
*/
|
|
217
228
|
multiplyInversePoint3d(point: XYAndZ, result?: Point3d): Point3d | undefined;
|
|
218
229
|
/**
|
|
219
|
-
*
|
|
220
|
-
* `p =
|
|
221
|
-
*
|
|
230
|
+
* Multiply the homogenous point by the inverse Transform.
|
|
231
|
+
* * If for a point `p` we have `Tp = M*p + o = q`, then `p = MInverse*(q - o) = TInverse q` so `TInverse` Transform
|
|
232
|
+
* has matrix part `MInverse` and origin part `-MInverse*o`.
|
|
233
|
+
* * This method computes `TInverse p = MInverse*p - w*MInverse*o` and returns the `Point4d` formed by `TInverse*p`
|
|
234
|
+
* in the first three coordinates, and `w` in the fourth.
|
|
235
|
+
* * Logically, this is multiplication by the inverse of the 4x4 matrix formed from the 3x4 instance augmented with
|
|
236
|
+
* fourth row 0001. This is equivalent to the 4x4 matrix formed in similar fashion from the inverse of this instance.
|
|
222
237
|
* * Return as a new point or in the optional `result`.
|
|
223
238
|
* * Returns `undefined` if the `matrix` part if this Transform is singular.
|
|
224
239
|
*/
|
|
225
240
|
multiplyInversePoint4d(weightedPoint: Point4d, result?: Point4d): Point4d | undefined;
|
|
226
241
|
/**
|
|
227
|
-
*
|
|
228
|
-
* `p = MInverse
|
|
229
|
-
*
|
|
242
|
+
* Multiply the point by the inverse Transform.
|
|
243
|
+
* * If for a point `p` we have `Tp = M*p + o = q`, then `p = MInverse*(q - o) = TInverse q` so `TInverse` Transform
|
|
244
|
+
* has matrix part `MInverse` and origin part `-MInverse*o`.
|
|
230
245
|
* * Return as a new point or in the optional `result`.
|
|
231
246
|
* * Returns `undefined` if the `matrix` part if this Transform is singular.
|
|
232
247
|
*/
|
|
@@ -249,20 +264,19 @@ export declare class Transform implements BeJSONFunctions {
|
|
|
249
264
|
*/
|
|
250
265
|
static matchArrayLengths(source: any[], dest: any[], constructionFunction: () => any): number;
|
|
251
266
|
/**
|
|
252
|
-
*
|
|
253
|
-
*
|
|
254
|
-
*
|
|
255
|
-
* * If `
|
|
256
|
-
* * If `
|
|
267
|
+
* Multiply each point in the array by the inverse of `this` Transform.
|
|
268
|
+
* * For a transform `T = [M o]` the inverse transform `T' = [M' -M'o]` exists if and only if `M` has an inverse
|
|
269
|
+
* `M'`. Indeed, for any point `p`, we have `T'Tp = T'(Mp + o) = M'(Mp + o) - M'o = M'Mp + M'o - M'o = p.`
|
|
270
|
+
* * If `result` is given, resize it to match the input `points` array and update it with original points `p[]`.
|
|
271
|
+
* * If `result` is not given, return a new array.
|
|
257
272
|
* * Returns `undefined` if the `matrix` part if this Transform is singular.
|
|
258
273
|
*/
|
|
259
|
-
multiplyInversePoint3dArray(points: Point3d[],
|
|
274
|
+
multiplyInversePoint3dArray(points: Point3d[], result?: Point3d[]): Point3d[] | undefined;
|
|
260
275
|
/**
|
|
261
|
-
*
|
|
262
|
-
*
|
|
263
|
-
*
|
|
264
|
-
*
|
|
265
|
-
* * Returns `true` if the `matrix` part if this Transform is invertible and `false if singular.
|
|
276
|
+
* Multiply each point in the array by the inverse of `this` Transform in place.
|
|
277
|
+
* * For a transform `T = [M o]` the inverse transform `T' = [M' -M'o]` exists if and only if `M` has an inverse
|
|
278
|
+
* `M'`. Indeed, for any point `p`, we have `T'Tp = T'(Mp + o) = M'(Mp + o) - M'o = M'Mp + M'o - M'o = p.`
|
|
279
|
+
* * Returns `true` if the `matrix` part if this Transform is invertible and `false` if singular.
|
|
266
280
|
*/
|
|
267
281
|
multiplyInversePoint3dArrayInPlace(points: Point3d[]): boolean;
|
|
268
282
|
/**
|
|
@@ -297,71 +311,67 @@ export declare class Transform implements BeJSONFunctions {
|
|
|
297
311
|
/**
|
|
298
312
|
* Calculate `transformA * transformB` and store it into the calling instance (`this`).
|
|
299
313
|
* * **Note:** If `transformA = [A a]` and `transformB = [B b]` then `transformA * transformB` is defined as
|
|
300
|
-
* `[A*B Ab+a]`.
|
|
314
|
+
* `[A*B Ab+a]`.
|
|
315
|
+
* * @see [[multiplyTransformTransform]] documentation for math details.
|
|
301
316
|
* @param transformA first operand
|
|
302
317
|
* @param transformB second operand
|
|
303
318
|
*/
|
|
304
319
|
setMultiplyTransformTransform(transformA: Transform, transformB: Transform): void;
|
|
305
320
|
/**
|
|
306
321
|
* Multiply `this` Transform times `other` Transform.
|
|
307
|
-
* **Note:** If `this = [A a]` and `other = [B b]` then `this * other` is defined as [A*B Ab+a]
|
|
308
|
-
* That's because we create a 4x4 matrix for each Transform with the 3x3 `matrix` and `origin`
|
|
309
|
-
* as upper 3x4 part of a 4x4 matrix and 0001 as the final row. Then we multiply those two 4x4 matrixes:
|
|
322
|
+
* * **Note:** If `this = [A a]` and `other = [B b]` then `this * other` is defined as [A*B Ab+a] because:
|
|
310
323
|
* ```
|
|
311
324
|
* equation
|
|
312
325
|
* \begin{matrix}
|
|
313
|
-
* \text{
|
|
314
|
-
* \text{
|
|
326
|
+
* \text{this Transform with matrix part }\bold{A}\text{ and origin part }\bold{a} & \blockTransform{A}{a}\\
|
|
327
|
+
* \text{other Transform with matrix part }\bold{B}\text{ and origin part }\bold{b} & \blockTransform{B}{b} \\
|
|
315
328
|
* \text{product}& \blockTransform{A}{a}\blockTransform{B}{b}=\blockTransform{AB}{Ab + a}
|
|
316
329
|
* \end{matrix}
|
|
317
330
|
* ```
|
|
318
331
|
* @param other the 'other` Transform to be multiplied to `this` Transform.
|
|
319
|
-
* @param result optional preallocated result to reuse.
|
|
332
|
+
* @param result optional preallocated `result` to reuse.
|
|
320
333
|
*/
|
|
321
334
|
multiplyTransformTransform(other: Transform, result?: Transform): Transform;
|
|
322
335
|
/**
|
|
323
336
|
* Multiply `this` Transform times `other` Matrix3d (considered to be a Transform with 0 `origin`).
|
|
324
|
-
* **Note:** If `this = [A a]`, then
|
|
325
|
-
* Then `this * other` is defined as [A*B a]. That's because we create a 4x4 matrix for each Transform
|
|
326
|
-
* with the 3x3 `matrix` and `origin` as upper 3x4 part of a 4x4 matrix and 0001 as the final row. Then we
|
|
327
|
-
* multiply those two 4x4 matrixes:
|
|
337
|
+
* * **Note:** If `this = [A a]` and `other = [B 0]`, then `this * other` is defined as [A*B a] because:
|
|
328
338
|
* ```
|
|
329
339
|
* equation
|
|
330
340
|
* \begin{matrix}
|
|
331
|
-
* \text{
|
|
332
|
-
* \text{
|
|
341
|
+
* \text{this Transform with matrix part }\bold{A}\text{ and origin part }\bold{a} & \blockTransform{A}{a}\\
|
|
342
|
+
* \text{other matrix }\bold{B}\text{ promoted to block Transform} & \blockTransform{B}{0} \\
|
|
333
343
|
* \text{product}& \blockTransform{A}{a}\blockTransform{B}{0}=\blockTransform{AB}{a}
|
|
334
344
|
* \end{matrix}
|
|
335
345
|
* ```
|
|
336
346
|
* @param other the `other` Matrix3d to be multiplied to `this` Transform.
|
|
337
|
-
* @param result optional preallocated result to reuse.
|
|
347
|
+
* @param result optional preallocated `result` to reuse.
|
|
338
348
|
*/
|
|
339
349
|
multiplyTransformMatrix3d(other: Matrix3d, result?: Transform): Transform;
|
|
340
350
|
/**
|
|
341
|
-
* Return the
|
|
351
|
+
* Return the range of the transformed corners.
|
|
342
352
|
* * The 8 corners are transformed individually.
|
|
343
353
|
* * **Note:** Suppose you have a geometry, a range box around that geometry, and your Transform is a rotation.
|
|
344
354
|
* If you rotate the range box and recompute a new range box around the rotated range box, then the new range
|
|
345
355
|
* box will have a larger volume than the original range box. However, if you rotate the geometry itself and
|
|
346
356
|
* then recompute the range box, it will be a tighter range box around the rotated geometry. `multiplyRange`
|
|
347
|
-
* function creates the larger range box because it only has access to the range box and the geometry itself.
|
|
357
|
+
* function creates the larger range box because it only has access to the range box and not the geometry itself.
|
|
348
358
|
*/
|
|
349
359
|
multiplyRange(range: Range3d, result?: Range3d): Range3d;
|
|
350
360
|
/**
|
|
351
361
|
* Return a Transform which is the inverse of `this` Transform.
|
|
352
|
-
* * If `transform = [M o]` then `transformInverse = [MInverse MInverse
|
|
362
|
+
* * If `transform = [M o]` then `transformInverse = [MInverse -MInverse*o]`
|
|
353
363
|
* * Return `undefined` if this Transform's matrix is singular.
|
|
354
364
|
*/
|
|
355
365
|
inverse(result?: Transform): Transform | undefined;
|
|
356
366
|
/**
|
|
357
|
-
* Initialize 2 Transforms
|
|
358
|
-
*
|
|
359
|
-
* @param min the min corner of the box
|
|
360
|
-
* @param max the max corner of the box
|
|
361
|
-
* @param npcToGlobal maps
|
|
362
|
-
*
|
|
363
|
-
* @param globalToNpc maps
|
|
364
|
-
*
|
|
367
|
+
* Initialize 2 Transforms that map between the unit box (specified by 000 and 111) and the range box specified
|
|
368
|
+
* by the input points.
|
|
369
|
+
* @param min the min corner of the range box
|
|
370
|
+
* @param max the max corner of the range box
|
|
371
|
+
* @param npcToGlobal maps NPC coordinates into range box coordinates. Specifically, maps 000 to `min` and maps
|
|
372
|
+
* 111 to `max`. This Transform is the inverse of `globalToNpc`. Object created by caller, re-initialized here.
|
|
373
|
+
* @param globalToNpc maps range box coordinates into NPC coordinates. Specifically, maps `min` to 000 and maps
|
|
374
|
+
* `max` to 111. This Transform is the inverse of `npcToGlobal`. Object created by caller, re-initialized here.
|
|
365
375
|
* * NPC stands for `Normalized Projection Coordinate`
|
|
366
376
|
*/
|
|
367
377
|
static initFromRange(min: Point3d, max: Point3d, npcToGlobal?: Transform, globalToNpc?: Transform): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Transform.d.ts","sourceRoot":"","sources":["../../../src/geometry3d/Transform.ts"],"names":[],"mappings":"AAKA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,eAAe,EAAY,MAAM,aAAa,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAE3D;;;;;;;;;;;;;;;;GAgBG;AACH,qBAAa,SAAU,YAAW,eAAe;IAC/C,OAAO,CAAC,OAAO,CAAM;IACrB,OAAO,CAAC,OAAO,CAAW;IAE1B,OAAO;IAIP,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,CAAY;IACrC,sEAAsE;IACtE,WAAkB,QAAQ,IAAI,SAAS,CAMtC;IACD,gEAAgE;IACzD,MAAM,IAAI,QAAQ,CAAC,IAAI,CAAC;IAK/B;;;OAGG;IACI,OAAO,CAAC,KAAK,EAAE,SAAS;IAI/B,4CAA4C;IACrC,WAAW;IAIlB;;;;;;;OAOG;IACI,WAAW,CAAC,IAAI,CAAC,EAAE,cAAc,GAAG,SAAS,GAAG,IAAI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