@kitware/vtk.js 21.1.5 → 21.2.0
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/Transform/LandmarkTransform.d.ts +1 -1
- package/Filters/Sources/Arrow2DSource.d.ts +14 -13
- package/Filters/Sources/ArrowSource.d.ts +9 -8
- package/Filters/Sources/CircleSource.d.ts +15 -14
- package/Filters/Sources/ConeSource.d.ts +18 -17
- package/Filters/Sources/CubeSource.d.ts +19 -19
- package/Filters/Sources/Cursor3D.d.ts +19 -16
- package/Filters/Sources/CylinderSource.d.ts +15 -14
- package/Filters/Sources/LineSource.d.ts +1 -1
- package/Filters/Sources/PlaneSource.d.ts +29 -28
- package/Filters/Sources/PointSource.d.ts +9 -8
- package/Filters/Sources/SphereSource.d.ts +9 -8
- package/Rendering/Core/AbstractMapper.js +1 -0
- package/Rendering/Core/Light.d.ts +277 -234
- package/Rendering/Core/Property.d.ts +43 -43
- package/Rendering/Core/Property2D.d.ts +21 -5
- package/Rendering/Core/RenderWindowInteractor.js +7 -7
- package/Rendering/Core/Volume.d.ts +9 -0
- package/Rendering/OpenGL/ImageMapper.js +1 -1
- package/Rendering/OpenGL/PolyDataMapper.js +5 -17
- package/Rendering/OpenGL/RenderWindow.js +190 -106
- package/Rendering/OpenGL/ShaderProgram.js +0 -12
- package/interfaces.d.ts +66 -24
- package/package.json +1 -1
- package/types.d.ts +4 -1
|
@@ -89,7 +89,7 @@ export function newInstance(initialValues?: ILandmarkTransformInitialValues): vt
|
|
|
89
89
|
*
|
|
90
90
|
* @example
|
|
91
91
|
* '''js
|
|
92
|
-
* import vtkLandmarkTransform from 'vtk.js/
|
|
92
|
+
* import vtkLandmarkTransform from '@kitware/vtk.js/Common/Transform/LandmarkTransform';
|
|
93
93
|
*
|
|
94
94
|
* const transform = LandmarkTransform.New();
|
|
95
95
|
* transform.setMode(Mode.RIGID_BODY);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { vtkAlgorithm, vtkObject } from '@kitware/vtk.js/interfaces';
|
|
2
|
+
import { Vector3 } from '@kitware/vtk.js/types';
|
|
2
3
|
|
|
3
4
|
export enum ShapeType {
|
|
4
5
|
TRIANGLE,
|
|
@@ -15,10 +16,10 @@ export interface IArrow2DSourceInitialValues {
|
|
|
15
16
|
height?: number;
|
|
16
17
|
width?: number;
|
|
17
18
|
thickness?: number;
|
|
18
|
-
center?:
|
|
19
|
+
center?: Vector3;
|
|
19
20
|
pointType?: string;
|
|
20
|
-
origin?:
|
|
21
|
-
direction?:
|
|
21
|
+
origin?: Vector3;
|
|
22
|
+
direction?: Vector3;
|
|
22
23
|
}
|
|
23
24
|
|
|
24
25
|
type vtkArrow2DSourceBase = vtkObject & Omit<vtkAlgorithm,
|
|
@@ -41,23 +42,23 @@ export interface vtkArrow2DSource extends vtkArrow2DSourceBase {
|
|
|
41
42
|
* Get the center of the cone.
|
|
42
43
|
* @default [0, 0, 0]
|
|
43
44
|
*/
|
|
44
|
-
getCenter():
|
|
45
|
+
getCenter(): Vector3;
|
|
45
46
|
|
|
46
47
|
/**
|
|
47
48
|
* Get the center of the cone.
|
|
48
49
|
*/
|
|
49
|
-
getCenterByReference():
|
|
50
|
+
getCenterByReference(): Vector3;
|
|
50
51
|
|
|
51
52
|
/**
|
|
52
53
|
* Get the orientation vector of the cone.
|
|
53
54
|
* @default [1.0, 0.0, 0.0]
|
|
54
55
|
*/
|
|
55
|
-
getDirection():
|
|
56
|
+
getDirection(): Vector3;
|
|
56
57
|
|
|
57
58
|
/**
|
|
58
59
|
* Get the orientation vector of the cone.
|
|
59
60
|
*/
|
|
60
|
-
getDirectionByReference():
|
|
61
|
+
getDirectionByReference(): Vector3;
|
|
61
62
|
|
|
62
63
|
/**
|
|
63
64
|
* Get the height of the cone.
|
|
@@ -107,10 +108,10 @@ export interface vtkArrow2DSource extends vtkArrow2DSourceBase {
|
|
|
107
108
|
* It is located at the middle of the axis of the cone.
|
|
108
109
|
* !!! warning
|
|
109
110
|
* This is not the center of the base of the cone!
|
|
110
|
-
* @param {
|
|
111
|
+
* @param {Vector3} center The center of the cone coordinates.
|
|
111
112
|
* @default [0, 0, 0]
|
|
112
113
|
*/
|
|
113
|
-
setCenterFrom(center:
|
|
114
|
+
setCenterFrom(center: Vector3): boolean;
|
|
114
115
|
|
|
115
116
|
/**
|
|
116
117
|
* Set the direction for the arrow.
|
|
@@ -122,15 +123,15 @@ export interface vtkArrow2DSource extends vtkArrow2DSourceBase {
|
|
|
122
123
|
|
|
123
124
|
/**
|
|
124
125
|
* Set the direction for the arrow 2D.
|
|
125
|
-
* @param {
|
|
126
|
+
* @param {Vector3} direction The direction coordinates.
|
|
126
127
|
*/
|
|
127
|
-
setDirection(direction:
|
|
128
|
+
setDirection(direction: Vector3): boolean;
|
|
128
129
|
|
|
129
130
|
/**
|
|
130
131
|
* Set the direction for the arrow 2D.
|
|
131
|
-
* @param {
|
|
132
|
+
* @param {Vector3} direction The direction coordinates.
|
|
132
133
|
*/
|
|
133
|
-
setDirectionFrom(direction:
|
|
134
|
+
setDirectionFrom(direction: Vector3): boolean;
|
|
134
135
|
|
|
135
136
|
/**
|
|
136
137
|
* Set the height of the cone.
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { vtkAlgorithm, vtkObject } from '@kitware/vtk.js/interfaces';
|
|
2
|
+
import { Vector3 } from '@kitware/vtk.js/types';
|
|
2
3
|
|
|
3
4
|
export enum ShapeType {
|
|
4
5
|
TRIANGLE,
|
|
@@ -17,7 +18,7 @@ export interface IArrowSourceInitialValues {
|
|
|
17
18
|
shaftResolution?: number;
|
|
18
19
|
shaftRadius?: number;
|
|
19
20
|
invert?: boolean;
|
|
20
|
-
direction?:
|
|
21
|
+
direction?: Vector3;
|
|
21
22
|
pointType?: string;
|
|
22
23
|
}
|
|
23
24
|
|
|
@@ -35,12 +36,12 @@ export interface vtkArrowSource extends vtkArrowSourceBase {
|
|
|
35
36
|
* Get the orientation vector of the cone.
|
|
36
37
|
* @default [1.0, 0.0, 0.0]
|
|
37
38
|
*/
|
|
38
|
-
getDirection():
|
|
39
|
+
getDirection(): Vector3;
|
|
39
40
|
|
|
40
41
|
/**
|
|
41
42
|
* Get the orientation vector of the cone.
|
|
42
43
|
*/
|
|
43
|
-
getDirectionByReference():
|
|
44
|
+
getDirectionByReference(): Vector3;
|
|
44
45
|
|
|
45
46
|
/**
|
|
46
47
|
*
|
|
@@ -95,15 +96,15 @@ export interface vtkArrowSource extends vtkArrowSourceBase {
|
|
|
95
96
|
|
|
96
97
|
/**
|
|
97
98
|
* Set the direction for the arrow.
|
|
98
|
-
* @param {
|
|
99
|
+
* @param {Vector3} direction The direction coordinates.
|
|
99
100
|
*/
|
|
100
|
-
setDirection(direction:
|
|
101
|
+
setDirection(direction: Vector3): boolean;
|
|
101
102
|
|
|
102
103
|
/**
|
|
103
104
|
* Set the direction for the arrow.
|
|
104
|
-
* @param {
|
|
105
|
+
* @param {Vector3} direction The direction coordinates.
|
|
105
106
|
*/
|
|
106
|
-
setDirectionFrom(direction:
|
|
107
|
+
setDirectionFrom(direction: Vector3): boolean;
|
|
107
108
|
|
|
108
109
|
/**
|
|
109
110
|
* Inverts the arrow direction.
|
|
@@ -168,7 +169,7 @@ export function newInstance(initialValues?: IArrowSourceInitialValues): vtkArrow
|
|
|
168
169
|
*
|
|
169
170
|
* @example
|
|
170
171
|
* ```js
|
|
171
|
-
* import vtkArrowSource from 'vtk.js/
|
|
172
|
+
* import vtkArrowSource from '@kitware/vtk.js/Filters/Sources/ArrowSource';
|
|
172
173
|
*
|
|
173
174
|
* const arrow = vtkArrowSource.newInstance({
|
|
174
175
|
* tipResolution: 6,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { vtkAlgorithm, vtkObject } from '@kitware/vtk.js/interfaces';
|
|
2
|
+
import { Vector3 } from '@kitware/vtk.js/types';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
*
|
|
@@ -6,7 +7,7 @@ import { vtkAlgorithm, vtkObject } from '@kitware/vtk.js/interfaces';
|
|
|
6
7
|
export interface ICircleSourceInitialValues {
|
|
7
8
|
radius?: number;
|
|
8
9
|
resolution?: number;
|
|
9
|
-
center?:
|
|
10
|
+
center?: Vector3;
|
|
10
11
|
pointType?: string;
|
|
11
12
|
lines?: boolean;
|
|
12
13
|
face?: boolean;
|
|
@@ -26,23 +27,23 @@ export interface vtkCircleSource extends vtkCircleSourceBase {
|
|
|
26
27
|
* Get the center of the cone.
|
|
27
28
|
* @default [0, 0, 0]
|
|
28
29
|
*/
|
|
29
|
-
getCenter():
|
|
30
|
+
getCenter(): Vector3;
|
|
30
31
|
|
|
31
32
|
/**
|
|
32
33
|
* Get the center of the cone.
|
|
33
34
|
*/
|
|
34
|
-
getCenterByReference():
|
|
35
|
+
getCenterByReference(): Vector3;
|
|
35
36
|
|
|
36
37
|
/**
|
|
37
38
|
* Get the orientation vector of the cone.
|
|
38
39
|
* @default [1.0, 0.0, 0.0]
|
|
39
40
|
*/
|
|
40
|
-
getDirection():
|
|
41
|
+
getDirection(): Vector3;
|
|
41
42
|
|
|
42
43
|
/**
|
|
43
44
|
* Get the orientation vector of the cone.
|
|
44
45
|
*/
|
|
45
|
-
getDirectionByReference():
|
|
46
|
+
getDirectionByReference(): Vector3;
|
|
46
47
|
|
|
47
48
|
/**
|
|
48
49
|
*
|
|
@@ -85,15 +86,15 @@ export interface vtkCircleSource extends vtkCircleSourceBase {
|
|
|
85
86
|
|
|
86
87
|
/**
|
|
87
88
|
* Set the direction for the circle.
|
|
88
|
-
* @param {
|
|
89
|
+
* @param {Vector3} direction The direction coordinates.
|
|
89
90
|
*/
|
|
90
|
-
setDirection(direction:
|
|
91
|
+
setDirection(direction: Vector3): boolean;
|
|
91
92
|
|
|
92
93
|
/**
|
|
93
94
|
* Set the direction for the circle.
|
|
94
|
-
* @param {
|
|
95
|
+
* @param {Vector3} direction The direction coordinates.
|
|
95
96
|
*/
|
|
96
|
-
setDirectionFrom(direction:
|
|
97
|
+
setDirectionFrom(direction: Vector3): boolean;
|
|
97
98
|
|
|
98
99
|
/**
|
|
99
100
|
* Set the center of the circle.
|
|
@@ -106,10 +107,10 @@ export interface vtkCircleSource extends vtkCircleSourceBase {
|
|
|
106
107
|
|
|
107
108
|
/**
|
|
108
109
|
* Set the center of the circle.
|
|
109
|
-
* @param {
|
|
110
|
+
* @param {Vector3} center
|
|
110
111
|
* @default [0, 0, 0]
|
|
111
112
|
*/
|
|
112
|
-
setCenterFrom(center:
|
|
113
|
+
setCenterFrom(center: Vector3): boolean;
|
|
113
114
|
|
|
114
115
|
/**
|
|
115
116
|
*
|
|
@@ -125,13 +126,13 @@ export interface vtkCircleSource extends vtkCircleSourceBase {
|
|
|
125
126
|
|
|
126
127
|
/**
|
|
127
128
|
* Set the radius of the circle.
|
|
128
|
-
* @param {Number} radius
|
|
129
|
+
* @param {Number} radius The radius of the circle.
|
|
129
130
|
*/
|
|
130
131
|
setRadius(radius: number): boolean;
|
|
131
132
|
|
|
132
133
|
/**
|
|
133
134
|
* Set the resolution of the circle.
|
|
134
|
-
* @param resolution
|
|
135
|
+
* @param {Number} resolution The resolution of the circle.
|
|
135
136
|
*/
|
|
136
137
|
setResolution(resolution: number): boolean;
|
|
137
138
|
}
|
|
@@ -157,7 +158,7 @@ export function newInstance(initialValues?: ICircleSourceInitialValues): vtkCirc
|
|
|
157
158
|
*
|
|
158
159
|
* @example
|
|
159
160
|
* ```js
|
|
160
|
-
* import vtkCircleSource from 'vtk.js/
|
|
161
|
+
* import vtkCircleSource from '@kitware/vtk.js/Filters/Sources/CircleSource';
|
|
161
162
|
*
|
|
162
163
|
* const circle = vtkCircleSource.newInstance({ radius: 1, resolution: 80 });
|
|
163
164
|
* const polydata = circle.getOutputData();
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { vtkAlgorithm, vtkObject } from '@kitware/vtk.js/interfaces';
|
|
2
|
+
import { Vector3 } from '@kitware/vtk.js/types';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
*
|
|
@@ -7,8 +8,8 @@ export interface IConeSourceInitialValues {
|
|
|
7
8
|
height?: number;
|
|
8
9
|
radius?: number;
|
|
9
10
|
resolution?: number;
|
|
10
|
-
center?:
|
|
11
|
-
direction?:
|
|
11
|
+
center?: Vector3 ;
|
|
12
|
+
direction?: Vector3;
|
|
12
13
|
capping?: boolean;
|
|
13
14
|
pointType?: string;
|
|
14
15
|
}
|
|
@@ -33,23 +34,23 @@ export interface vtkConeSource extends vtkConeSourceBase {
|
|
|
33
34
|
* Get the center of the cone.
|
|
34
35
|
* @default [0, 0, 0]
|
|
35
36
|
*/
|
|
36
|
-
getCenter():
|
|
37
|
+
getCenter(): Vector3;
|
|
37
38
|
|
|
38
39
|
/**
|
|
39
40
|
* Get the center of the cone.
|
|
40
41
|
*/
|
|
41
|
-
getCenterByReference():
|
|
42
|
+
getCenterByReference(): Vector3;
|
|
42
43
|
|
|
43
44
|
/**
|
|
44
45
|
* Get the orientation vector of the cone.
|
|
45
46
|
* @default [1.0, 0.0, 0.0]
|
|
46
47
|
*/
|
|
47
|
-
getDirection():
|
|
48
|
+
getDirection(): Vector3;
|
|
48
49
|
|
|
49
50
|
/**
|
|
50
51
|
* Get the orientation vector of the cone.
|
|
51
52
|
*/
|
|
52
|
-
getDirectionByReference():
|
|
53
|
+
getDirectionByReference(): Vector3;
|
|
53
54
|
|
|
54
55
|
/**
|
|
55
56
|
* Get the height of the cone.
|
|
@@ -99,20 +100,20 @@ export interface vtkConeSource extends vtkConeSourceBase {
|
|
|
99
100
|
* It is located at the middle of the axis of the cone.
|
|
100
101
|
* !!! warning
|
|
101
102
|
* This is not the center of the base of the cone!
|
|
102
|
-
* @param {
|
|
103
|
+
* @param {Vector3} center
|
|
103
104
|
* @default [0, 0, 0]
|
|
104
105
|
*/
|
|
105
|
-
setCenter(center:
|
|
106
|
+
setCenter(center: Vector3): boolean;
|
|
106
107
|
|
|
107
108
|
/**
|
|
108
109
|
* Set the center of the cone.
|
|
109
110
|
* It is located at the middle of the axis of the cone.
|
|
110
111
|
* !!! warning
|
|
111
112
|
* This is not the center of the base of the cone!
|
|
112
|
-
* @param {
|
|
113
|
+
* @param {Vector3} center
|
|
113
114
|
* @default [0, 0, 0]
|
|
114
115
|
*/
|
|
115
|
-
setCenterFrom(center:
|
|
116
|
+
setCenterFrom(center: Vector3): boolean;
|
|
116
117
|
|
|
117
118
|
/**
|
|
118
119
|
* Set the direction for the cone.
|
|
@@ -125,23 +126,23 @@ export interface vtkConeSource extends vtkConeSourceBase {
|
|
|
125
126
|
|
|
126
127
|
/**
|
|
127
128
|
* Set the direction for the cone.
|
|
128
|
-
* @param {
|
|
129
|
+
* @param {Vector3} direction The direction coordinates.
|
|
129
130
|
*/
|
|
130
|
-
setDirection(direction:
|
|
131
|
+
setDirection(direction: Vector3): boolean;
|
|
131
132
|
|
|
132
133
|
/**
|
|
133
134
|
* Set the direction for the cone.
|
|
134
|
-
* @param {
|
|
135
|
+
* @param {Vector3} direction
|
|
135
136
|
* @default [1, 0, 0]
|
|
136
137
|
*/
|
|
137
|
-
setDirection(direction:
|
|
138
|
+
setDirection(direction: Vector3): boolean;
|
|
138
139
|
|
|
139
140
|
/**
|
|
140
141
|
* Set the direction for the cone.
|
|
141
|
-
* @param {
|
|
142
|
+
* @param {Vector3} direction
|
|
142
143
|
* @default [1, 0, 0]
|
|
143
144
|
*/
|
|
144
|
-
setDirectionFrom(direction:
|
|
145
|
+
setDirectionFrom(direction: Vector3): boolean;
|
|
145
146
|
|
|
146
147
|
/**
|
|
147
148
|
* Set the height of the cone.
|
|
@@ -188,7 +189,7 @@ export function newInstance(initialValues ? : IConeSourceInitialValues): vtkCone
|
|
|
188
189
|
*
|
|
189
190
|
* @example
|
|
190
191
|
* ```js
|
|
191
|
-
* import vtkConeSource from 'vtk.js/
|
|
192
|
+
* import vtkConeSource from '@kitware/vtk.js/Filters/Sources/ConeSource';
|
|
192
193
|
*
|
|
193
194
|
* const cone = vtkConeSource.newInstance({ height: 2, radius: 1, resolution: 80 });
|
|
194
195
|
* const polydata = cone.getOutputData();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { vtkAlgorithm, vtkObject } from '@kitware/vtk.js/interfaces';
|
|
2
|
-
import { Bounds,
|
|
2
|
+
import { Bounds, Vector3 } from '@kitware/vtk.js/types';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
*
|
|
@@ -8,8 +8,8 @@ export interface ICircleSourceInitialValues {
|
|
|
8
8
|
xLength?: number;
|
|
9
9
|
yLength?: number;
|
|
10
10
|
zLength?: number;
|
|
11
|
-
center?:
|
|
12
|
-
rotations?:
|
|
11
|
+
center?: Vector3;
|
|
12
|
+
rotations?: Vector3;
|
|
13
13
|
pointType?: string;
|
|
14
14
|
generate3DTextureCoordinates?: boolean;
|
|
15
15
|
}
|
|
@@ -28,12 +28,12 @@ export interface vtkCubeSource extends vtkCubeSourceBase {
|
|
|
28
28
|
* Get the center of the cube.
|
|
29
29
|
* @default [0.0, 0.0, 0.0]
|
|
30
30
|
*/
|
|
31
|
-
getCenter():
|
|
31
|
+
getCenter(): Vector3;
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
34
|
* Get the center of the cube.
|
|
35
35
|
*/
|
|
36
|
-
getCenterByReference():
|
|
36
|
+
getCenterByReference(): Vector3;
|
|
37
37
|
|
|
38
38
|
/**
|
|
39
39
|
*
|
|
@@ -45,13 +45,13 @@ export interface vtkCubeSource extends vtkCubeSourceBase {
|
|
|
45
45
|
*
|
|
46
46
|
* @default [0.0, 0.0, 0.0]
|
|
47
47
|
*/
|
|
48
|
-
getRotations():
|
|
48
|
+
getRotations(): Vector3;
|
|
49
49
|
|
|
50
50
|
/**
|
|
51
51
|
*
|
|
52
|
-
* @default
|
|
52
|
+
* @default [0.0, 0.0, 0.0]
|
|
53
53
|
*/
|
|
54
|
-
getRotationsByReference():
|
|
54
|
+
getRotationsByReference(): Vector3;
|
|
55
55
|
|
|
56
56
|
/**
|
|
57
57
|
* Get the length of the cube in the x-direction.
|
|
@@ -80,12 +80,12 @@ export interface vtkCubeSource extends vtkCubeSourceBase {
|
|
|
80
80
|
|
|
81
81
|
/**
|
|
82
82
|
* Convenience methods allows creation of cube by specifying bounding box.
|
|
83
|
-
* @param xMin
|
|
84
|
-
* @param xMax
|
|
85
|
-
* @param yMin
|
|
86
|
-
* @param yMax
|
|
87
|
-
* @param zMin
|
|
88
|
-
* @param zMax
|
|
83
|
+
* @param {Number} xMin
|
|
84
|
+
* @param {Number} xMax
|
|
85
|
+
* @param {Number} yMin
|
|
86
|
+
* @param {Number} yMax
|
|
87
|
+
* @param {Number} zMin
|
|
88
|
+
* @param {Number} zMax
|
|
89
89
|
*/
|
|
90
90
|
setBounds(xMin: number, xMax: number, yMin: number, yMax: number, zMin: number, zMax: number): boolean;
|
|
91
91
|
|
|
@@ -109,7 +109,7 @@ export interface vtkCubeSource extends vtkCubeSourceBase {
|
|
|
109
109
|
* @param center
|
|
110
110
|
* @default [0, 0, 0]
|
|
111
111
|
*/
|
|
112
|
-
setCenterFrom(center:
|
|
112
|
+
setCenterFrom(center: Vector3): boolean;
|
|
113
113
|
|
|
114
114
|
/**
|
|
115
115
|
*
|
|
@@ -127,9 +127,9 @@ export interface vtkCubeSource extends vtkCubeSourceBase {
|
|
|
127
127
|
|
|
128
128
|
/**
|
|
129
129
|
*
|
|
130
|
-
* @param rotations
|
|
130
|
+
* @param {Vector3} rotations
|
|
131
131
|
*/
|
|
132
|
-
setRotationsFrom(rotations:
|
|
132
|
+
setRotationsFrom(rotations: Vector3): boolean;
|
|
133
133
|
|
|
134
134
|
/**
|
|
135
135
|
* Set the length of the cube in the x-direction.
|
|
@@ -171,10 +171,10 @@ export function newInstance(initialValues?: ICircleSourceInitialValues): vtkCube
|
|
|
171
171
|
*
|
|
172
172
|
* @example
|
|
173
173
|
* ```js
|
|
174
|
-
* import vtkCubeSource from 'vtk.js/
|
|
174
|
+
* import vtkCubeSource from '@kitware/vtk.js/Filters/Sources/CubeSource';
|
|
175
175
|
*
|
|
176
176
|
* const cubeSource = vtkCubeSource.newInstance({ xLength: 5, yLength: 5, zLength: 5 });
|
|
177
|
-
* const
|
|
177
|
+
* const polydata = cubeSource.getOutputData();
|
|
178
178
|
* ```
|
|
179
179
|
*/
|
|
180
180
|
export declare const vtkCubeSource: {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { vtkAlgorithm, vtkObject } from '@kitware/vtk.js/interfaces';
|
|
2
|
-
|
|
3
2
|
import vtkPolyData from '@kitware/vtk.js/Common/DataModel/PolyData';
|
|
3
|
+
import { Bounds, Vector3 } from '@kitware/vtk.js/types';
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
*
|
|
8
8
|
*/
|
|
9
9
|
export interface ICursor3DInitialValues {
|
|
10
|
-
modelBounds?:
|
|
11
|
-
focalPoint?:
|
|
10
|
+
modelBounds?: Bounds;
|
|
11
|
+
focalPoint?: Vector3;
|
|
12
12
|
outline?: boolean;
|
|
13
13
|
axes?: boolean;
|
|
14
14
|
xShadows?: boolean;
|
|
@@ -46,12 +46,12 @@ export interface vtkCursor3D extends vtkCursor3DBase {
|
|
|
46
46
|
/**
|
|
47
47
|
* Get the position of cursor focus.
|
|
48
48
|
*/
|
|
49
|
-
getFocalPoint():
|
|
49
|
+
getFocalPoint(): Vector3;
|
|
50
50
|
|
|
51
51
|
/**
|
|
52
52
|
*
|
|
53
53
|
*/
|
|
54
|
-
getFocalPointByReference():
|
|
54
|
+
getFocalPointByReference(): Vector3;
|
|
55
55
|
|
|
56
56
|
/**
|
|
57
57
|
*
|
|
@@ -63,13 +63,13 @@ export interface vtkCursor3D extends vtkCursor3DBase {
|
|
|
63
63
|
* Set the boundary of the 3D cursor.
|
|
64
64
|
* @default [-1.0, 1.0, -1.0, 1.0, -1.0, 1.0]
|
|
65
65
|
*/
|
|
66
|
-
getModelBounds():
|
|
66
|
+
getModelBounds(): Bounds;
|
|
67
67
|
|
|
68
68
|
/**
|
|
69
69
|
*
|
|
70
70
|
* @default [-1.0, 1.0, -1.0, 1.0, -1.0, 1.0]
|
|
71
71
|
*/
|
|
72
|
-
getModelBoundsByReference():
|
|
72
|
+
getModelBoundsByReference(): Bounds;
|
|
73
73
|
|
|
74
74
|
/**
|
|
75
75
|
*
|
|
@@ -127,22 +127,25 @@ export interface vtkCursor3D extends vtkCursor3DBase {
|
|
|
127
127
|
|
|
128
128
|
/**
|
|
129
129
|
* Set the position of cursor focus.
|
|
130
|
-
* If translation mode is on, then the entire cursor (including bounding
|
|
131
|
-
* translated. Otherwise, the focal point will
|
|
132
|
-
*
|
|
133
|
-
*
|
|
130
|
+
* If translation mode is on, then the entire cursor (including bounding
|
|
131
|
+
* box, cursor, and shadows) is translated. Otherwise, the focal point will
|
|
132
|
+
* either be clamped to the bounding box, or wrapped, if Wrap is on. (Note:
|
|
133
|
+
* this behavior requires that the bounding box is set prior to the focal
|
|
134
|
+
* point.)
|
|
135
|
+
* @param {Vector3} points
|
|
134
136
|
*/
|
|
135
|
-
setFocalPoint(points:
|
|
137
|
+
setFocalPoint(points: Vector3): boolean;
|
|
136
138
|
|
|
137
139
|
/**
|
|
138
140
|
* Set the boundary of the 3D cursor.
|
|
139
|
-
* @param {
|
|
141
|
+
* @param {Bounds} bounds The bounds of the 3D cursor.
|
|
140
142
|
*/
|
|
141
|
-
setModelBounds(bounds:
|
|
143
|
+
setModelBounds(bounds: Bounds): boolean;
|
|
142
144
|
|
|
143
145
|
/**
|
|
144
146
|
* Enable/disable the translation mode.
|
|
145
|
-
* If on, changes in cursor position cause the entire widget to translate
|
|
147
|
+
* If on, changes in cursor position cause the entire widget to translate
|
|
148
|
+
* along with the cursor.
|
|
146
149
|
* @param {Boolean} translationMode
|
|
147
150
|
*/
|
|
148
151
|
setTranslationMode(translationMode: boolean): boolean;
|
|
@@ -201,7 +204,7 @@ export function newInstance(initialValues?: ICursor3DInitialValues): vtkCursor3D
|
|
|
201
204
|
*
|
|
202
205
|
* @example
|
|
203
206
|
* ```js
|
|
204
|
-
* import vtkCursor3D from 'vtk.js/
|
|
207
|
+
* import vtkCursor3D from '@kitware/vtk.js/Filters/Sources/vtkCursor3D';
|
|
205
208
|
*
|
|
206
209
|
* const cursor = vtkCursor3D.newInstance({focalPoint: [0, 0, 0], modelBounds: [-100, 100, -100, 100, -100, 100]});
|
|
207
210
|
* const polyData = cursor.getOutputData();
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { vtkAlgorithm, vtkObject } from '@kitware/vtk.js/interfaces';
|
|
2
|
+
import { Vector3 } from '@kitware/vtk.js/types';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
*
|
|
@@ -9,8 +10,8 @@ export interface ICylinderSourceInitialValues {
|
|
|
9
10
|
otherRadius?: number;
|
|
10
11
|
radius?: number;
|
|
11
12
|
resolution?: number;
|
|
12
|
-
center?:
|
|
13
|
-
direction?:
|
|
13
|
+
center?: Vector3;
|
|
14
|
+
direction?: Vector3;
|
|
14
15
|
capping?: boolean;
|
|
15
16
|
pointType?: string;
|
|
16
17
|
}
|
|
@@ -35,23 +36,23 @@ export interface vtkCylinderSource extends vtkCylinderSourceBase {
|
|
|
35
36
|
* Get the center of the cylinder.
|
|
36
37
|
* @default [0, 0, 0]
|
|
37
38
|
*/
|
|
38
|
-
getCenter():
|
|
39
|
+
getCenter(): Vector3;
|
|
39
40
|
|
|
40
41
|
/**
|
|
41
42
|
* Get the center of the cylinder.
|
|
42
43
|
*/
|
|
43
|
-
getCenterByReference():
|
|
44
|
+
getCenterByReference(): Vector3;
|
|
44
45
|
|
|
45
46
|
/**
|
|
46
47
|
* Get the orientation vector of the cylinder.
|
|
47
48
|
* @default [1.0, 0.0, 0.0]
|
|
48
49
|
*/
|
|
49
|
-
getDirection():
|
|
50
|
+
getDirection(): Vector3;
|
|
50
51
|
|
|
51
52
|
/**
|
|
52
53
|
* Get the orientation vector of the cylinder.
|
|
53
54
|
*/
|
|
54
|
-
getDirectionByReference():
|
|
55
|
+
getDirectionByReference(): Vector3;
|
|
55
56
|
|
|
56
57
|
/**
|
|
57
58
|
* Get the height of the cylinder.
|
|
@@ -111,10 +112,10 @@ export interface vtkCylinderSource extends vtkCylinderSourceBase {
|
|
|
111
112
|
|
|
112
113
|
/**
|
|
113
114
|
* Set the center of the cylinder.
|
|
114
|
-
* @param {
|
|
115
|
+
* @param {Vector3} center The center point's coordinates.
|
|
115
116
|
* @default [0, 0, 0]
|
|
116
117
|
*/
|
|
117
|
-
setCenterFrom(center:
|
|
118
|
+
setCenterFrom(center: Vector3): boolean;
|
|
118
119
|
|
|
119
120
|
/**
|
|
120
121
|
* Set the direction for the cylinder.
|
|
@@ -126,15 +127,15 @@ export interface vtkCylinderSource extends vtkCylinderSourceBase {
|
|
|
126
127
|
|
|
127
128
|
/**
|
|
128
129
|
* Set the direction for the cylinder.
|
|
129
|
-
* @param {
|
|
130
|
+
* @param {Vector3} direction The direction coordinates.
|
|
130
131
|
*/
|
|
131
|
-
setDirection(direction:
|
|
132
|
+
setDirection(direction: Vector3): boolean;
|
|
132
133
|
|
|
133
134
|
/**
|
|
134
135
|
* Set the direction for the cylinder.
|
|
135
|
-
* @param {
|
|
136
|
+
* @param {Vector3} direction The direction coordinates.
|
|
136
137
|
*/
|
|
137
|
-
setDirectionFrom(direction:
|
|
138
|
+
setDirectionFrom(direction: Vector3): boolean;
|
|
138
139
|
|
|
139
140
|
/**
|
|
140
141
|
* Set the height of the cylinder.
|
|
@@ -146,7 +147,7 @@ export interface vtkCylinderSource extends vtkCylinderSourceBase {
|
|
|
146
147
|
* Set the initial angle along direction.
|
|
147
148
|
* @param {Number} initAngle The initial angle in radian.
|
|
148
149
|
*/
|
|
149
|
-
setInitAngle(
|
|
150
|
+
setInitAngle(initAngle: number): boolean;
|
|
150
151
|
|
|
151
152
|
/**
|
|
152
153
|
* Set the base Z radius of the cylinder.
|
|
@@ -194,7 +195,7 @@ export function newInstance(initialValues?: ICylinderSourceInitialValues): vtkCy
|
|
|
194
195
|
*
|
|
195
196
|
* @example
|
|
196
197
|
* ```js
|
|
197
|
-
* import vtkCylinderSource from 'vtk.js/
|
|
198
|
+
* import vtkCylinderSource from '@kitware/vtk.js/Filters/Sources/CylinderSource';
|
|
198
199
|
*
|
|
199
200
|
* const cylinder = vtkCylinderSource.newInstance({ height: 2, radius: 1, resolution: 80 });
|
|
200
201
|
* const polydata = cylinder.getOutputData();
|
|
@@ -119,7 +119,7 @@ export function newInstance(initialValues?: ILineSourceInitialValues): vtkLineSo
|
|
|
119
119
|
*
|
|
120
120
|
* @example
|
|
121
121
|
* ```js
|
|
122
|
-
* import vtkLineSource from 'vtk.js/
|
|
122
|
+
* import vtkLineSource from '@kitware/vtk.js/Filters/Sources/LineSource';
|
|
123
123
|
*
|
|
124
124
|
* const line = vtkLineSource.newInstance({ resolution: 10 });
|
|
125
125
|
* const polydata = line.getOutputData();
|