[vtkusers] Removing RenderWindowInteractor

Nesli Bozkurt neslibozkurt at hotmail.com
Thu Sep 17 09:37:54 EDT 2009


Hello.


I add a RenderWindowInteractor to my RenderWindow, but after it
is no more used,in another function, I want to remove it and go back to
the default interactor where leftbutton is for rotation, rightbutton is
for zoom, etc.


Here is the code I am using to add the interactor:


MyInteractorCallback* m_pInteractorCallback = MyInteractorCallback::New();

iren = vtkRenderWindowInteractor::New();

iren->SetRenderWindow(this->pvtkMFCWindow2->GetRenderWindow());

iren->SetInteractorStyle(NULL);

iren->Initialize();

m_pInteractorCallback->SetRenderer(this); 

observer = iren->AddObserver( vtkCommand::RightButtonPressEvent, m_pInteractorCallback);


To undo what I did, I tried:

iren->SetRenderWindow(NULL);

this->pvtkMFCWindow2->GetRenderWindow()->UnRegister(iren);


but couldn't make it work.


Any help is much appreciated. 
Nesli
 


 		 	   		  
_________________________________________________________________
Drag n’ drop—Get easy photo sharing with Windows Live™ Photos.

http://www.microsoft.com/windows/windowslive/products/photos.aspx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090917/7eed8e4a/attachment.htm>


More information about the vtkusers mailing list