[vtkusers] Clipping and cutting more than one actor?

Randy Heiland heiland at ncsa.uiuc.edu
Fri Mar 2 10:22:02 EST 2001


> I'm programming in Java, but I have noticed that some methods are not
> implemented in the wrappers, like GetBounds in vtkProp3D. Is it an
> error? Then, how can I obtain the bound of an actor?

The following snippet works in my version (3.2) of VTK:

    vtkOutlineFilter outline = new vtkOutlineFilter();
      outline.SetInput(cone.GetOutput());
      outline.Update();
    vtkPolyDataMapper outlineMapper = new vtkPolyDataMapper();
      outlineMapper.SetInput(outline.GetOutput());
    vtkActor outlineActor = new vtkActor();
      outlineActor.SetMapper(outlineMapper);
      outlineActor.GetProperty().SetColor(0,0,0);
      double bds[] = outlineActor.GetMapper().GetInputAsDataSet().GetBounds();
      System.out.println("bds=" + bds[0] +","+bds[1]);  // etc...

--Randy




More information about the vtkusers mailing list