@kitware/vtk.js 30.5.3 → 30.6.1
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/Common/Core/Base64.d.ts +2 -2
- package/Common/Core/CellArray.d.ts +45 -42
- package/Common/Core/DataArray.d.ts +465 -449
- package/Common/Core/Endian.d.ts +5 -5
- package/Common/Core/HalfFloat.d.ts +3 -3
- package/Common/Core/ImageHelper.d.ts +11 -5
- package/Common/Core/LookupTable.d.ts +260 -257
- package/Common/Core/Math.d.ts +461 -270
- package/Common/Core/MatrixBuilder.d.ts +117 -112
- package/Common/Core/Points.d.ts +114 -106
- package/Common/Core/PriorityQueue.d.ts +34 -30
- package/Common/Core/ProgressHandler.d.ts +44 -39
- package/Common/Core/ScalarsToColors/Constants.d.ts +9 -9
- package/Common/Core/ScalarsToColors.d.ts +351 -326
- package/Common/Core/StringArray.d.ts +94 -89
- package/Common/Core/URLExtract.d.ts +9 -6
- package/Common/Core/VariantArray.d.ts +94 -89
- package/Common/DataModel/AbstractPointLocator.d.ts +18 -18
- package/Common/DataModel/Box.d.ts +60 -52
- package/Common/DataModel/CardinalSpline1D.d.ts +59 -34
- package/Common/DataModel/Cell.d.ts +70 -67
- package/Common/DataModel/Collection.d.ts +100 -84
- package/Common/DataModel/Cone.d.ts +30 -27
- package/Common/DataModel/Cylinder.d.ts +122 -112
- package/Common/DataModel/DataSet/Constants.d.ts +9 -9
- package/Common/DataModel/DataSet.d.ts +38 -35
- package/Common/DataModel/DataSetAttributes/FieldData.d.ts +217 -206
- package/Common/DataModel/DataSetAttributes.d.ts +420 -415
- package/Common/DataModel/EdgeLocator.d.ts +82 -79
- package/Common/DataModel/ITKHelper.d.ts +33 -22
- package/Common/DataModel/ImageData.d.ts +362 -340
- package/Common/DataModel/IncrementalOctreeNode.d.ts +242 -242
- package/Common/DataModel/IncrementalOctreePointLocator.d.ts +16 -16
- package/Common/DataModel/KochanekSpline1D.d.ts +60 -36
- package/Common/DataModel/Line.d.ts +104 -83
- package/Common/DataModel/Locator.d.ts +10 -10
- package/Common/DataModel/PiecewiseFunction.d.ts +215 -199
- package/Common/DataModel/Plane.d.ts +255 -223
- package/Common/DataModel/PointSet.d.ts +32 -28
- package/Common/DataModel/PolyData/Constants.d.ts +2 -2
- package/Common/DataModel/PolyData.d.ts +143 -140
- package/Common/DataModel/PolyLine.d.ts +51 -28
- package/Common/DataModel/Polygon.d.ts +34 -33
- package/Common/DataModel/SelectionNode/Constants.d.ts +18 -18
- package/Common/DataModel/SelectionNode.d.ts +62 -56
- package/Common/DataModel/Sphere.d.ts +74 -72
- package/Common/DataModel/Spline1D.d.ts +60 -40
- package/Common/DataModel/Spline3D/Constants.d.ts +3 -3
- package/Common/DataModel/Spline3D.d.ts +27 -22
- package/Common/Transform/LandmarkTransform.d.ts +67 -64
- package/Common/Transform/Transform.d.ts +148 -126
- package/Filters/General/AppendPolyData.d.ts +43 -37
- package/Filters/General/ClipClosedSurface.d.ts +41 -41
- package/Filters/General/ContourTriangulator.d.ts +38 -38
- package/Filters/General/ImageCropFilter.d.ts +48 -44
- package/Filters/General/ImageDataOutlineFilter.d.ts +41 -37
- package/Filters/General/ImageOutlineFilter.d.ts +41 -37
- package/Filters/General/ImageSliceFilter.d.ts +38 -34
- package/Filters/General/ImageStreamline.d.ts +120 -93
- package/Filters/General/LineFilter.d.ts +18 -15
- package/Filters/General/OutlineFilter.d.ts +19 -16
- package/Filters/General/TriangleFilter.d.ts +23 -19
- package/Filters/General/TubeFilter.d.ts +194 -188
- package/Filters/Sources/Arrow2DSource.d.ts +151 -143
- package/Filters/Sources/ArrowSource.d.ts +148 -140
- package/Filters/Sources/CircleSource.d.ts +138 -130
- package/Filters/Sources/ConeSource.d.ts +167 -159
- package/Filters/Sources/CubeSource.d.ts +198 -181
- package/Filters/Sources/Cursor3D.d.ts +171 -164
- package/Filters/Sources/CylinderSource.d.ts +173 -166
- package/Filters/Sources/LineSource.d.ts +100 -92
- package/Filters/Sources/PlaneSource.d.ts +211 -203
- package/Filters/Sources/PointSource.d.ts +90 -82
- package/Filters/Sources/SphereSource.d.ts +171 -164
- package/Filters/Texture/TextureMapToPlane.d.ts +213 -208
- package/Filters/Texture/TextureMapToSphere.d.ts +77 -72
- package/IO/Core/DataAccessHelper/HtmlDataAccessHelper.d.ts +18 -5
- package/IO/Core/DataAccessHelper/HttpDataAccessHelper.d.ts +18 -5
- package/IO/Core/DataAccessHelper/JSZipDataAccessHelper.d.ts +19 -6
- package/IO/Core/DataAccessHelper/LiteHttpDataAccessHelper.d.ts +18 -5
- package/IO/Core/DataAccessHelper.d.ts +36 -22
- package/IO/Core/HttpDataSetReader.d.ts +279 -249
- package/IO/Core/HttpSceneLoader.d.ts +92 -87
- package/IO/Core/ImageStream/DefaultProtocol.d.ts +27 -20
- package/IO/Core/ImageStream/ViewStream.d.ts +7 -7
- package/IO/Core/ImageStream.d.ts +52 -47
- package/IO/Core/WSLinkClient.d.ts +12 -6
- package/IO/Geometry/DracoReader.d.ts +106 -88
- package/IO/Geometry/PLYReader.d.ts +92 -75
- package/IO/Geometry/PLYWriter.d.ts +163 -148
- package/IO/Geometry/STLReader.d.ts +92 -77
- package/IO/Geometry/STLWriter.d.ts +50 -42
- package/IO/Misc/ElevationReader.d.ts +155 -139
- package/IO/Misc/ITKImageReader.d.ts +58 -50
- package/IO/Misc/ITKPolyDataReader.d.ts +58 -50
- package/IO/Misc/JSONNucleoReader.d.ts +74 -57
- package/IO/Misc/JSONReader.d.ts +78 -72
- package/IO/Misc/MTLReader.d.ts +143 -130
- package/IO/Misc/OBJReader.d.ts +129 -110
- package/IO/Misc/PDBReader.d.ts +109 -93
- package/IO/XML/XMLImageDataReader.d.ts +31 -19
- package/IO/XML/XMLPolyDataReader.d.ts +31 -19
- package/IO/XML/XMLReader.d.ts +141 -105
- package/Imaging/Core/AbstractImageInterpolator/Constants.d.ts +2 -2
- package/Imaging/Core/ImageReslice.d.ts +231 -173
- package/Interaction/Style/InteractorStyleHMDXR.d.ts +7 -3
- package/Interaction/Style/InteractorStyleImage.d.ts +5 -4
- package/Interaction/Style/InteractorStyleTrackballCamera.d.ts +17 -6
- package/Interaction/Widgets/OrientationMarkerWidget/Constants.d.ts +5 -5
- package/Interaction/Widgets/OrientationMarkerWidget.d.ts +146 -142
- package/Proxy/Core/ViewProxy.d.ts +1 -1
- package/Proxy/Representations/GeometryRepresentationProxy.d.ts +28 -27
- package/Proxy/Representations/ResliceRepresentationProxy.d.ts +0 -1
- package/Rendering/Core/AbstractImageMapper.d.ts +125 -113
- package/Rendering/Core/AbstractMapper.d.ts +58 -52
- package/Rendering/Core/AbstractMapper3D.d.ts +32 -25
- package/Rendering/Core/AbstractPicker.d.ts +91 -88
- package/Rendering/Core/Actor.d.ts +117 -114
- package/Rendering/Core/Actor2D.d.ts +101 -98
- package/Rendering/Core/AnnotatedCubeActor.d.ts +58 -53
- package/Rendering/Core/AxesActor.d.ts +10 -4
- package/Rendering/Core/Camera.d.ts +739 -727
- package/Rendering/Core/CellPicker.d.ts +87 -77
- package/Rendering/Core/ColorTransferFunction/Constants.d.ts +2 -2
- package/Rendering/Core/ColorTransferFunction/CssFilters.d.ts +39 -13
- package/Rendering/Core/ColorTransferFunction.d.ts +3 -6
- package/Rendering/Core/Coordinate/Constants.d.ts +1 -1
- package/Rendering/Core/Coordinate.d.ts +154 -150
- package/Rendering/Core/Follower.d.ts +52 -47
- package/Rendering/Core/Glyph3DMapper/Constants.d.ts +8 -8
- package/Rendering/Core/Glyph3DMapper.d.ts +152 -149
- package/Rendering/Core/ImageArrayMapper.d.ts +237 -213
- package/Rendering/Core/ImageCPRMapper/Constants.d.ts +4 -4
- package/Rendering/Core/ImageCPRMapper.d.ts +424 -392
- package/Rendering/Core/ImageMapper/Constants.d.ts +8 -8
- package/Rendering/Core/ImageMapper.d.ts +292 -268
- package/Rendering/Core/ImageProperty/Constants.d.ts +3 -3
- package/Rendering/Core/ImageProperty.d.ts +204 -197
- package/Rendering/Core/ImageResliceMapper/Constants.d.ts +5 -5
- package/Rendering/Core/ImageResliceMapper.d.ts +235 -210
- package/Rendering/Core/ImageSlice.d.ts +142 -136
- package/Rendering/Core/InteractorObserver.d.ts +41 -32
- package/Rendering/Core/Light.d.ts +321 -318
- package/Rendering/Core/Mapper/Constants.d.ts +14 -14
- package/Rendering/Core/Mapper.d.ts +539 -512
- package/Rendering/Core/Mapper2D.d.ts +342 -330
- package/Rendering/Core/Picker.d.ts +114 -106
- package/Rendering/Core/PixelSpaceCallbackMapper.d.ts +56 -40
- package/Rendering/Core/PointPicker.d.ts +42 -37
- package/Rendering/Core/Prop/Constants.d.ts +3 -3
- package/Rendering/Core/Prop.d.ts +274 -274
- package/Rendering/Core/Prop3D.d.ts +259 -257
- package/Rendering/Core/Property/Constants.d.ts +12 -12
- package/Rendering/Core/Property.d.ts +535 -531
- package/Rendering/Core/Property2D/Constants.d.ts +1 -1
- package/Rendering/Core/Property2D.d.ts +114 -109
- package/Rendering/Core/RenderWindow.d.ts +193 -191
- package/Rendering/Core/RenderWindowInteractor/Constants.d.ts +19 -19
- package/Rendering/Core/RenderWindowInteractor.d.ts +1335 -1219
- package/Rendering/Core/Renderer.d.ts +677 -663
- package/Rendering/Core/ScalarBarActor.d.ts +333 -322
- package/Rendering/Core/Skybox.d.ts +45 -42
- package/Rendering/Core/SphereMapper.d.ts +49 -44
- package/Rendering/Core/StickMapper.d.ts +49 -44
- package/Rendering/Core/Texture.d.ts +87 -80
- package/Rendering/Core/Viewport.d.ts +229 -222
- package/Rendering/Core/Volume.d.ts +78 -73
- package/Rendering/Core/VolumeMapper/Constants.d.ts +11 -11
- package/Rendering/Core/VolumeMapper.d.ts +295 -285
- package/Rendering/Core/VolumeProperty/Constants.d.ts +19 -19
- package/Rendering/Core/VolumeProperty.d.ts +375 -365
- package/Rendering/Misc/CanvasView.d.ts +148 -145
- package/Rendering/Misc/FullScreenRenderWindow.d.ts +111 -108
- package/Rendering/Misc/GenericRenderWindow.d.ts +69 -65
- package/Rendering/Misc/RenderWindowWithControlBar.d.ts +46 -39
- package/Rendering/Misc/SynchronizableRenderWindow/ObjectManager.d.ts +49 -29
- package/Rendering/Misc/SynchronizableRenderWindow.d.ts +51 -35
- package/Rendering/Misc/TextureLODsDownloader.d.ts +110 -106
- package/Rendering/OpenGL/BufferObject.d.ts +3 -2
- package/Rendering/OpenGL/RenderWindow.d.ts +456 -405
- package/Rendering/OpenGL/Texture.d.ts +66 -14
- package/Rendering/SceneGraph/RenderPass.d.ts +88 -83
- package/Rendering/SceneGraph/ViewNode.d.ts +150 -146
- package/Rendering/SceneGraph/ViewNodeFactory.d.ts +17 -12
- package/Rendering/WebXR/RenderWindowHelper/Constants.d.ts +5 -5
- package/Rendering/WebXR/RenderWindowHelper.d.ts +54 -49
- package/Widgets/Core/AbstractWidget.d.ts +30 -24
- package/Widgets/Core/AbstractWidgetFactory.d.ts +53 -33
- package/Widgets/Core/WidgetManager/Constants.d.ts +4 -4
- package/Widgets/Core/WidgetManager.d.ts +21 -15
- package/Widgets/Core/WidgetState.d.ts +11 -7
- package/Widgets/Manipulators/AbstractManipulator.d.ts +224 -191
- package/Widgets/Manipulators/AbstractManipulator.js +20 -0
- package/Widgets/Manipulators/CPRManipulator.js +3 -3
- package/Widgets/Manipulators/LineManipulator.d.ts +33 -21
- package/Widgets/Manipulators/LineManipulator.js +1 -1
- package/Widgets/Manipulators/PickerManipulator.d.ts +22 -18
- package/Widgets/Manipulators/PickerManipulator.js +2 -2
- package/Widgets/Manipulators/PlaneManipulator.d.ts +33 -22
- package/Widgets/Manipulators/PlaneManipulator.js +1 -1
- package/Widgets/Manipulators/TrackballManipulator.d.ts +40 -26
- package/Widgets/Manipulators/TrackballManipulator.js +2 -2
- package/Widgets/Representations/WidgetRepresentation.d.ts +62 -51
- package/Widgets/Widgets3D/AngleWidget/behavior.js +14 -7
- package/Widgets/Widgets3D/ImageCroppingWidget/behavior.js +19 -6
- package/Widgets/Widgets3D/ImplicitPlaneWidget.js +38 -8
- package/Widgets/Widgets3D/InteractiveOrientationWidget.d.ts +25 -10
- package/Widgets/Widgets3D/LabelWidget/behavior.js +14 -10
- package/Widgets/Widgets3D/LineWidget/behavior.js +22 -12
- package/Widgets/Widgets3D/PolyLineWidget/behavior.js +16 -4
- package/Widgets/Widgets3D/PolyLineWidget.js +0 -5
- package/Widgets/Widgets3D/ResliceCursorWidget/Constants.d.ts +26 -7
- package/Widgets/Widgets3D/ResliceCursorWidget/behavior.d.ts +13 -12
- package/Widgets/Widgets3D/ResliceCursorWidget.d.ts +26 -15
- package/Widgets/Widgets3D/SeedWidget/behavior.js +1 -7
- package/Widgets/Widgets3D/SeedWidget.d.ts +2 -2
- package/Widgets/Widgets3D/ShapeWidget/behavior.js +9 -8
- package/Widgets/Widgets3D/SphereWidget/behavior.js +20 -29
- package/Widgets/Widgets3D/SphereWidget.d.ts +5 -3
- package/Widgets/Widgets3D/SplineWidget/behavior.js +16 -4
- package/interfaces.d.ts +243 -243
- package/package.json +3 -3
package/Common/Core/Math.d.ts
CHANGED
|
@@ -1,4 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
Bounds,
|
|
3
|
+
Extent,
|
|
4
|
+
HSVColor,
|
|
5
|
+
RGBAColor,
|
|
6
|
+
RGBColor,
|
|
7
|
+
Matrix,
|
|
8
|
+
Matrix3x3,
|
|
9
|
+
Range,
|
|
10
|
+
Vector2,
|
|
11
|
+
Vector3,
|
|
12
|
+
Vector4,
|
|
13
|
+
} from './../../types';
|
|
2
14
|
|
|
3
15
|
/**
|
|
4
16
|
*
|
|
@@ -13,7 +25,12 @@ export function createArray(size?: number): number[];
|
|
|
13
25
|
* @param {Number} row1 index of first row to swap with the other.
|
|
14
26
|
* @param {Number} row2 index of second row to swap with the other.
|
|
15
27
|
*/
|
|
16
|
-
export function swapRowsMatrix_nxn(
|
|
28
|
+
export function swapRowsMatrix_nxn(
|
|
29
|
+
matrix: number[],
|
|
30
|
+
n: number,
|
|
31
|
+
row1: number,
|
|
32
|
+
row2: number
|
|
33
|
+
): void;
|
|
17
34
|
|
|
18
35
|
/**
|
|
19
36
|
* Given two columns indices, swap the two columns of a nxn matrix
|
|
@@ -22,7 +39,12 @@ export function swapRowsMatrix_nxn(matrix: number[], n: number, row1: number, ro
|
|
|
22
39
|
* @param {Number} column1 index of first col to swap with the other.
|
|
23
40
|
* @param {Number} column2 index of second col to swap with the other.
|
|
24
41
|
*/
|
|
25
|
-
|
|
42
|
+
export function swapColumnsMatrix_nxn(
|
|
43
|
+
matrix: number[],
|
|
44
|
+
n: number,
|
|
45
|
+
column1: number,
|
|
46
|
+
column2: number
|
|
47
|
+
): void;
|
|
26
48
|
|
|
27
49
|
/**
|
|
28
50
|
* Get the number π.
|
|
@@ -97,7 +119,11 @@ export function arrayMax(arr: number[], offset: number, stride: number): number;
|
|
|
97
119
|
* @param {Number} offset The offset.
|
|
98
120
|
* @param {Number} stride The stride.
|
|
99
121
|
*/
|
|
100
|
-
export function arrayRange(
|
|
122
|
+
export function arrayRange(
|
|
123
|
+
arr: number[],
|
|
124
|
+
offset: number,
|
|
125
|
+
stride: number
|
|
126
|
+
): number[];
|
|
101
127
|
|
|
102
128
|
/**
|
|
103
129
|
* Gives the exponent of the lowest power of two not less than x.
|
|
@@ -197,8 +223,8 @@ export function subtract(a: Vector3, b: Vector3, out: Vector3): Vector3;
|
|
|
197
223
|
|
|
198
224
|
/**
|
|
199
225
|
*
|
|
200
|
-
* @param {Vector3} vec
|
|
201
|
-
* @param {Number} scalar
|
|
226
|
+
* @param {Vector3} vec
|
|
227
|
+
* @param {Number} scalar
|
|
202
228
|
* @example
|
|
203
229
|
* ```js
|
|
204
230
|
* vec[3] * scalar => vec[3]
|
|
@@ -208,8 +234,8 @@ export function multiplyScalar(vec: Vector3, scalar: number): Vector3;
|
|
|
208
234
|
|
|
209
235
|
/**
|
|
210
236
|
*
|
|
211
|
-
* @param {Vector2} vec
|
|
212
|
-
* @param {Number} scalar
|
|
237
|
+
* @param {Vector2} vec
|
|
238
|
+
* @param {Number} scalar
|
|
213
239
|
* @example
|
|
214
240
|
* ```js
|
|
215
241
|
* vec[3] * scalar => vec[3]
|
|
@@ -220,7 +246,7 @@ export function multiplyScalar2D(vec: Vector2, scalar: number): Vector2;
|
|
|
220
246
|
/**
|
|
221
247
|
*
|
|
222
248
|
* @param {Vector3} a
|
|
223
|
-
* @param {Vector3} b
|
|
249
|
+
* @param {Vector3} b
|
|
224
250
|
* @param {Number} scalar
|
|
225
251
|
* @param {Vector3} out
|
|
226
252
|
* @example
|
|
@@ -228,20 +254,30 @@ export function multiplyScalar2D(vec: Vector2, scalar: number): Vector2;
|
|
|
228
254
|
* a[3] + b[3] * scalar => out[3]
|
|
229
255
|
* ```
|
|
230
256
|
*/
|
|
231
|
-
export function multiplyAccumulate(
|
|
257
|
+
export function multiplyAccumulate(
|
|
258
|
+
a: Vector3,
|
|
259
|
+
b: Vector3,
|
|
260
|
+
scalar: number,
|
|
261
|
+
out: Vector3
|
|
262
|
+
): Vector3;
|
|
232
263
|
|
|
233
264
|
/**
|
|
234
265
|
*
|
|
235
266
|
* @param {Vector2} a
|
|
236
267
|
* @param {Vector2} b
|
|
237
|
-
* @param {Number} scalar
|
|
268
|
+
* @param {Number} scalar
|
|
238
269
|
* @param {Vector2} out
|
|
239
270
|
* @example
|
|
240
271
|
* ```js
|
|
241
272
|
* a[2] + b[2] * scalar => out[2]
|
|
242
273
|
* ```
|
|
243
274
|
*/
|
|
244
|
-
export function multiplyAccumulate2D(
|
|
275
|
+
export function multiplyAccumulate2D(
|
|
276
|
+
a: Vector2,
|
|
277
|
+
b: Vector2,
|
|
278
|
+
scalar: number,
|
|
279
|
+
out: Vector2
|
|
280
|
+
): Vector2;
|
|
245
281
|
|
|
246
282
|
/**
|
|
247
283
|
*
|
|
@@ -272,8 +308,8 @@ export function cross(x: Vector3, y: Vector3, out: Vector3): Vector3;
|
|
|
272
308
|
|
|
273
309
|
/**
|
|
274
310
|
*
|
|
275
|
-
* @param {Number[]} x
|
|
276
|
-
* @param {Number} n
|
|
311
|
+
* @param {Number[]} x
|
|
312
|
+
* @param {Number} n
|
|
277
313
|
*/
|
|
278
314
|
export function norm(x: number[], n: number): number;
|
|
279
315
|
|
|
@@ -290,7 +326,12 @@ export function normalize(x: Vector3): number;
|
|
|
290
326
|
* @param {Vector3} z The third vector.
|
|
291
327
|
* @param {Number} theta
|
|
292
328
|
*/
|
|
293
|
-
export function perpendiculars(
|
|
329
|
+
export function perpendiculars(
|
|
330
|
+
x: Vector3,
|
|
331
|
+
y: Vector3,
|
|
332
|
+
z: Vector3,
|
|
333
|
+
theta: number
|
|
334
|
+
): void;
|
|
294
335
|
|
|
295
336
|
/**
|
|
296
337
|
*
|
|
@@ -298,7 +339,11 @@ export function perpendiculars(x: Vector3, y: Vector3, z: Vector3, theta: number
|
|
|
298
339
|
* @param {Vector3} b
|
|
299
340
|
* @param {Vector3} projection
|
|
300
341
|
*/
|
|
301
|
-
export function projectVector(
|
|
342
|
+
export function projectVector(
|
|
343
|
+
a: Vector3,
|
|
344
|
+
b: Vector3,
|
|
345
|
+
projection: Vector3
|
|
346
|
+
): boolean;
|
|
302
347
|
|
|
303
348
|
/**
|
|
304
349
|
*
|
|
@@ -314,7 +359,11 @@ export function dot2D(x: Vector2, y: Vector2): number;
|
|
|
314
359
|
* @param {Vector2} b The second 2D vector.
|
|
315
360
|
* @param {Vector2} projection The projection 2D vector.
|
|
316
361
|
*/
|
|
317
|
-
export function projectVector2D(
|
|
362
|
+
export function projectVector2D(
|
|
363
|
+
a: Vector2,
|
|
364
|
+
b: Vector2,
|
|
365
|
+
projection: Vector2
|
|
366
|
+
): boolean;
|
|
318
367
|
|
|
319
368
|
/**
|
|
320
369
|
* Compute distance squared between two points p1 and p2.
|
|
@@ -330,7 +379,6 @@ export function distance2BetweenPoints(x: Vector3, y: Vector3): number;
|
|
|
330
379
|
*/
|
|
331
380
|
export function angleBetweenVectors(v1: Vector3, v2: Vector3): number;
|
|
332
381
|
|
|
333
|
-
|
|
334
382
|
/**
|
|
335
383
|
* Signed angle between v1 and v2 with regards to plane defined by normal vN.
|
|
336
384
|
* angle between v1 and v2 with regards to plane defined by normal vN.Signed
|
|
@@ -338,10 +386,13 @@ export function angleBetweenVectors(v1: Vector3, v2: Vector3): number;
|
|
|
338
386
|
* vN.t3(mat_3x3, in_3, out_3)
|
|
339
387
|
* @param {Vector3} v1 The first 3D vector.
|
|
340
388
|
* @param {Vector3} v2 The second 3D vector.
|
|
341
|
-
* @param {Vector3} vN
|
|
389
|
+
* @param {Vector3} vN
|
|
342
390
|
*/
|
|
343
|
-
export function signedAngleBetweenVectors(
|
|
344
|
-
|
|
391
|
+
export function signedAngleBetweenVectors(
|
|
392
|
+
v1: Vector3,
|
|
393
|
+
v2: Vector3,
|
|
394
|
+
vN: Vector3
|
|
395
|
+
): number;
|
|
345
396
|
|
|
346
397
|
/**
|
|
347
398
|
* Compute the amplitude of a Gaussian function with mean=0 and specified variance.
|
|
@@ -349,7 +400,11 @@ export function signedAngleBetweenVectors(v1: Vector3, v2: Vector3, vN: Vector3)
|
|
|
349
400
|
* @param {Number} variance The variance value.
|
|
350
401
|
* @param {Number} position The position value.
|
|
351
402
|
*/
|
|
352
|
-
export function gaussianAmplitude(
|
|
403
|
+
export function gaussianAmplitude(
|
|
404
|
+
mean: number,
|
|
405
|
+
variance: number,
|
|
406
|
+
position: number
|
|
407
|
+
): number;
|
|
353
408
|
|
|
354
409
|
/**
|
|
355
410
|
* Compute the amplitude of an unnormalized Gaussian function with mean=0 and
|
|
@@ -358,7 +413,11 @@ export function gaussianAmplitude(mean: number, variance: number, position: numb
|
|
|
358
413
|
* @param {Number} variance The variance value.
|
|
359
414
|
* @param {Number} position The position value.
|
|
360
415
|
*/
|
|
361
|
-
export function gaussianWeight(
|
|
416
|
+
export function gaussianWeight(
|
|
417
|
+
mean: number,
|
|
418
|
+
variance: number,
|
|
419
|
+
position: number
|
|
420
|
+
): number;
|
|
362
421
|
|
|
363
422
|
/**
|
|
364
423
|
* Outer product of two 2-vectors.
|
|
@@ -382,98 +441,144 @@ export function normalize2D(x: Vector2): number;
|
|
|
382
441
|
|
|
383
442
|
/**
|
|
384
443
|
*
|
|
385
|
-
* @param {Number[]} args
|
|
444
|
+
* @param {Number[]} args
|
|
386
445
|
*/
|
|
387
446
|
export function determinant2x2(args: number[]): number;
|
|
388
447
|
|
|
389
448
|
/**
|
|
390
449
|
* Fill a 4x4 matrix with the given row vectors
|
|
391
|
-
* @param {Vector4} row0
|
|
450
|
+
* @param {Vector4} row0
|
|
392
451
|
* @param {Vector4} row1
|
|
393
452
|
* @param {Vector4} row2
|
|
394
453
|
* @param {Vector4} row3
|
|
395
454
|
* @param {Matrix} mat
|
|
396
455
|
*/
|
|
397
|
-
export function rowsToMat4(
|
|
456
|
+
export function rowsToMat4(
|
|
457
|
+
row0: Vector4,
|
|
458
|
+
row1: Vector4,
|
|
459
|
+
row2: Vector4,
|
|
460
|
+
row3: Vector4,
|
|
461
|
+
mat: Matrix
|
|
462
|
+
): Matrix;
|
|
398
463
|
|
|
399
464
|
/**
|
|
400
465
|
* Fill a 4x4 matrix with the given column vectors
|
|
401
|
-
* @param {Vector4} column0
|
|
466
|
+
* @param {Vector4} column0
|
|
402
467
|
* @param {Vector4} column1
|
|
403
468
|
* @param {Vector4} column2
|
|
404
469
|
* @param {Vector4} column3
|
|
405
470
|
* @param {Matrix} mat
|
|
406
471
|
*/
|
|
407
|
-
export function columnsToMat4(
|
|
472
|
+
export function columnsToMat4(
|
|
473
|
+
column0: Vector4,
|
|
474
|
+
column1: Vector4,
|
|
475
|
+
column2: Vector4,
|
|
476
|
+
column3: Vector4,
|
|
477
|
+
mat: Matrix
|
|
478
|
+
): Matrix;
|
|
408
479
|
|
|
409
|
-
|
|
480
|
+
/**
|
|
410
481
|
* Fill a 3x3 matrix with the given row vectors
|
|
411
|
-
* @param {Vector3} row0
|
|
482
|
+
* @param {Vector3} row0
|
|
412
483
|
* @param {Vector3} row1
|
|
413
484
|
* @param {Vector3} row2
|
|
414
485
|
* @param {Matrix} mat
|
|
415
486
|
*/
|
|
416
|
-
export function rowsToMat3(
|
|
487
|
+
export function rowsToMat3(
|
|
488
|
+
row0: Vector3,
|
|
489
|
+
row1: Vector3,
|
|
490
|
+
row2: Vector3,
|
|
491
|
+
mat: Matrix
|
|
492
|
+
): Matrix;
|
|
417
493
|
|
|
418
|
-
|
|
494
|
+
/**
|
|
419
495
|
* Fill a 3x3 matrix with the given column vectors
|
|
420
|
-
* @param {Vector3} column0
|
|
496
|
+
* @param {Vector3} column0
|
|
421
497
|
* @param {Vector3} column1
|
|
422
498
|
* @param {Vector3} column2
|
|
423
499
|
* @param {Matrix} mat
|
|
424
500
|
*/
|
|
425
|
-
export function columnsToMat3(
|
|
501
|
+
export function columnsToMat3(
|
|
502
|
+
column0: Vector3,
|
|
503
|
+
column1: Vector3,
|
|
504
|
+
column2: Vector3,
|
|
505
|
+
mat: Matrix
|
|
506
|
+
): Matrix;
|
|
426
507
|
|
|
427
508
|
/**
|
|
428
509
|
* LU Factorization of a 3x3 matrix.
|
|
429
|
-
* @param {Matrix3x3} mat_3x3
|
|
430
|
-
* @param {Vector3} index_3
|
|
510
|
+
* @param {Matrix3x3} mat_3x3
|
|
511
|
+
* @param {Vector3} index_3
|
|
431
512
|
*/
|
|
432
513
|
export function LUFactor3x3(mat_3x3: Matrix3x3, index_3: Vector3): void;
|
|
433
514
|
|
|
434
515
|
/**
|
|
435
516
|
* LU back substitution for a 3x3 matrix.
|
|
436
|
-
* @param {Matrix3x3} mat_3x3
|
|
437
|
-
* @param {Vector3} index_3
|
|
438
|
-
* @param {Vector3} x_3
|
|
517
|
+
* @param {Matrix3x3} mat_3x3
|
|
518
|
+
* @param {Vector3} index_3
|
|
519
|
+
* @param {Vector3} x_3
|
|
439
520
|
*/
|
|
440
|
-
export function LUSolve3x3(
|
|
521
|
+
export function LUSolve3x3(
|
|
522
|
+
mat_3x3: Matrix3x3,
|
|
523
|
+
index_3: Vector3,
|
|
524
|
+
x_3: Vector3
|
|
525
|
+
): void;
|
|
441
526
|
|
|
442
527
|
/**
|
|
443
528
|
* Solve mat_3x3y_3 = x_3 for y and place the result in y.
|
|
444
|
-
* @param {Matrix3x3} mat_3x3
|
|
445
|
-
* @param {Vector3} x_3
|
|
446
|
-
* @param {Vector3} y_3
|
|
529
|
+
* @param {Matrix3x3} mat_3x3
|
|
530
|
+
* @param {Vector3} x_3
|
|
531
|
+
* @param {Vector3} y_3
|
|
447
532
|
*/
|
|
448
|
-
export function linearSolve3x3(
|
|
533
|
+
export function linearSolve3x3(
|
|
534
|
+
mat_3x3: Matrix3x3,
|
|
535
|
+
x_3: Vector3,
|
|
536
|
+
y_3: Vector3
|
|
537
|
+
): void;
|
|
449
538
|
|
|
450
539
|
/**
|
|
451
540
|
*
|
|
452
|
-
* @param {Matrix3x3} mat_3x3
|
|
453
|
-
* @param {Vector3} in_3
|
|
454
|
-
* @param {Vector3} out_3
|
|
541
|
+
* @param {Matrix3x3} mat_3x3
|
|
542
|
+
* @param {Vector3} in_3
|
|
543
|
+
* @param {Vector3} out_3
|
|
455
544
|
*/
|
|
456
|
-
export function multiply3x3_vect3(
|
|
545
|
+
export function multiply3x3_vect3(
|
|
546
|
+
mat_3x3: Matrix3x3,
|
|
547
|
+
in_3: Vector3,
|
|
548
|
+
out_3: Vector3
|
|
549
|
+
): void;
|
|
457
550
|
|
|
458
551
|
/**
|
|
459
552
|
*
|
|
460
|
-
* @param {Matrix3x3} a_3x3
|
|
461
|
-
* @param {Matrix3x3} b_3x3
|
|
462
|
-
* @param {Matrix3x3} out_3x3
|
|
553
|
+
* @param {Matrix3x3} a_3x3
|
|
554
|
+
* @param {Matrix3x3} b_3x3
|
|
555
|
+
* @param {Matrix3x3} out_3x3
|
|
463
556
|
*/
|
|
464
|
-
export function multiply3x3_mat3(
|
|
557
|
+
export function multiply3x3_mat3(
|
|
558
|
+
a_3x3: Matrix3x3,
|
|
559
|
+
b_3x3: Matrix3x3,
|
|
560
|
+
out_3x3: Matrix3x3
|
|
561
|
+
): void;
|
|
465
562
|
|
|
466
563
|
/**
|
|
467
564
|
* Multiply two matrices.
|
|
468
|
-
* @param {Matrix} a
|
|
469
|
-
* @param {Matrix} b
|
|
470
|
-
* @param {Number} rowA
|
|
471
|
-
* @param {Number} colA
|
|
472
|
-
* @param {Number} rowB
|
|
473
|
-
* @param {Number} colB
|
|
474
|
-
* @param {Matrix} outRowAColB
|
|
475
|
-
*/
|
|
476
|
-
export function multiplyMatrix(
|
|
565
|
+
* @param {Matrix} a
|
|
566
|
+
* @param {Matrix} b
|
|
567
|
+
* @param {Number} rowA
|
|
568
|
+
* @param {Number} colA
|
|
569
|
+
* @param {Number} rowB
|
|
570
|
+
* @param {Number} colB
|
|
571
|
+
* @param {Matrix} outRowAColB
|
|
572
|
+
*/
|
|
573
|
+
export function multiplyMatrix(
|
|
574
|
+
a: Matrix,
|
|
575
|
+
b: Matrix,
|
|
576
|
+
rowA: number,
|
|
577
|
+
colA: number,
|
|
578
|
+
rowB: number,
|
|
579
|
+
colB: number,
|
|
580
|
+
outRowAColB: Matrix
|
|
581
|
+
): void;
|
|
477
582
|
|
|
478
583
|
/**
|
|
479
584
|
* Transpose a 3x3 matrix.
|
|
@@ -533,9 +638,12 @@ export function determinant3x3(mat_3x3: Matrix3x3): number;
|
|
|
533
638
|
/**
|
|
534
639
|
*
|
|
535
640
|
* @param {Vector4} quat_4
|
|
536
|
-
* @param {Matrix3x3} mat_3x3
|
|
641
|
+
* @param {Matrix3x3} mat_3x3
|
|
537
642
|
*/
|
|
538
|
-
export function quaternionToMatrix3x3(
|
|
643
|
+
export function quaternionToMatrix3x3(
|
|
644
|
+
quat_4: Vector4,
|
|
645
|
+
mat_3x3: Matrix3x3
|
|
646
|
+
): void;
|
|
539
647
|
|
|
540
648
|
/**
|
|
541
649
|
* Returns true if elements of both arrays are equals.
|
|
@@ -547,89 +655,118 @@ export function areEquals(a: number[], b: number[], eps?: number): boolean;
|
|
|
547
655
|
|
|
548
656
|
/**
|
|
549
657
|
*
|
|
550
|
-
* @param {Number} num
|
|
551
|
-
* @param {Number} [digits]
|
|
658
|
+
* @param {Number} num
|
|
659
|
+
* @param {Number} [digits]
|
|
552
660
|
*/
|
|
553
661
|
export function roundNumber(num: number, digits?: number): number;
|
|
554
662
|
|
|
555
663
|
/**
|
|
556
664
|
*
|
|
557
|
-
* @param {Vector3} vector
|
|
558
|
-
* @param {Vector3} [out]
|
|
559
|
-
* @param {Number} [digits]
|
|
665
|
+
* @param {Vector3} vector
|
|
666
|
+
* @param {Vector3} [out]
|
|
667
|
+
* @param {Number} [digits]
|
|
560
668
|
*/
|
|
561
|
-
export function roundVector(
|
|
669
|
+
export function roundVector(
|
|
670
|
+
vector: Vector3,
|
|
671
|
+
out?: Vector3,
|
|
672
|
+
digits?: number
|
|
673
|
+
): Vector3;
|
|
562
674
|
|
|
563
675
|
/**
|
|
564
|
-
* Jacobi iteration for the solution of eigenvectors/eigenvalues. Input matrix a is modified (the upper triangle is filled with zeros)
|
|
565
|
-
* @param {Matrix} a real symetric nxn matrix
|
|
566
|
-
* @param {Number} n matrix size
|
|
567
|
-
* @param {Number[]} w vector of size n to store eigenvalues (stored in decreasing order)
|
|
568
|
-
* @param {Number[]} v matrix of size nxn to store eigenvectors (stored in decreasing order, normalized)
|
|
569
|
-
*/
|
|
676
|
+
* Jacobi iteration for the solution of eigenvectors/eigenvalues. Input matrix a is modified (the upper triangle is filled with zeros)
|
|
677
|
+
* @param {Matrix} a real symetric nxn matrix
|
|
678
|
+
* @param {Number} n matrix size
|
|
679
|
+
* @param {Number[]} w vector of size n to store eigenvalues (stored in decreasing order)
|
|
680
|
+
* @param {Number[]} v matrix of size nxn to store eigenvectors (stored in decreasing order, normalized)
|
|
681
|
+
*/
|
|
570
682
|
export function jacobiN(a: Matrix, n: number, w: number[], v: number[]): number;
|
|
571
683
|
|
|
572
684
|
/**
|
|
573
685
|
*
|
|
574
|
-
* @param {Matrix3x3} mat_3x3
|
|
575
|
-
* @param {Vector4} quat_4
|
|
686
|
+
* @param {Matrix3x3} mat_3x3
|
|
687
|
+
* @param {Vector4} quat_4
|
|
576
688
|
*/
|
|
577
|
-
export function matrix3x3ToQuaternion(
|
|
689
|
+
export function matrix3x3ToQuaternion(
|
|
690
|
+
mat_3x3: Matrix3x3,
|
|
691
|
+
quat_4: Vector4
|
|
692
|
+
): void;
|
|
578
693
|
|
|
579
694
|
/**
|
|
580
695
|
*
|
|
581
|
-
* @param {Vector4} quat_1
|
|
582
|
-
* @param {Vector4} quat_2
|
|
583
|
-
* @param {Vector4} quat_out
|
|
696
|
+
* @param {Vector4} quat_1
|
|
697
|
+
* @param {Vector4} quat_2
|
|
698
|
+
* @param {Vector4} quat_out
|
|
584
699
|
*/
|
|
585
|
-
export function multiplyQuaternion(
|
|
700
|
+
export function multiplyQuaternion(
|
|
701
|
+
quat_1: Vector4,
|
|
702
|
+
quat_2: Vector4,
|
|
703
|
+
quat_out: Vector4
|
|
704
|
+
): void;
|
|
586
705
|
|
|
587
706
|
/**
|
|
588
707
|
*
|
|
589
|
-
* @param {Matrix3x3} a_3x3
|
|
590
|
-
* @param {Matrix3x3} out_3x3
|
|
708
|
+
* @param {Matrix3x3} a_3x3
|
|
709
|
+
* @param {Matrix3x3} out_3x3
|
|
591
710
|
*/
|
|
592
711
|
export function orthogonalize3x3(a_3x3: Matrix3x3, out_3x3: Matrix3x3): void;
|
|
593
712
|
|
|
594
713
|
/**
|
|
595
714
|
*
|
|
596
|
-
* @param {Matrix3x3} a_3x3
|
|
597
|
-
* @param {Vector3} w_3
|
|
598
|
-
* @param {Matrix3x3} v_3x3
|
|
715
|
+
* @param {Matrix3x3} a_3x3
|
|
716
|
+
* @param {Vector3} w_3
|
|
717
|
+
* @param {Matrix3x3} v_3x3
|
|
599
718
|
*/
|
|
600
|
-
export function diagonalize3x3(
|
|
719
|
+
export function diagonalize3x3(
|
|
720
|
+
a_3x3: Matrix3x3,
|
|
721
|
+
w_3: Vector3,
|
|
722
|
+
v_3x3: Matrix3x3
|
|
723
|
+
): void;
|
|
601
724
|
|
|
602
725
|
/**
|
|
603
726
|
*
|
|
604
|
-
* @param {Matrix3x3} a_3x3
|
|
605
|
-
* @param {Matrix3x3} u_3x3
|
|
606
|
-
* @param {Vector3} w_3
|
|
607
|
-
* @param {Matrix3x3} vT_3x3
|
|
727
|
+
* @param {Matrix3x3} a_3x3
|
|
728
|
+
* @param {Matrix3x3} u_3x3
|
|
729
|
+
* @param {Vector3} w_3
|
|
730
|
+
* @param {Matrix3x3} vT_3x3
|
|
608
731
|
*/
|
|
609
|
-
export function singularValueDecomposition3x3(
|
|
732
|
+
export function singularValueDecomposition3x3(
|
|
733
|
+
a_3x3: Matrix3x3,
|
|
734
|
+
u_3x3: Matrix3x3,
|
|
735
|
+
w_3: Vector3,
|
|
736
|
+
vT_3x3: Matrix3x3
|
|
737
|
+
): void;
|
|
610
738
|
|
|
611
739
|
/**
|
|
612
740
|
*
|
|
613
|
-
* @param {Matrix} A
|
|
614
|
-
* @param {Number[]} index
|
|
615
|
-
* @param {Number} size
|
|
741
|
+
* @param {Matrix} A
|
|
742
|
+
* @param {Number[]} index
|
|
743
|
+
* @param {Number} size
|
|
616
744
|
*/
|
|
617
|
-
export function luFactorLinearSystem(
|
|
745
|
+
export function luFactorLinearSystem(
|
|
746
|
+
A: Matrix,
|
|
747
|
+
index: number[],
|
|
748
|
+
size: number
|
|
749
|
+
): number;
|
|
618
750
|
|
|
619
751
|
/**
|
|
620
752
|
*
|
|
621
|
-
* @param {Matrix} A
|
|
622
|
-
* @param {Number[]} index
|
|
623
|
-
* @param {Number[]} x
|
|
624
|
-
* @param {Number} size
|
|
753
|
+
* @param {Matrix} A
|
|
754
|
+
* @param {Number[]} index
|
|
755
|
+
* @param {Number[]} x
|
|
756
|
+
* @param {Number} size
|
|
625
757
|
*/
|
|
626
|
-
export function luSolveLinearSystem(
|
|
758
|
+
export function luSolveLinearSystem(
|
|
759
|
+
A: Matrix,
|
|
760
|
+
index: number[],
|
|
761
|
+
x: number[],
|
|
762
|
+
size: number
|
|
763
|
+
): void;
|
|
627
764
|
|
|
628
765
|
/**
|
|
629
766
|
*
|
|
630
|
-
* @param {Matrix} A
|
|
631
|
-
* @param {Number[]} x
|
|
632
|
-
* @param {Number} size
|
|
767
|
+
* @param {Matrix} A
|
|
768
|
+
* @param {Number[]} x
|
|
769
|
+
* @param {Number} size
|
|
633
770
|
*/
|
|
634
771
|
export function solveLinearSystem(A: Matrix, x: number[], size: number): number;
|
|
635
772
|
|
|
@@ -638,24 +775,30 @@ export function solveLinearSystem(A: Matrix, x: number[], size: number): number;
|
|
|
638
775
|
* @param {Matrix} A The input matrix. It is modified during the inversion.
|
|
639
776
|
* @param {Matrix} AI The output inverse matrix. Can be the same as input matrix.
|
|
640
777
|
* @param {Number} [size] The square size of the matrix to invert : 4 for a 4x4
|
|
641
|
-
* @param {Number[]} [index]
|
|
642
|
-
* @param {Number[]} [column]
|
|
778
|
+
* @param {Number[]} [index]
|
|
779
|
+
* @param {Number[]} [column]
|
|
643
780
|
* @return AI on success, null otherwise
|
|
644
781
|
*/
|
|
645
|
-
export function invertMatrix(
|
|
782
|
+
export function invertMatrix(
|
|
783
|
+
A: Matrix,
|
|
784
|
+
AI: Matrix,
|
|
785
|
+
size?: number,
|
|
786
|
+
index?: number[],
|
|
787
|
+
column?: number[]
|
|
788
|
+
): Matrix | null;
|
|
646
789
|
|
|
647
790
|
/**
|
|
648
791
|
*
|
|
649
|
-
* @param {Matrix} A
|
|
650
|
-
* @param {Number} size
|
|
792
|
+
* @param {Matrix} A
|
|
793
|
+
* @param {Number} size
|
|
651
794
|
*/
|
|
652
795
|
export function estimateMatrixCondition(A: Matrix, size: number): number;
|
|
653
796
|
|
|
654
797
|
/**
|
|
655
798
|
*
|
|
656
|
-
* @param {Matrix3x3} a_3x3
|
|
657
|
-
* @param {Number[]} w
|
|
658
|
-
* @param {Number[]} v
|
|
799
|
+
* @param {Matrix3x3} a_3x3
|
|
800
|
+
* @param {Number[]} w
|
|
801
|
+
* @param {Number[]} v
|
|
659
802
|
*/
|
|
660
803
|
export function jacobi(a_3x3: Matrix3x3, w: number[], v: number[]): number;
|
|
661
804
|
|
|
@@ -668,12 +811,17 @@ export function jacobi(a_3x3: Matrix3x3, w: number[], v: number[]): number;
|
|
|
668
811
|
* by xOrder, M' dimension is xOrder by yOrder. M' should be pre-allocated. All
|
|
669
812
|
* matrices are row major. The resultant matrix M' should be pre-multiplied to
|
|
670
813
|
* X' to get 0', or transposed and then post multiplied to X to get 0
|
|
671
|
-
* @param {Number} numberOfSamples
|
|
672
|
-
* @param {Matrix} xt
|
|
673
|
-
* @param {Number} xOrder
|
|
674
|
-
* @param {Matrix} mt
|
|
814
|
+
* @param {Number} numberOfSamples
|
|
815
|
+
* @param {Matrix} xt
|
|
816
|
+
* @param {Number} xOrder
|
|
817
|
+
* @param {Matrix} mt
|
|
675
818
|
*/
|
|
676
|
-
export function solveHomogeneousLeastSquares(
|
|
819
|
+
export function solveHomogeneousLeastSquares(
|
|
820
|
+
numberOfSamples: number,
|
|
821
|
+
xt: Matrix,
|
|
822
|
+
xOrder: number,
|
|
823
|
+
mt: Matrix
|
|
824
|
+
): number;
|
|
677
825
|
|
|
678
826
|
/**
|
|
679
827
|
* Solves for the least squares best fit matrix for the equation X'M' = Y'. Uses
|
|
@@ -686,20 +834,28 @@ export function solveHomogeneousLeastSquares(numberOfSamples: number, xt: Matrix
|
|
|
686
834
|
* Y==0, and if so, invokes SolveHomogeneousLeastSquares. For better performance
|
|
687
835
|
* when the system is known not to be homogeneous, invoke with
|
|
688
836
|
* checkHomogeneous=0.
|
|
689
|
-
* @param {Number} numberOfSamples
|
|
690
|
-
* @param {Matrix} xt
|
|
691
|
-
* @param {Number} xOrder
|
|
692
|
-
* @param {Matrix} yt
|
|
693
|
-
* @param {Number} yOrder
|
|
694
|
-
* @param {Matrix} mt
|
|
695
|
-
* @param {Boolean} [checkHomogeneous]
|
|
696
|
-
*/
|
|
697
|
-
export function solveLeastSquares(
|
|
837
|
+
* @param {Number} numberOfSamples
|
|
838
|
+
* @param {Matrix} xt
|
|
839
|
+
* @param {Number} xOrder
|
|
840
|
+
* @param {Matrix} yt
|
|
841
|
+
* @param {Number} yOrder
|
|
842
|
+
* @param {Matrix} mt
|
|
843
|
+
* @param {Boolean} [checkHomogeneous]
|
|
844
|
+
*/
|
|
845
|
+
export function solveLeastSquares(
|
|
846
|
+
numberOfSamples: number,
|
|
847
|
+
xt: Matrix,
|
|
848
|
+
xOrder: number,
|
|
849
|
+
yt: Matrix,
|
|
850
|
+
yOrder: number,
|
|
851
|
+
mt: Matrix,
|
|
852
|
+
checkHomogeneous?: boolean
|
|
853
|
+
): number;
|
|
698
854
|
|
|
699
855
|
/**
|
|
700
856
|
*
|
|
701
|
-
* @param {String} hexStr
|
|
702
|
-
* @param {Number[]} [outFloatArray]
|
|
857
|
+
* @param {String} hexStr
|
|
858
|
+
* @param {Number[]} [outFloatArray]
|
|
703
859
|
*/
|
|
704
860
|
export function hex2float(hexStr: string, outFloatArray?: number[]): number[];
|
|
705
861
|
|
|
@@ -719,21 +875,21 @@ export function hsv2rgb(hsv: HSVColor, rgb: RGBColor): void;
|
|
|
719
875
|
|
|
720
876
|
/**
|
|
721
877
|
*
|
|
722
|
-
* @param {Vector3} lab
|
|
723
|
-
* @param {Vector3} xyz
|
|
878
|
+
* @param {Vector3} lab
|
|
879
|
+
* @param {Vector3} xyz
|
|
724
880
|
*/
|
|
725
881
|
export function lab2xyz(lab: Vector3, xyz: Vector3): void;
|
|
726
882
|
|
|
727
883
|
/**
|
|
728
884
|
*
|
|
729
|
-
* @param {Vector3} xyz
|
|
730
|
-
* @param {Vector3} lab
|
|
885
|
+
* @param {Vector3} xyz
|
|
886
|
+
* @param {Vector3} lab
|
|
731
887
|
*/
|
|
732
888
|
export function xyz2lab(xyz: Vector3, lab: Vector3): void;
|
|
733
889
|
|
|
734
890
|
/**
|
|
735
891
|
*
|
|
736
|
-
* @param {Vector3} xyz
|
|
892
|
+
* @param {Vector3} xyz
|
|
737
893
|
* @param {RGBColor} rgb An Array of the RGB color.
|
|
738
894
|
*/
|
|
739
895
|
export function xyz2rgb(xyz: Vector3, rgb: RGBColor): void;
|
|
@@ -741,20 +897,20 @@ export function xyz2rgb(xyz: Vector3, rgb: RGBColor): void;
|
|
|
741
897
|
/**
|
|
742
898
|
*
|
|
743
899
|
* @param {RGBColor} rgb An Array of the RGB color.
|
|
744
|
-
* @param {Vector3} xyz
|
|
900
|
+
* @param {Vector3} xyz
|
|
745
901
|
*/
|
|
746
902
|
export function rgb2xyz(rgb: RGBColor, xyz: Vector3): void;
|
|
747
903
|
|
|
748
904
|
/**
|
|
749
905
|
*
|
|
750
|
-
* @param {RGBColor} rgb
|
|
751
|
-
* @param {Vector3} lab
|
|
906
|
+
* @param {RGBColor} rgb
|
|
907
|
+
* @param {Vector3} lab
|
|
752
908
|
*/
|
|
753
909
|
export function rgb2lab(rgb: RGBColor, lab: Vector3): void;
|
|
754
910
|
|
|
755
911
|
/**
|
|
756
912
|
*
|
|
757
|
-
* @param {Vector3} lab
|
|
913
|
+
* @param {Vector3} lab
|
|
758
914
|
* @param {RGBColor} rgb An Array of the RGB color.
|
|
759
915
|
*/
|
|
760
916
|
export function lab2rgb(lab: Vector3, rgb: RGBColor): void;
|
|
@@ -778,7 +934,11 @@ export function areBoundsInitialized(bounds: Bounds): boolean;
|
|
|
778
934
|
* @param {Bounds} bounds Output array that hold bounds, optionally empty.
|
|
779
935
|
* @deprecated please use vtkBoundingBox.addPoints(vtkBoundingBox.reset([]), points)
|
|
780
936
|
*/
|
|
781
|
-
export function computeBoundsFromPoints(
|
|
937
|
+
export function computeBoundsFromPoints(
|
|
938
|
+
point1: Vector3,
|
|
939
|
+
point2: Vector3,
|
|
940
|
+
bounds: Bounds
|
|
941
|
+
): Bounds;
|
|
782
942
|
|
|
783
943
|
/**
|
|
784
944
|
* Clamp some value against a range.
|
|
@@ -786,7 +946,11 @@ export function computeBoundsFromPoints(point1: Vector3, point2: Vector3, bounds
|
|
|
786
946
|
* @param {Number} minValue The minimum value.
|
|
787
947
|
* @param {Number} maxValue The maximum value.
|
|
788
948
|
*/
|
|
789
|
-
export function clampValue(
|
|
949
|
+
export function clampValue(
|
|
950
|
+
value: number,
|
|
951
|
+
minValue: number,
|
|
952
|
+
maxValue: number
|
|
953
|
+
): number;
|
|
790
954
|
|
|
791
955
|
/**
|
|
792
956
|
* Clamp some vector against a range.
|
|
@@ -795,19 +959,24 @@ export function clampValue(value: number, minValue: number, maxValue: number): n
|
|
|
795
959
|
* @param {Vector3} maxVector The maximum vector.
|
|
796
960
|
* @param {Vector3} out The output vector.
|
|
797
961
|
*/
|
|
798
|
-
export function clampVector(
|
|
962
|
+
export function clampVector(
|
|
963
|
+
vector: Vector3,
|
|
964
|
+
minVector: Vector3,
|
|
965
|
+
maxVector: Vector3,
|
|
966
|
+
out: Vector3
|
|
967
|
+
): Vector3;
|
|
799
968
|
|
|
800
969
|
/**
|
|
801
970
|
*
|
|
802
|
-
* @param {Vector3} vector
|
|
803
|
-
* @param {Vector3} out
|
|
971
|
+
* @param {Vector3} vector
|
|
972
|
+
* @param {Vector3} out
|
|
804
973
|
*/
|
|
805
974
|
export function roundVector(vector: Vector3, out: Vector3): Vector3;
|
|
806
975
|
|
|
807
976
|
/**
|
|
808
977
|
*
|
|
809
|
-
* @param {Number} value
|
|
810
|
-
* @param {Range} range
|
|
978
|
+
* @param {Number} value
|
|
979
|
+
* @param {Range} range
|
|
811
980
|
*/
|
|
812
981
|
export function clampAndNormalizeValue(value: number, range: Range): number;
|
|
813
982
|
|
|
@@ -827,7 +996,10 @@ export function getAdjustedScalarRange(): void;
|
|
|
827
996
|
* @param {Extent} extent1 The first extent.
|
|
828
997
|
* @param {Extent} extent2 The second extent.
|
|
829
998
|
*/
|
|
830
|
-
export function extentIsWithinOtherExtent(
|
|
999
|
+
export function extentIsWithinOtherExtent(
|
|
1000
|
+
extent1: Extent,
|
|
1001
|
+
extent2: Extent
|
|
1002
|
+
): number;
|
|
831
1003
|
|
|
832
1004
|
/**
|
|
833
1005
|
* Check if first 3D bounds is within the second 3D bounds.
|
|
@@ -835,7 +1007,11 @@ export function extentIsWithinOtherExtent(extent1: Extent, extent2: Extent): num
|
|
|
835
1007
|
* @param {Bounds} bounds2_6 The second bounds.
|
|
836
1008
|
* @param {Vector3} delta_3 The error margin along each axis.
|
|
837
1009
|
*/
|
|
838
|
-
export function boundsIsWithinOtherBounds(
|
|
1010
|
+
export function boundsIsWithinOtherBounds(
|
|
1011
|
+
bounds1_6: Bounds,
|
|
1012
|
+
bounds2_6: Bounds,
|
|
1013
|
+
delta_3: Vector3
|
|
1014
|
+
): number;
|
|
839
1015
|
|
|
840
1016
|
/**
|
|
841
1017
|
* Check if point is within the given 3D bounds.
|
|
@@ -843,7 +1019,11 @@ export function boundsIsWithinOtherBounds(bounds1_6: Bounds, bounds2_6: Bounds,
|
|
|
843
1019
|
* @param {Bounds} bounds_6 The bounds.
|
|
844
1020
|
* @param {Vector3} delta_3 The error margin along each axis.
|
|
845
1021
|
*/
|
|
846
|
-
export function pointIsWithinBounds(
|
|
1022
|
+
export function pointIsWithinBounds(
|
|
1023
|
+
point_3: Vector3,
|
|
1024
|
+
bounds_6: Bounds,
|
|
1025
|
+
delta_3: Vector3
|
|
1026
|
+
): number;
|
|
847
1027
|
|
|
848
1028
|
/**
|
|
849
1029
|
* In Euclidean space, there is a unique circle passing through any given three
|
|
@@ -859,7 +1039,12 @@ export function pointIsWithinBounds(point_3: Vector3, bounds_6: Bounds, delta_3:
|
|
|
859
1039
|
* @param {Vector3} p3 The coordinate of the third point.
|
|
860
1040
|
* @param {Vector3} center The coordinate of the center point.
|
|
861
1041
|
*/
|
|
862
|
-
export function solve3PointCircle(
|
|
1042
|
+
export function solve3PointCircle(
|
|
1043
|
+
p1: Vector3,
|
|
1044
|
+
p2: Vector3,
|
|
1045
|
+
p3: Vector3,
|
|
1046
|
+
center: Vector3
|
|
1047
|
+
): number;
|
|
863
1048
|
|
|
864
1049
|
/**
|
|
865
1050
|
* Determines whether the passed value is a infinite number.
|
|
@@ -874,7 +1059,7 @@ export function createUninitializedBounds(): Bounds;
|
|
|
874
1059
|
|
|
875
1060
|
/**
|
|
876
1061
|
*
|
|
877
|
-
* @param {Number[]} vector
|
|
1062
|
+
* @param {Number[]} vector
|
|
878
1063
|
*/
|
|
879
1064
|
export function getMajorAxisIndex(vector: number[]): number;
|
|
880
1065
|
|
|
@@ -885,11 +1070,14 @@ export function getMajorAxisIndex(vector: number[]): number;
|
|
|
885
1070
|
* the greatest absolute value from the remaining row and columns
|
|
886
1071
|
* For each association, a -1 or a 1 is set in the output, depending on
|
|
887
1072
|
* the sign of the value in the original matrix
|
|
888
|
-
*
|
|
1073
|
+
*
|
|
889
1074
|
* @param {Number[]} matrix The matrix of size nxn
|
|
890
1075
|
* @param {Number[]} n The size of the square matrix, defaults to 3
|
|
891
1076
|
*/
|
|
892
|
-
export function getSparseOrthogonalMatrix(
|
|
1077
|
+
export function getSparseOrthogonalMatrix(
|
|
1078
|
+
matrix: number[],
|
|
1079
|
+
n: number
|
|
1080
|
+
): number[];
|
|
893
1081
|
|
|
894
1082
|
/**
|
|
895
1083
|
*
|
|
@@ -899,10 +1087,13 @@ export function floatToHex2(value: number): string;
|
|
|
899
1087
|
|
|
900
1088
|
/**
|
|
901
1089
|
*
|
|
902
|
-
* @param {RGBColor} rgbArray
|
|
903
|
-
* @param {string} [prefix]
|
|
1090
|
+
* @param {RGBColor} rgbArray
|
|
1091
|
+
* @param {string} [prefix]
|
|
904
1092
|
*/
|
|
905
|
-
export function floatRGB2HexCode(
|
|
1093
|
+
export function floatRGB2HexCode(
|
|
1094
|
+
rgbArray: RGBColor | RGBAColor,
|
|
1095
|
+
prefix?: string
|
|
1096
|
+
): string;
|
|
906
1097
|
|
|
907
1098
|
/**
|
|
908
1099
|
* Convert RGB or RGBA color array to CSS representation
|
|
@@ -936,119 +1127,119 @@ export function isFinite(value: any): boolean;
|
|
|
936
1127
|
* number generation (for backward compatibility only).
|
|
937
1128
|
*/
|
|
938
1129
|
export declare const vtkMath: {
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
}
|
|
1130
|
+
createArray: typeof createArray;
|
|
1131
|
+
swapRowsMatrix_nxn: typeof swapRowsMatrix_nxn;
|
|
1132
|
+
swapColumnsMatrix_nxn: typeof swapColumnsMatrix_nxn;
|
|
1133
|
+
Pi: typeof Pi;
|
|
1134
|
+
radiansFromDegrees: typeof radiansFromDegrees;
|
|
1135
|
+
degreesFromRadians: typeof degreesFromRadians;
|
|
1136
|
+
round: typeof round;
|
|
1137
|
+
floor: typeof floor;
|
|
1138
|
+
ceil: typeof ceil;
|
|
1139
|
+
min: typeof min;
|
|
1140
|
+
max: typeof max;
|
|
1141
|
+
arrayMin: typeof arrayMin;
|
|
1142
|
+
arrayMax: typeof arrayMax;
|
|
1143
|
+
arrayRange: typeof arrayRange;
|
|
1144
|
+
ceilLog2: typeof ceilLog2;
|
|
1145
|
+
factorial: typeof factorial;
|
|
1146
|
+
gaussian: typeof gaussian;
|
|
1147
|
+
nearestPowerOfTwo: typeof nearestPowerOfTwo;
|
|
1148
|
+
isPowerOfTwo: typeof isPowerOfTwo;
|
|
1149
|
+
binomial: typeof binomial;
|
|
1150
|
+
beginCombination: typeof beginCombination;
|
|
1151
|
+
nextCombination: typeof nextCombination;
|
|
1152
|
+
randomSeed: typeof randomSeed;
|
|
1153
|
+
getSeed: typeof getSeed;
|
|
1154
|
+
random: typeof random;
|
|
1155
|
+
add: typeof add;
|
|
1156
|
+
subtract: typeof subtract;
|
|
1157
|
+
multiplyScalar: typeof multiplyScalar;
|
|
1158
|
+
multiplyScalar2D: typeof multiplyScalar2D;
|
|
1159
|
+
multiplyAccumulate: typeof multiplyAccumulate;
|
|
1160
|
+
multiplyAccumulate2D: typeof multiplyAccumulate2D;
|
|
1161
|
+
dot: typeof dot;
|
|
1162
|
+
outer: typeof outer;
|
|
1163
|
+
cross: typeof cross;
|
|
1164
|
+
norm: typeof norm;
|
|
1165
|
+
normalize: typeof normalize;
|
|
1166
|
+
perpendiculars: typeof perpendiculars;
|
|
1167
|
+
projectVector: typeof projectVector;
|
|
1168
|
+
dot2D: typeof dot2D;
|
|
1169
|
+
projectVector2D: typeof projectVector2D;
|
|
1170
|
+
distance2BetweenPoints: typeof distance2BetweenPoints;
|
|
1171
|
+
angleBetweenVectors: typeof angleBetweenVectors;
|
|
1172
|
+
gaussianAmplitude: typeof gaussianAmplitude;
|
|
1173
|
+
gaussianWeight: typeof gaussianWeight;
|
|
1174
|
+
outer2D: typeof outer2D;
|
|
1175
|
+
norm2D: typeof norm2D;
|
|
1176
|
+
normalize2D: typeof normalize2D;
|
|
1177
|
+
determinant2x2: typeof determinant2x2;
|
|
1178
|
+
rowsToMat4: typeof rowsToMat4;
|
|
1179
|
+
columnsToMat4: typeof columnsToMat4;
|
|
1180
|
+
rowsToMat3: typeof rowsToMat3;
|
|
1181
|
+
columnsToMat3: typeof columnsToMat3;
|
|
1182
|
+
LUFactor3x3: typeof LUFactor3x3;
|
|
1183
|
+
LUSolve3x3: typeof LUSolve3x3;
|
|
1184
|
+
linearSolve3x3: typeof linearSolve3x3;
|
|
1185
|
+
multiply3x3_vect3: typeof multiply3x3_vect3;
|
|
1186
|
+
multiply3x3_mat3: typeof multiply3x3_mat3;
|
|
1187
|
+
multiplyMatrix: typeof multiplyMatrix;
|
|
1188
|
+
transpose3x3: typeof transpose3x3;
|
|
1189
|
+
invert3x3: typeof invert3x3;
|
|
1190
|
+
identity3x3: typeof identity3x3;
|
|
1191
|
+
determinant3x3: typeof determinant3x3;
|
|
1192
|
+
quaternionToMatrix3x3: typeof quaternionToMatrix3x3;
|
|
1193
|
+
areEquals: typeof areEquals;
|
|
1194
|
+
areMatricesEqual: typeof areEquals;
|
|
1195
|
+
roundNumber: typeof roundNumber;
|
|
1196
|
+
roundVector: typeof roundVector;
|
|
1197
|
+
jacobiN: typeof jacobiN;
|
|
1198
|
+
matrix3x3ToQuaternion: typeof matrix3x3ToQuaternion;
|
|
1199
|
+
multiplyQuaternion: typeof multiplyQuaternion;
|
|
1200
|
+
orthogonalize3x3: typeof orthogonalize3x3;
|
|
1201
|
+
diagonalize3x3: typeof diagonalize3x3;
|
|
1202
|
+
singularValueDecomposition3x3: typeof singularValueDecomposition3x3;
|
|
1203
|
+
luFactorLinearSystem: typeof luFactorLinearSystem;
|
|
1204
|
+
luSolveLinearSystem: typeof luSolveLinearSystem;
|
|
1205
|
+
solveLinearSystem: typeof solveLinearSystem;
|
|
1206
|
+
invertMatrix: typeof invertMatrix;
|
|
1207
|
+
estimateMatrixCondition: typeof estimateMatrixCondition;
|
|
1208
|
+
jacobi: typeof jacobi;
|
|
1209
|
+
solveHomogeneousLeastSquares: typeof solveHomogeneousLeastSquares;
|
|
1210
|
+
solveLeastSquares: typeof solveLeastSquares;
|
|
1211
|
+
hex2float: typeof hex2float;
|
|
1212
|
+
rgb2hsv: typeof rgb2hsv;
|
|
1213
|
+
hsv2rgb: typeof hsv2rgb;
|
|
1214
|
+
lab2xyz: typeof lab2xyz;
|
|
1215
|
+
xyz2lab: typeof xyz2lab;
|
|
1216
|
+
xyz2rgb: typeof xyz2rgb;
|
|
1217
|
+
rgb2xyz: typeof rgb2xyz;
|
|
1218
|
+
rgb2lab: typeof rgb2lab;
|
|
1219
|
+
lab2rgb: typeof lab2rgb;
|
|
1220
|
+
uninitializeBounds: typeof uninitializeBounds;
|
|
1221
|
+
areBoundsInitialized: typeof areBoundsInitialized;
|
|
1222
|
+
computeBoundsFromPoints: typeof computeBoundsFromPoints;
|
|
1223
|
+
clampValue: typeof clampValue;
|
|
1224
|
+
clampVector: typeof clampVector;
|
|
1225
|
+
clampAndNormalizeValue: typeof clampAndNormalizeValue;
|
|
1226
|
+
getScalarTypeFittingRange: typeof getScalarTypeFittingRange;
|
|
1227
|
+
getAdjustedScalarRange: typeof getAdjustedScalarRange;
|
|
1228
|
+
extentIsWithinOtherExtent: typeof extentIsWithinOtherExtent;
|
|
1229
|
+
boundsIsWithinOtherBounds: typeof boundsIsWithinOtherBounds;
|
|
1230
|
+
pointIsWithinBounds: typeof pointIsWithinBounds;
|
|
1231
|
+
solve3PointCircle: typeof solve3PointCircle;
|
|
1232
|
+
isInf: typeof isInf;
|
|
1233
|
+
createUninitializedBounds: typeof createUninitializedBounds;
|
|
1234
|
+
getMajorAxisIndex: typeof getMajorAxisIndex;
|
|
1235
|
+
getSparseOrthogonalMatrix: typeof getSparseOrthogonalMatrix;
|
|
1236
|
+
floatToHex2: typeof floatToHex2;
|
|
1237
|
+
floatRGB2HexCode: typeof floatRGB2HexCode;
|
|
1238
|
+
float2CssRGBA: typeof float2CssRGBA;
|
|
1239
|
+
inf: number;
|
|
1240
|
+
negInf: number;
|
|
1241
|
+
isNan: typeof isNaN;
|
|
1242
|
+
isNaN: typeof isNaN;
|
|
1243
|
+
isFinite: typeof isFinite;
|
|
1244
|
+
};
|
|
1054
1245
|
export default vtkMath;
|