Hi everyone,<br><br>I have a renderer that has 2 actors as follows:<br><br>this->m_renderer->AddActor(this->m_actor2D);<br>this->m_renderer->AddActor(m_cursor.GetActor());<br><br>Now, I am trying to pick this cursor actor on mouse clicks as follows:
<br><br>// This code is in vtkInteractorStyleImage based class...<br><br>int x = this->Interactor->GetEventPosition()[0];<br>int y = this->Interactor->GetEventPosition()[1];<br>this->FindPokedRenderer(x, y);
<br> <br>if (this->CurrentRenderer == NULL)<br> return;<br><br>vtkPropPicker * picker = vtkPropPicker::New();<br>if (picker->PickProp(x, y, this->CurrentRenderer))<br>{<br> vtkProp * prop = picker->GetViewProp();
<br> std::cout << prop << ": " << m_viewer->m_cursor.GetActor() << ": " << m_viewer->m_actor2D << std::endl;<br><br>}<br>picker->Delete();<br><br><br>
Now no matter where I click, on the cursor image or on the underlying image, I always seem to pick the bottom image and never the cursor image. Is it possible to actually layer these objects somehow and pick the top most one or something like that...
<br><br>Cheers,<br>Anja<br>