@kitware/vtk.js 23.4.2 → 23.4.4

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.
Files changed (180) hide show
  1. package/Common/Core/Math/Constants.js +12 -0
  2. package/Common/Core/Math/index.js +1 -1
  3. package/Common/Core/Math.js +1 -1
  4. package/Common/Core/ScalarsToColors/Constants.d.ts +18 -0
  5. package/Common/DataModel/AbstractPointLocator.d.ts +54 -0
  6. package/Common/DataModel/AbstractPointLocator.js +40 -0
  7. package/Common/DataModel/BoundingBox.d.ts +659 -0
  8. package/Common/DataModel/Collection.d.ts +118 -0
  9. package/Common/DataModel/Collection.js +113 -0
  10. package/Common/DataModel/DataSet/Constants.d.ts +27 -0
  11. package/Common/DataModel/EdgeLocator.d.ts +79 -0
  12. package/Common/DataModel/EdgeLocator.js +85 -0
  13. package/Common/DataModel/ITKHelper.d.ts +54 -0
  14. package/Common/DataModel/IncrementalOctreeNode.d.ts +297 -0
  15. package/Common/DataModel/IncrementalOctreeNode.js +640 -0
  16. package/Common/DataModel/IncrementalOctreePointLocator.d.ts +61 -0
  17. package/Common/DataModel/IncrementalOctreePointLocator.js +398 -0
  18. package/Common/DataModel/Locator.d.ts +43 -0
  19. package/Common/DataModel/Locator.js +37 -0
  20. package/Common/DataModel/Plane.js +1 -1
  21. package/Common/DataModel/PolyData/Constants.d.ts +6 -0
  22. package/Common/DataModel/PolyLine.d.ts +63 -0
  23. package/Common/DataModel/PolyLine.js +77 -0
  24. package/Common/DataModel/Polygon/Constants.js +12 -0
  25. package/Common/DataModel/Polygon.js +1 -1
  26. package/Common/DataModel/Quad/Constants.js +9 -0
  27. package/Common/DataModel/Quad.d.ts +91 -0
  28. package/Common/DataModel/Quad.js +235 -0
  29. package/Common/DataModel/SelectionNode/Constants.d.ts +27 -0
  30. package/Common/DataModel/Spline1D/Constants.js +17 -0
  31. package/Common/DataModel/Spline3D/Constants.d.ts +9 -0
  32. package/Common/Transform/Transform.js +51 -0
  33. package/Filters/Core/PolyDataNormals.js +124 -0
  34. package/Filters/General/ClipClosedSurface/Constants.js +10 -0
  35. package/Filters/General/ClipClosedSurface.d.ts +95 -0
  36. package/Filters/General/ClipClosedSurface.js +972 -0
  37. package/Filters/General/ContourTriangulator/Constants.js +6 -0
  38. package/Filters/General/ContourTriangulator/helper.js +1951 -0
  39. package/Filters/General/ContourTriangulator.d.ts +136 -0
  40. package/Filters/General/ContourTriangulator.js +202 -0
  41. package/Filters/General/ImageMarchingCubes.js +1 -1
  42. package/Filters/General/MoleculeToRepresentation.js +1 -1
  43. package/Filters/General/OBBTree/OBBNode.js +82 -0
  44. package/Filters/General/OBBTree/helper.js +92 -0
  45. package/Filters/General/OBBTree.js +1243 -0
  46. package/Filters/General/TubeFilter.js +1 -1
  47. package/Filters/Sources/LineSource.js +1 -1
  48. package/Filters/Sources/PlaneSource.js +1 -1
  49. package/Filters/Texture/TextureMapToPlane.js +1 -1
  50. package/Interaction/Manipulators/CompositeCameraManipulator.d.ts +68 -0
  51. package/Interaction/Manipulators/CompositeGestureManipulator.d.ts +168 -0
  52. package/Interaction/Manipulators/CompositeKeyboardManipulator.d.ts +48 -0
  53. package/Interaction/Manipulators/CompositeMouseManipulator.d.ts +149 -0
  54. package/Interaction/Manipulators/CompositeVRManipulator.d.ts +44 -0
  55. package/Interaction/Manipulators/GestureCameraManipulator.d.ts +34 -0
  56. package/Interaction/Manipulators/KeyboardCameraManipulator.js +1 -1
  57. package/Interaction/Manipulators/MouseBoxSelectorManipulator.d.ts +88 -0
  58. package/Interaction/Manipulators/MouseCameraAxisRotateManipulator.js +1 -1
  59. package/Interaction/Manipulators/MouseCameraTrackballMultiRotateManipulator.d.ts +32 -0
  60. package/Interaction/Manipulators/MouseCameraTrackballPanManipulator.d.ts +33 -0
  61. package/Interaction/Manipulators/MouseCameraTrackballPanManipulator.js +1 -1
  62. package/Interaction/Manipulators/MouseCameraTrackballRollManipulator.d.ts +33 -0
  63. package/Interaction/Manipulators/MouseCameraTrackballRotateManipulator.d.ts +67 -0
  64. package/Interaction/Manipulators/MouseCameraTrackballRotateManipulator.js +1 -1
  65. package/Interaction/Manipulators/MouseCameraTrackballZoomManipulator.d.ts +45 -0
  66. package/Interaction/Manipulators/MouseCameraTrackballZoomToMouseManipulator.d.ts +26 -0
  67. package/Interaction/Manipulators/MouseCameraUnicamManipulator.js +1 -1
  68. package/Interaction/Manipulators/MouseCameraUnicamRotateManipulator.js +1 -1
  69. package/Interaction/Manipulators/MouseRangeManipulator.d.ts +53 -0
  70. package/Interaction/Style/InteractorStyleImage.d.ts +107 -0
  71. package/Interaction/Style/InteractorStyleMPRSlice.js +1 -1
  72. package/Interaction/Style/InteractorStyleManipulator.d.ts +348 -0
  73. package/Interaction/Style/InteractorStyleTrackballCamera.d.ts +170 -0
  74. package/Interaction/Widgets/ImageCroppingRegionsWidget.js +1 -1
  75. package/Interaction/Widgets/LabelRepresentation.js +1 -1
  76. package/Interaction/Widgets/OrientationMarkerWidget/Constants.d.ts +11 -0
  77. package/Interaction/Widgets/ResliceCursor/ResliceCursor.js +1 -1
  78. package/Interaction/Widgets/ResliceCursor/ResliceCursorLineRepresentation.js +1 -1
  79. package/Interaction/Widgets/ResliceCursor/ResliceCursorRepresentation.js +1 -1
  80. package/Proxy/Core/AbstractRepresentationProxy.d.ts +24 -0
  81. package/Proxy/Core/LookupTableProxy.d.ts +45 -0
  82. package/Proxy/Core/PiecewiseFunctionProxy.d.ts +62 -0
  83. package/Proxy/Core/ProxyManager.d.ts +115 -0
  84. package/Proxy/Core/SourceProxy.d.ts +22 -0
  85. package/Proxy/Core/View2DProxy.d.ts +7 -0
  86. package/Proxy/Core/View2DProxy.js +1 -1
  87. package/Proxy/Core/ViewProxy.d.ts +86 -0
  88. package/Proxy/Representations/SliceRepresentationProxy.d.ts +27 -0
  89. package/Proxy/Representations/VolumeRepresentationProxy.d.ts +44 -0
  90. package/README.md +2 -2
  91. package/Rendering/Core/AbstractImageMapper/helper.js +127 -0
  92. package/Rendering/Core/AbstractImageMapper.d.ts +82 -0
  93. package/Rendering/Core/AbstractImageMapper.js +44 -0
  94. package/Rendering/Core/Camera.js +1 -1
  95. package/Rendering/Core/CellPicker.js +1 -1
  96. package/Rendering/Core/ColorTransferFunction/ColorMaps.d.ts +24 -0
  97. package/Rendering/Core/ColorTransferFunction/Constants.d.ts +17 -0
  98. package/Rendering/Core/ColorTransferFunction.js +1 -1
  99. package/Rendering/Core/Coordinate/Constants.d.ts +14 -0
  100. package/Rendering/Core/Coordinate.js +1 -1
  101. package/Rendering/Core/Glyph3DMapper/Constants.d.ts +17 -0
  102. package/Rendering/Core/Glyph3DMapper.js +1 -1
  103. package/Rendering/Core/HardwareSelector.d.ts +84 -0
  104. package/Rendering/Core/ImageArrayMapper.d.ts +253 -0
  105. package/Rendering/Core/ImageArrayMapper.js +242 -0
  106. package/Rendering/Core/ImageMapper/Constants.d.ts +14 -0
  107. package/Rendering/Core/ImageMapper.js +1 -1
  108. package/Rendering/Core/ImageProperty/Constants.d.ts +9 -0
  109. package/Rendering/Core/ImageResliceMapper/Constants.d.ts +11 -0
  110. package/Rendering/Core/ImageResliceMapper/Constants.js +11 -0
  111. package/Rendering/Core/ImageResliceMapper.d.ts +245 -0
  112. package/Rendering/Core/ImageResliceMapper.js +70 -0
  113. package/Rendering/Core/InteractorObserver.d.ts +132 -0
  114. package/Rendering/Core/InteractorStyle/Constants.d.ts +16 -0
  115. package/Rendering/Core/InteractorStyle.d.ts +229 -0
  116. package/Rendering/Core/Light.js +1 -1
  117. package/Rendering/Core/Mapper/Constants.d.ts +26 -0
  118. package/Rendering/Core/Mapper.js +1 -1
  119. package/Rendering/Core/Picker.js +1 -1
  120. package/Rendering/Core/Prop/Constants.d.ts +9 -0
  121. package/Rendering/Core/Prop/Constants.js +9 -0
  122. package/Rendering/Core/Property/Constants.d.ts +24 -0
  123. package/Rendering/Core/Property2D/Constants.d.ts +9 -0
  124. package/Rendering/Core/RenderWindow.js +1 -1
  125. package/Rendering/Core/RenderWindowInteractor/Constants.d.ts +31 -0
  126. package/Rendering/Core/Renderer.js +1 -1
  127. package/Rendering/Core/VolumeMapper/Constants.d.ts +20 -0
  128. package/Rendering/Core/VolumeMapper.js +1 -1
  129. package/Rendering/Core/VolumeProperty/Constants.d.ts +16 -0
  130. package/Rendering/Misc/SynchronizableRenderWindow/BehaviorManager/CameraSynchronizer.js +129 -0
  131. package/Rendering/Misc/SynchronizableRenderWindow/BehaviorManager.js +131 -0
  132. package/Rendering/Misc/SynchronizableRenderWindow/ObjectManager.d.ts +80 -0
  133. package/Rendering/Misc/SynchronizableRenderWindow/ObjectManager.js +763 -0
  134. package/Rendering/OpenGL/HardwareSelector/Constants.d.ts +8 -0
  135. package/Rendering/OpenGL/HardwareSelector.d.ts +339 -0
  136. package/Rendering/OpenGL/ImageResliceMapper.js +996 -0
  137. package/Rendering/OpenGL/PolyDataMapper.js +1 -1
  138. package/Rendering/OpenGL/PolyDataMapper2D.js +1 -1
  139. package/Rendering/OpenGL/RenderWindow/Constants.d.ts +10 -0
  140. package/Rendering/OpenGL/RenderWindow/Constants.js +13 -0
  141. package/Rendering/OpenGL/RenderWindow/ContextProxy.js +70 -0
  142. package/Rendering/OpenGL/RenderWindow.d.ts +9 -2
  143. package/Rendering/OpenGL/RenderWindow.js +2 -1
  144. package/Rendering/OpenGL/glsl/vtkImageResliceMapperFS.glsl.js +3 -0
  145. package/Rendering/OpenGL/glsl/vtkImageResliceMapperVS.glsl.js +3 -0
  146. package/Rendering/WebGPU/Actor2D.js +151 -0
  147. package/Rendering/WebGPU/BufferManager.js +1 -1
  148. package/Rendering/WebGPU/CellArrayMapper.js +853 -0
  149. package/Rendering/WebGPU/IndexBuffer.js +397 -0
  150. package/Rendering/WebGPU/PolyDataMapper2D.js +99 -0
  151. package/Rendering/WebGPU/RenderWindow.js +3 -1
  152. package/Rendering/WebGPU/SimpleMapper.js +290 -0
  153. package/Widgets/Core/AbstractWidget.d.ts +187 -0
  154. package/Widgets/Core/AbstractWidgetFactory.d.ts +131 -0
  155. package/Widgets/Core/StateBuilder/color3Mixin.js +24 -0
  156. package/Widgets/Core/StateBuilder/orientationMixin.js +1 -1
  157. package/Widgets/Core/StateBuilder.d.ts +29 -0
  158. package/Widgets/Core/WidgetManager/Constants.d.ts +27 -0
  159. package/Widgets/Core/WidgetManager.d.ts +231 -0
  160. package/Widgets/Core/WidgetState.d.ts +81 -0
  161. package/Widgets/Manipulators/AbstractManipulator.d.ts +221 -0
  162. package/Widgets/Manipulators/AbstractManipulator.js +57 -0
  163. package/Widgets/Manipulators/LineManipulator.js +1 -1
  164. package/Widgets/Manipulators/TrackballManipulator.js +1 -1
  165. package/Widgets/Representations/GlyphRepresentation.js +325 -0
  166. package/Widgets/Representations/LineHandleRepresentation.js +116 -0
  167. package/Widgets/Representations/ResliceCursorContextRepresentation.js +1 -1
  168. package/Widgets/Representations/WidgetRepresentation.js +1 -1
  169. package/Widgets/Widgets3D/AngleWidget.js +1 -1
  170. package/Widgets/Widgets3D/InteractiveOrientationWidget.d.ts +40 -0
  171. package/Widgets/Widgets3D/LabelWidget/behavior.js +157 -0
  172. package/Widgets/Widgets3D/LabelWidget/state.js +22 -0
  173. package/Widgets/Widgets3D/LabelWidget.js +78 -0
  174. package/Widgets/Widgets3D/LineWidget/behavior.js +1 -1
  175. package/Widgets/Widgets3D/LineWidget/helpers.js +1 -1
  176. package/Widgets/Widgets3D/ResliceCursorWidget/behavior.js +1 -1
  177. package/Widgets/Widgets3D/ResliceCursorWidget/helpers.js +1 -1
  178. package/Widgets/Widgets3D/ResliceCursorWidget.js +1 -1
  179. package/index.d.ts +133 -74
  180. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  import macro from '../../macros.js';
2
2
  import vtkCellArray from '../../Common/Core/CellArray.js';
3
3
  import vtkDataArray from '../../Common/Core/DataArray.js';
4
- import { l as normalize, j as cross, n as norm, d as dot, f as distance2BetweenPoints } from '../../Common/Core/Math/index.js';
4
+ import { g as normalize, k as cross, n as norm, d as dot, f as distance2BetweenPoints } from '../../Common/Core/Math/index.js';
5
5
  import vtkPoints from '../../Common/Core/Points.js';
6
6
  import vtkPolyData from '../../Common/DataModel/PolyData.js';
7
7
  import { DesiredOutputPrecision } from '../../Common/DataModel/DataSetAttributes/Constants.js';
@@ -1,6 +1,6 @@
1
1
  import macro from '../../macros.js';
2
2
  import vtkPolyData from '../../Common/DataModel/PolyData.js';
3
- import { g as subtract, n as norm } from '../../Common/Core/Math/index.js';
3
+ import { j as subtract, n as norm } from '../../Common/Core/Math/index.js';
4
4
 
5
5
  var vtkWarningMacro = macro.vtkWarningMacro; // ----------------------------------------------------------------------------
6
6
  // vtkLineSource methods
@@ -2,7 +2,7 @@ import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
2
2
  import { mat4, vec3 } from 'gl-matrix';
