[vtkusers] Drawing objects interactively in VTK..??

Darshan Pai darshanpai at gmail.com
Tue Apr 6 11:21:53 EDT 2010


When you are selecting points on the screen they are in display coordinates.
You need to basically unproject it by multipying with the inverse MPV (
model-projection-viewport) matrix . Also you need to specify the depth from
the near clipping plane thats defined .

Regards
Darshan

On Tue, Apr 6, 2010 at 5:13 AM, Rakesh Patil <rakeshthp at in.com> wrote:

> Hello,
>
> I am trying to draw a polyline interactively (with help of mouse). What i'm
> doing is at every left button down event, i get the mouse position and store
> it is a vector list. Later using this points am displaying on the rendering
> window.
>
> But when i do this, i noticed the following:
>
> The mouse position values are totally different from the the points which
> are displayed.. I mean, i click at one location, and it is displayed at far
> end another location..
>
> I tried changing the coordinate system also.. Still the result is
> unchanged..
>
> Any suggestions how it is to be done..??
>
> Thanks
> Rakesh Patil
>
>
> Dear *VTK !* Get Yourself a cool, short *@in.com* Email ID now!<http://mail.in.com/mails/new_reg.php?utm_source=invite&utm_medium=outgoing>
>
> _______________________________________________
> 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/20100406/ea61c116/attachment.htm>


More information about the vtkusers mailing list