[vtkusers] Interaction using vtkRenderWindowInteractor

Kjeld Vestberg Hansen kjeld at aub.dk
Mon Apr 17 13:51:24 EDT 2006


hi Ashley

You can addcommand to all object there inherent from vtkObject

Best regards Kjeld

> On 4/17/06, Kjeld Vestberg Hansen <kjeld at aub.dk> wrote:
>>
>> Hi Ashley
>>
>> You should use a vtkCommand instead of then you can get yours
>> OnLeftButtonDown event to be excurse direct on an object. You use the method
>> AddObserver and RemoveObserver and you schall only implement execute in
>> the class the inherent from vtkCommand.
>>
>> Best regards Kjeld
>>
>>
> This is exactly the problem I am trying to solve. Would you please be so
> kind to elaborate?
>
> Are you telling us we should:
>
> 1. create a callback function.
> 2. create a vtkCallbackCommand object
> 3. assign the callback function to vtkCallbackCommand (ie
> vtkCallbackCommand->SetCallback( callback ))
>
> 4. what next? where do we use AddObserver?
>
> Thank you in advance!
>
> --
> stoptv at gmail.com
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>





More information about the vtkusers mailing list