3
3
  import macro from '../../macros.js';
4
4
  import vtkDataArray from '../../Common/Core/DataArray.js';
5
- import { g as subtract, l as normalize, d as dot, j as cross, r as radiansFromDegrees } from '../../Common/Core/Math/index.js';
5
+ import { j as subtract, g as normalize, d as dot, k as cross, r as radiansFromDegrees } from '../../Common/Core/Math/index.js';
6
6
  import vtkMatrixBuilder from '../../Common/Core/MatrixBuilder.js';
7
7
  import vtkPolyData from '../../Common/DataModel/PolyData.js';
8
8
 
@@ -1,6 +1,6 @@
1
1
  import macro from '../../macros.js';
2
2
  import vtkDataArray from '../../Common/Core/DataArray.js';
3
- import { l as normalize, d as dot, j as cross, f as distance2BetweenPoints, x as determinant3x3 } from '../../Common/Core/Math/index.js';
3
+ import { g as normalize, d as dot, k as cross, f as distance2BetweenPoints, x as determinant3x3 } from '../../Common/Core/Math/index.js';
4
4
  import vtkPolyData from '../../Common/DataModel/PolyData.js';
5
5
 
6
6
  var vtkErrorMacro = macro.vtkErrorMacro; // ----------------------------------------------------------------------------
