@kitware/vtk.js 23.4.2 → 24.0.0-beta.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/BREAKING_CHANGES.md +33 -0
- package/Common/Core/DataArray.js +4 -0
- package/Common/Core/Math/index.js +2 -2
- package/Common/Core/Math.js +1 -1
- package/Common/DataModel/BoundingBox.js +3 -8
- package/Common/DataModel/DataSetAttributes/FieldData.js +9 -5
- package/Common/DataModel/ITKHelper.js +2 -346
- package/Common/DataModel/ImageData.d.ts +23 -6
- package/Common/DataModel/ImageData.js +8 -1
- package/Common/DataModel/PolyData.d.ts +8 -1
- package/Common/DataModel/PolyData.js +5 -3
- package/Common/DataModel/Triangle.js +217 -2
- package/Common/Transform/LandmarkTransform.js +1 -1
- package/Filters/General/OBBTree/OBBNode.js +82 -0
- package/Filters/General/OBBTree/helper.js +92 -0
- package/Filters/General/OBBTree.js +1249 -0
- package/Filters/General/WindowedSincPolyDataFilter.js +1 -1
- package/Filters/General.js +2 -0
- package/Filters/Sources/CircleSource.js +1 -1
- package/Filters/Sources/PointSource.js +1 -1
- package/Filters/Texture/TextureMapToPlane.js +1 -1
- package/IO/Core/DataAccessHelper.d.ts +0 -6
- package/Interaction/Manipulators/KeyboardCameraManipulator.js +1 -1
- package/Interaction/Manipulators/MouseCameraTrackballRollManipulator.js +1 -1
- package/Interaction/Manipulators/MouseCameraTrackballRotateManipulator.js +1 -1
- package/Interaction/Manipulators/MouseCameraUnicamManipulator.js +1 -1
- package/Interaction/Manipulators/MouseCameraUnicamRotateManipulator.js +1 -1
- package/Interaction/Style/InteractorStyleImage.js +3 -3
- package/Interaction/Style/InteractorStyleMPRSlice.js +12 -6
- package/Interaction/Style/InteractorStyleManipulator.js +42 -28
- package/Interaction/Style/InteractorStyleRemoteMouse.js +32 -14
- package/Interaction/Style/InteractorStyleTrackballCamera.js +7 -7
- package/Interaction/Widgets/OrientationMarkerWidget.js +18 -13
- package/Interaction/Widgets/PiecewiseGaussianWidget.js +1 -1
- package/Interaction/Widgets.js +1 -35
- package/Proxy/Core/View2DProxy.js +1 -1
- package/Rendering/Core/ColorTransferFunction.js +1 -1
- package/Rendering/Core/Coordinate.js +1 -1
- package/Rendering/Core/CubeAxesActor.js +1 -1
- package/Rendering/Core/Glyph3DMapper.js +1 -1
- package/Rendering/Core/ImageMapper.js +1 -1
- package/Rendering/Core/InteractorObserver.js +11 -10
- package/Rendering/Core/InteractorStyle.js +9 -4
- package/Rendering/Core/Mapper.js +1 -1
- package/Rendering/Core/Prop.js +6 -4
- package/Rendering/Core/Prop3D.js +1 -1
- package/Rendering/Core/RenderWindowInteractor.js +24 -17
- package/Rendering/Core/Renderer.js +24 -19
- package/Rendering/Core/ScalarBarActor.js +1 -1
- package/Rendering/Core/Viewport.js +1 -1
- package/Rendering/Core/VolumeMapper.js +1 -1
- package/Rendering/OpenGL/Actor.js +2 -2
- package/Rendering/OpenGL/Actor2D.js +2 -2
- package/Rendering/OpenGL/BufferObject.js +6 -5
- package/Rendering/OpenGL/Camera.js +3 -3
- package/Rendering/OpenGL/CellArrayBufferObject.js +1 -1
- package/Rendering/OpenGL/Framebuffer.js +13 -12
- package/Rendering/OpenGL/Glyph3DMapper.js +10 -8
- package/Rendering/OpenGL/HardwareSelector.js +35 -25
- package/Rendering/OpenGL/ImageMapper.js +51 -45
- package/Rendering/OpenGL/ImageSlice.js +2 -2
- package/Rendering/OpenGL/PixelSpaceCallbackMapper.js +4 -2
- package/Rendering/OpenGL/PolyDataMapper.js +14 -11
- package/Rendering/OpenGL/PolyDataMapper2D.js +17 -16
- package/Rendering/OpenGL/Renderer.js +11 -7
- package/Rendering/OpenGL/ReplacementShaderMapper.js +1 -1
- package/Rendering/OpenGL/ScalarBarActor.js +2 -2
- package/Rendering/OpenGL/ShaderCache.js +7 -5
- package/Rendering/OpenGL/Skybox.js +11 -9
- package/Rendering/OpenGL/SphereMapper.js +2 -2
- package/Rendering/OpenGL/StickMapper.js +2 -2
- package/Rendering/OpenGL/SurfaceLIC/LineIntegralConvolution2D/pingpong.js +13 -12
- package/Rendering/OpenGL/SurfaceLIC/LineIntegralConvolution2D.js +11 -9
- package/Rendering/OpenGL/SurfaceLIC/SurfaceLICInterface.js +19 -12
- package/Rendering/OpenGL/SurfaceLIC/SurfaceLICMapper.js +9 -6
- package/Rendering/OpenGL/Texture.js +44 -31
- package/Rendering/OpenGL/VertexArrayObject.js +7 -7
- package/Rendering/OpenGL/Volume.js +3 -2
- package/Rendering/OpenGL/VolumeMapper.js +30 -26
- package/Rendering/OpenGL/glsl/vtkVolumeFS.glsl.js +1 -1
- package/Rendering/SceneGraph/ViewNode.js +8 -7
- package/Rendering/WebGPU/Renderer.js +18 -10
- package/Widgets/Core/AbstractWidget.js +5 -4
- package/Widgets/Core/AbstractWidgetFactory.js +2 -1
- package/Widgets/Core/WidgetManager.js +66 -49
- package/Widgets/Manipulators/LineManipulator.js +1 -1
- package/Widgets/Representations/CircleContextRepresentation.js +1 -1
- package/Widgets/Representations/ImplicitPlaneRepresentation.js +5 -5
- package/Widgets/Representations/PolyLineRepresentation.js +1 -1
- package/Widgets/Representations/ResliceCursorContextRepresentation.js +7 -7
- package/Widgets/SVG/SVGLandmarkRepresentation/Constants.js +2 -2
- package/Widgets/SVG/SVGLandmarkRepresentation.js +21 -8
- package/Widgets/SVG/SVGRepresentation.js +1 -1
- package/Widgets/Widgets3D/AngleWidget/behavior.js +14 -6
- package/Widgets/Widgets3D/DistanceWidget/behavior.js +14 -6
- package/Widgets/Widgets3D/EllipseWidget.js +0 -1
- package/Widgets/Widgets3D/ImageCroppingWidget/behavior.js +6 -2
- package/Widgets/Widgets3D/ImplicitPlaneWidget.js +4 -2
- package/Widgets/Widgets3D/LabelWidget/behavior.js +138 -0
- package/Widgets/Widgets3D/LabelWidget/state.js +22 -0
- package/Widgets/Widgets3D/LabelWidget.js +79 -0
- package/Widgets/Widgets3D/LineWidget/behavior.js +18 -9
- package/Widgets/Widgets3D/LineWidget/helpers.js +1 -1
- package/Widgets/Widgets3D/LineWidget.js +0 -1
- package/Widgets/Widgets3D/PaintWidget/behavior.js +5 -3
- package/Widgets/Widgets3D/PolyLineWidget/behavior.js +18 -8
- package/Widgets/Widgets3D/RectangleWidget.js +0 -1
- package/Widgets/Widgets3D/ResliceCursorWidget/behavior.js +1 -1
- package/Widgets/Widgets3D/ResliceCursorWidget/helpers.js +1 -1
- package/Widgets/Widgets3D/ResliceCursorWidget.js +1 -1
- package/Widgets/Widgets3D/ShapeWidget/behavior.js +18 -11
- package/Widgets/Widgets3D/SplineWidget/behavior.js +33 -21
- package/index.d.ts +1 -2
- package/interfaces.d.ts +16 -3
- package/macros.d.ts +26 -1
- package/macros.js +51 -19
- package/package.json +1 -1
- package/types.d.ts +1 -0
- package/Interaction/Widgets/AbstractWidget.js +0 -104
- package/Interaction/Widgets/DistanceRepresentation.js +0 -116
- package/Interaction/Widgets/DistanceWidget.js +0 -77
- package/Interaction/Widgets/HandleRepresentation/Constants.js +0 -12
- package/Interaction/Widgets/HandleRepresentation.js +0 -100
- package/Interaction/Widgets/HandleWidget/Constants.js +0 -9
- package/Interaction/Widgets/HandleWidget.js +0 -194
- package/Interaction/Widgets/ImageCroppingRegionsRepresentation.js +0 -233
- package/Interaction/Widgets/ImageCroppingRegionsWidget/Constants.js +0 -16
- package/Interaction/Widgets/ImageCroppingRegionsWidget.js +0 -573
- package/Interaction/Widgets/LabelRepresentation/Constants.js +0 -17
- package/Interaction/Widgets/LabelRepresentation.js +0 -325
- package/Interaction/Widgets/LabelWidget.js +0 -65
- package/Interaction/Widgets/LineRepresentation/Constants.js +0 -21
- package/Interaction/Widgets/LineRepresentation.js +0 -498
- package/Interaction/Widgets/LineWidget/Constants.js +0 -11
- package/Interaction/Widgets/LineWidget.js +0 -296
- package/Interaction/Widgets/PointPlacer.js +0 -51
- package/Interaction/Widgets/ResliceCursor/ResliceCursor/Constants.js +0 -10
- package/Interaction/Widgets/ResliceCursor/ResliceCursor.js +0 -269
- package/Interaction/Widgets/ResliceCursor/ResliceCursorActor/Constants.js +0 -10
- package/Interaction/Widgets/ResliceCursor/ResliceCursorActor.js +0 -146
- package/Interaction/Widgets/ResliceCursor/ResliceCursorLineRepresentation.js +0 -332
- package/Interaction/Widgets/ResliceCursor/ResliceCursorPolyDataAlgorithm.js +0 -134
- package/Interaction/Widgets/ResliceCursor/ResliceCursorRepresentation/Constants.js +0 -16
- package/Interaction/Widgets/ResliceCursor/ResliceCursorRepresentation.js +0 -371
- package/Interaction/Widgets/ResliceCursor/ResliceCursorWidget/Constants.js +0 -10
- package/Interaction/Widgets/ResliceCursor/ResliceCursorWidget.js +0 -157
- package/Interaction/Widgets/SphereHandleRepresentation.js +0 -370
- package/Interaction/Widgets/WidgetRepresentation.js +0 -121
- package/Widgets/Representations/SphereContextRepresentation.js +0 -131
- package/Widgets/Widgets3D/SphereWidget/behavior.js +0 -177
- package/Widgets/Widgets3D/SphereWidget/state.js +0 -45
- package/Widgets/Widgets3D/SphereWidget.d.ts +0 -50
- package/Widgets/Widgets3D/SphereWidget.js +0 -62
|
@@ -30,7 +30,7 @@ function vtkOrientationMarkerWidget(publicAPI, model) {
|
|
|
30
30
|
var selfSubscription = null;
|
|
31
31
|
|
|
32
32
|
publicAPI.computeViewport = function () {
|
|
33
|
-
var parentRen = model.parentRenderer || model.
|
|
33
|
+
var parentRen = model.parentRenderer || model._interactor.getCurrentRenderer();
|
|
34
34
|
|
|
35
35
|
var _parentRen$getViewpor = parentRen.getViewport(),
|
|
36
36
|
_parentRen$getViewpor2 = _slicedToArray(_parentRen$getViewpor, 4),
|
|
@@ -39,7 +39,8 @@ function vtkOrientationMarkerWidget(publicAPI, model) {
|
|
|
39
39
|
xMax = _parentRen$getViewpor2[2],
|
|
40
40
|
yMax = _parentRen$getViewpor2[3];
|
|
41
41
|
|
|
42
|
-
var view = model.
|
|
42
|
+
var view = model._interactor.getView();
|
|
43
|
+
|
|
43
44
|
var canvasSize = view.getSize();
|
|
44
45
|
|
|
45
46
|
var _view$getViewportSize = view.getViewportSize(parentRen),
|
|
@@ -76,12 +77,14 @@ function vtkOrientationMarkerWidget(publicAPI, model) {
|
|
|
76
77
|
publicAPI.updateViewport = function () {
|
|
77
78
|
if (model.enabled) {
|
|
78
79
|
selfRenderer.setViewport.apply(selfRenderer, _toConsumableArray(publicAPI.computeViewport()));
|
|
79
|
-
|
|
80
|
+
|
|
81
|
+
model._interactor.render();
|
|
80
82
|
}
|
|
81
83
|
};
|
|
82
84
|
|
|
83
85
|
publicAPI.updateMarkerOrientation = function () {
|
|
84
|
-
var ren = model.parentRenderer || model.
|
|
86
|
+
var ren = model.parentRenderer || model._interactor.getCurrentRenderer();
|
|
87
|
+
|
|
85
88
|
var currentCamera = ren.getActiveCamera();
|
|
86
89
|
|
|
87
90
|
if (!currentCamera) {
|
|
@@ -125,12 +128,13 @@ function vtkOrientationMarkerWidget(publicAPI, model) {
|
|
|
125
128
|
return;
|
|
126
129
|
}
|
|
127
130
|
|
|
128
|
-
if (!model.
|
|
131
|
+
if (!model._interactor) {
|
|
129
132
|
vtkErrorMacro('Must set interactor before enabling orientation marker.');
|
|
130
133
|
return;
|
|
131
134
|
}
|
|
132
135
|
|
|
133
|
-
var ren = model.parentRenderer || model.
|
|
136
|
+
var ren = model.parentRenderer || model._interactor.getCurrentRenderer();
|
|
137
|
+
|
|
134
138
|
var renderWindow = ren.getRenderWindow();
|
|
135
139
|
renderWindow.addRenderer(selfRenderer);
|
|
136
140
|
|
|
@@ -143,9 +147,9 @@ function vtkOrientationMarkerWidget(publicAPI, model) {
|
|
|
143
147
|
selfRenderer.setInteractive(false);
|
|
144
148
|
selfRenderer.addViewProp(model.actor);
|
|
145
149
|
model.actor.setVisibility(true);
|
|
146
|
-
onAnimationSub = model.
|
|
147
|
-
onEndAnimationSub = model.
|
|
148
|
-
resizeObserver.observe(model.
|
|
150
|
+
onAnimationSub = model._interactor.onAnimation(publicAPI.updateMarkerOrientation);
|
|
151
|
+
onEndAnimationSub = model._interactor.onEndAnimation(publicAPI.updateMarkerOrientation);
|
|
152
|
+
resizeObserver.observe(model._interactor.getView().getCanvas());
|
|
149
153
|
publicAPI.updateViewport();
|
|
150
154
|
publicAPI.updateMarkerOrientation();
|
|
151
155
|
model.enabled = true;
|
|
@@ -163,7 +167,7 @@ function vtkOrientationMarkerWidget(publicAPI, model) {
|
|
|
163
167
|
model.actor.setVisibility(false);
|
|
164
168
|
selfRenderer.removeViewProp(model.actor);
|
|
165
169
|
|
|
166
|
-
var _renderWindow = model.
|
|
170
|
+
var _renderWindow = model._interactor.findPokedRenderer().getRenderWindow();
|
|
167
171
|
|
|
168
172
|
if (_renderWindow) {
|
|
169
173
|
_renderWindow.removeRenderer(selfRenderer);
|
|
@@ -253,7 +257,7 @@ function vtkOrientationMarkerWidget(publicAPI, model) {
|
|
|
253
257
|
|
|
254
258
|
var DEFAULT_VALUES = {
|
|
255
259
|
// actor: null,
|
|
256
|
-
//
|
|
260
|
+
// _interactor: null,
|
|
257
261
|
viewportCorner: Constants.Corners.BOTTOM_LEFT,
|
|
258
262
|
viewportSize: 0.2,
|
|
259
263
|
minPixelSize: 50,
|
|
@@ -269,8 +273,9 @@ function extend(publicAPI, model) {
|
|
|
269
273
|
macro.get(publicAPI, model, ['enabled', 'viewportCorner', 'viewportSize']); // NOTE: setting these while the widget is enabled will
|
|
270
274
|
// not update the widget.
|
|
271
275
|
|
|
272
|
-
macro.setGet(publicAPI, model, ['
|
|
273
|
-
macro.get(publicAPI, model, ['actor']);
|
|
276
|
+
macro.setGet(publicAPI, model, ['_interactor', 'minPixelSize', 'maxPixelSize', 'parentRenderer']);
|
|
277
|
+
macro.get(publicAPI, model, ['actor']);
|
|
278
|
+
macro.moveToProtected(publicAPI, model, ['interactor']); // Object methods
|
|
274
279
|
|
|
275
280
|
vtkOrientationMarkerWidget(publicAPI, model);
|
|
276
281
|
} // ----------------------------------------------------------------------------
|
|
@@ -2,7 +2,7 @@ import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
|
2
2
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
3
3
|
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
4
4
|
import macro from '../../macros.js';
|
|
5
|
-
import {
|
|
5
|
+
import { D as arrayRange } from '../../Common/Core/Math/index.js';
|
|
6
6
|
import WebworkerPromise from 'webworker-promise';
|
|
7
7
|
import { W as WorkerFactory } from '../../_virtual/rollup-plugin-worker-loader__module_Sources/Interaction/Widgets/PiecewiseGaussianWidget/ComputeHistogram.worker.js';
|
|
8
8
|
|
package/Interaction/Widgets.js
CHANGED
|
@@ -1,43 +1,9 @@
|
|
|
1
|
-
import vtkAbstractWidget from './Widgets/AbstractWidget.js';
|
|
2
|
-
import vtkDistanceRepresentation from './Widgets/DistanceRepresentation.js';
|
|
3
|
-
import vtkDistanceWidget from './Widgets/DistanceWidget.js';
|
|
4
|
-
import vtkHandleRepresentation from './Widgets/HandleRepresentation.js';
|
|
5
|
-
import vtkHandleWidget from './Widgets/HandleWidget.js';
|
|
6
|
-
import vtkImageCroppingRegionsRepresentation from './Widgets/ImageCroppingRegionsRepresentation.js';
|
|
7
|
-
import vtkImageCroppingRegionsWidget from './Widgets/ImageCroppingRegionsWidget.js';
|
|
8
|
-
import vtkLabelRepresentation from './Widgets/LabelRepresentation.js';
|
|
9
|
-
import vtkLabelWidget from './Widgets/LabelWidget.js';
|
|
10
|
-
import vtkLineRepresentation from './Widgets/LineRepresentation.js';
|
|
11
|
-
import vtkLineWidget from './Widgets/LineWidget.js';
|
|
12
1
|
import vtkOrientationMarkerWidget from './Widgets/OrientationMarkerWidget.js';
|
|
13
2
|
import vtkPiecewiseGaussianWidget from './Widgets/PiecewiseGaussianWidget.js';
|
|
14
|
-
import vtkPointPlacer from './Widgets/PointPlacer.js';
|
|
15
|
-
import vtkResliceCursor from './Widgets/ResliceCursor/ResliceCursor.js';
|
|
16
|
-
import vtkResliceCursorLineRepresentation from './Widgets/ResliceCursor/ResliceCursorLineRepresentation.js';
|
|
17
|
-
import vtkResliceCursorWidget from './Widgets/ResliceCursor/ResliceCursorWidget.js';
|
|
18
|
-
import vtkSphereHandleRepresentation from './Widgets/SphereHandleRepresentation.js';
|
|
19
|
-
import vtkWidgetRepresentation from './Widgets/WidgetRepresentation.js';
|
|
20
3
|
|
|
21
4
|
var Widgets = {
|
|
22
|
-
vtkAbstractWidget: vtkAbstractWidget,
|
|
23
|
-
vtkDistanceRepresentation: vtkDistanceRepresentation,
|
|
24
|
-
vtkDistanceWidget: vtkDistanceWidget,
|
|
25
|
-
vtkHandleRepresentation: vtkHandleRepresentation,
|
|
26
|
-
vtkHandleWidget: vtkHandleWidget,
|
|
27
|
-
vtkImageCroppingRegionsRepresentation: vtkImageCroppingRegionsRepresentation,
|
|
28
|
-
vtkImageCroppingRegionsWidget: vtkImageCroppingRegionsWidget,
|
|
29
|
-
vtkLabelRepresentation: vtkLabelRepresentation,
|
|
30
|
-
vtkLabelWidget: vtkLabelWidget,
|
|
31
|
-
vtkLineRepresentation: vtkLineRepresentation,
|
|
32
|
-
vtkLineWidget: vtkLineWidget,
|
|
33
5
|
vtkOrientationMarkerWidget: vtkOrientationMarkerWidget,
|
|
34
|
-
vtkPiecewiseGaussianWidget: vtkPiecewiseGaussianWidget
|
|
35
|
-
vtkPointPlacer: vtkPointPlacer,
|
|
36
|
-
vtkResliceCursor: vtkResliceCursor,
|
|
37
|
-
vtkResliceCursorLineRepresentation: vtkResliceCursorLineRepresentation,
|
|
38
|
-
vtkResliceCursorWidget: vtkResliceCursorWidget,
|
|
39
|
-
vtkSphereHandleRepresentation: vtkSphereHandleRepresentation,
|
|
40
|
-
vtkWidgetRepresentation: vtkWidgetRepresentation
|
|
6
|
+
vtkPiecewiseGaussianWidget: vtkPiecewiseGaussianWidget
|
|
41
7
|
};
|
|
42
8
|
|
|
43
9
|
export { Widgets as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import macro from '../../macros.js';
|
|
2
2
|
import vtkMouseRangeManipulator from '../../Interaction/Manipulators/MouseRangeManipulator.js';
|
|
3
3
|
import vtkViewProxy from './ViewProxy.js';
|
|
4
|
-
import { j as cross,
|
|
4
|
+
import { j as cross, E as getMajorAxisIndex } from '../../Common/Core/Math/index.js';
|
|
5
5
|
|
|
6
6
|
var DEFAULT_STEP_WIDTH = 512;
|
|
7
7
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
2
2
|
import macro from '../../macros.js';
|
|
3
|
-
import { h as hsv2rgb, i as isNan,
|
|
3
|
+
import { h as hsv2rgb, i as isNan, F as isInf, G as rgb2hsv, H as rgb2lab, I as lab2rgb, J as floor } from '../../Common/Core/Math/index.js';
|
|
4
4
|
import vtkScalarsToColors from '../../Common/Core/ScalarsToColors.js';
|
|
5
5
|
import Constants from './ColorTransferFunction/Constants.js';
|
|
6
6
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
2
2
|
import macro from '../../macros.js';
|
|
3
3
|
import Constants from './Coordinate/Constants.js';
|
|
4
|
-
import {
|
|
4
|
+
import { K as round, J as floor } from '../../Common/Core/Math/index.js';
|
|
5
5
|
|
|
6
6
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
7
7
|
|
|
@@ -2,7 +2,7 @@ import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
|
2
2
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
3
3
|
import { vec3, mat4 } from 'gl-matrix';
|
|
4
4
|
import * as d3 from 'd3-scale';
|
|
5
|
-
import {
|
|
5
|
+
import { L as normalize2D, M as nearestPowerOfTwo } from '../../Common/Core/Math/index.js';
|
|
6
6
|
import macro from '../../macros.js';
|
|
7
7
|
import vtkActor from './Actor.js';
|
|
8
8
|
import vtkBoundingBox from '../../Common/DataModel/BoundingBox.js';
|
|
@@ -4,7 +4,7 @@ import { mat4, vec3, mat3 } from 'gl-matrix';
|
|
|
4
4
|
import Constants from './Glyph3DMapper/Constants.js';
|
|
5
5
|
import macro from '../../macros.js';
|
|
6
6
|
import vtkMapper from './Mapper.js';
|
|
7
|
-
import {
|
|
7
|
+
import { N as createUninitializedBounds, n as norm } from '../../Common/Core/Math/index.js';
|
|
8
8
|
import vtkBoundingBox from '../../Common/DataModel/BoundingBox.js';
|
|
9
9
|
|
|
10
10
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
@@ -2,7 +2,7 @@ import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
|
2
2
|
import Constants from './ImageMapper/Constants.js';
|
|
3
3
|
import macro from '../../macros.js';
|
|
4
4
|
import vtkAbstractMapper from './AbstractMapper.js';
|
|
5
|
-
import {
|
|
5
|
+
import { C as clampValue, O as multiply3x3_vect3, N as createUninitializedBounds } from '../../Common/Core/Math/index.js';
|
|
6
6
|
import vtkPlane from '../../Common/DataModel/Plane.js';
|
|
7
7
|
import CoincidentTopologyHelper from './Mapper/CoincidentTopologyHelper.js';
|
|
8
8
|
import { vec3 } from 'gl-matrix';
|
|
@@ -54,7 +54,7 @@ function vtkInteractorObserver(publicAPI, model) {
|
|
|
54
54
|
function subscribeToEvents() {
|
|
55
55
|
vtkRenderWindowInteractor.handledEvents.forEach(function (eventName) {
|
|
56
56
|
if (publicAPI["handle".concat(eventName)]) {
|
|
57
|
-
model.subscribedEvents.push(model.
|
|
57
|
+
model.subscribedEvents.push(model._interactor["on".concat(eventName)](function (callData) {
|
|
58
58
|
if (model.processEvents) {
|
|
59
59
|
return publicAPI["handle".concat(eventName)](callData);
|
|
60
60
|
}
|
|
@@ -69,12 +69,12 @@ function vtkInteractorObserver(publicAPI, model) {
|
|
|
69
69
|
|
|
70
70
|
|
|
71
71
|
publicAPI.setInteractor = function (i) {
|
|
72
|
-
if (i === model.
|
|
72
|
+
if (i === model._interactor) {
|
|
73
73
|
return;
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
unsubscribeFromEvents();
|
|
77
|
-
model.
|
|
77
|
+
model._interactor = i;
|
|
78
78
|
|
|
79
79
|
if (i && model.enabled) {
|
|
80
80
|
subscribeToEvents();
|
|
@@ -92,7 +92,7 @@ function vtkInteractorObserver(publicAPI, model) {
|
|
|
92
92
|
unsubscribeFromEvents();
|
|
93
93
|
|
|
94
94
|
if (enable) {
|
|
95
|
-
if (model.
|
|
95
|
+
if (model._interactor) {
|
|
96
96
|
subscribeToEvents();
|
|
97
97
|
} else {
|
|
98
98
|
vtkErrorMacro("\n The interactor must be set before subscribing to events\n ");
|
|
@@ -111,7 +111,7 @@ function vtkInteractorObserver(publicAPI, model) {
|
|
|
111
111
|
return null;
|
|
112
112
|
}
|
|
113
113
|
|
|
114
|
-
return model.
|
|
114
|
+
return model._interactor.getView().displayToWorld(x, y, z, renderer);
|
|
115
115
|
}; //----------------------------------------------------------------------------
|
|
116
116
|
// Description:
|
|
117
117
|
// Transform from world to display coordinates.
|
|
@@ -122,14 +122,14 @@ function vtkInteractorObserver(publicAPI, model) {
|
|
|
122
122
|
return null;
|
|
123
123
|
}
|
|
124
124
|
|
|
125
|
-
return model.
|
|
125
|
+
return model._interactor.getView().worldToDisplay(x, y, z, renderer);
|
|
126
126
|
}; //----------------------------------------------------------------------------
|
|
127
127
|
|
|
128
128
|
|
|
129
129
|
publicAPI.setPriority = function (priority) {
|
|
130
130
|
var modified = superClass.setPriority(priority);
|
|
131
131
|
|
|
132
|
-
if (modified && model.
|
|
132
|
+
if (modified && model._interactor) {
|
|
133
133
|
unsubscribeFromEvents();
|
|
134
134
|
subscribeToEvents();
|
|
135
135
|
}
|
|
@@ -141,7 +141,7 @@ function vtkInteractorObserver(publicAPI, model) {
|
|
|
141
141
|
|
|
142
142
|
var DEFAULT_VALUES = {
|
|
143
143
|
enabled: true,
|
|
144
|
-
|
|
144
|
+
// _interactor: null,
|
|
145
145
|
priority: 0.0,
|
|
146
146
|
processEvents: true,
|
|
147
147
|
subscribedEvents: []
|
|
@@ -156,9 +156,10 @@ function extend(publicAPI, model) {
|
|
|
156
156
|
macro.event(publicAPI, model, 'StartInteractionEvent');
|
|
157
157
|
macro.event(publicAPI, model, 'EndInteractionEvent'); // Create get-only macros
|
|
158
158
|
|
|
159
|
-
macro.get(publicAPI, model, ['
|
|
159
|
+
macro.get(publicAPI, model, ['_interactor', 'enabled']); // Create get-set macros
|
|
160
160
|
|
|
161
|
-
macro.setGet(publicAPI, model, ['priority', 'processEvents']);
|
|
161
|
+
macro.setGet(publicAPI, model, ['priority', 'processEvents']);
|
|
162
|
+
macro.moveToProtected(publicAPI, model, ['interactor']); // For more macro methods, see "Sources/macros.js"
|
|
162
163
|
// Object specific methods
|
|
163
164
|
|
|
164
165
|
vtkInteractorObserver(publicAPI, model);
|
|
@@ -38,7 +38,9 @@ function vtkInteractorStyle(publicAPI, model) {
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
model.state = stateNames[key];
|
|
41
|
-
|
|
41
|
+
|
|
42
|
+
model._interactor.requestAnimation(publicAPI);
|
|
43
|
+
|
|
42
44
|
publicAPI.invokeStartInteractionEvent({
|
|
43
45
|
type: 'StartInteractionEvent'
|
|
44
46
|
});
|
|
@@ -55,19 +57,22 @@ function vtkInteractorStyle(publicAPI, model) {
|
|
|
55
57
|
}
|
|
56
58
|
|
|
57
59
|
model.state = States.IS_NONE;
|
|
58
|
-
|
|
60
|
+
|
|
61
|
+
model._interactor.cancelAnimation(publicAPI);
|
|
62
|
+
|
|
59
63
|
publicAPI.invokeEndInteractionEvent({
|
|
60
64
|
type: 'EndInteractionEvent'
|
|
61
65
|
});
|
|
62
66
|
publicAPI["invokeEnd".concat(key, "Event")]({
|
|
63
67
|
type: "End".concat(key, "Event")
|
|
64
68
|
});
|
|
65
|
-
|
|
69
|
+
|
|
70
|
+
model._interactor.render();
|
|
66
71
|
};
|
|
67
72
|
}); //----------------------------------------------------------------------------
|
|
68
73
|
|
|
69
74
|
publicAPI.handleKeyPress = function (callData) {
|
|
70
|
-
var rwi = model.
|
|
75
|
+
var rwi = model._interactor;
|
|
71
76
|
var ac = null;
|
|
72
77
|
|
|
73
78
|
switch (callData.key) {
|
package/Rendering/Core/Mapper.js
CHANGED
|
@@ -4,7 +4,7 @@ import vtkAbstractMapper3D from './AbstractMapper3D.js';
|
|
|
4
4
|
import vtkDataArray from '../../Common/Core/DataArray.js';
|
|
5
5
|
import vtkImageData from '../../Common/DataModel/ImageData.js';
|
|
6
6
|
import vtkLookupTable from '../../Common/Core/LookupTable.js';
|
|
7
|
-
import {
|
|
7
|
+
import { N as createUninitializedBounds, i as isNan } from '../../Common/Core/Math/index.js';
|
|
8
8
|
import vtkScalarsToColors from '../../Common/Core/ScalarsToColors/Constants.js';
|
|
9
9
|
import CoincidentTopologyHelper from './Mapper/CoincidentTopologyHelper.js';
|
|
10
10
|
import Constants from './Mapper/Constants.js';
|
package/Rendering/Core/Prop.js
CHANGED
|
@@ -47,15 +47,15 @@ function vtkProp(publicAPI, model) {
|
|
|
47
47
|
publicAPI.hasKey = notImplemented('hasKey');
|
|
48
48
|
|
|
49
49
|
publicAPI.getNestedVisibility = function () {
|
|
50
|
-
return model.visibility && (!model.
|
|
50
|
+
return model.visibility && (!model._parentProp || model._parentProp.getNestedVisibility());
|
|
51
51
|
};
|
|
52
52
|
|
|
53
53
|
publicAPI.getNestedPickable = function () {
|
|
54
|
-
return model.pickable && (!model.
|
|
54
|
+
return model.pickable && (!model._parentProp || model._parentProp.getNestedPickable());
|
|
55
55
|
};
|
|
56
56
|
|
|
57
57
|
publicAPI.getNestedDragable = function () {
|
|
58
|
-
return model.dragable && (!model.
|
|
58
|
+
return model.dragable && (!model._parentProp || model._parentProp.getNestedDragable());
|
|
59
59
|
};
|
|
60
60
|
|
|
61
61
|
publicAPI.getRedrawMTime = function () {
|
|
@@ -121,6 +121,7 @@ function vtkProp(publicAPI, model) {
|
|
|
121
121
|
|
|
122
122
|
|
|
123
123
|
var DEFAULT_VALUES = {
|
|
124
|
+
// _parentProp: null,
|
|
124
125
|
visibility: true,
|
|
125
126
|
pickable: true,
|
|
126
127
|
dragable: true,
|
|
@@ -139,7 +140,8 @@ function extend(publicAPI, model) {
|
|
|
139
140
|
|
|
140
141
|
macro.obj(publicAPI, model);
|
|
141
142
|
macro.get(publicAPI, model, ['estimatedRenderTime', 'allocatedRenderTime']);
|
|
142
|
-
macro.setGet(publicAPI, model, ['visibility', 'pickable', 'dragable', 'useBounds', 'renderTimeMultiplier', '
|
|
143
|
+
macro.setGet(publicAPI, model, ['visibility', 'pickable', 'dragable', 'useBounds', 'renderTimeMultiplier', '_parentProp']);
|
|
144
|
+
macro.moveToProtected(publicAPI, model, ['parentProp']); // Object methods
|
|
143
145
|
|
|
144
146
|
vtkProp(publicAPI, model);
|
|
145
147
|
} // ----------------------------------------------------------------------------
|
package/Rendering/Core/Prop3D.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { mat4, quat } from 'gl-matrix';
|
|
2
2
|
import macro from '../../macros.js';
|
|
3
3
|
import vtkBoundingBox from '../../Common/DataModel/BoundingBox.js';
|
|
4
|
-
import {
|
|
4
|
+
import { A as degreesFromRadians, r as radiansFromDegrees } from '../../Common/Core/Math/index.js';
|
|
5
5
|
import vtkProp from './Prop.js';
|
|
6
6
|
|
|
7
7
|
// vtkProp3D methods
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
2
2
|
import macro from '../../macros.js';
|
|
3
|
-
import {
|
|
3
|
+
import { A as degreesFromRadians } from '../../Common/Core/Math/index.js';
|
|
4
4
|
import Constants from './RenderWindowInteractor/Constants.js';
|
|
5
5
|
|
|
6
6
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
@@ -119,7 +119,9 @@ function vtkRenderWindowInteractor(publicAPI, model) {
|
|
|
119
119
|
|
|
120
120
|
function getScreenEventPositionFor(source) {
|
|
121
121
|
var bounds = model.container.getBoundingClientRect();
|
|
122
|
-
|
|
122
|
+
|
|
123
|
+
var canvas = model._view.getCanvas();
|
|
124
|
+
|
|
123
125
|
var scaleX = canvas.width / bounds.width;
|
|
124
126
|
var scaleY = canvas.height / bounds.height;
|
|
125
127
|
var position = {
|
|
@@ -301,9 +303,11 @@ function vtkRenderWindowInteractor(publicAPI, model) {
|
|
|
301
303
|
|
|
302
304
|
|
|
303
305
|
function forceRender() {
|
|
304
|
-
if (model.
|
|
306
|
+
if (model._view && model.enabled && model.enableRender) {
|
|
305
307
|
model.inRender = true;
|
|
306
|
-
|
|
308
|
+
|
|
309
|
+
model._view.traverseAllPasses();
|
|
310
|
+
|
|
307
311
|
model.inRender = false;
|
|
308
312
|
} // outside the above test so that third-party code can redirect
|
|
309
313
|
// the render to the appropriate class
|
|
@@ -674,34 +678,36 @@ function vtkRenderWindowInteractor(publicAPI, model) {
|
|
|
674
678
|
};
|
|
675
679
|
|
|
676
680
|
publicAPI.setView = function (val) {
|
|
677
|
-
if (model.
|
|
681
|
+
if (model._view === val) {
|
|
678
682
|
return;
|
|
679
683
|
}
|
|
680
684
|
|
|
681
|
-
model.
|
|
682
|
-
|
|
685
|
+
model._view = val;
|
|
686
|
+
|
|
687
|
+
model._view.getRenderable().setInteractor(publicAPI);
|
|
688
|
+
|
|
683
689
|
publicAPI.modified();
|
|
684
690
|
};
|
|
685
691
|
|
|
686
692
|
publicAPI.getFirstRenderer = function () {
|
|
687
|
-
var _model$
|
|
693
|
+
var _model$_view, _model$_view$getRende, _model$_view$getRende2;
|
|
688
694
|
|
|
689
|
-
return (_model$
|
|
695
|
+
return (_model$_view = model._view) === null || _model$_view === void 0 ? void 0 : (_model$_view$getRende = _model$_view.getRenderable()) === null || _model$_view$getRende === void 0 ? void 0 : (_model$_view$getRende2 = _model$_view$getRende.getRenderersByReference()) === null || _model$_view$getRende2 === void 0 ? void 0 : _model$_view$getRende2[0];
|
|
690
696
|
};
|
|
691
697
|
|
|
692
698
|
publicAPI.findPokedRenderer = function () {
|
|
693
|
-
var _model$
|
|
699
|
+
var _model$_view2, _model$_view2$getRend;
|
|
694
700
|
|
|
695
701
|
var x = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
696
702
|
var y = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
697
703
|
|
|
698
|
-
if (!model.
|
|
704
|
+
if (!model._view) {
|
|
699
705
|
return null;
|
|
700
706
|
} // The original order of renderers needs to remain as
|
|
701
707
|
// the first one is the one we want to manipulate the camera on.
|
|
702
708
|
|
|
703
709
|
|
|
704
|
-
var rc = (_model$
|
|
710
|
+
var rc = (_model$_view2 = model._view) === null || _model$_view2 === void 0 ? void 0 : (_model$_view2$getRend = _model$_view2.getRenderable()) === null || _model$_view2$getRend === void 0 ? void 0 : _model$_view2$getRend.getRenderers();
|
|
705
711
|
|
|
706
712
|
if (!rc) {
|
|
707
713
|
return null;
|
|
@@ -718,7 +724,7 @@ function vtkRenderWindowInteractor(publicAPI, model) {
|
|
|
718
724
|
while (count--) {
|
|
719
725
|
var aren = rc[count];
|
|
720
726
|
|
|
721
|
-
if (model.
|
|
727
|
+
if (model._view.isInViewport(x, y, aren) && aren.getInteractive()) {
|
|
722
728
|
currentRenderer = aren;
|
|
723
729
|
break;
|
|
724
730
|
}
|
|
@@ -729,7 +735,7 @@ function vtkRenderWindowInteractor(publicAPI, model) {
|
|
|
729
735
|
interactiveren = aren;
|
|
730
736
|
}
|
|
731
737
|
|
|
732
|
-
if (viewportren === null && model.
|
|
738
|
+
if (viewportren === null && model._view.isInViewport(x, y, aren)) {
|
|
733
739
|
// Save this renderer in case we can't find one in the viewport that
|
|
734
740
|
// is interactive.
|
|
735
741
|
viewportren = aren;
|
|
@@ -995,7 +1001,7 @@ var DEFAULT_VALUES = {
|
|
|
995
1001
|
desiredUpdateRate: 30.0,
|
|
996
1002
|
stillUpdateRate: 2.0,
|
|
997
1003
|
container: null,
|
|
998
|
-
|
|
1004
|
+
// _view: null,
|
|
999
1005
|
recognizeGestures: true,
|
|
1000
1006
|
currentGesture: 'Start',
|
|
1001
1007
|
animationRequest: null,
|
|
@@ -1018,9 +1024,10 @@ function extend(publicAPI, model) {
|
|
|
1018
1024
|
return macro.event(publicAPI, model, eventName);
|
|
1019
1025
|
}); // Create get-only macros
|
|
1020
1026
|
|
|
1021
|
-
macro.get(publicAPI, model, ['initialized', 'container', 'interactorStyle', 'lastFrameTime', 'recentAnimationFrameRate', '
|
|
1027
|
+
macro.get(publicAPI, model, ['initialized', 'container', 'interactorStyle', 'lastFrameTime', 'recentAnimationFrameRate', '_view']); // Create get-set macros
|
|
1022
1028
|
|
|
1023
|
-
macro.setGet(publicAPI, model, ['lightFollowCamera', 'enabled', 'enableRender', 'recognizeGestures', 'desiredUpdateRate', 'stillUpdateRate', 'picker']);
|
|
1029
|
+
macro.setGet(publicAPI, model, ['lightFollowCamera', 'enabled', 'enableRender', 'recognizeGestures', 'desiredUpdateRate', 'stillUpdateRate', 'picker']);
|
|
1030
|
+
macro.moveToProtected(publicAPI, model, ['view']); // For more macro methods, see "Sources/macros.js"
|
|
1024
1031
|
// Object specific methods
|
|
1025
1032
|
|
|
1026
1033
|
vtkRenderWindowInteractor(publicAPI, model);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { mat4, vec3 } from 'gl-matrix';
|
|
2
|
-
import { newInstance as newInstance$1, get, setGet, getArray, setGetArray, vtkDebugMacro as vtkDebugMacro$1, vtkErrorMacro as vtkErrorMacro$1, vtkWarningMacro as vtkWarningMacro$1 } from '../../macros.js';
|
|
2
|
+
import { newInstance as newInstance$1, get, setGet, getArray, setGetArray, moveToProtected, vtkDebugMacro as vtkDebugMacro$1, vtkErrorMacro as vtkErrorMacro$1, vtkWarningMacro as vtkWarningMacro$1 } from '../../macros.js';
|
|
3
3
|
import vtkCamera from './Camera.js';
|
|
4
4
|
import vtkLight from './Light.js';
|
|
5
|
-
import {
|
|
5
|
+
import { P as areBoundsInitialized, u as uninitializeBounds, r as radiansFromDegrees, d as dot, N as createUninitializedBounds } from '../../Common/Core/Math/index.js';
|
|
6
6
|
import vtkViewport from './Viewport.js';
|
|
7
7
|
import vtkBoundingBox from '../../Common/DataModel/BoundingBox.js';
|
|
8
8
|
|
|
@@ -81,7 +81,7 @@ function vtkRenderer(publicAPI, model) {
|
|
|
81
81
|
publicAPI.updateGeometry = notImplemented('updateGeometry');
|
|
82
82
|
|
|
83
83
|
publicAPI.getVTKWindow = function () {
|
|
84
|
-
return model.
|
|
84
|
+
return model._renderWindow;
|
|
85
85
|
};
|
|
86
86
|
|
|
87
87
|
publicAPI.setLayer = function (layer) {
|
|
@@ -219,19 +219,24 @@ function vtkRenderer(publicAPI, model) {
|
|
|
219
219
|
return;
|
|
220
220
|
}
|
|
221
221
|
|
|
222
|
-
if (model.
|
|
223
|
-
publicAPI.removeLight(model.
|
|
224
|
-
|
|
225
|
-
model.
|
|
222
|
+
if (model._createdLight) {
|
|
223
|
+
publicAPI.removeLight(model._createdLight);
|
|
224
|
+
|
|
225
|
+
model._createdLight.delete();
|
|
226
|
+
|
|
227
|
+
model._createdLight = null;
|
|
226
228
|
}
|
|
227
229
|
|
|
228
|
-
model.
|
|
229
|
-
publicAPI.addLight(model.
|
|
230
|
-
|
|
230
|
+
model._createdLight = publicAPI.makeLight();
|
|
231
|
+
publicAPI.addLight(model._createdLight);
|
|
232
|
+
|
|
233
|
+
model._createdLight.setLightTypeToHeadLight(); // set these values just to have a good default should LightFollowCamera
|
|
231
234
|
// be turned off.
|
|
232
235
|
|
|
233
|
-
|
|
234
|
-
model.
|
|
236
|
+
|
|
237
|
+
model._createdLight.setPosition(publicAPI.getActiveCamera().getPosition());
|
|
238
|
+
|
|
239
|
+
model._createdLight.setFocalPoint(publicAPI.getActiveCamera().getFocalPoint());
|
|
235
240
|
}; // requires the aspect ratio of the viewport as X/Y
|
|
236
241
|
|
|
237
242
|
|
|
@@ -508,9 +513,9 @@ function vtkRenderer(publicAPI, model) {
|
|
|
508
513
|
};
|
|
509
514
|
|
|
510
515
|
publicAPI.setRenderWindow = function (renderWindow) {
|
|
511
|
-
if (renderWindow !== model.
|
|
512
|
-
model.
|
|
513
|
-
model.
|
|
516
|
+
if (renderWindow !== model._renderWindow) {
|
|
517
|
+
model._vtkWindow = renderWindow;
|
|
518
|
+
model._renderWindow = renderWindow;
|
|
514
519
|
}
|
|
515
520
|
};
|
|
516
521
|
|
|
@@ -530,7 +535,7 @@ function vtkRenderer(publicAPI, model) {
|
|
|
530
535
|
m1 = m2;
|
|
531
536
|
}
|
|
532
537
|
|
|
533
|
-
var m3 = model.
|
|
538
|
+
var m3 = model._createdLight ? model._createdLight.getMTime() : 0;
|
|
534
539
|
|
|
535
540
|
if (m3 > m1) {
|
|
536
541
|
m1 = m3;
|
|
@@ -558,7 +563,6 @@ var DEFAULT_VALUES = {
|
|
|
558
563
|
ambient: [1, 1, 1],
|
|
559
564
|
allocatedRenderTime: 100,
|
|
560
565
|
timeFactor: 1,
|
|
561
|
-
createdLight: null,
|
|
562
566
|
automaticLightCreation: true,
|
|
563
567
|
twoSidedLighting: true,
|
|
564
568
|
lastRenderTimeInSeconds: -1,
|
|
@@ -604,10 +608,11 @@ function extend(publicAPI, model) {
|
|
|
604
608
|
|
|
605
609
|
if (model.background.length === 3) model.background.push(1); // Build VTK API
|
|
606
610
|
|
|
607
|
-
get(publicAPI, model, ['
|
|
611
|
+
get(publicAPI, model, ['_renderWindow', 'allocatedRenderTime', 'timeFactor', 'lastRenderTimeInSeconds', 'numberOfPropsRendered', 'lastRenderingUsedDepthPeeling', 'selector']);
|
|
608
612
|
setGet(publicAPI, model, ['twoSidedLighting', 'lightFollowCamera', 'automaticLightCreation', 'erase', 'draw', 'nearClippingPlaneTolerance', 'clippingRangeExpansion', 'backingStore', 'interactive', 'layer', 'preserveColorBuffer', 'preserveDepthBuffer', 'useDepthPeeling', 'occlusionRatio', 'maximumNumberOfPeels', 'delegate', 'backgroundTexture', 'texturedBackground', 'useShadows', 'pass']);
|
|
609
613
|
getArray(publicAPI, model, ['actors', 'volumes', 'lights']);
|
|
610
|
-
setGetArray(publicAPI, model, ['background'], 4, 1.0);
|
|
614
|
+
setGetArray(publicAPI, model, ['background'], 4, 1.0);
|
|
615
|
+
moveToProtected(publicAPI, model, ['renderWindow']); // Object methods
|
|
611
616
|
|
|
612
617
|
vtkRenderer(publicAPI, model);
|
|
613
618
|
} // ----------------------------------------------------------------------------
|
|
@@ -2,7 +2,7 @@ import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
|
2
2
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
3
3
|
import { vec3, mat4 } from 'gl-matrix';
|
|
4
4
|
import * as d3 from 'd3-scale';
|
|
5
|
-
import {
|
|
5
|
+
import { M as nearestPowerOfTwo } from '../../Common/Core/Math/index.js';
|
|
6
6
|
import macro from '../../macros.js';
|
|
7
7
|
import vtkActor from './Actor.js';
|
|
8
8
|
import vtkDataArray from '../../Common/Core/DataArray.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import macro from '../../macros.js';
|
|
2
|
-
import {
|
|
2
|
+
import { N as createUninitializedBounds } from '../../Common/Core/Math/index.js';
|
|
3
3
|
import Constants from './VolumeMapper/Constants.js';
|
|
4
4
|
import vtkAbstractMapper from './AbstractMapper.js';
|
|
5
5
|
|
|
@@ -12,9 +12,9 @@ function vtkOpenGLActor(publicAPI, model) {
|
|
|
12
12
|
|
|
13
13
|
publicAPI.buildPass = function (prepass) {
|
|
14
14
|
if (prepass) {
|
|
15
|
-
model.
|
|
15
|
+
model._openGLRenderWindow = publicAPI.getFirstAncestorOfType('vtkOpenGLRenderWindow');
|
|
16
16
|
model.openGLRenderer = publicAPI.getFirstAncestorOfType('vtkOpenGLRenderer');
|
|
17
|
-
model.context = model.
|
|
17
|
+
model.context = model._openGLRenderWindow.getContext();
|
|
18
18
|
publicAPI.prepareNodes();
|
|
19
19
|
publicAPI.addMissingNodes(model.renderable.getTextures());
|
|
20
20
|
publicAPI.addMissingNode(model.renderable.getMapper());
|