[vtkusers] 1vtkActor and 2vtkRendrer

sseo sseo at miki.pe.u-tokyo.ac.jp
Fri Jan 12 05:59:47 EST 2001


hi vtk users!

i am now developing a application which has several vtkWindow.
where each vtkWindow show the same data with a small difference
(mainly the position of camera, and with or without of costly actors)

so i intended to share a vtkActor with several vtkWindow.
unfortunately it didn't work well.
there are cases that each vtkWindow shows same actors.
even when i intend to show more actors than other vtkWindows.
means some actor dont show in case

my question is
"is it valid to share a vtkActor or vtkMapper or a process object?"
or is the problem should in a very different place

any advice is welcome
thanks
seo shinichiro


this is the code snip
where TVTKWindow is a vtkWindow+vtkRendrer class
similar to vtkMFCView for bcb

 VTKWindow = new TVTKWindow(this);
 VTKWindow->Parent = TabSheet3d;
 VTKWindow->Align = alClient;

 PositionWindow = new TVTKWindow(this);
 PositionWindow->Parent = PositionPanel;
 PositionWindow->Align = alClient;
 PositionWindow->AddProp(            //// important part
  document->GetOutlineActor());    ////
 PositionWindow->AddProp(          //// this line seems not to work
  document->GetSliceActor());      //// without line *A* below
 PositionWindow->UpdateProps();
 PositionWindow->DeactivateInteraction();
 vtkCamera *c = PositionWindow->GetCamera();
 c->Azimuth(150);
 c->Elevation(30);
 c->Zoom(2.0);
 PositionWindow->ResetLightPosition();
 PositionWindow->SetWindowColor(clWhite);

 VTKWindow->AddProp(              //// important part
  document->GetOutlineActor());  ////
 VTKWindow->AddProp(             ////  *A*
  document->GetSliceActor());    ////  it goes wrong when i comment out this
line
 VTKWindow->AddProp(             ////  this also not work
  document->GetSurfaceActor());    ////  the pipeline it self works... i'm
sure

-------------- next part --------------
A non-text attachment was scrubbed...
Name: VTKWindow.cpp
Type: application/octet-stream
Size: 7190 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20010112/49b99564/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: VTKWindow.h
Type: application/octet-stream
Size: 2461 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20010112/49b99564/attachment-0001.obj>


More information about the vtkusers mailing list