X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=org.simantics.g3d.vtk%2Fsrc%2Forg%2Fsimantics%2Fg3d%2Fvtk%2Futils%2FAxesDisplay.java;h=4bbaaccda3407428a4f52c87cafccb9629bede6f;hb=53d55c24c779745f188bdb18d32f71d20acb61b2;hp=ed1a503a92b7ef6a1bbb5dcb0f07fcec511dbd43;hpb=fc44aa6fb56a795b4cae2d0684af67ae539fc748;p=simantics%2F3d.git diff --git a/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/utils/AxesDisplay.java b/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/utils/AxesDisplay.java index ed1a503a..4bbaaccd 100644 --- a/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/utils/AxesDisplay.java +++ b/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/utils/AxesDisplay.java @@ -1,6 +1,6 @@ package org.simantics.g3d.vtk.utils; -import org.simantics.g3d.vtk.common.InteractiveVtkPanel; +import org.simantics.g3d.vtk.common.VtkView; import vtk.vtkAxesActor; import vtk.vtkOrientationMarkerWidget; @@ -8,41 +8,41 @@ import vtk.vtkOrientationMarkerWidget; public class AxesDisplay { - private InteractiveVtkPanel panel; + private VtkView panel; - public AxesDisplay(InteractiveVtkPanel panel) { + public AxesDisplay(VtkView 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); + 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); } }