@@ -0,0 +1,68 @@
1
+ import vtkInteractorObserver from './../../Rendering/Core/InteractorObserver';
2
+ import vtkRenderer from './../../Rendering/Core/Renderer';
3
+ import { Vector2, Vector3 } from './../../types';
4
+
5
+ export interface vtkCompositeCameraManipulator {
6
+ /**
7
+ * Computes the display center.
8
+ * @param observer
9
+ * @param renderer
10
+ */
11
+ computeDisplayCenter(
12
+ observer: vtkInteractorObserver,
13
+ renderer: vtkRenderer
14
+ ): void;
15
+
16
+ /**
17
+ * Sets the rotation factor.
18
+ * @param factor
19
+ */
20
+ setRotationFactor(factor: number): boolean;
21
+
22
+ /**
23
+ * Gets the rotation factor.
24
+ */
25
+ getRotationFactor(): number;
26
+
27
+ /**
28
+ * Sets the display center.
29
+ * @param center
30
+ */
31
+ setDisplayCenter(center: Vector2): boolean;
32
+ setDisplayCenter(x: number, y: number): boolean;
33
+
34
+ /**
35
+ * Gets the display center.
36
+ */
37
+ getDisplayCenter(): Vector2;
38
+
39
+ /**
40
+ * Sets the center.
41
+ * @param center
42
+ */
43
+ setCenter(center: Vector3): boolean;
44
+ setCenter(x: number, y: number, z: number): boolean;
45
+
46
+ /**
47
+ * Gets the center.
48
+ */
49
+ getCenter(): Vector3;
50
+ }
51
+
52
+ export interface ICompositeCameraManipulatorInitialValues {
53
+ center?: Vector3;
54
+ rotationFactor?: number;
55
+ displayCenter?: Vector2;
56
+ }
57
+
58
+ export function extend(
59
+ publicAPI: object,
60
+ model: object,
61
+ initialValues?: ICompositeCameraManipulatorInitialValues
62
+ ): void;
63
+
64
+ export const vtkCompositeCameraManipulator: {
65
+ extend: typeof extend;
66
+ };
67
+
68
+ export default vtkCompositeCameraManipulator;
@@ -0,0 +1,168 @@
1
+ import vtkInteractorStyle from './../../Rendering/Core/InteractorStyle';
2
+ import vtkRenderer from './../../Rendering/Core/Renderer';
3
+ import vtkRenderWindowInteractor from './../../Rendering/Core/RenderWindowInteractor';
4
+ import { Nullable } from './../../types';
5
+
6
+ export interface vtkCompositeGestureManipulator {
7
+ /**
8
+ * Starts an interaction event.
9
+ */
10
+ startInteraction(): void;
11
+
12
+ /**
13
+ * Ends an interaction event.
14
+ */
15
+ endInteraction(): void;
16
+
17
+ /**
18
+ * Handles a start pinch gesture.
19
+ * @param interactor
20
+ * @param scale
21
+ */
22
+ onStartPinch(interactor: vtkRenderWindowInteractor, scale: number): void;
23
+
24
+ /**
25
+ * Handles a pinch gesture.
26
+ * @param interactor
27
+ * @param renderer
28
+ * @param scale
29
+ */
30
+ onPinch(
31
+ interactor: vtkRenderWindowInteractor,
32
+ renderer: vtkRenderer,
33
+ scale: number
34
+ ): void;
35
+
36
+ /**
37
+ * Handles an end pinch gesture.
38
+ * @param interactor
39
+ */
40
+ onEndPinch(interactor: vtkRenderWindowInteractor): void;
41
+
42
+ /**
43
+ * Handles a start rotate gesture.
44
+ * @param interactor
45
+ * @param rotation
46
+ */
47
+ onStartRotate(interactor: vtkRenderWindowInteractor, rotation: number): void;
48
+
49
+ /**
50
+ * Handles a rotate gesture.
51
+ * @param interactor
52
+ * @param renderer
53
+ * @param rotation
54
+ */
55
+ onRotate(
56
+ interactor: vtkRenderWindowInteractor,
57
+ renderer: vtkRenderer,
58
+ rotation: number
59
+ ): void;
60
+
61
+ /**
62
+ * Handles an end pinch gesture.
63
+ * @param interactor
64
+ */
65
+ onEndRotate(interactor: vtkRenderWindowInteractor): void;
66
+
67
+ /**
68
+ * Handles a start pan gesture.
69
+ * @param interactor
70
+ * @param translation
71
+ */
72
+ onStartPan(interactor: vtkRenderWindowInteractor, translation: number): void;
73
+
74
+ /**
75
+ * Handles a pan gesture.
76
+ * @param interactor
77
+ * @param renderer
78
+ * @param translation
79
+ */
80
+ onPan(
81
+ interactor: vtkRenderWindowInteractor,
82
+ renderer: vtkRenderer,
83
+ translation: number
84
+ ): void;
85
+
86
+ /**
87
+ * Handles an end pan gesture.
88
+ * @param interactor
89
+ */
90
+ onEndPan(interactor: vtkRenderWindowInteractor): void;
91
+
92
+ /**
93
+ * Is pinch enabled.
94
+ */
95
+ isPinchEnabled(): boolean;
96
+
97
+ /**
98
+ * Sets if pinch is enabled.
99
+ * @param pinch
100
+ */
101
+ setPinchEnabled(pinch: boolean): boolean;
102
+
103
+ /**
104
+ * Gets flag if pinch is enabled.
105
+ */
106
+ getPinchEnabled(): boolean;
107
+
108
+ /**
109
+ * Is pan enabled.
110
+ */
111
+ isPanEnabled(): boolean;
112
+
113
+ /**
114
+ * Sets if pan is enabled.
115
+ * @param pan
116
+ */
117
+ setPanEnabled(pan: boolean): boolean;
118
+
119
+ /**
120
+ * Gets flag if pan is enabled.
121
+ */
122
+ getPanEnabled(): boolean;
123
+
124
+ /**
125
+ * Is rotate enabled.
126
+ */
127
+ isRotateEnabled(): boolean;
128
+
129
+ /**
130
+ * Sets if rotate is enabled.
131
+ * @param rotate
132
+ */
133
+ setRotateEnabled(rotate: boolean): boolean;
134
+
135
+ /**
136
+ * Gets flag if rotate is enabled.
137
+ */
138
+ getRotateEnabled(): boolean;
139
+
140
+ /**
141
+ * Sets the interactor style.
142
+ * @param style vtkInteractorStyle
143
+ */
144
+ setInteractorStyle(style: Nullable<vtkInteractorStyle>): boolean;
145
+
146
+ /**
147
+ * Gets the interactor style.
148
+ */
149
+ getInteractorStyle(): Nullable<vtkInteractorStyle>;
150
+ }
151
+
152
+ export interface ICompositeGestureManipulatorInitialValues {
153
+ pinchEnabled?: boolean;
154
+ panEnabled?: boolean;
155
+ rotateEnabled?: boolean;
156
+ }
157
+
158
+ export function extend(
159
+ publicAPI: object,
160
+ model: object,
161
+ initialValues?: ICompositeGestureManipulatorInitialValues
162
+ ): void;
163
+
164
+ export const vtkCompositeGestureManipulator: {
165
+ extend: typeof extend;
166
+ };
167
+
168
+ export default vtkCompositeGestureManipulator;
@@ -0,0 +1,48 @@
1
+ import vtkRenderer from './../../Rendering/Core/Renderer';
2
+ import vtkRenderWindowInteractor from './../../Rendering/Core/RenderWindowInteractor';
3
+
4
+ export interface vtkCompositeKeyboardManipulator {
5
+ /**
6
+ * Handles a keypress event.
7
+ * @param interactor the interactor
8
+ * @param renderer the renderer
9
+ * @param key the key
10
+ */
11
+ onKeyPress(
12
+ interactor: vtkRenderWindowInteractor,
13
+ renderer: vtkRenderer,
14
+ key: KeyboardEvent['key']
15
+ ): void;
16
+
17
+ /**
18
+ * Handles a keydown event.
19
+ * @param interactor the interactor
20
+ * @param renderer the renderer
21
+ * @param key the key
22
+ */
23
+ onKeyDown(
24
+ interactor: vtkRenderWindowInteractor,
25
+ renderer: vtkRenderer,
26
+ key: KeyboardEvent['key']
27
+ ): void;
28
+
29
+ /**
30
+ * Handles a keyup event.
31
+ * @param interactor the interactor
32
+ * @param renderer the renderer
33
+ * @param key the key
34
+ */
35
+ onKeyUp(
36
+ interactor: vtkRenderWindowInteractor,
37
+ renderer: vtkRenderer,
38
+ key: KeyboardEvent['key']
39
+ ): void;
40
+ }
41
+
42
+ export function extend(publicAPI: object, model: object): void;
43
+
44
+ export const vtkCompositeKeyboardManipulator: {
45
+ extend: typeof extend;
46
+ };
47
+
48
+ export default vtkCompositeKeyboardManipulator;
@@ -0,0 +1,149 @@
1
+ import vtkRenderer from './../../Rendering/Core/Renderer';
2
+ import vtkRenderWindowInteractor from './../../Rendering/Core/RenderWindowInteractor';
3
+
4
+ export interface vtkCompositeMouseManipulator {
5
+ /**
6
+ * Starts an interaction event.
7
+ */
8
+ startInteraction(): void;
9
+
10
+ /**
11
+ * Ends an interaction event.
12
+ */
13
+ endInteraction(): void;
14
+
15
+ /**
16
+ * Handles a button down event.
17
+ * @param interactor the interactor
18
+ * @param renderer the renderer
19
+ * @param position the display position
20
+ */
21
+ onButtonDown(
22
+ interactor: vtkRenderWindowInteractor,
23
+ renderer: vtkRenderer,
24
+ position: { x: number; y: number }
25
+ ): void;
26
+
27
+ /**
28
+ * Handles a button up event.
29
+ * @param interactor the interactor
30
+ */
31
+ onButtonUp(interactor: vtkRenderWindowInteractor): void;
32
+
33
+ /**
34
+ * Handles a mouse move event.
35
+ * @param interactor the interactor
36
+ * @param renderer the renderer
37
+ * @param position the display position
38
+ */
39
+ onMouseMove(
40
+ interactor: vtkRenderWindowInteractor,
41
+ renderer: vtkRenderer,
42
+ position: { x: number; y: number }
43
+ ): void;
44
+
45
+ /**
46
+ * Handles a start scroll event.
47
+ * @param interactor the interactor
48
+ * @param renderer the renderer
49
+ * @param delta the scroll delta
50
+ */
51
+ onStartScroll(
52
+ interactor: vtkRenderWindowInteractor,
53
+ renderer: vtkRenderer,
54
+ delta: number
55
+ ): void;
56
+
57
+ /**
58
+ * Handles a scroll event.
59
+ * @param interactor the interactor
60
+ */
61
+ onEndScroll(interactor: vtkRenderWindowInteractor): void;
62
+
63
+ /**
64
+ * Is drag enabled.
65
+ */
66
+ isDragEnabled(): boolean;
67
+
68
+ /**
69
+ * Sets if drag is enabled.
70
+ * @param enabled
71
+ */
72
+ setDragEnabled(enabled: boolean): boolean;
73
+
74
+ /**
75
+ * Is scroll enabled.
76
+ */
77
+ isScrollEnabled(): boolean;
78
+
79
+ /**
80
+ * Sets if scroll is enabled.
81
+ * @param enabled
82
+ */
83
+ setScrollEnabled(enabled: boolean): boolean;
84
+
85
+ /**
86
+ * Sets the associated button.
87
+ * @param btn
88
+ */
89
+ setButton(btn: number): boolean;
90
+
91
+ /**
92
+ * Gets the associated button.
93
+ */
94
+ getButton(): number;
95
+
96
+ /**
97
+ * Sets if the shift key is required.
98
+ * @param shift
99
+ */
100
+ setShift(shift: boolean): boolean;
101
+
102
+ /**
103
+ * Gets flag if shift key is required.
104
+ */
105
+ getShift(): boolean;
106
+
107
+ /**
108
+ * Sets if the control key is required.
109
+ * @param ctrl
110
+ */
111
+ setControl(ctrl: boolean): boolean;
112
+
113
+ /**
114
+ * Gets flag if control key is required.
115
+ */
116
+ getControl(): boolean;
117
+
118
+ /**
119
+ * Sets if the alt key is required.
120
+ * @param alt
121
+ */
122
+ setAlt(alt: boolean): boolean;
123
+
124
+ /**
125
+ * Gets flag if alt key is required.
126
+ */
127
+ getAlt(): boolean;
128
+ }
129
+
130
+ export interface ICompositeMouseManipulatorInitialValues {
131
+ button?: number;
132
+ shift?: boolean;
133
+ control?: boolean;
134
+ alt?: boolean;
135
+ dragEnabled?: boolean;
136
+ scrollEnabled?: boolean;
137
+ }
138
+
139
+ export function extend(
140
+ publicAPI: object,
141
+ model: object,
142
+ initialValues?: ICompositeMouseManipulatorInitialValues
143
+ ): void;
144
+
145
+ export const vtkCompositeMouseManipulator: {
146
+ extend: typeof extend;
147
+ };
148
+
149
+ export default vtkCompositeMouseManipulator;
@@ -0,0 +1,44 @@
1
+ import { States } from './../../Rendering/Core/InteractorStyle/Constants';
2
+ import vtkRenderer from './../../Rendering/Core/Renderer';
3
+ import vtkRenderWindowInteractor from './../../Rendering/Core/RenderWindowInteractor';
4
+ import {
5
+ Device,
6
+ Input,
7
+ } from './../../Rendering/Core/RenderWindowInteractor/Constants';
8
+
9
+ export interface vtkCompositeVRManipulator {
10
+ onButton3D(
11
+ interactor: vtkRenderWindowInteractor,
12
+ renderer: vtkRenderer,
13
+ state: States,
14
+ device: Device,
15
+ input: Input,
16
+ pressed: boolean
17
+ ): void;
18
+
19
+ onMove3D(
20
+ interactor: vtkRenderWindowInteractor,
21
+ renderer: vtkRenderer,
22
+ state: States,
23
+ device: Device,
24
+ input: Input,
25
+ pressed: boolean
26
+ ): void;
27
+ }
28
+
29
+ export interface ICompositeVRManipulatorInitialValues {
30
+ device?: Device;
31
+ input?: Input;
32
+ }
33
+
34
+ export function extend(
35
+ publicAPI: object,
36
+ model: object,
37
+ initialValues?: ICompositeVRManipulatorInitialValues
38
+ ): void;
39
+
40
+ export const vtkCompositeVRManipulator: {
41
+ extend: typeof extend;
42
+ };
43
+
44
+ export default vtkCompositeVRManipulator;
@@ -0,0 +1,34 @@
1
+ import vtkCompositeCameraManipulator, {
2
+ ICompositeCameraManipulatorInitialValues,
3
+ } from './CompositeCameraManipulator';
4
+ import vtkCompositeGestureManipulator, {
5
+ ICompositeGestureManipulatorInitialValues,
6
+ } from './CompositeGestureManipulator';
7
+ import { vtkObject } from './../../interfaces';
8
+ export interface vtkGestureCameraManipulator
9
+ extends vtkObject,
10
+ vtkCompositeCameraManipulator,
11
+ vtkCompositeGestureManipulator {}
12
+
13
+ export interface IGestureCameraManipulatorInitialValues
14
+ extends ICompositeCameraManipulatorInitialValues,
15
+ ICompositeGestureManipulatorInitialValues {
16
+ flipDirection?: boolean;
17
+ }
18
+
19
+ export function newInstance(
20
+ initialValues?: IGestureCameraManipulatorInitialValues
21
+ ): vtkGestureCameraManipulator;
22
+
23
+ export function extend(
24
+ publicAPI: object,
25
+ model: object,
26
+ initialValues?: IGestureCameraManipulatorInitialValues
27
+ ): void;
28
+
29
+ export const vtkGestureCameraManipulator: {
30
+ newInstance: typeof newInstance;
31
+ extend: typeof extend;
32
+ };
33
+
34
+ export default vtkGestureCameraManipulator;
@@ -1,7 +1,7 @@
1
1
  import macro from '../../macros.js';
