[vtkusers] giving renderwindow a name
    michiel mentink 
    michael.mentink at st-hughs.ox.ac.uk
       
    Tue Jan  5 11:25:33 EST 2010
    
    
  
I'm trying to give a renderwindow a title.
I'm using the following code to create a window. So far so good.
  // create a renderer
  vtkSmartPointer<vtkRenderer> renderer =
    vtkSmartPointer<vtkRenderer>::New();
  renderer->AddActor(actor);
  // create a render window
  vtkSmartPointer<vtkRenderWindow> renwin =
    vtkSmartPointer<vtkRenderWindow>::New();
  renwin->AddRenderer(renderer);
  // create an interactor
  vtkSmartPointer<vtkRenderWindowInteractor> iren =
    vtkSmartPointer<vtkRenderWindowInteractor>::New();
  iren->SetRenderWindow(renwin);
    renwin->SetSize(640, 480);
  iren->Initialize();
  iren->Start();
///////////end code////////
Before iren->initialize, I tried the following:
      iren->SetWindowInfo( "window1" );
     renwin->SetWindowInfo( "window1");
and also ->SetWindowId("window1");
and ->SetWindowName("window1");
but it keeps giving me error messages upon compiling:
‘class vtkRenderWindowInteractor’ has no member named ‘SetWindowInfo’
or
error: ‘renWin’ was not declared in this scope
It's probably a simple mistake, but I'm still beginning to understand VTK.
Can anybody point me in the right direction?
Kind regards, Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100105/6364a2c1/attachment.htm>
    
    
More information about the vtkusers
mailing list