--- /dev/null
+package org.simantics.g3d.vtk.utils;
+
+import org.simantics.g3d.vtk.common.InteractiveVtkPanel;
+
+import vtk.vtkAxesActor;
+import vtk.vtkOrientationMarkerWidget;
+
+public class AxesDisplay {
+
+
+ private InteractiveVtkPanel panel;
+
+ public AxesDisplay(InteractiveVtkPanel panel) {
+ this.panel = panel;
+ }
+
+ public void show() {
+ vtkAxesActor axes = new vtkAxesActor();
+ axes.GetXAxisCaptionActor2D().GetCaptionTextProperty().SetColor(0,0,0);
+ axes.GetYAxisCaptionActor2D().GetCaptionTextProperty().SetColor(0,0,0);
+ axes.GetZAxisCaptionActor2D().GetCaptionTextProperty().SetColor(0,0,0);
+ axes.GetXAxisCaptionActor2D().GetCaptionTextProperty().SetShadow(0);
+ axes.GetYAxisCaptionActor2D().GetCaptionTextProperty().SetShadow(0);
+ axes.GetZAxisCaptionActor2D().GetCaptionTextProperty().SetShadow(0);
+ axes.GetXAxisCaptionActor2D().GetCaptionTextProperty().ItalicOff();
+ axes.GetYAxisCaptionActor2D().GetCaptionTextProperty().ItalicOff();
+ axes.GetZAxisCaptionActor2D().GetCaptionTextProperty().ItalicOff();
+ axes.GetXAxisCaptionActor2D().GetCaptionTextProperty().Delete();
+ axes.GetYAxisCaptionActor2D().GetCaptionTextProperty().Delete();
+ axes.GetZAxisCaptionActor2D().GetCaptionTextProperty().Delete();
+ axes.GetXAxisCaptionActor2D().Delete();
+ axes.GetYAxisCaptionActor2D().Delete();
+ axes.GetZAxisCaptionActor2D().Delete();
+ vtkOrientationMarkerWidget widget = new vtkOrientationMarkerWidget();
+ widget.SetOutlineColor(0.9300, 0.5700, 0.1300 );
+ widget.SetOrientationMarker(axes);
+ widget.SetInteractor(panel.getRenderWindowInteractor());
+ //widget.SetViewport(0.8, 0.0, 1.0, 0.2); // bottom right
+ //widget.SetViewport(0.0, 0.0, 0.4, 0.4);
+ widget.SetViewport(0.0, 0.0, 0.2, 0.2); // bottom left
+ widget.SetEnabled(1);
+ widget.InteractiveOff();
+
+ panel.addDeletable(widget);
+ panel.addDeletable(axes);
+ }
+
+}