8000 fix(shapewidget): support non axis-aligned slices · Kitware/vtk-js@88e7b2b · GitHub
[go: up one dir, main page]

Skip to content 8000

Commit 88e7b2b

Browse files
finetjulfloryst
authored andcommitted
fix(shapewidget): support non axis-aligned slices
1 parent d369c75 commit 88e7b2b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Sources/Widgets/Widgets3D/ShapeWidget/behavior.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,9 @@ export default function widgetBehavior(publicAPI, model) {
475475
const up = model._camera.getViewUp();
476476
const right = [];
477477
vec3.cross(right, up, normal);
478+
vtkMath.normalize(right);
479+
vec3.cross(up, normal, right);
480+
vtkMath.normalize(up);
478481
model.shapeHandle.setUp(up);
479482
model.shapeHandle.setRight(right);
480483
model.shapeHandle.setDirection(normal);

0 commit comments

Comments
 (0)
0