2
2
  import vtkBoundingBox from '../../Common/DataModel/BoundingBox.js';
3
3
  import vtkCompositeKeyboardManipulator from './CompositeKeyboardManipulator.js';
4
- import { k as add, l as normalize, j as cross } from '../../Common/Core/Math/index.js';
4
+ import { l as add, g as normalize, k as cross } from '../../Common/Core/Math/index.js';
5
5
 
6
6
  var vtkErrorMacro = macro.vtkErrorMacro;
7
7
  var ANIMATION_REQUESTER = 'vtkKeyboardCameraManipulator'; // ----------------------------------------------------------------------------
@@ -0,0 +1,88 @@
1
+ import vtkCompositeMouseManipulator, {
2
+ ICompositeMouseManipulatorInitialValues,
3
+ } from './CompositeMouseManipulator';
4
+ import { EventHandler, vtkObject, vtkSubscription } from './../../interfaces';
5
+ import { Nullable } from './../../types';
6
+
7
+ export interface vtkMouseBoxSelectorManipulator
8
+ extends vtkObject,
9
+ vtkCompositeMouseManipulator {
10
+ /**
11
+ * Invokes a box select change event.
12
+ */
13
+ invokeBoxSelectChange(data: unknown): void;
14
+
15
+ /**
16
+ * Registers a callback when a box select change event occurs.
17
+ * @param cb EventHandler
18
+ */
19
+ onBoxSelectChange(cb: EventHandler): vtkSubscription;
20
+
21
+ /**
22
+ * Invokes a box select input event.
23
+ */
24
+ invokeBoxSelectInput(data: unknown): void;
25
+
26
+ /**
27
+ * Registers a callback when a box select input event occurs.
28
+ * @param cb EventHandler
29
+ */
30
+ onBoxSelectInput(cb: EventHandler): vtkSubscription;
31
+
32
+ /**
33
+ * Sets whether to render the selection.
34
+ * @param render
35
+ */
36
+ setRenderSelection(render: boolean): boolean;
37
+
38
+ /**
39
+ * Get whether to render the selection.
40
+ */
41
+ getRenderSelection(): boolean;
42
+
43
+ /**
44
+ * Sets the selection box style.
45
+ * @param style
46
+ */
47
+ setSelectionStyle(style: Record<string, string>): boolean;
48
+
49
+ /**
50
+ * Gets the selection box style.
51
+ */
52
+ getSelectionStyle(): Record<string, string>;
53
+
54
+ /**
55
+ * Sets the box container.
56
+ * @param container
57
+ */
58
+ setContainer(container: Element): boolean;
59
+
60
+ /**
61
+ * Gets the box container.
62
+ */
63
+ getContainer(): Nullable<Element>;
64
+ }
65
+
66
+ export interface IMouseBoxSelectorManipulatorInitialValues
67
+ extends ICompositeMouseManipulatorInitialValues {
68
+ renderSelection?: boolean;
69
+ selectionStyle?: Record<string, string>;
70
+ container?: Element;
71
+ }
72
+
73
+ export function newInstance(
74
+ initialValues?: IMouseBoxSelectorManipulatorInitialValues
75
+ ): vtkMouseBoxSelectorManipulator;
76
+
77
+ export function extend(
78
+ publicAPI: object,
79
+ model: object,
80
+ initialValues?: IMouseBoxSelectorManipulatorInitialValues
81
+ ): void;
82
+
83
+ export const vtkMouseBoxSelectorManipulator: {
84
+ newInstance: typeof newInstance;
85
+ extend: typeof extend;
86
+ };
87
+
88
+ export default vtkMouseBoxSelectorManipulator;
@@ -3,7 +3,7 @@ import { mat4, vec3 } from 'gl-matrix';
3
3
  import macro from '../../macros.js';
