[vtkusers] Mouse position anytime

Karthik Krishnan karthik.krishnan at kitware.com
Mon Jul 20 08:24:58 EDT 2009


Benoist:

The render window interactor emits an MouseMoveEvent every time the mouse
cursor is moved. The display coordinates can be queried from the interactor.


Numerous widgets in VTK use this to perform various actions such as object
highlighting, annotations etc. Take a look at vtkBalloonWidget and its
generic superclass vtkHoverWidget It may already perform what you need. You
might be able to re-derive vtkHoverWidget to tailor it to your hover based
annotation needs.

At a later stage, you may also find it worthwhile to take a look at
vtkScenePicker if your annotation/interaction starts getting too slow. More
on that later.

--
karthik

On Mon, Jul 20, 2009 at 7:40 AM, Benoist Laurent <laurentbenoist at hotmail.com
> wrote:

>  Hi,
>
> I would like to change the color of the nearest object of the cursor,
> without need to click or something.
> So I need to have the mouse position anytime.
> But I can't find how to do that (I know how to have the position on a move
> click but not "on the fly").
>
> Can someone help me ?
> Thank you by advance,
>
> Benoist
>
> ------------------------------
> Votre correspondant a choisi Hotmail et profite d'un stockage quasiment
> illimité. Créez un compte Hotmail gratuitement !<http://www.windowslive.fr/hotmail/default.asp>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090720/7e66ff46/attachment.htm>


More information about the vtkusers mailing list