Ok, I might have found a bug with the vtkPropPicker class or maybe something is missing from my code.<br><br>I have moved my cursor actor with the code:<br><br>m_actor->SetPosition(x, y);<br><br>However, when I click on the bottom left corner of my view, so basically around (0, 0) then it picks the cursor! Even though, on my screen it is at another position! Surely this is a bug???
<br><br>Cheers,<br><br>Anja<br><br><div><span class="gmail_quote">On 03/10/06, <b class="gmail_sendername">Anja Ende</b> <<a href="mailto:anja.ende@googlemail.com">anja.ende@googlemail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
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><span class="sg">Anja<br>
</span></blockquote></div><br>