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 .<br>
<br>Regards<br>Darshan<br><br><div class="gmail_quote">On Tue, Apr 6, 2010 at 5:13 AM, Rakesh Patil <span dir="ltr"><<a href="mailto:rakeshthp@in.com">rakeshthp@in.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hello,<br><br>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.<br>
<br>But when i do this, i noticed the following:<br><br>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..<br>
<br>I tried changing the coordinate system also.. Still the result is unchanged..<br><br>Any suggestions how it is to be done..??<br><br>Thanks<br>Rakesh Patil<br><br><br><div style="border-top: 1px dashed rgb(204, 204, 204); border-bottom: 1px dashed rgb(204, 204, 204); padding: 5px;">
<a href="http://mail.in.com/mails/new_reg.php?utm_source=invite&utm_medium=outgoing" style="font: 13px arial; color: rgb(30, 86, 161); text-decoration: none;" target="_blank">Dear <b>VTK !</b> Get Yourself a cool, short <b>@in.com</b> Email ID now!</a></div>
<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br>