Skip to content

Commit

Permalink
fix(volumemapper): make vtkVolumeMapper inherit from vtkAbstractMapper3D
Browse files Browse the repository at this point in the history
vtkVolumeMapper used to inherit from vtkAbstractMapper. vtkAbstractMapper3D defines methods that
relies on the implementation of getBounds, which is defined by vtkVolumeMapper. Moreover, the VTK
C++ implementation for vtkVolumeMapper also inherits from vtkAbstractMapper3D. This is not a
breaking change since vtkAbstractMapper3D also inherits from vtkAbstractMapper.
  • Loading branch information
bourdaisj committed Mar 4, 2024
1 parent f9cb176 commit eafdb8d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/Rendering/Core/VolumeMapper/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import macro from 'vtk.js/Sources/macros';
import * as vtkMath from 'vtk.js/Sources/Common/Core/Math';
import Constants from 'vtk.js/Sources/Rendering/Core/VolumeMapper/Constants';
import vtkAbstractMapper from 'vtk.js/Sources/Rendering/Core/AbstractMapper';
import vtkAbstractMapper3D from 'vtk.js/Sources/Rendering/Core/AbstractMapper3D';
import vtkPiecewiseFunction from 'vtk.js/Sources/Common/DataModel/PiecewiseFunction';

const { BlendMode, FilterMode } = Constants;
Expand Down Expand Up @@ -170,7 +170,7 @@ const DEFAULT_VALUES = {
export function extend(publicAPI, model, initialValues = {}) {
Object.assign(model, DEFAULT_VALUES, initialValues);

vtkAbstractMapper.extend(publicAPI, model, initialValues);
vtkAbstractMapper3D.extend(publicAPI, model, initialValues);

macro.setGet(publicAPI, model, [
'sampleDistance',
Expand Down

0 comments on commit eafdb8d

Please sign in to comment.