Skip to content

Commit

Permalink
fix(shapewidget): support non axis-aligned slices
Browse files Browse the repository at this point in the history
  • Loading branch information
finetjul committed Nov 25, 2024
1 parent 45982c6 commit 44d2e02
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Sources/Widgets/Widgets3D/ShapeWidget/behavior.js
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,9 @@ export default function widgetBehavior(publicAPI, model) {
const up = model._camera.getViewUp();
const right = [];
vec3.cross(right, up, normal);
vtkMath.normalize(right);
vec3.cross(up, normal, right);
vtkMath.normalize(up);
model.shapeHandle.setUp(up);
model.shapeHandle.setRight(right);
model.shapeHandle.setDirection(normal);
Expand Down

0 comments on commit 44d2e02

Please sign in to comment.