4
4
  import vtkCompositeCameraManipulator from './CompositeCameraManipulator.js';
5
5
  import vtkCompositeMouseManipulator from './CompositeMouseManipulator.js';
6
- import { r as radiansFromDegrees, j as cross } from '../../Common/Core/Math/index.js';
6
+ import { r as radiansFromDegrees, k as cross } from '../../Common/Core/Math/index.js';
7
7
  import vtkMatrixBuilder from '../../Common/Core/MatrixBuilder.js';
8
8
 
9
9
  // vtkMouseCameraAxisRotateManipulator methods
@@ -0,0 +1,32 @@
1
+ import vtkCompositeCameraManipulator, {
2
+ ICompositeCameraManipulatorInitialValues,
3
+ } from './CompositeCameraManipulator';
4
+ import vtkCompositeMouseManipulator, {
5
+ ICompositeMouseManipulatorInitialValues,
6
+ } from './CompositeMouseManipulator';
7
+ import { vtkObject } from './../../interfaces';
8
+ export interface vtkMouseCameraTrackballMultiRotateManipulator
9
+ extends vtkObject,
10
+ vtkCompositeCameraManipulator,
11
+ vtkCompositeMouseManipulator {}
12
+
13
+ export interface IMouseCameraTrackballMultiRotateManipulatorInitialValues
14
+ extends ICompositeCameraManipulatorInitialValues,
15
+ ICompositeMouseManipulatorInitialValues {}
16
+
17
+ export function newInstance(
18
+ initialValues?: IMouseCameraTrackballMultiRotateManipulatorInitialValues
19
+ ): vtkMouseCameraTrackballMultiRotateManipulator;
20
+
21
+ export function extend(
22
+ publicAPI: object,
23
+ model: object,
24
+ initialValues?: IMouseCameraTrackballMultiRotateManipulatorInitialValues
25
+ ): void;
26
+
27
+ export const vtkMouseCameraTrackballMultiRotateManipulator: {
28
+ newInstance: typeof newInstance;
29
+ extend: typeof extend;
30
+ };
31
+
32
+ export default vtkMouseCameraTrackballMultiRotateManipulator;