[vtkusers] problems with vtkPropPicker

Anja Ende anja.ende at googlemail.com
Wed Sep 6 06:28:02 EDT 2006


Hi everyone,

I have a PNG image based cursor that is initialized at coordinate (0, 0)
when it starts. Later, I move it to position (150, 150).

However, I cannot pick the actor with vtkPropPicker at the new position. It
only picks it at the old position of (0, 0);

So, I have updated the actor as follows:

m_cursor.GetActor()->SetPosition(150.0, 150.0);

My prop picking code looks like this:

// This is in the interactor style
int picked = m_picker->Pick(x, y, 0, this->CurrentRenderer);
if (picked)
{
     vtkProp * prop = m_picker->GetViewProp();
     // Only true at the old position....
     if (prop && (prop == (vtkProp *)m_viewer->GetCursorActor()))
     {

           m_viewer->GetCursorActor()->SetPosition(x, y);
     }
}

Thanks for any help you might give me.

Anja
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20060906/878a9f20/attachment.htm>


More information about the vtkusers mailing list