I have created a small test program that creates vtkSliderWidgets with the vtkSliderRepresentation3D. I create one slider per axis (not necessarily along the main coordinate system axes). Even though the three sliders have the same start point, one of the sliders seems to start offset from the start point and pointing slightly in the wrong direction.
sliderRep->SetPoint1InWorldCoordinates(0.0, 0.0, -6.0); // Note: All sliders have the same start point
sliderRep->SetPoint2InWorldCoordinates(x, y, z);
The (x,y,z) coordinates for the axes are the following where the x-axis looks rotated incorrectly:
(0.8060793615028174, -4.596267436520017, -6.0)
(-6.465520758172843, -1.1339033066529178, -6.0)
(0.0, 0.0, 0.0)
vtkSliderRepresentation3D seems to want to rotate some geometry aligned along the x-axis with the slider axis defined by point1 and point2. Could there be an issue with the rotation calculation?
Also note that I have tried using vtkLineWidget instead of vtkSliderWidget and that seems to render the axes correctly with the correct start point and end point.
Got any ideas?