Stop rendering after vtkPicker

Hugues Wisniewski h_wski at yahoo.com
Mon Jul 26 13:29:35 EDT 1999


> I would like to pick many points in a large polydataset. But after each
> pick-process the object is redrawn which takes long time. Can I stop the
> update of the render window?

I can give you a solution, if your with windows MFCs.
The object is redrawn because of calling 
void vtkRenderWindowInteractor::HighlightActor(vtkActor *actor)
that after highlighting the actor calls the Render() of the render window

I think the only way to avoid calling the Redraw is not to call HighlightActor, that's called in
vtkMFCInteractor::OnChar, so you have to write your own pick method and remove this HighlightActor
call. I would take the code of vtkMFCInteractor::OnChar, for the 'p' value, and write it when
mapping the same message WM_CHAR, in the considered window :

int *nPosition=m_Interactor->GetEventPosition();
int *nSize=m_Interactor->GetSize();
m_Interactor->FindPokedRenderer(nPosition[0], nSize[1]-nPosition[1]);
if (m_Interactor->StartPickMethod)
{
 (*m_Interactor->StartPickMethod)(m_Interactor->StartPickMethodArg);
}
m_Interactor->GetPicker()->Pick(nPosition[0], nSize[1]-nPosition[1],
0.0,m_Interactor->GetCurrentRenderer());
//remove the call m_Interactor->HighlightActor(m_Interactor->GetPicker()->GetActor());
if (m_Interactor->EndPickMethod)
{
(*m_Interactor->EndPickMethod)(m_Interactor->EndPickMethodArg);
}

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com



-----------------------------------------------------------------------------
This is the private VTK discussion list.  Please keep messages on-topic.
Check the FAQ at: <http://www.automatrix.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at gsao.med.ge.com>.  For help, send message body containing
"info vtkusers" to the same address.     Live long and prosper.
-----------------------------------------------------------------------------





More information about the vtkusers mailing list