File tree Expand file tree Collapse file tree 2 files changed +2
-10
lines changed
Volume/VolumeMapperLightAndShadow Expand file tree Collapse file tree 2 files changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -135,11 +135,7 @@ function createVolumeView(renderer, source) {
135
135
136
136
// Add one positional light
137
137
const bounds = volume . getBounds ( ) ;
138
- const center = [
139
- ( bounds [ 1 ] - bounds [ 0 ] ) / 2.0 ,
140
- ( bounds [ 3 ] - bounds [ 2 ] ) / 2.0 ,
141
- ( bounds [ 5 ] - bounds [ 4 ] ) / 2.0 ,
142
- ] ;
138
+ const center = vtkBoundingBox . getCenter ( bounds ) ;
143
139
renderer . removeAllLights ( ) ;
144
140
const light = vtkLight . newInstance ( ) ;
145
141
const lightPos = [ center [ 0 ] + 300 , center [ 1 ] + 50 , center [ 2 ] - 50 ] ;
Original file line number Diff line number Diff line change @@ -101,11 +101,7 @@ function createVolumeShadowViewer(rootContainer, fileContents) {
101
101
102
102
// Add one positional light
103
103
const bounds = actor . getBounds ( ) ;
104
- const center = [
105
- ( bounds [ 1 ] - bounds [ 0 ] ) / 2.0 ,
106
- ( bounds [ 3 ] - bounds [ 2 ] ) / 2.0 ,
107
- ( bounds [ 5 ] - bounds [ 4 ] ) / 2.0 ,
108
- ] ;
104
+ const center = vtkBoundingBox . getCenter ( bounds ) ;
109
105
renderer . removeAllLights ( ) ;
110
106
const light = vtkLight . newInstance ( ) ;
111
107
const lightPos = [ center [ 0 ] + 300 , center [ 1 ] + 50 , center [ 2 ] - 50 ] ;
You can’t perform that action at this time.
0 commit comments