home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   linux.debian.bugs.dist      Ohh some weird Debian bug report thing      28,835 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 28,668 of 28,835   
   Jean-Max Redonnet to All   
   Bug#1125167: SPAM: Bug#1125167: vtk9: li   
   23 Feb 26 16:50:01   
   
   From: jmax.red@zaclys.net   
      
   Hi Drew!   
      
   For the moment I do not have enough space on my disk to install a   
   virtual machine running forky. Sorry.   
      
   Getting an example reproducing the problem is quite easy: Once vtk9 and   
   libvtk9-java are properly installed with dependencies, just grab any   
   java example from https://examples.vtk.org/site/Java/   
      
   Compile it, run it and admire the crash... At least if your computer   
   acts exactly as mine.   
      
   As an example, you can try with:   
      
   import vtk.vtkActor;   
   import vtk.vtkCylinderSource;   
   import vtk.vtkNamedColors;   
   import vtk.vtkNativeLibrary;   
   import vtk.vtkPolyDataMapper;   
   import vtk.vtkRenderer;   
   import vtk.vtkRenderWindow;   
   import vtk.vtkRenderWindowInteractor;   
      
   // Then we define our class.   
   public class CylinderExample {   
      private static final long serialVersionUID = 1L;   
      
      // -----------------------------------------------------------------   
      // Load VTK library and print which library was not properly loaded   
      static {   
        if (!vtkNativeLibrary.LoadAllNativeLibraries()) {   
          for (vtkNativeLibrary lib : vtkNativeLibrary.values()) {   
            if (!lib.IsLoaded()) {   
              System.out.println(lib.GetLibraryName() + " not loaded");   
            }   
          }   
        }   
        vtkNativeLibrary.DisableOutputWindow(null);   
      }   
      // -----------------------------------------------------------------   
      
      // now the main program   
      public static void main(String args[]) {   
        vtkNamedColors colors = new vtkNamedColors();   
      
        // Here is how you create your own named color.   
        double bkgColor[];   
        bkgColor = new double[]{0.1, 0.2, 0.4, 1.0};   
        // This corresponds to the unsigned char array   
        // {26, 51, 102, 255} seen in C++ code for setting   
        // colors not in vtkNamedColors.   
        colors.SetColor("BkgColor", bkgColor);   
      
        // Now we use our own named color.   
        double bkg[] = new double[4];   
        colors.GetColor("BkgColor", bkg);   
      
        //For Actor Color   
        double actorColor[] = new double[4];   
        colors.GetColor("Tomato", actorColor);   
        //Renderer Background Color   
      
        // This creates a polygonal cylinder model with eight   
   circumferential facets   
        // (i.e, in practice an octagonal prism).   
        vtkCylinderSource cylinder = new vtkCylinderSource();   
        cylinder.SetResolution(8);   
      
        // The actor is a grouping mechanism: besides the geometry (mapper),   
   it   
        // also has a property, transformation matrix, and/or texture map.   
        // Here we set its color and rotate it around the X and Y axes.   
        vtkPolyDataMapper cylinderMapper = new vtkPolyDataMapper();   
        cylinderMapper.SetInputConnection(cylinder.GetOutputPort());   
      
        vtkActor cylinderActor = new vtkActor();   
        cylinderActor.SetMapper(cylinderMapper);   
        cylinderActor.GetProperty().SetColor(actorColor);   
        cylinderActor.RotateX(30.0);   
        cylinderActor.RotateY(-45.0);   
      
        // The renderer generates the image   
        // which is then displayed on the render window.   
        // It can be thought of as a scene to which the actor is added   
        vtkRenderer ren = new vtkRenderer();   
        ren.AddActor(cylinderActor);   
        ren.ResetCamera();   
        ren.GetActiveCamera().Zoom(1.5);   
        ren.SetBackground(bkg);   
      
        // The render window is the actual GUI window   
        // that appears on the computer screen   
        vtkRenderWindow renWin = new vtkRenderWindow();   
        renWin.AddRenderer(ren);   
        renWin.SetSize(300, 300);   
        renWin.SetWindowName("Cylinder");   
      
      
        // The render window interactor captures mouse events   
        // and will perform appropriate camera or actor manipulation   
        // depending on the nature of the events.   
        vtkRenderWindowInteractor iren = new vtkRenderWindowInteractor();   
        iren.SetRenderWindow(renWin);   
      
        renWin.Render();   
      
        iren.Initialize();   
        // This starts the event loop and as a side effect causes an initial   
   render.   
        iren.Start();   
      }   
   }   
      
   Hope this help.   
      
   Regards,   
      
   jMaxR   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca