Skip to content

Commit

Permalink
Merge pull request #504 from Kitware/camera-style-light
Browse files Browse the repository at this point in the history
fix(Manipulators): Update light orientation if needed
  • Loading branch information
jourdain authored Jan 17, 2018
2 parents 132a58b + 11ac939 commit 2d6066c
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Sources/Interaction/Manipulators/TrackballPan/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ function vtkTrackballPan(publicAPI, model) {
}

renderer.resetCameraClippingRange();

if (interactor.getLightFollowCamera()) {
renderer.updateLightsGeometryToFollowCamera();
}
};
}

Expand Down
4 changes: 4 additions & 0 deletions Sources/Interaction/Manipulators/TrackballRoll/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ function vtkTrackballRoll(publicAPI, model) {
camera.orthogonalizeViewUp();

renderer.resetCameraClippingRange();

if (interactor.getLightFollowCamera()) {
renderer.updateLightsGeometryToFollowCamera();
}
};
}

Expand Down
4 changes: 4 additions & 0 deletions Sources/Interaction/Manipulators/TrackballRotate/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ function vtkTrackballRotate(publicAPI, model) {
camera.orthogonalizeViewUp();

renderer.resetCameraClippingRange();

if (interactor.getLightFollowCamera()) {
renderer.updateLightsGeometryToFollowCamera();
}
};
}

Expand Down
4 changes: 4 additions & 0 deletions Sources/Interaction/Manipulators/TrackballZoom/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ function vtkTrackballZoom(publicAPI, model) {
camera.setPosition(cameraPos[0], cameraPos[1], cameraPos[2]);
renderer.resetCameraClippingRange();
}

if (interactor.getLightFollowCamera()) {
renderer.updateLightsGeometryToFollowCamera();
}
};

publicAPI.onPinch = (interactor) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ function vtkTrackballZoomToMouse(publicAPI, model) {
renderer,
interactor
);

if (interactor.getLightFollowCamera()) {
renderer.updateLightsGeometryToFollowCamera();
}
};
}

Expand Down

0 comments on commit 2d6066c

Please sign in to comment.