@@ -0,0 +1,2564 @@
+import vtk.vtkNativeLibrary;%0Aimport vtk.vtkRenderWindow;%0Aimport vtk.vtkRenderWindowInteractor;%0Aimport vtk.vtkRenderer;%0Aimport vtk.vtkNamedColors;%0Aimport vtk.vtkActorCollection;%0Aimport vtk.vtk3DSImporter;%0Aimport vtk.vtkCamera;%0A%0Apublic class ThreeDSImporter%0A%7B%0A  // -----------------------------------------------------------------%0A  // Load VTK library and print which library was not properly loaded%0A  static %0A  %7B%0A    if (!vtkNativeLibrary.LoadAllNativeLibraries()) %0A    %7B%0A      for (vtkNativeLibrary lib : vtkNativeLibrary.values()) %0A      %7B%0A        if (!lib.IsLoaded()) %0A        %7B%0A          System.out.println(lib.GetLibraryName() + %22 not loaded%22);%0A        %7D%0A      %7D%0A    %7D%0A    vtkNativeLibrary.DisableOutputWindow(null);%0A  %7D%0A  // -----------------------------------------------------------------%0A  %0A  public static void main(String args%5B%5D) %0A  %7B%0A%0A    //parse command line arguments%0A    if (args.length != 1) %0A    %7B%0A      System.err.println(%22Usage: java -classpath ... Filename(.3ds) e.g iflamingo.3ds%22);%0A      return;%0A    %7D%0A    String inputFilename = args%5B0%5D;%0A%0A    vtkNamedColors Color = new vtkNamedColors(); %0A%0A    //Renderer Background Color%0A    double BgColor%5B%5D = new double%5B4%5D;%0A    double BgColor2%5B%5D = new double%5B4%5D;%0A%0A    //Change Color Name to Use your own Color for Renderer Background%0A    Color.GetColor(%22Gold%22,BgColor);%0A    Color.GetColor(%22Wheat%22,BgColor2);%0A%0A    // Create the renderer, render window and interactor.%0A    vtkRenderer ren = new vtkRenderer();%0A    vtkRenderWindow renWin = new vtkRenderWindow();%0A    renWin.AddRenderer(ren);%0A    vtkRenderWindowInteractor iren = new vtkRenderWindowInteractor();%0A    iren.SetRenderWindow(renWin);%0A    %0A    vtk3DSImporter importer = new vtk3DSImporter();%0A    importer.SetFileName(inputFilename);%0A    importer.ComputeNormalsOn();%0A    %0A    renWin.AddRenderer(ren);%0A    ren.SetBackground2 (BgColor);%0A    ren.SetBackground (BgColor2);%0A    ren.GradientBackgroundOn();%0A    %0A    importer.SetRenderWindow(renWin);%0A    importer.Update();%0A    %0A    vtkActorCollection actors = new vtkActorCollection();%0A    actors = ren.GetActors();%0A    System.out.println(%22There are%22 + %22 %22 + actors.GetNumberOfItems() + %22 %22 + %22actors%22);%0A%0A%0A    renWin.SetSize(300,300);%0A    renWin.Render();%0A    %0A    vtkCamera camera = new vtkCamera();%0A    camera.SetPosition (0, -1, 0);%0A    camera.SetFocalPoint (0, 0, 0);%0A    camera.SetViewUp (0, 0, 1);%0A    camera.Azimuth(150);%0A    camera.Elevation(30);%0A    %0A    ren.SetActiveCamera(camera);%0A    ren.ResetCamera();%0A    ren.ResetCameraClippingRange();%0A    %0A    iren.Initialize();%0A    iren.Start();%0A%0A  %7D%0A%7D%0A

Create ThreeDSImporter.java