[vtkusers] Picking and Moving 2D Actors an Text

Emiliano Beronich emiliano at veccsa.com
Fri Sep 10 10:00:00 EDT 2004


Hi Andrew,

I have worked with picking and dragging 2D actors on VTK. I develop a 
class descendant from vtkInteractorStyle that detect a pick and moves 
the picked Actor. The files are attached. You can start from this point. 
But this is not the way I work at now. I found a better approach for 
dragging 2D actors like text or a cursor over an image that works well 
on Builder C++. I made a class descendant from the VCL family for text, 
cursors. The advantages are most fonts available, more efficient (it's 
only a 2D pick, the calcule needed is simple, totally different to a 3D 
pick). The routines for moving and picking are managed for the messages 
of Builder. You can try to emulate this behaviour on MFC.

HTH
Emiliano


Andrew Wilford wrote:
> Hi,
> 
> I have recently added 2D actors (simple shapes) and text to my viewer. I am
> having great difficulty in picking and moving these actors. The text does
> not even appear to be pickable and there is limited data on the bounding
> boxes of these actors, so that I could try to implement my own pick/move
> routine in MFC after detecting which actors are under the mouse pick point.
> 
> Can anyway point me in the right direction with this? Have there been recent
> additions to VTK which would help me?
> 
> Thanks,
> Andrew Wilford
> 
> _______________________________________________
> This is the private VTK discussion list. 
> Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
> 
> 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: vtkInteractorStyleDrager2D.h
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20040910/606ee2c6/attachment.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: vtkInteractorStyleDrager2D.cpp
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20040910/606ee2c6/attachment.asc>


More information about the vtkusers mailing list