@@ -0,0 +1,2395 @@
+import vtk.vtkNativeLibrary;%0Aimport vtk.vtkRenderWindowInteractor;%0Aimport vtk.vtkAngleRepresentation2D;%0Aimport vtk.vtkAngleWidget;%0Aimport vtk.vtkNamedColors;%0Aimport vtk.vtkRenderWindow;%0Aimport vtk.vtkRenderer;%0A%0A%0Apublic class AngleWidget2D  %7B%0A%09  //private static final long serialVersionUID = 1L;%0A%09  %0A%09  // -----------------------------------------------------------------%0A%09  // Load VTK library and print which library was not properly loaded%0A%09  static %7B%0A%09    if (!vtkNativeLibrary.LoadAllNativeLibraries()) %7B%0A%09      for (vtkNativeLibrary lib : vtkNativeLibrary.values()) %7B%0A%09        if (!lib.IsLoaded()) %7B%0A%09          System.out.println(lib.GetLibraryName() + %22 not loaded%22);%0A%09        %7D%0A%09      %7D%0A%09    %7D%0A%09    vtkNativeLibrary.DisableOutputWindow(null);%0A%09  %7D%0A%09  // -----------------------------------------------------------------%0A%09  %0A%09  %0A%09  public static void main(String s%5B%5D) %7B%0A%09    %0A%09%09  %0A%09%09  vtkNamedColors Color = new vtkNamedColors(); %0A%0A%09%09   //For Renderer Background Color%0A%09%09   double BgColor%5B%5D = new double%5B4%5D;%0A%09%09   %09   //Change Color Name to Use your own Color for Renderer Background%0A%09%09   Color.GetColor(%22Black%22,BgColor);%0A%09%09%0A%09%09   // An interactor%0A%09%09  vtkRenderWindowInteractor iren = new vtkRenderWindowInteractor();%0A%09%09  %0A%09%09  double pos1%5B%5D = new double%5B%5D %7B50.0, 200.0, 0.0%7D;%0A%09%09  double pos2%5B%5D = new double%5B%5D %7B200.0, 20.0, 0.0%7D;%0A%09%09  double center%5B%5D =new double%5B%5D %7B100.0, 100.0, 0.0%7D;%0A%09  %0A%09%09  vtkAngleRepresentation2D Rep = new vtkAngleRepresentation2D();%0A%09%09  Rep.ArcVisibilityOff();%0A%09%09  %0A%09%09%0A%09%09   // Create the renderer, render window and interactor.%0A%09       vtkRenderer ren = new vtkRenderer();%0A%09       vtkRenderWindow renWin = new vtkRenderWindow();%0A%09       renWin.AddRenderer(ren);%0A%09       renWin.SetInteractor(iren);%0A%09       iren.SetRenderWindow(renWin);%0A%09       ren.ResetCamera();%0A%09       ren.SetBackground(BgColor);%0A%09       %0A%09      // Angle Widget  %0A%09 %09  vtkAngleWidget angleWidget = new vtkAngleWidget();%0A%09 %09  angleWidget.SetInteractor(iren);%0A%09 %09  angleWidget .CreateDefaultRepresentation();%0A%09 %09  angleWidget.SetRepresentation(Rep);%0A%0A%09%09  angleWidget.On();%0A%09  %09  renWin.SetSize(300, 300);%0A%09  %09  renWin.Render();%0A%0A%09  %09  iren.Initialize();%0A%09  %09  %0A%09%09  Rep.SetPoint1DisplayPosition(pos1);%0A%09%09  Rep.SetPoint2DisplayPosition(pos2);%0A%09%09  Rep.SetCenterDisplayPosition(center);%0A%09%09  Rep.Ray1VisibilityOn();%0A%09%09  Rep.Ray2VisibilityOn();%0A%09%09  Rep.ArcVisibilityOn();%0A%09  %09  %0A%09%09  iren.Start();%0A%0A%09  %7D%0A%09%7D %0A

Create AngleWidget2D.java